@@ -60,116 +60,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
6060 return this .unknownFields ;
6161 }
6262
63- private CVSSv3 (
64- com .google .protobuf .CodedInputStream input ,
65- com .google .protobuf .ExtensionRegistryLite extensionRegistry )
66- throws com .google .protobuf .InvalidProtocolBufferException {
67- this ();
68- if (extensionRegistry == null ) {
69- throw new java .lang .NullPointerException ();
70- }
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 13 :
82- {
83- baseScore_ = input .readFloat ();
84- break ;
85- }
86- case 21 :
87- {
88- exploitabilityScore_ = input .readFloat ();
89- break ;
90- }
91- case 29 :
92- {
93- impactScore_ = input .readFloat ();
94- break ;
95- }
96- case 40 :
97- {
98- int rawValue = input .readEnum ();
99-
100- attackVector_ = rawValue ;
101- break ;
102- }
103- case 48 :
104- {
105- int rawValue = input .readEnum ();
106-
107- attackComplexity_ = rawValue ;
108- break ;
109- }
110- case 56 :
111- {
112- int rawValue = input .readEnum ();
113-
114- privilegesRequired_ = rawValue ;
115- break ;
116- }
117- case 64 :
118- {
119- int rawValue = input .readEnum ();
120-
121- userInteraction_ = rawValue ;
122- break ;
123- }
124- case 72 :
125- {
126- int rawValue = input .readEnum ();
127-
128- scope_ = rawValue ;
129- break ;
130- }
131- case 80 :
132- {
133- int rawValue = input .readEnum ();
134-
135- confidentialityImpact_ = rawValue ;
136- break ;
137- }
138- case 88 :
139- {
140- int rawValue = input .readEnum ();
141-
142- integrityImpact_ = rawValue ;
143- break ;
144- }
145- case 96 :
146- {
147- int rawValue = input .readEnum ();
148-
149- availabilityImpact_ = rawValue ;
150- break ;
151- }
152- default :
153- {
154- if (!parseUnknownField (input , unknownFields , extensionRegistry , tag )) {
155- done = true ;
156- }
157- break ;
158- }
159- }
160- }
161- } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
162- throw e .setUnfinishedMessage (this );
163- } catch (com .google .protobuf .UninitializedMessageException e ) {
164- throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (this );
165- } catch (java .io .IOException e ) {
166- throw new com .google .protobuf .InvalidProtocolBufferException (e ).setUnfinishedMessage (this );
167- } finally {
168- this .unknownFields = unknownFields .build ();
169- makeExtensionsImmutable ();
170- }
171- }
172-
17363 public static final com .google .protobuf .Descriptors .Descriptor getDescriptor () {
17464 return com .google .cloud .osconfig .v1 .VulnerabilityProto
17565 .internal_static_google_cloud_osconfig_v1_CVSSv3_descriptor ;
@@ -1700,7 +1590,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
17001590 != com .google .cloud .osconfig .v1 .CVSSv3 .Impact .IMPACT_UNSPECIFIED .getNumber ()) {
17011591 output .writeEnum (12 , availabilityImpact_ );
17021592 }
1703- unknownFields .writeTo (output );
1593+ getUnknownFields () .writeTo (output );
17041594 }
17051595
17061596 @ java .lang .Override
@@ -1752,7 +1642,7 @@ public int getSerializedSize() {
17521642 != com .google .cloud .osconfig .v1 .CVSSv3 .Impact .IMPACT_UNSPECIFIED .getNumber ()) {
17531643 size += com .google .protobuf .CodedOutputStream .computeEnumSize (12 , availabilityImpact_ );
17541644 }
1755- size += unknownFields .getSerializedSize ();
1645+ size += getUnknownFields () .getSerializedSize ();
17561646 memoizedSize = size ;
17571647 return size ;
17581648 }
@@ -1781,7 +1671,7 @@ public boolean equals(final java.lang.Object obj) {
17811671 if (confidentialityImpact_ != other .confidentialityImpact_ ) return false ;
17821672 if (integrityImpact_ != other .integrityImpact_ ) return false ;
17831673 if (availabilityImpact_ != other .availabilityImpact_ ) return false ;
1784- if (!unknownFields .equals (other .unknownFields )) return false ;
1674+ if (!getUnknownFields () .equals (other .getUnknownFields () )) return false ;
17851675 return true ;
17861676 }
17871677
@@ -1814,7 +1704,7 @@ public int hashCode() {
18141704 hash = (53 * hash ) + integrityImpact_ ;
18151705 hash = (37 * hash ) + AVAILABILITY_IMPACT_FIELD_NUMBER ;
18161706 hash = (53 * hash ) + availabilityImpact_ ;
1817- hash = (29 * hash ) + unknownFields .hashCode ();
1707+ hash = (29 * hash ) + getUnknownFields () .hashCode ();
18181708 memoizedHashCode = hash ;
18191709 return hash ;
18201710 }
@@ -1943,17 +1833,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
19431833 }
19441834
19451835 // Construct using com.google.cloud.osconfig.v1.CVSSv3.newBuilder()
1946- private Builder () {
1947- maybeForceBuilderInitialization ();
1948- }
1836+ private Builder () {}
19491837
19501838 private Builder (com .google .protobuf .GeneratedMessageV3 .BuilderParent parent ) {
19511839 super (parent );
1952- maybeForceBuilderInitialization ();
1953- }
1954-
1955- private void maybeForceBuilderInitialization () {
1956- if (com .google .protobuf .GeneratedMessageV3 .alwaysUseFieldBuilders ) {}
19571840 }
19581841
19591842 @ java .lang .Override
@@ -2100,7 +1983,7 @@ public Builder mergeFrom(com.google.cloud.osconfig.v1.CVSSv3 other) {
21001983 if (other .availabilityImpact_ != 0 ) {
21011984 setAvailabilityImpactValue (other .getAvailabilityImpactValue ());
21021985 }
2103- this .mergeUnknownFields (other .unknownFields );
1986+ this .mergeUnknownFields (other .getUnknownFields () );
21041987 onChanged ();
21051988 return this ;
21061989 }
@@ -2115,17 +1998,97 @@ public Builder mergeFrom(
21151998 com .google .protobuf .CodedInputStream input ,
21161999 com .google .protobuf .ExtensionRegistryLite extensionRegistry )
21172000 throws java .io .IOException {
2118- com .google .cloud .osconfig .v1 .CVSSv3 parsedMessage = null ;
2001+ if (extensionRegistry == null ) {
2002+ throw new java .lang .NullPointerException ();
2003+ }
21192004 try {
2120- parsedMessage = PARSER .parsePartialFrom (input , extensionRegistry );
2005+ boolean done = false ;
2006+ while (!done ) {
2007+ int tag = input .readTag ();
2008+ switch (tag ) {
2009+ case 0 :
2010+ done = true ;
2011+ break ;
2012+ case 13 :
2013+ {
2014+ baseScore_ = input .readFloat ();
2015+
2016+ break ;
2017+ } // case 13
2018+ case 21 :
2019+ {
2020+ exploitabilityScore_ = input .readFloat ();
2021+
2022+ break ;
2023+ } // case 21
2024+ case 29 :
2025+ {
2026+ impactScore_ = input .readFloat ();
2027+
2028+ break ;
2029+ } // case 29
2030+ case 40 :
2031+ {
2032+ attackVector_ = input .readEnum ();
2033+
2034+ break ;
2035+ } // case 40
2036+ case 48 :
2037+ {
2038+ attackComplexity_ = input .readEnum ();
2039+
2040+ break ;
2041+ } // case 48
2042+ case 56 :
2043+ {
2044+ privilegesRequired_ = input .readEnum ();
2045+
2046+ break ;
2047+ } // case 56
2048+ case 64 :
2049+ {
2050+ userInteraction_ = input .readEnum ();
2051+
2052+ break ;
2053+ } // case 64
2054+ case 72 :
2055+ {
2056+ scope_ = input .readEnum ();
2057+
2058+ break ;
2059+ } // case 72
2060+ case 80 :
2061+ {
2062+ confidentialityImpact_ = input .readEnum ();
2063+
2064+ break ;
2065+ } // case 80
2066+ case 88 :
2067+ {
2068+ integrityImpact_ = input .readEnum ();
2069+
2070+ break ;
2071+ } // case 88
2072+ case 96 :
2073+ {
2074+ availabilityImpact_ = input .readEnum ();
2075+
2076+ break ;
2077+ } // case 96
2078+ default :
2079+ {
2080+ if (!super .parseUnknownField (input , extensionRegistry , tag )) {
2081+ done = true ; // was an endgroup tag
2082+ }
2083+ break ;
2084+ } // default:
2085+ } // switch (tag)
2086+ } // while (!done)
21212087 } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
2122- parsedMessage = (com .google .cloud .osconfig .v1 .CVSSv3 ) e .getUnfinishedMessage ();
21232088 throw e .unwrapIOException ();
21242089 } finally {
2125- if (parsedMessage != null ) {
2126- mergeFrom (parsedMessage );
2127- }
2128- }
2090+ onChanged ();
2091+ } // finally
21292092 return this ;
21302093 }
21312094
@@ -3113,7 +3076,18 @@ public CVSSv3 parsePartialFrom(
31133076 com .google .protobuf .CodedInputStream input ,
31143077 com .google .protobuf .ExtensionRegistryLite extensionRegistry )
31153078 throws com .google .protobuf .InvalidProtocolBufferException {
3116- return new CVSSv3 (input , extensionRegistry );
3079+ Builder builder = newBuilder ();
3080+ try {
3081+ builder .mergeFrom (input , extensionRegistry );
3082+ } catch (com .google .protobuf .InvalidProtocolBufferException e ) {
3083+ throw e .setUnfinishedMessage (builder .buildPartial ());
3084+ } catch (com .google .protobuf .UninitializedMessageException e ) {
3085+ throw e .asInvalidProtocolBufferException ().setUnfinishedMessage (builder .buildPartial ());
3086+ } catch (java .io .IOException e ) {
3087+ throw new com .google .protobuf .InvalidProtocolBufferException (e )
3088+ .setUnfinishedMessage (builder .buildPartial ());
3089+ }
3090+ return builder .buildPartial ();
31173091 }
31183092 };
31193093
0 commit comments