@@ -56,66 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
56
56
return this .unknownFields ;
57
57
}
58
58
59
- private CrawledUrl (
60
- com .google .protobuf .CodedInputStream input ,
61
- com .google .protobuf .ExtensionRegistryLite extensionRegistry )
62
- throws com .google .protobuf .InvalidProtocolBufferException {
63
- this ();
64
- if (extensionRegistry == null ) {
65
- throw new java .lang .NullPointerException ();
66
- }
67
- com .google .protobuf .UnknownFieldSet .Builder unknownFields =
68
- com .google .protobuf .UnknownFieldSet .newBuilder ();
69
- try {
70
- boolean done = false ;
71
- while (!done ) {
72
- int tag = input .readTag ();
73
- switch (tag ) {
74
- case 0 :
75
- done = true ;
76
- break ;
77
- case 10 :
78
- {
79
- java .lang .String s = input .readStringRequireUtf8 ();
80
-
81
- httpMethod_ = s ;
82
- break ;
83
- }
84
- case 18 :
85
- {
86
- java .lang .String s = input .readStringRequireUtf8 ();
87
-
88
- url_ = s ;
89
- break ;
90
- }
91
- case 26 :
92
- {
93
- java .lang .String s = input .readStringRequireUtf8 ();
94
-
95
- body_ = s ;
96
- break ;
97
- }
98
- default :
99
- {
100
- if (!parseUnknownField (input , unknownFields , extensionRegistry , tag )) {
101
- done = true ;
102
- }
103
- break ;
104
- }
105
- }
106
- }
107
- } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
108
- throw e .setUnfinishedMessage (this );
109
- } catch (com .google .protobuf .UninitializedMessageException e ) {
110
- throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (this );
111
- } catch (java .io .IOException e ) {
112
- throw new com .google .protobuf .InvalidProtocolBufferException (e ).setUnfinishedMessage (this );
113
- } finally {
114
- this .unknownFields = unknownFields .build ();
115
- makeExtensionsImmutable ();
116
- }
117
- }
118
-
119
59
public static final com .google .protobuf .Descriptors .Descriptor getDescriptor () {
120
60
return com .google .cloud .websecurityscanner .v1 .CrawledUrlProto
121
61
.internal_static_google_cloud_websecurityscanner_v1_CrawledUrl_descriptor ;
@@ -303,7 +243,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
303
243
if (!com .google .protobuf .GeneratedMessageV3 .isStringEmpty (body_ )) {
304
244
com .google .protobuf .GeneratedMessageV3 .writeString (output , 3 , body_ );
305
245
}
306
- unknownFields .writeTo (output );
246
+ getUnknownFields () .writeTo (output );
307
247
}
308
248
309
249
@ java .lang .Override
@@ -321,7 +261,7 @@ public int getSerializedSize() {
321
261
if (!com .google .protobuf .GeneratedMessageV3 .isStringEmpty (body_ )) {
322
262
size += com .google .protobuf .GeneratedMessageV3 .computeStringSize (3 , body_ );
323
263
}
324
- size += unknownFields .getSerializedSize ();
264
+ size += getUnknownFields () .getSerializedSize ();
325
265
memoizedSize = size ;
326
266
return size ;
327
267
}
@@ -340,7 +280,7 @@ public boolean equals(final java.lang.Object obj) {
340
280
if (!getHttpMethod ().equals (other .getHttpMethod ())) return false ;
341
281
if (!getUrl ().equals (other .getUrl ())) return false ;
342
282
if (!getBody ().equals (other .getBody ())) return false ;
343
- if (!unknownFields .equals (other .unknownFields )) return false ;
283
+ if (!getUnknownFields () .equals (other .getUnknownFields () )) return false ;
344
284
return true ;
345
285
}
346
286
@@ -357,7 +297,7 @@ public int hashCode() {
357
297
hash = (53 * hash ) + getUrl ().hashCode ();
358
298
hash = (37 * hash ) + BODY_FIELD_NUMBER ;
359
299
hash = (53 * hash ) + getBody ().hashCode ();
360
- hash = (29 * hash ) + unknownFields .hashCode ();
300
+ hash = (29 * hash ) + getUnknownFields () .hashCode ();
361
301
memoizedHashCode = hash ;
362
302
return hash ;
363
303
}
@@ -488,17 +428,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
488
428
}
489
429
490
430
// Construct using com.google.cloud.websecurityscanner.v1.CrawledUrl.newBuilder()
491
- private Builder () {
492
- maybeForceBuilderInitialization ();
493
- }
431
+ private Builder () {}
494
432
495
433
private Builder (com .google .protobuf .GeneratedMessageV3 .BuilderParent parent ) {
496
434
super (parent );
497
- maybeForceBuilderInitialization ();
498
- }
499
-
500
- private void maybeForceBuilderInitialization () {
501
- if (com .google .protobuf .GeneratedMessageV3 .alwaysUseFieldBuilders ) {}
502
435
}
503
436
504
437
@ java .lang .Override
@@ -602,7 +535,7 @@ public Builder mergeFrom(com.google.cloud.websecurityscanner.v1.CrawledUrl other
602
535
body_ = other .body_ ;
603
536
onChanged ();
604
537
}
605
- this .mergeUnknownFields (other .unknownFields );
538
+ this .mergeUnknownFields (other .getUnknownFields () );
606
539
onChanged ();
607
540
return this ;
608
541
}
@@ -617,18 +550,49 @@ public Builder mergeFrom(
617
550
com .google .protobuf .CodedInputStream input ,
618
551
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
619
552
throws java .io .IOException {
620
- com .google .cloud .websecurityscanner .v1 .CrawledUrl parsedMessage = null ;
553
+ if (extensionRegistry == null ) {
554
+ throw new java .lang .NullPointerException ();
555
+ }
621
556
try {
622
- parsedMessage = PARSER .parsePartialFrom (input , extensionRegistry );
557
+ boolean done = false ;
558
+ while (!done ) {
559
+ int tag = input .readTag ();
560
+ switch (tag ) {
561
+ case 0 :
562
+ done = true ;
563
+ break ;
564
+ case 10 :
565
+ {
566
+ httpMethod_ = input .readStringRequireUtf8 ();
567
+
568
+ break ;
569
+ } // case 10
570
+ case 18 :
571
+ {
572
+ url_ = input .readStringRequireUtf8 ();
573
+
574
+ break ;
575
+ } // case 18
576
+ case 26 :
577
+ {
578
+ body_ = input .readStringRequireUtf8 ();
579
+
580
+ break ;
581
+ } // case 26
582
+ default :
583
+ {
584
+ if (!super .parseUnknownField (input , extensionRegistry , tag )) {
585
+ done = true ; // was an endgroup tag
586
+ }
587
+ break ;
588
+ } // default:
589
+ } // switch (tag)
590
+ } // while (!done)
623
591
} catch (com .google .protobuf .InvalidProtocolBufferException e ) {
624
- parsedMessage =
625
- (com .google .cloud .websecurityscanner .v1 .CrawledUrl ) e .getUnfinishedMessage ();
626
592
throw e .unwrapIOException ();
627
593
} finally {
628
- if (parsedMessage != null ) {
629
- mergeFrom (parsedMessage );
630
- }
631
- }
594
+ onChanged ();
595
+ } // finally
632
596
return this ;
633
597
}
634
598
@@ -987,7 +951,18 @@ public CrawledUrl parsePartialFrom(
987
951
com .google .protobuf .CodedInputStream input ,
988
952
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
989
953
throws com .google .protobuf .InvalidProtocolBufferException {
990
- return new CrawledUrl (input , extensionRegistry );
954
+ Builder builder = newBuilder ();
955
+ try {
956
+ builder .mergeFrom (input , extensionRegistry );
957
+ } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
958
+ throw e .setUnfinishedMessage (builder .buildPartial ());
959
+ } catch (com .google .protobuf .UninitializedMessageException e ) {
960
+ throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (builder .buildPartial ());
961
+ } catch (java .io .IOException e ) {
962
+ throw new com .google .protobuf .InvalidProtocolBufferException (e )
963
+ .setUnfinishedMessage (builder .buildPartial ());
964
+ }
965
+ return builder .buildPartial ();
991
966
}
992
967
};
993
968
0 commit comments