@@ -59,73 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
59
59
return this .unknownFields ;
60
60
}
61
61
62
- private AdmissionRule (
63
- com .google .protobuf .CodedInputStream input ,
64
- com .google .protobuf .ExtensionRegistryLite extensionRegistry )
65
- throws com .google .protobuf .InvalidProtocolBufferException {
66
- this ();
67
- if (extensionRegistry == null ) {
68
- throw new java .lang .NullPointerException ();
69
- }
70
- int mutable_bitField0_ = 0 ;
71
- com .google .protobuf .UnknownFieldSet .Builder unknownFields =
72
- com .google .protobuf .UnknownFieldSet .newBuilder ();
73
- try {
74
- boolean done = false ;
75
- while (!done ) {
76
- int tag = input .readTag ();
77
- switch (tag ) {
78
- case 0 :
79
- done = true ;
80
- break ;
81
- case 8 :
82
- {
83
- int rawValue = input .readEnum ();
84
-
85
- evaluationMode_ = rawValue ;
86
- break ;
87
- }
88
- case 18 :
89
- {
90
- java .lang .String s = input .readStringRequireUtf8 ();
91
- if (!((mutable_bitField0_ & 0x00000001 ) != 0 )) {
92
- requireAttestationsBy_ = new com .google .protobuf .LazyStringArrayList ();
93
- mutable_bitField0_ |= 0x00000001 ;
94
- }
95
- requireAttestationsBy_ .add (s );
96
- break ;
97
- }
98
- case 24 :
99
- {
100
- int rawValue = input .readEnum ();
101
-
102
- enforcementMode_ = rawValue ;
103
- break ;
104
- }
105
- default :
106
- {
107
- if (!parseUnknownField (input , unknownFields , extensionRegistry , tag )) {
108
- done = true ;
109
- }
110
- break ;
111
- }
112
- }
113
- }
114
- } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
115
- throw e .setUnfinishedMessage (this );
116
- } catch (com .google .protobuf .UninitializedMessageException e ) {
117
- throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (this );
118
- } catch (java .io .IOException e ) {
119
- throw new com .google .protobuf .InvalidProtocolBufferException (e ).setUnfinishedMessage (this );
120
- } finally {
121
- if (((mutable_bitField0_ & 0x00000001 ) != 0 )) {
122
- requireAttestationsBy_ = requireAttestationsBy_ .getUnmodifiableView ();
123
- }
124
- this .unknownFields = unknownFields .build ();
125
- makeExtensionsImmutable ();
126
- }
127
- }
128
-
129
62
public static final com .google .protobuf .Descriptors .Descriptor getDescriptor () {
130
63
return com .google .cloud .binaryauthorization .v1beta1 .BinaryAuthorizationResourcesProto
131
64
.internal_static_google_cloud_binaryauthorization_v1beta1_AdmissionRule_descriptor ;
@@ -689,7 +622,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
689
622
.getNumber ()) {
690
623
output .writeEnum (3 , enforcementMode_ );
691
624
}
692
- unknownFields .writeTo (output );
625
+ getUnknownFields () .writeTo (output );
693
626
}
694
627
695
628
@ java .lang .Override
@@ -718,7 +651,7 @@ public int getSerializedSize() {
718
651
.getNumber ()) {
719
652
size += com .google .protobuf .CodedOutputStream .computeEnumSize (3 , enforcementMode_ );
720
653
}
721
- size += unknownFields .getSerializedSize ();
654
+ size += getUnknownFields () .getSerializedSize ();
722
655
memoizedSize = size ;
723
656
return size ;
724
657
}
@@ -737,7 +670,7 @@ public boolean equals(final java.lang.Object obj) {
737
670
if (evaluationMode_ != other .evaluationMode_ ) return false ;
738
671
if (!getRequireAttestationsByList ().equals (other .getRequireAttestationsByList ())) return false ;
739
672
if (enforcementMode_ != other .enforcementMode_ ) return false ;
740
- if (!unknownFields .equals (other .unknownFields )) return false ;
673
+ if (!getUnknownFields () .equals (other .getUnknownFields () )) return false ;
741
674
return true ;
742
675
}
743
676
@@ -756,7 +689,7 @@ public int hashCode() {
756
689
}
757
690
hash = (37 * hash ) + ENFORCEMENT_MODE_FIELD_NUMBER ;
758
691
hash = (53 * hash ) + enforcementMode_ ;
759
- hash = (29 * hash ) + unknownFields .hashCode ();
692
+ hash = (29 * hash ) + getUnknownFields () .hashCode ();
760
693
memoizedHashCode = hash ;
761
694
return hash ;
762
695
}
@@ -891,17 +824,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
891
824
}
892
825
893
826
// Construct using com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.newBuilder()
894
- private Builder () {
895
- maybeForceBuilderInitialization ();
896
- }
827
+ private Builder () {}
897
828
898
829
private Builder (com .google .protobuf .GeneratedMessageV3 .BuilderParent parent ) {
899
830
super (parent );
900
- maybeForceBuilderInitialization ();
901
- }
902
-
903
- private void maybeForceBuilderInitialization () {
904
- if (com .google .protobuf .GeneratedMessageV3 .alwaysUseFieldBuilders ) {}
905
831
}
906
832
907
833
@ java .lang .Override
@@ -1014,7 +940,7 @@ public Builder mergeFrom(com.google.cloud.binaryauthorization.v1beta1.AdmissionR
1014
940
if (other .enforcementMode_ != 0 ) {
1015
941
setEnforcementModeValue (other .getEnforcementModeValue ());
1016
942
}
1017
- this .mergeUnknownFields (other .unknownFields );
943
+ this .mergeUnknownFields (other .getUnknownFields () );
1018
944
onChanged ();
1019
945
return this ;
1020
946
}
@@ -1029,18 +955,50 @@ public Builder mergeFrom(
1029
955
com .google .protobuf .CodedInputStream input ,
1030
956
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
1031
957
throws java .io .IOException {
1032
- com .google .cloud .binaryauthorization .v1beta1 .AdmissionRule parsedMessage = null ;
958
+ if (extensionRegistry == null ) {
959
+ throw new java .lang .NullPointerException ();
960
+ }
1033
961
try {
1034
- parsedMessage = PARSER .parsePartialFrom (input , extensionRegistry );
962
+ boolean done = false ;
963
+ while (!done ) {
964
+ int tag = input .readTag ();
965
+ switch (tag ) {
966
+ case 0 :
967
+ done = true ;
968
+ break ;
969
+ case 8 :
970
+ {
971
+ evaluationMode_ = input .readEnum ();
972
+
973
+ break ;
974
+ } // case 8
975
+ case 18 :
976
+ {
977
+ java .lang .String s = input .readStringRequireUtf8 ();
978
+ ensureRequireAttestationsByIsMutable ();
979
+ requireAttestationsBy_ .add (s );
980
+ break ;
981
+ } // case 18
982
+ case 24 :
983
+ {
984
+ enforcementMode_ = input .readEnum ();
985
+
986
+ break ;
987
+ } // case 24
988
+ default :
989
+ {
990
+ if (!super .parseUnknownField (input , extensionRegistry , tag )) {
991
+ done = true ; // was an endgroup tag
992
+ }
993
+ break ;
994
+ } // default:
995
+ } // switch (tag)
996
+ } // while (!done)
1035
997
} catch (com .google .protobuf .InvalidProtocolBufferException e ) {
1036
- parsedMessage =
1037
- (com .google .cloud .binaryauthorization .v1beta1 .AdmissionRule ) e .getUnfinishedMessage ();
1038
998
throw e .unwrapIOException ();
1039
999
} finally {
1040
- if (parsedMessage != null ) {
1041
- mergeFrom (parsedMessage );
1042
- }
1043
- }
1000
+ onChanged ();
1001
+ } // finally
1044
1002
return this ;
1045
1003
}
1046
1004
@@ -1522,7 +1480,18 @@ public AdmissionRule parsePartialFrom(
1522
1480
com .google .protobuf .CodedInputStream input ,
1523
1481
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
1524
1482
throws com .google .protobuf .InvalidProtocolBufferException {
1525
- return new AdmissionRule (input , extensionRegistry );
1483
+ Builder builder = newBuilder ();
1484
+ try {
1485
+ builder .mergeFrom (input , extensionRegistry );
1486
+ } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
1487
+ throw e .setUnfinishedMessage (builder .buildPartial ());
1488
+ } catch (com .google .protobuf .UninitializedMessageException e ) {
1489
+ throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (builder .buildPartial ());
1490
+ } catch (java .io .IOException e ) {
1491
+ throw new com .google .protobuf .InvalidProtocolBufferException (e )
1492
+ .setUnfinishedMessage (builder .buildPartial ());
1493
+ }
1494
+ return builder .buildPartial ();
1526
1495
}
1527
1496
};
1528
1497
0 commit comments