@@ -1134,210 +1134,6 @@ impl ::protobuf::reflect::ProtobufValue for KeyValue {
1134
1134
}
1135
1135
}
1136
1136
1137
- #[ derive( PartialEq , Clone , Default ) ]
1138
- #[ cfg_attr( feature = "with-serde" , derive( :: serde:: Serialize , :: serde:: Deserialize ) ) ]
1139
- pub struct StringKeyValue {
1140
- // message fields
1141
- pub key : :: std:: string:: String ,
1142
- pub value : :: std:: string:: String ,
1143
- // special fields
1144
- #[ cfg_attr( feature = "with-serde" , serde( skip) ) ]
1145
- pub unknown_fields : :: protobuf:: UnknownFields ,
1146
- #[ cfg_attr( feature = "with-serde" , serde( skip) ) ]
1147
- pub cached_size : :: protobuf:: CachedSize ,
1148
- }
1149
-
1150
- impl < ' a > :: std:: default:: Default for & ' a StringKeyValue {
1151
- fn default ( ) -> & ' a StringKeyValue {
1152
- <StringKeyValue as :: protobuf:: Message >:: default_instance ( )
1153
- }
1154
- }
1155
-
1156
- impl StringKeyValue {
1157
- pub fn new ( ) -> StringKeyValue {
1158
- :: std:: default:: Default :: default ( )
1159
- }
1160
-
1161
- // string key = 1;
1162
-
1163
-
1164
- pub fn get_key ( & self ) -> & str {
1165
- & self . key
1166
- }
1167
- pub fn clear_key ( & mut self ) {
1168
- self . key . clear ( ) ;
1169
- }
1170
-
1171
- // Param is passed by value, moved
1172
- pub fn set_key ( & mut self , v : :: std:: string:: String ) {
1173
- self . key = v;
1174
- }
1175
-
1176
- // Mutable pointer to the field.
1177
- // If field is not initialized, it is initialized with default value first.
1178
- pub fn mut_key ( & mut self ) -> & mut :: std:: string:: String {
1179
- & mut self . key
1180
- }
1181
-
1182
- // Take field
1183
- pub fn take_key ( & mut self ) -> :: std:: string:: String {
1184
- :: std:: mem:: replace ( & mut self . key , :: std:: string:: String :: new ( ) )
1185
- }
1186
-
1187
- // string value = 2;
1188
-
1189
-
1190
- pub fn get_value ( & self ) -> & str {
1191
- & self . value
1192
- }
1193
- pub fn clear_value ( & mut self ) {
1194
- self . value . clear ( ) ;
1195
- }
1196
-
1197
- // Param is passed by value, moved
1198
- pub fn set_value ( & mut self , v : :: std:: string:: String ) {
1199
- self . value = v;
1200
- }
1201
-
1202
- // Mutable pointer to the field.
1203
- // If field is not initialized, it is initialized with default value first.
1204
- pub fn mut_value ( & mut self ) -> & mut :: std:: string:: String {
1205
- & mut self . value
1206
- }
1207
-
1208
- // Take field
1209
- pub fn take_value ( & mut self ) -> :: std:: string:: String {
1210
- :: std:: mem:: replace ( & mut self . value , :: std:: string:: String :: new ( ) )
1211
- }
1212
- }
1213
-
1214
- impl :: protobuf:: Message for StringKeyValue {
1215
- fn is_initialized ( & self ) -> bool {
1216
- true
1217
- }
1218
-
1219
- fn merge_from ( & mut self , is : & mut :: protobuf:: CodedInputStream < ' _ > ) -> :: protobuf:: ProtobufResult < ( ) > {
1220
- while !is. eof ( ) ? {
1221
- let ( field_number, wire_type) = is. read_tag_unpack ( ) ?;
1222
- match field_number {
1223
- 1 => {
1224
- :: protobuf:: rt:: read_singular_proto3_string_into ( wire_type, is, & mut self . key ) ?;
1225
- } ,
1226
- 2 => {
1227
- :: protobuf:: rt:: read_singular_proto3_string_into ( wire_type, is, & mut self . value ) ?;
1228
- } ,
1229
- _ => {
1230
- :: protobuf:: rt:: read_unknown_or_skip_group ( field_number, wire_type, is, self . mut_unknown_fields ( ) ) ?;
1231
- } ,
1232
- } ;
1233
- }
1234
- :: std:: result:: Result :: Ok ( ( ) )
1235
- }
1236
-
1237
- // Compute sizes of nested messages
1238
- #[ allow( unused_variables) ]
1239
- fn compute_size ( & self ) -> u32 {
1240
- let mut my_size = 0 ;
1241
- if !self . key . is_empty ( ) {
1242
- my_size += :: protobuf:: rt:: string_size ( 1 , & self . key ) ;
1243
- }
1244
- if !self . value . is_empty ( ) {
1245
- my_size += :: protobuf:: rt:: string_size ( 2 , & self . value ) ;
1246
- }
1247
- my_size += :: protobuf:: rt:: unknown_fields_size ( self . get_unknown_fields ( ) ) ;
1248
- self . cached_size . set ( my_size) ;
1249
- my_size
1250
- }
1251
-
1252
- fn write_to_with_cached_sizes ( & self , os : & mut :: protobuf:: CodedOutputStream < ' _ > ) -> :: protobuf:: ProtobufResult < ( ) > {
1253
- if !self . key . is_empty ( ) {
1254
- os. write_string ( 1 , & self . key ) ?;
1255
- }
1256
- if !self . value . is_empty ( ) {
1257
- os. write_string ( 2 , & self . value ) ?;
1258
- }
1259
- os. write_unknown_fields ( self . get_unknown_fields ( ) ) ?;
1260
- :: std:: result:: Result :: Ok ( ( ) )
1261
- }
1262
-
1263
- fn get_cached_size ( & self ) -> u32 {
1264
- self . cached_size . get ( )
1265
- }
1266
-
1267
- fn get_unknown_fields ( & self ) -> & :: protobuf:: UnknownFields {
1268
- & self . unknown_fields
1269
- }
1270
-
1271
- fn mut_unknown_fields ( & mut self ) -> & mut :: protobuf:: UnknownFields {
1272
- & mut self . unknown_fields
1273
- }
1274
-
1275
- fn as_any ( & self ) -> & dyn ( :: std:: any:: Any ) {
1276
- self as & dyn ( :: std:: any:: Any )
1277
- }
1278
- fn as_any_mut ( & mut self ) -> & mut dyn ( :: std:: any:: Any ) {
1279
- self as & mut dyn ( :: std:: any:: Any )
1280
- }
1281
- fn into_any ( self : :: std:: boxed:: Box < Self > ) -> :: std:: boxed:: Box < dyn ( :: std:: any:: Any ) > {
1282
- self
1283
- }
1284
-
1285
- fn descriptor ( & self ) -> & ' static :: protobuf:: reflect:: MessageDescriptor {
1286
- Self :: descriptor_static ( )
1287
- }
1288
-
1289
- fn new ( ) -> StringKeyValue {
1290
- StringKeyValue :: new ( )
1291
- }
1292
-
1293
- fn descriptor_static ( ) -> & ' static :: protobuf:: reflect:: MessageDescriptor {
1294
- static descriptor: :: protobuf:: rt:: LazyV2 < :: protobuf:: reflect:: MessageDescriptor > = :: protobuf:: rt:: LazyV2 :: INIT ;
1295
- descriptor. get ( || {
1296
- let mut fields = :: std:: vec:: Vec :: new ( ) ;
1297
- fields. push ( :: protobuf:: reflect:: accessor:: make_simple_field_accessor :: < _ , :: protobuf:: types:: ProtobufTypeString > (
1298
- "key" ,
1299
- |m : & StringKeyValue | { & m. key } ,
1300
- |m : & mut StringKeyValue | { & mut m. key } ,
1301
- ) ) ;
1302
- fields. push ( :: protobuf:: reflect:: accessor:: make_simple_field_accessor :: < _ , :: protobuf:: types:: ProtobufTypeString > (
1303
- "value" ,
1304
- |m : & StringKeyValue | { & m. value } ,
1305
- |m : & mut StringKeyValue | { & mut m. value } ,
1306
- ) ) ;
1307
- :: protobuf:: reflect:: MessageDescriptor :: new_pb_name :: < StringKeyValue > (
1308
- "StringKeyValue" ,
1309
- fields,
1310
- file_descriptor_proto ( )
1311
- )
1312
- } )
1313
- }
1314
-
1315
- fn default_instance ( ) -> & ' static StringKeyValue {
1316
- static instance: :: protobuf:: rt:: LazyV2 < StringKeyValue > = :: protobuf:: rt:: LazyV2 :: INIT ;
1317
- instance. get ( StringKeyValue :: new)
1318
- }
1319
- }
1320
-
1321
- impl :: protobuf:: Clear for StringKeyValue {
1322
- fn clear ( & mut self ) {
1323
- self . key . clear ( ) ;
1324
- self . value . clear ( ) ;
1325
- self . unknown_fields . clear ( ) ;
1326
- }
1327
- }
1328
-
1329
- impl :: std:: fmt:: Debug for StringKeyValue {
1330
- fn fmt ( & self , f : & mut :: std:: fmt:: Formatter < ' _ > ) -> :: std:: fmt:: Result {
1331
- :: protobuf:: text_format:: fmt ( self , f)
1332
- }
1333
- }
1334
-
1335
- impl :: protobuf:: reflect:: ProtobufValue for StringKeyValue {
1336
- fn as_ref ( & self ) -> :: protobuf:: reflect:: ReflectValueRef {
1337
- :: protobuf:: reflect:: ReflectValueRef :: Message ( self )
1338
- }
1339
- }
1340
-
1341
1137
#[ derive( PartialEq , Clone , Default ) ]
1342
1138
#[ cfg_attr( feature = "with-serde" , derive( :: serde:: Serialize , :: serde:: Deserialize ) ) ]
1343
1139
pub struct InstrumentationLibrary {
@@ -1557,12 +1353,10 @@ static file_descriptor_proto_data: &'static [u8] = b"\
1557
1353
\x20 \x03 (\x0b 2'.opentelemetry.proto.common.v1.KeyValueR\x06 values\" [\n \
1558
1354
\x08 KeyValue\x12 \x10 \n \x03 key\x18 \x01 \x20 \x01 (\t R\x03 key\x12 =\n \x05 value\
1559
1355
\x18 \x02 \x20 \x01 (\x0b 2'.opentelemetry.proto.common.v1.AnyValueR\x05 value\
1560
- \" <\n \x0e StringKeyValue\x12 \x10 \n \x03 key\x18 \x01 \x20 \x01 (\t R\x03 key\x12 \
1561
- \x14 \n \x05 value\x18 \x02 \x20 \x01 (\t R\x05 value:\x02 \x18 \x01 \" F\n \x16 Instru\
1562
- mentationLibrary\x12 \x12 \n \x04 name\x18 \x01 \x20 \x01 (\t R\x04 name\x12 \x18 \n \
1563
- \x07 version\x18 \x02 \x20 \x01 (\t R\x07 versionBq\n \x20 io.opentelemetry.proto\
1564
- .common.v1B\x0b CommonProtoP\x01 Z>github.com/open-telemetry/opentelemetry\
1565
- -proto/gen/go/common/v1b\x06 proto3\
1356
+ \" F\n \x16 InstrumentationLibrary\x12 \x12 \n \x04 name\x18 \x01 \x20 \x01 (\t R\
1357
+ \x04 name\x12 \x18 \n \x07 version\x18 \x02 \x20 \x01 (\t R\x07 versionB[\n \x20 io.o\
1358
+ pentelemetry.proto.common.v1B\x0b CommonProtoP\x01 Z(go.opentelemetry.io/p\
1359
+ roto/otlp/common/v1b\x06 proto3\
1566
1360
";
1567
1361
1568
1362
static file_descriptor_proto_lazy: :: protobuf:: rt:: LazyV2 < :: protobuf:: descriptor:: FileDescriptorProto > = :: protobuf:: rt:: LazyV2 :: INIT ;
0 commit comments