@@ -60,116 +60,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
60
60
return this .unknownFields ;
61
61
}
62
62
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
-
173
63
public static final com .google .protobuf .Descriptors .Descriptor getDescriptor () {
174
64
return com .google .cloud .osconfig .v1 .VulnerabilityProto
175
65
.internal_static_google_cloud_osconfig_v1_CVSSv3_descriptor ;
@@ -1700,7 +1590,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
1700
1590
!= com .google .cloud .osconfig .v1 .CVSSv3 .Impact .IMPACT_UNSPECIFIED .getNumber ()) {
1701
1591
output .writeEnum (12 , availabilityImpact_ );
1702
1592
}
1703
- unknownFields .writeTo (output );
1593
+ getUnknownFields () .writeTo (output );
1704
1594
}
1705
1595
1706
1596
@ java .lang .Override
@@ -1752,7 +1642,7 @@ public int getSerializedSize() {
1752
1642
!= com .google .cloud .osconfig .v1 .CVSSv3 .Impact .IMPACT_UNSPECIFIED .getNumber ()) {
1753
1643
size += com .google .protobuf .CodedOutputStream .computeEnumSize (12 , availabilityImpact_ );
1754
1644
}
1755
- size += unknownFields .getSerializedSize ();
1645
+ size += getUnknownFields () .getSerializedSize ();
1756
1646
memoizedSize = size ;
1757
1647
return size ;
1758
1648
}
@@ -1781,7 +1671,7 @@ public boolean equals(final java.lang.Object obj) {
1781
1671
if (confidentialityImpact_ != other .confidentialityImpact_ ) return false ;
1782
1672
if (integrityImpact_ != other .integrityImpact_ ) return false ;
1783
1673
if (availabilityImpact_ != other .availabilityImpact_ ) return false ;
1784
- if (!unknownFields .equals (other .unknownFields )) return false ;
1674
+ if (!getUnknownFields () .equals (other .getUnknownFields () )) return false ;
1785
1675
return true ;
1786
1676
}
1787
1677
@@ -1814,7 +1704,7 @@ public int hashCode() {
1814
1704
hash = (53 * hash ) + integrityImpact_ ;
1815
1705
hash = (37 * hash ) + AVAILABILITY_IMPACT_FIELD_NUMBER ;
1816
1706
hash = (53 * hash ) + availabilityImpact_ ;
1817
- hash = (29 * hash ) + unknownFields .hashCode ();
1707
+ hash = (29 * hash ) + getUnknownFields () .hashCode ();
1818
1708
memoizedHashCode = hash ;
1819
1709
return hash ;
1820
1710
}
@@ -1943,17 +1833,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
1943
1833
}
1944
1834
1945
1835
// Construct using com.google.cloud.osconfig.v1.CVSSv3.newBuilder()
1946
- private Builder () {
1947
- maybeForceBuilderInitialization ();
1948
- }
1836
+ private Builder () {}
1949
1837
1950
1838
private Builder (com .google .protobuf .GeneratedMessageV3 .BuilderParent parent ) {
1951
1839
super (parent );
1952
- maybeForceBuilderInitialization ();
1953
- }
1954
-
1955
- private void maybeForceBuilderInitialization () {
1956
- if (com .google .protobuf .GeneratedMessageV3 .alwaysUseFieldBuilders ) {}
1957
1840
}
1958
1841
1959
1842
@ java .lang .Override
@@ -2100,7 +1983,7 @@ public Builder mergeFrom(com.google.cloud.osconfig.v1.CVSSv3 other) {
2100
1983
if (other .availabilityImpact_ != 0 ) {
2101
1984
setAvailabilityImpactValue (other .getAvailabilityImpactValue ());
2102
1985
}
2103
- this .mergeUnknownFields (other .unknownFields );
1986
+ this .mergeUnknownFields (other .getUnknownFields () );
2104
1987
onChanged ();
2105
1988
return this ;
2106
1989
}
@@ -2115,17 +1998,97 @@ public Builder mergeFrom(
2115
1998
com .google .protobuf .CodedInputStream input ,
2116
1999
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
2117
2000
throws java .io .IOException {
2118
- com .google .cloud .osconfig .v1 .CVSSv3 parsedMessage = null ;
2001
+ if (extensionRegistry == null ) {
2002
+ throw new java .lang .NullPointerException ();
2003
+ }
2119
2004
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)
2121
2087
} catch (com .google .protobuf .InvalidProtocolBufferException e ) {
2122
- parsedMessage = (com .google .cloud .osconfig .v1 .CVSSv3 ) e .getUnfinishedMessage ();
2123
2088
throw e .unwrapIOException ();
2124
2089
} finally {
2125
- if (parsedMessage != null ) {
2126
- mergeFrom (parsedMessage );
2127
- }
2128
- }
2090
+ onChanged ();
2091
+ } // finally
2129
2092
return this ;
2130
2093
}
2131
2094
@@ -3113,7 +3076,18 @@ public CVSSv3 parsePartialFrom(
3113
3076
com .google .protobuf .CodedInputStream input ,
3114
3077
com .google .protobuf .ExtensionRegistryLite extensionRegistry )
3115
3078
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 ();
3117
3091
}
3118
3092
};
3119
3093
0 commit comments