steam_vent_proto_steam/generated/
steamnetworkingsockets_messages_certs.rs

1// This file is generated by rust-protobuf 3.5.1. Do not edit
2// .proto file is parsed by pure
3// @generated
4
5// https://github.com/rust-lang/rust-clippy/issues/702
6#![allow(unknown_lints)]
7#![allow(clippy::all)]
8
9#![allow(unused_attributes)]
10#![cfg_attr(rustfmt, rustfmt::skip)]
11
12#![allow(dead_code)]
13#![allow(missing_docs)]
14#![allow(non_camel_case_types)]
15#![allow(non_snake_case)]
16#![allow(non_upper_case_globals)]
17#![allow(trivial_casts)]
18#![allow(unused_results)]
19#![allow(unused_mut)]
20
21//! Generated file from `steamnetworkingsockets_messages_certs.proto`
22// Generated for lite runtime
23
24/// Generated files are compatible only with the same version
25/// of protobuf runtime.
26const _PROTOBUF_VERSION_CHECK: () = ::steam_vent_proto_common::protobuf::VERSION_3_5_1;
27
28// @@protoc_insertion_point(message:CMsgSteamNetworkingIdentityLegacyBinary)
29#[derive(PartialEq,Clone,Default,Debug)]
30pub struct CMsgSteamNetworkingIdentityLegacyBinary {
31    // message fields
32    // @@protoc_insertion_point(field:CMsgSteamNetworkingIdentityLegacyBinary.steam_id)
33    pub steam_id: ::std::option::Option<u64>,
34    // @@protoc_insertion_point(field:CMsgSteamNetworkingIdentityLegacyBinary.xbox_pairwise_id)
35    pub xbox_pairwise_id: ::std::option::Option<::std::string::String>,
36    // @@protoc_insertion_point(field:CMsgSteamNetworkingIdentityLegacyBinary.generic_bytes)
37    pub generic_bytes: ::std::option::Option<::std::vec::Vec<u8>>,
38    // @@protoc_insertion_point(field:CMsgSteamNetworkingIdentityLegacyBinary.generic_string)
39    pub generic_string: ::std::option::Option<::std::string::String>,
40    // @@protoc_insertion_point(field:CMsgSteamNetworkingIdentityLegacyBinary.ipv6_and_port)
41    pub ipv6_and_port: ::std::option::Option<::std::vec::Vec<u8>>,
42    // special fields
43    // @@protoc_insertion_point(special_field:CMsgSteamNetworkingIdentityLegacyBinary.special_fields)
44    pub special_fields: ::steam_vent_proto_common::protobuf::SpecialFields,
45}
46
47impl<'a> ::std::default::Default for &'a CMsgSteamNetworkingIdentityLegacyBinary {
48    fn default() -> &'a CMsgSteamNetworkingIdentityLegacyBinary {
49        <CMsgSteamNetworkingIdentityLegacyBinary as ::steam_vent_proto_common::protobuf::Message>::default_instance()
50    }
51}
52
53impl CMsgSteamNetworkingIdentityLegacyBinary {
54    pub fn new() -> CMsgSteamNetworkingIdentityLegacyBinary {
55        ::std::default::Default::default()
56    }
57
58    // optional fixed64 steam_id = 16;
59
60    pub fn steam_id(&self) -> u64 {
61        self.steam_id.unwrap_or(0)
62    }
63
64    pub fn clear_steam_id(&mut self) {
65        self.steam_id = ::std::option::Option::None;
66    }
67
68    pub fn has_steam_id(&self) -> bool {
69        self.steam_id.is_some()
70    }
71
72    // Param is passed by value, moved
73    pub fn set_steam_id(&mut self, v: u64) {
74        self.steam_id = ::std::option::Option::Some(v);
75    }
76
77    // optional string xbox_pairwise_id = 17;
78
79    pub fn xbox_pairwise_id(&self) -> &str {
80        match self.xbox_pairwise_id.as_ref() {
81            Some(v) => v,
82            None => "",
83        }
84    }
85
86    pub fn clear_xbox_pairwise_id(&mut self) {
87        self.xbox_pairwise_id = ::std::option::Option::None;
88    }
89
90    pub fn has_xbox_pairwise_id(&self) -> bool {
91        self.xbox_pairwise_id.is_some()
92    }
93
94    // Param is passed by value, moved
95    pub fn set_xbox_pairwise_id(&mut self, v: ::std::string::String) {
96        self.xbox_pairwise_id = ::std::option::Option::Some(v);
97    }
98
99    // Mutable pointer to the field.
100    // If field is not initialized, it is initialized with default value first.
101    pub fn mut_xbox_pairwise_id(&mut self) -> &mut ::std::string::String {
102        if self.xbox_pairwise_id.is_none() {
103            self.xbox_pairwise_id = ::std::option::Option::Some(::std::string::String::new());
104        }
105        self.xbox_pairwise_id.as_mut().unwrap()
106    }
107
108    // Take field
109    pub fn take_xbox_pairwise_id(&mut self) -> ::std::string::String {
110        self.xbox_pairwise_id.take().unwrap_or_else(|| ::std::string::String::new())
111    }
112
113    // optional bytes generic_bytes = 2;
114
115    pub fn generic_bytes(&self) -> &[u8] {
116        match self.generic_bytes.as_ref() {
117            Some(v) => v,
118            None => &[],
119        }
120    }
121
122    pub fn clear_generic_bytes(&mut self) {
123        self.generic_bytes = ::std::option::Option::None;
124    }
125
126    pub fn has_generic_bytes(&self) -> bool {
127        self.generic_bytes.is_some()
128    }
129
130    // Param is passed by value, moved
131    pub fn set_generic_bytes(&mut self, v: ::std::vec::Vec<u8>) {
132        self.generic_bytes = ::std::option::Option::Some(v);
133    }
134
135    // Mutable pointer to the field.
136    // If field is not initialized, it is initialized with default value first.
137    pub fn mut_generic_bytes(&mut self) -> &mut ::std::vec::Vec<u8> {
138        if self.generic_bytes.is_none() {
139            self.generic_bytes = ::std::option::Option::Some(::std::vec::Vec::new());
140        }
141        self.generic_bytes.as_mut().unwrap()
142    }
143
144    // Take field
145    pub fn take_generic_bytes(&mut self) -> ::std::vec::Vec<u8> {
146        self.generic_bytes.take().unwrap_or_else(|| ::std::vec::Vec::new())
147    }
148
149    // optional string generic_string = 3;
150
151    pub fn generic_string(&self) -> &str {
152        match self.generic_string.as_ref() {
153            Some(v) => v,
154            None => "",
155        }
156    }
157
158    pub fn clear_generic_string(&mut self) {
159        self.generic_string = ::std::option::Option::None;
160    }
161
162    pub fn has_generic_string(&self) -> bool {
163        self.generic_string.is_some()
164    }
165
166    // Param is passed by value, moved
167    pub fn set_generic_string(&mut self, v: ::std::string::String) {
168        self.generic_string = ::std::option::Option::Some(v);
169    }
170
171    // Mutable pointer to the field.
172    // If field is not initialized, it is initialized with default value first.
173    pub fn mut_generic_string(&mut self) -> &mut ::std::string::String {
174        if self.generic_string.is_none() {
175            self.generic_string = ::std::option::Option::Some(::std::string::String::new());
176        }
177        self.generic_string.as_mut().unwrap()
178    }
179
180    // Take field
181    pub fn take_generic_string(&mut self) -> ::std::string::String {
182        self.generic_string.take().unwrap_or_else(|| ::std::string::String::new())
183    }
184
185    // optional bytes ipv6_and_port = 4;
186
187    pub fn ipv6_and_port(&self) -> &[u8] {
188        match self.ipv6_and_port.as_ref() {
189            Some(v) => v,
190            None => &[],
191        }
192    }
193
194    pub fn clear_ipv6_and_port(&mut self) {
195        self.ipv6_and_port = ::std::option::Option::None;
196    }
197
198    pub fn has_ipv6_and_port(&self) -> bool {
199        self.ipv6_and_port.is_some()
200    }
201
202    // Param is passed by value, moved
203    pub fn set_ipv6_and_port(&mut self, v: ::std::vec::Vec<u8>) {
204        self.ipv6_and_port = ::std::option::Option::Some(v);
205    }
206
207    // Mutable pointer to the field.
208    // If field is not initialized, it is initialized with default value first.
209    pub fn mut_ipv6_and_port(&mut self) -> &mut ::std::vec::Vec<u8> {
210        if self.ipv6_and_port.is_none() {
211            self.ipv6_and_port = ::std::option::Option::Some(::std::vec::Vec::new());
212        }
213        self.ipv6_and_port.as_mut().unwrap()
214    }
215
216    // Take field
217    pub fn take_ipv6_and_port(&mut self) -> ::std::vec::Vec<u8> {
218        self.ipv6_and_port.take().unwrap_or_else(|| ::std::vec::Vec::new())
219    }
220}
221
222impl ::steam_vent_proto_common::protobuf::Message for CMsgSteamNetworkingIdentityLegacyBinary {
223    const NAME: &'static str = "CMsgSteamNetworkingIdentityLegacyBinary";
224
225    fn is_initialized(&self) -> bool {
226        true
227    }
228
229    fn merge_from(&mut self, is: &mut ::steam_vent_proto_common::protobuf::CodedInputStream<'_>) -> ::steam_vent_proto_common::protobuf::Result<()> {
230        while let Some(tag) = is.read_raw_tag_or_eof()? {
231            match tag {
232                129 => {
233                    self.steam_id = ::std::option::Option::Some(is.read_fixed64()?);
234                },
235                138 => {
236                    self.xbox_pairwise_id = ::std::option::Option::Some(is.read_string()?);
237                },
238                18 => {
239                    self.generic_bytes = ::std::option::Option::Some(is.read_bytes()?);
240                },
241                26 => {
242                    self.generic_string = ::std::option::Option::Some(is.read_string()?);
243                },
244                34 => {
245                    self.ipv6_and_port = ::std::option::Option::Some(is.read_bytes()?);
246                },
247                tag => {
248                    ::steam_vent_proto_common::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
249                },
250            };
251        }
252        ::std::result::Result::Ok(())
253    }
254
255    // Compute sizes of nested messages
256    #[allow(unused_variables)]
257    fn compute_size(&self) -> u64 {
258        let mut my_size = 0;
259        if let Some(v) = self.steam_id {
260            my_size += 2 + 8;
261        }
262        if let Some(v) = self.xbox_pairwise_id.as_ref() {
263            my_size += ::steam_vent_proto_common::protobuf::rt::string_size(17, &v);
264        }
265        if let Some(v) = self.generic_bytes.as_ref() {
266            my_size += ::steam_vent_proto_common::protobuf::rt::bytes_size(2, &v);
267        }
268        if let Some(v) = self.generic_string.as_ref() {
269            my_size += ::steam_vent_proto_common::protobuf::rt::string_size(3, &v);
270        }
271        if let Some(v) = self.ipv6_and_port.as_ref() {
272            my_size += ::steam_vent_proto_common::protobuf::rt::bytes_size(4, &v);
273        }
274        my_size += ::steam_vent_proto_common::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
275        self.special_fields.cached_size().set(my_size as u32);
276        my_size
277    }
278
279    fn write_to_with_cached_sizes(&self, os: &mut ::steam_vent_proto_common::protobuf::CodedOutputStream<'_>) -> ::steam_vent_proto_common::protobuf::Result<()> {
280        if let Some(v) = self.steam_id {
281            os.write_fixed64(16, v)?;
282        }
283        if let Some(v) = self.xbox_pairwise_id.as_ref() {
284            os.write_string(17, v)?;
285        }
286        if let Some(v) = self.generic_bytes.as_ref() {
287            os.write_bytes(2, v)?;
288        }
289        if let Some(v) = self.generic_string.as_ref() {
290            os.write_string(3, v)?;
291        }
292        if let Some(v) = self.ipv6_and_port.as_ref() {
293            os.write_bytes(4, v)?;
294        }
295        os.write_unknown_fields(self.special_fields.unknown_fields())?;
296        ::std::result::Result::Ok(())
297    }
298
299    fn special_fields(&self) -> &::steam_vent_proto_common::protobuf::SpecialFields {
300        &self.special_fields
301    }
302
303    fn mut_special_fields(&mut self) -> &mut ::steam_vent_proto_common::protobuf::SpecialFields {
304        &mut self.special_fields
305    }
306
307    fn new() -> CMsgSteamNetworkingIdentityLegacyBinary {
308        CMsgSteamNetworkingIdentityLegacyBinary::new()
309    }
310
311    fn clear(&mut self) {
312        self.steam_id = ::std::option::Option::None;
313        self.xbox_pairwise_id = ::std::option::Option::None;
314        self.generic_bytes = ::std::option::Option::None;
315        self.generic_string = ::std::option::Option::None;
316        self.ipv6_and_port = ::std::option::Option::None;
317        self.special_fields.clear();
318    }
319
320    fn default_instance() -> &'static CMsgSteamNetworkingIdentityLegacyBinary {
321        static instance: CMsgSteamNetworkingIdentityLegacyBinary = CMsgSteamNetworkingIdentityLegacyBinary {
322            steam_id: ::std::option::Option::None,
323            xbox_pairwise_id: ::std::option::Option::None,
324            generic_bytes: ::std::option::Option::None,
325            generic_string: ::std::option::Option::None,
326            ipv6_and_port: ::std::option::Option::None,
327            special_fields: ::steam_vent_proto_common::protobuf::SpecialFields::new(),
328        };
329        &instance
330    }
331}
332
333// @@protoc_insertion_point(message:CMsgSteamDatagramCertificate)
334#[derive(PartialEq,Clone,Default,Debug)]
335pub struct CMsgSteamDatagramCertificate {
336    // message fields
337    // @@protoc_insertion_point(field:CMsgSteamDatagramCertificate.key_type)
338    pub key_type: ::std::option::Option<::steam_vent_proto_common::protobuf::EnumOrUnknown<cmsg_steam_datagram_certificate::EKeyType>>,
339    // @@protoc_insertion_point(field:CMsgSteamDatagramCertificate.key_data)
340    pub key_data: ::std::option::Option<::std::vec::Vec<u8>>,
341    // @@protoc_insertion_point(field:CMsgSteamDatagramCertificate.legacy_steam_id)
342    pub legacy_steam_id: ::std::option::Option<u64>,
343    // @@protoc_insertion_point(field:CMsgSteamDatagramCertificate.legacy_identity_binary)
344    pub legacy_identity_binary: ::steam_vent_proto_common::protobuf::MessageField<CMsgSteamNetworkingIdentityLegacyBinary>,
345    // @@protoc_insertion_point(field:CMsgSteamDatagramCertificate.identity_string)
346    pub identity_string: ::std::option::Option<::std::string::String>,
347    // @@protoc_insertion_point(field:CMsgSteamDatagramCertificate.gameserver_datacenter_ids)
348    pub gameserver_datacenter_ids: ::std::vec::Vec<u32>,
349    // @@protoc_insertion_point(field:CMsgSteamDatagramCertificate.time_created)
350    pub time_created: ::std::option::Option<u32>,
351    // @@protoc_insertion_point(field:CMsgSteamDatagramCertificate.time_expiry)
352    pub time_expiry: ::std::option::Option<u32>,
353    // @@protoc_insertion_point(field:CMsgSteamDatagramCertificate.app_ids)
354    pub app_ids: ::std::vec::Vec<u32>,
355    // @@protoc_insertion_point(field:CMsgSteamDatagramCertificate.ip_addresses)
356    pub ip_addresses: ::std::vec::Vec<::std::string::String>,
357    // special fields
358    // @@protoc_insertion_point(special_field:CMsgSteamDatagramCertificate.special_fields)
359    pub special_fields: ::steam_vent_proto_common::protobuf::SpecialFields,
360}
361
362impl<'a> ::std::default::Default for &'a CMsgSteamDatagramCertificate {
363    fn default() -> &'a CMsgSteamDatagramCertificate {
364        <CMsgSteamDatagramCertificate as ::steam_vent_proto_common::protobuf::Message>::default_instance()
365    }
366}
367
368impl CMsgSteamDatagramCertificate {
369    pub fn new() -> CMsgSteamDatagramCertificate {
370        ::std::default::Default::default()
371    }
372
373    // optional .CMsgSteamDatagramCertificate.EKeyType key_type = 1;
374
375    pub fn key_type(&self) -> cmsg_steam_datagram_certificate::EKeyType {
376        match self.key_type {
377            Some(e) => e.enum_value_or(cmsg_steam_datagram_certificate::EKeyType::INVALID),
378            None => cmsg_steam_datagram_certificate::EKeyType::INVALID,
379        }
380    }
381
382    pub fn clear_key_type(&mut self) {
383        self.key_type = ::std::option::Option::None;
384    }
385
386    pub fn has_key_type(&self) -> bool {
387        self.key_type.is_some()
388    }
389
390    // Param is passed by value, moved
391    pub fn set_key_type(&mut self, v: cmsg_steam_datagram_certificate::EKeyType) {
392        self.key_type = ::std::option::Option::Some(::steam_vent_proto_common::protobuf::EnumOrUnknown::new(v));
393    }
394
395    // optional bytes key_data = 2;
396
397    pub fn key_data(&self) -> &[u8] {
398        match self.key_data.as_ref() {
399            Some(v) => v,
400            None => &[],
401        }
402    }
403
404    pub fn clear_key_data(&mut self) {
405        self.key_data = ::std::option::Option::None;
406    }
407
408    pub fn has_key_data(&self) -> bool {
409        self.key_data.is_some()
410    }
411
412    // Param is passed by value, moved
413    pub fn set_key_data(&mut self, v: ::std::vec::Vec<u8>) {
414        self.key_data = ::std::option::Option::Some(v);
415    }
416
417    // Mutable pointer to the field.
418    // If field is not initialized, it is initialized with default value first.
419    pub fn mut_key_data(&mut self) -> &mut ::std::vec::Vec<u8> {
420        if self.key_data.is_none() {
421            self.key_data = ::std::option::Option::Some(::std::vec::Vec::new());
422        }
423        self.key_data.as_mut().unwrap()
424    }
425
426    // Take field
427    pub fn take_key_data(&mut self) -> ::std::vec::Vec<u8> {
428        self.key_data.take().unwrap_or_else(|| ::std::vec::Vec::new())
429    }
430
431    // optional fixed64 legacy_steam_id = 4;
432
433    pub fn legacy_steam_id(&self) -> u64 {
434        self.legacy_steam_id.unwrap_or(0)
435    }
436
437    pub fn clear_legacy_steam_id(&mut self) {
438        self.legacy_steam_id = ::std::option::Option::None;
439    }
440
441    pub fn has_legacy_steam_id(&self) -> bool {
442        self.legacy_steam_id.is_some()
443    }
444
445    // Param is passed by value, moved
446    pub fn set_legacy_steam_id(&mut self, v: u64) {
447        self.legacy_steam_id = ::std::option::Option::Some(v);
448    }
449
450    // optional string identity_string = 12;
451
452    pub fn identity_string(&self) -> &str {
453        match self.identity_string.as_ref() {
454            Some(v) => v,
455            None => "",
456        }
457    }
458
459    pub fn clear_identity_string(&mut self) {
460        self.identity_string = ::std::option::Option::None;
461    }
462
463    pub fn has_identity_string(&self) -> bool {
464        self.identity_string.is_some()
465    }
466
467    // Param is passed by value, moved
468    pub fn set_identity_string(&mut self, v: ::std::string::String) {
469        self.identity_string = ::std::option::Option::Some(v);
470    }
471
472    // Mutable pointer to the field.
473    // If field is not initialized, it is initialized with default value first.
474    pub fn mut_identity_string(&mut self) -> &mut ::std::string::String {
475        if self.identity_string.is_none() {
476            self.identity_string = ::std::option::Option::Some(::std::string::String::new());
477        }
478        self.identity_string.as_mut().unwrap()
479    }
480
481    // Take field
482    pub fn take_identity_string(&mut self) -> ::std::string::String {
483        self.identity_string.take().unwrap_or_else(|| ::std::string::String::new())
484    }
485
486    // optional fixed32 time_created = 8;
487
488    pub fn time_created(&self) -> u32 {
489        self.time_created.unwrap_or(0)
490    }
491
492    pub fn clear_time_created(&mut self) {
493        self.time_created = ::std::option::Option::None;
494    }
495
496    pub fn has_time_created(&self) -> bool {
497        self.time_created.is_some()
498    }
499
500    // Param is passed by value, moved
501    pub fn set_time_created(&mut self, v: u32) {
502        self.time_created = ::std::option::Option::Some(v);
503    }
504
505    // optional fixed32 time_expiry = 9;
506
507    pub fn time_expiry(&self) -> u32 {
508        self.time_expiry.unwrap_or(0)
509    }
510
511    pub fn clear_time_expiry(&mut self) {
512        self.time_expiry = ::std::option::Option::None;
513    }
514
515    pub fn has_time_expiry(&self) -> bool {
516        self.time_expiry.is_some()
517    }
518
519    // Param is passed by value, moved
520    pub fn set_time_expiry(&mut self, v: u32) {
521        self.time_expiry = ::std::option::Option::Some(v);
522    }
523}
524
525impl ::steam_vent_proto_common::protobuf::Message for CMsgSteamDatagramCertificate {
526    const NAME: &'static str = "CMsgSteamDatagramCertificate";
527
528    fn is_initialized(&self) -> bool {
529        true
530    }
531
532    fn merge_from(&mut self, is: &mut ::steam_vent_proto_common::protobuf::CodedInputStream<'_>) -> ::steam_vent_proto_common::protobuf::Result<()> {
533        while let Some(tag) = is.read_raw_tag_or_eof()? {
534            match tag {
535                8 => {
536                    self.key_type = ::std::option::Option::Some(is.read_enum_or_unknown()?);
537                },
538                18 => {
539                    self.key_data = ::std::option::Option::Some(is.read_bytes()?);
540                },
541                33 => {
542                    self.legacy_steam_id = ::std::option::Option::Some(is.read_fixed64()?);
543                },
544                90 => {
545                    ::steam_vent_proto_common::protobuf::rt::read_singular_message_into_field(is, &mut self.legacy_identity_binary)?;
546                },
547                98 => {
548                    self.identity_string = ::std::option::Option::Some(is.read_string()?);
549                },
550                42 => {
551                    is.read_repeated_packed_fixed32_into(&mut self.gameserver_datacenter_ids)?;
552                },
553                45 => {
554                    self.gameserver_datacenter_ids.push(is.read_fixed32()?);
555                },
556                69 => {
557                    self.time_created = ::std::option::Option::Some(is.read_fixed32()?);
558                },
559                77 => {
560                    self.time_expiry = ::std::option::Option::Some(is.read_fixed32()?);
561                },
562                82 => {
563                    is.read_repeated_packed_uint32_into(&mut self.app_ids)?;
564                },
565                80 => {
566                    self.app_ids.push(is.read_uint32()?);
567                },
568                106 => {
569                    self.ip_addresses.push(is.read_string()?);
570                },
571                tag => {
572                    ::steam_vent_proto_common::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
573                },
574            };
575        }
576        ::std::result::Result::Ok(())
577    }
578
579    // Compute sizes of nested messages
580    #[allow(unused_variables)]
581    fn compute_size(&self) -> u64 {
582        let mut my_size = 0;
583        if let Some(v) = self.key_type {
584            my_size += ::steam_vent_proto_common::protobuf::rt::int32_size(1, v.value());
585        }
586        if let Some(v) = self.key_data.as_ref() {
587            my_size += ::steam_vent_proto_common::protobuf::rt::bytes_size(2, &v);
588        }
589        if let Some(v) = self.legacy_steam_id {
590            my_size += 1 + 8;
591        }
592        if let Some(v) = self.legacy_identity_binary.as_ref() {
593            let len = v.compute_size();
594            my_size += 1 + ::steam_vent_proto_common::protobuf::rt::compute_raw_varint64_size(len) + len;
595        }
596        if let Some(v) = self.identity_string.as_ref() {
597            my_size += ::steam_vent_proto_common::protobuf::rt::string_size(12, &v);
598        }
599        my_size += 5 * self.gameserver_datacenter_ids.len() as u64;
600        if let Some(v) = self.time_created {
601            my_size += 1 + 4;
602        }
603        if let Some(v) = self.time_expiry {
604            my_size += 1 + 4;
605        }
606        for value in &self.app_ids {
607            my_size += ::steam_vent_proto_common::protobuf::rt::uint32_size(10, *value);
608        };
609        for value in &self.ip_addresses {
610            my_size += ::steam_vent_proto_common::protobuf::rt::string_size(13, &value);
611        };
612        my_size += ::steam_vent_proto_common::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
613        self.special_fields.cached_size().set(my_size as u32);
614        my_size
615    }
616
617    fn write_to_with_cached_sizes(&self, os: &mut ::steam_vent_proto_common::protobuf::CodedOutputStream<'_>) -> ::steam_vent_proto_common::protobuf::Result<()> {
618        if let Some(v) = self.key_type {
619            os.write_enum(1, ::steam_vent_proto_common::protobuf::EnumOrUnknown::value(&v))?;
620        }
621        if let Some(v) = self.key_data.as_ref() {
622            os.write_bytes(2, v)?;
623        }
624        if let Some(v) = self.legacy_steam_id {
625            os.write_fixed64(4, v)?;
626        }
627        if let Some(v) = self.legacy_identity_binary.as_ref() {
628            ::steam_vent_proto_common::protobuf::rt::write_message_field_with_cached_size(11, v, os)?;
629        }
630        if let Some(v) = self.identity_string.as_ref() {
631            os.write_string(12, v)?;
632        }
633        for v in &self.gameserver_datacenter_ids {
634            os.write_fixed32(5, *v)?;
635        };
636        if let Some(v) = self.time_created {
637            os.write_fixed32(8, v)?;
638        }
639        if let Some(v) = self.time_expiry {
640            os.write_fixed32(9, v)?;
641        }
642        for v in &self.app_ids {
643            os.write_uint32(10, *v)?;
644        };
645        for v in &self.ip_addresses {
646            os.write_string(13, &v)?;
647        };
648        os.write_unknown_fields(self.special_fields.unknown_fields())?;
649        ::std::result::Result::Ok(())
650    }
651
652    fn special_fields(&self) -> &::steam_vent_proto_common::protobuf::SpecialFields {
653        &self.special_fields
654    }
655
656    fn mut_special_fields(&mut self) -> &mut ::steam_vent_proto_common::protobuf::SpecialFields {
657        &mut self.special_fields
658    }
659
660    fn new() -> CMsgSteamDatagramCertificate {
661        CMsgSteamDatagramCertificate::new()
662    }
663
664    fn clear(&mut self) {
665        self.key_type = ::std::option::Option::None;
666        self.key_data = ::std::option::Option::None;
667        self.legacy_steam_id = ::std::option::Option::None;
668        self.legacy_identity_binary.clear();
669        self.identity_string = ::std::option::Option::None;
670        self.gameserver_datacenter_ids.clear();
671        self.time_created = ::std::option::Option::None;
672        self.time_expiry = ::std::option::Option::None;
673        self.app_ids.clear();
674        self.ip_addresses.clear();
675        self.special_fields.clear();
676    }
677
678    fn default_instance() -> &'static CMsgSteamDatagramCertificate {
679        static instance: CMsgSteamDatagramCertificate = CMsgSteamDatagramCertificate {
680            key_type: ::std::option::Option::None,
681            key_data: ::std::option::Option::None,
682            legacy_steam_id: ::std::option::Option::None,
683            legacy_identity_binary: ::steam_vent_proto_common::protobuf::MessageField::none(),
684            identity_string: ::std::option::Option::None,
685            gameserver_datacenter_ids: ::std::vec::Vec::new(),
686            time_created: ::std::option::Option::None,
687            time_expiry: ::std::option::Option::None,
688            app_ids: ::std::vec::Vec::new(),
689            ip_addresses: ::std::vec::Vec::new(),
690            special_fields: ::steam_vent_proto_common::protobuf::SpecialFields::new(),
691        };
692        &instance
693    }
694}
695
696/// Nested message and enums of message `CMsgSteamDatagramCertificate`
697pub mod cmsg_steam_datagram_certificate {
698    #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
699    // @@protoc_insertion_point(enum:CMsgSteamDatagramCertificate.EKeyType)
700    pub enum EKeyType {
701        // @@protoc_insertion_point(enum_value:CMsgSteamDatagramCertificate.EKeyType.INVALID)
702        INVALID = 0,
703        // @@protoc_insertion_point(enum_value:CMsgSteamDatagramCertificate.EKeyType.ED25519)
704        ED25519 = 1,
705    }
706
707    impl ::steam_vent_proto_common::protobuf::Enum for EKeyType {
708        const NAME: &'static str = "EKeyType";
709
710        fn value(&self) -> i32 {
711            *self as i32
712        }
713
714        fn from_i32(value: i32) -> ::std::option::Option<EKeyType> {
715            match value {
716                0 => ::std::option::Option::Some(EKeyType::INVALID),
717                1 => ::std::option::Option::Some(EKeyType::ED25519),
718                _ => ::std::option::Option::None
719            }
720        }
721
722        fn from_str(str: &str) -> ::std::option::Option<EKeyType> {
723            match str {
724                "INVALID" => ::std::option::Option::Some(EKeyType::INVALID),
725                "ED25519" => ::std::option::Option::Some(EKeyType::ED25519),
726                _ => ::std::option::Option::None
727            }
728        }
729
730        const VALUES: &'static [EKeyType] = &[
731            EKeyType::INVALID,
732            EKeyType::ED25519,
733        ];
734    }
735
736    impl ::std::default::Default for EKeyType {
737        fn default() -> Self {
738            EKeyType::INVALID
739        }
740    }
741
742}
743
744// @@protoc_insertion_point(message:CMsgSteamDatagramCertificateSigned)
745#[derive(PartialEq,Clone,Default,Debug)]
746pub struct CMsgSteamDatagramCertificateSigned {
747    // message fields
748    // @@protoc_insertion_point(field:CMsgSteamDatagramCertificateSigned.cert)
749    pub cert: ::std::option::Option<::std::vec::Vec<u8>>,
750    // @@protoc_insertion_point(field:CMsgSteamDatagramCertificateSigned.ca_key_id)
751    pub ca_key_id: ::std::option::Option<u64>,
752    // @@protoc_insertion_point(field:CMsgSteamDatagramCertificateSigned.ca_signature)
753    pub ca_signature: ::std::option::Option<::std::vec::Vec<u8>>,
754    // @@protoc_insertion_point(field:CMsgSteamDatagramCertificateSigned.private_key_data)
755    pub private_key_data: ::std::option::Option<::std::vec::Vec<u8>>,
756    // special fields
757    // @@protoc_insertion_point(special_field:CMsgSteamDatagramCertificateSigned.special_fields)
758    pub special_fields: ::steam_vent_proto_common::protobuf::SpecialFields,
759}
760
761impl<'a> ::std::default::Default for &'a CMsgSteamDatagramCertificateSigned {
762    fn default() -> &'a CMsgSteamDatagramCertificateSigned {
763        <CMsgSteamDatagramCertificateSigned as ::steam_vent_proto_common::protobuf::Message>::default_instance()
764    }
765}
766
767impl CMsgSteamDatagramCertificateSigned {
768    pub fn new() -> CMsgSteamDatagramCertificateSigned {
769        ::std::default::Default::default()
770    }
771
772    // optional bytes cert = 4;
773
774    pub fn cert(&self) -> &[u8] {
775        match self.cert.as_ref() {
776            Some(v) => v,
777            None => &[],
778        }
779    }
780
781    pub fn clear_cert(&mut self) {
782        self.cert = ::std::option::Option::None;
783    }
784
785    pub fn has_cert(&self) -> bool {
786        self.cert.is_some()
787    }
788
789    // Param is passed by value, moved
790    pub fn set_cert(&mut self, v: ::std::vec::Vec<u8>) {
791        self.cert = ::std::option::Option::Some(v);
792    }
793
794    // Mutable pointer to the field.
795    // If field is not initialized, it is initialized with default value first.
796    pub fn mut_cert(&mut self) -> &mut ::std::vec::Vec<u8> {
797        if self.cert.is_none() {
798            self.cert = ::std::option::Option::Some(::std::vec::Vec::new());
799        }
800        self.cert.as_mut().unwrap()
801    }
802
803    // Take field
804    pub fn take_cert(&mut self) -> ::std::vec::Vec<u8> {
805        self.cert.take().unwrap_or_else(|| ::std::vec::Vec::new())
806    }
807
808    // optional fixed64 ca_key_id = 5;
809
810    pub fn ca_key_id(&self) -> u64 {
811        self.ca_key_id.unwrap_or(0)
812    }
813
814    pub fn clear_ca_key_id(&mut self) {
815        self.ca_key_id = ::std::option::Option::None;
816    }
817
818    pub fn has_ca_key_id(&self) -> bool {
819        self.ca_key_id.is_some()
820    }
821
822    // Param is passed by value, moved
823    pub fn set_ca_key_id(&mut self, v: u64) {
824        self.ca_key_id = ::std::option::Option::Some(v);
825    }
826
827    // optional bytes ca_signature = 6;
828
829    pub fn ca_signature(&self) -> &[u8] {
830        match self.ca_signature.as_ref() {
831            Some(v) => v,
832            None => &[],
833        }
834    }
835
836    pub fn clear_ca_signature(&mut self) {
837        self.ca_signature = ::std::option::Option::None;
838    }
839
840    pub fn has_ca_signature(&self) -> bool {
841        self.ca_signature.is_some()
842    }
843
844    // Param is passed by value, moved
845    pub fn set_ca_signature(&mut self, v: ::std::vec::Vec<u8>) {
846        self.ca_signature = ::std::option::Option::Some(v);
847    }
848
849    // Mutable pointer to the field.
850    // If field is not initialized, it is initialized with default value first.
851    pub fn mut_ca_signature(&mut self) -> &mut ::std::vec::Vec<u8> {
852        if self.ca_signature.is_none() {
853            self.ca_signature = ::std::option::Option::Some(::std::vec::Vec::new());
854        }
855        self.ca_signature.as_mut().unwrap()
856    }
857
858    // Take field
859    pub fn take_ca_signature(&mut self) -> ::std::vec::Vec<u8> {
860        self.ca_signature.take().unwrap_or_else(|| ::std::vec::Vec::new())
861    }
862
863    // optional bytes private_key_data = 1;
864
865    pub fn private_key_data(&self) -> &[u8] {
866        match self.private_key_data.as_ref() {
867            Some(v) => v,
868            None => &[],
869        }
870    }
871
872    pub fn clear_private_key_data(&mut self) {
873        self.private_key_data = ::std::option::Option::None;
874    }
875
876    pub fn has_private_key_data(&self) -> bool {
877        self.private_key_data.is_some()
878    }
879
880    // Param is passed by value, moved
881    pub fn set_private_key_data(&mut self, v: ::std::vec::Vec<u8>) {
882        self.private_key_data = ::std::option::Option::Some(v);
883    }
884
885    // Mutable pointer to the field.
886    // If field is not initialized, it is initialized with default value first.
887    pub fn mut_private_key_data(&mut self) -> &mut ::std::vec::Vec<u8> {
888        if self.private_key_data.is_none() {
889            self.private_key_data = ::std::option::Option::Some(::std::vec::Vec::new());
890        }
891        self.private_key_data.as_mut().unwrap()
892    }
893
894    // Take field
895    pub fn take_private_key_data(&mut self) -> ::std::vec::Vec<u8> {
896        self.private_key_data.take().unwrap_or_else(|| ::std::vec::Vec::new())
897    }
898}
899
900impl ::steam_vent_proto_common::protobuf::Message for CMsgSteamDatagramCertificateSigned {
901    const NAME: &'static str = "CMsgSteamDatagramCertificateSigned";
902
903    fn is_initialized(&self) -> bool {
904        true
905    }
906
907    fn merge_from(&mut self, is: &mut ::steam_vent_proto_common::protobuf::CodedInputStream<'_>) -> ::steam_vent_proto_common::protobuf::Result<()> {
908        while let Some(tag) = is.read_raw_tag_or_eof()? {
909            match tag {
910                34 => {
911                    self.cert = ::std::option::Option::Some(is.read_bytes()?);
912                },
913                41 => {
914                    self.ca_key_id = ::std::option::Option::Some(is.read_fixed64()?);
915                },
916                50 => {
917                    self.ca_signature = ::std::option::Option::Some(is.read_bytes()?);
918                },
919                10 => {
920                    self.private_key_data = ::std::option::Option::Some(is.read_bytes()?);
921                },
922                tag => {
923                    ::steam_vent_proto_common::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
924                },
925            };
926        }
927        ::std::result::Result::Ok(())
928    }
929
930    // Compute sizes of nested messages
931    #[allow(unused_variables)]
932    fn compute_size(&self) -> u64 {
933        let mut my_size = 0;
934        if let Some(v) = self.cert.as_ref() {
935            my_size += ::steam_vent_proto_common::protobuf::rt::bytes_size(4, &v);
936        }
937        if let Some(v) = self.ca_key_id {
938            my_size += 1 + 8;
939        }
940        if let Some(v) = self.ca_signature.as_ref() {
941            my_size += ::steam_vent_proto_common::protobuf::rt::bytes_size(6, &v);
942        }
943        if let Some(v) = self.private_key_data.as_ref() {
944            my_size += ::steam_vent_proto_common::protobuf::rt::bytes_size(1, &v);
945        }
946        my_size += ::steam_vent_proto_common::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
947        self.special_fields.cached_size().set(my_size as u32);
948        my_size
949    }
950
951    fn write_to_with_cached_sizes(&self, os: &mut ::steam_vent_proto_common::protobuf::CodedOutputStream<'_>) -> ::steam_vent_proto_common::protobuf::Result<()> {
952        if let Some(v) = self.cert.as_ref() {
953            os.write_bytes(4, v)?;
954        }
955        if let Some(v) = self.ca_key_id {
956            os.write_fixed64(5, v)?;
957        }
958        if let Some(v) = self.ca_signature.as_ref() {
959            os.write_bytes(6, v)?;
960        }
961        if let Some(v) = self.private_key_data.as_ref() {
962            os.write_bytes(1, v)?;
963        }
964        os.write_unknown_fields(self.special_fields.unknown_fields())?;
965        ::std::result::Result::Ok(())
966    }
967
968    fn special_fields(&self) -> &::steam_vent_proto_common::protobuf::SpecialFields {
969        &self.special_fields
970    }
971
972    fn mut_special_fields(&mut self) -> &mut ::steam_vent_proto_common::protobuf::SpecialFields {
973        &mut self.special_fields
974    }
975
976    fn new() -> CMsgSteamDatagramCertificateSigned {
977        CMsgSteamDatagramCertificateSigned::new()
978    }
979
980    fn clear(&mut self) {
981        self.cert = ::std::option::Option::None;
982        self.ca_key_id = ::std::option::Option::None;
983        self.ca_signature = ::std::option::Option::None;
984        self.private_key_data = ::std::option::Option::None;
985        self.special_fields.clear();
986    }
987
988    fn default_instance() -> &'static CMsgSteamDatagramCertificateSigned {
989        static instance: CMsgSteamDatagramCertificateSigned = CMsgSteamDatagramCertificateSigned {
990            cert: ::std::option::Option::None,
991            ca_key_id: ::std::option::Option::None,
992            ca_signature: ::std::option::Option::None,
993            private_key_data: ::std::option::Option::None,
994            special_fields: ::steam_vent_proto_common::protobuf::SpecialFields::new(),
995        };
996        &instance
997    }
998}
999
1000// @@protoc_insertion_point(message:CMsgSteamDatagramCertificateRequest)
1001#[derive(PartialEq,Clone,Default,Debug)]
1002pub struct CMsgSteamDatagramCertificateRequest {
1003    // message fields
1004    // @@protoc_insertion_point(field:CMsgSteamDatagramCertificateRequest.cert)
1005    pub cert: ::steam_vent_proto_common::protobuf::MessageField<CMsgSteamDatagramCertificate>,
1006    // special fields
1007    // @@protoc_insertion_point(special_field:CMsgSteamDatagramCertificateRequest.special_fields)
1008    pub special_fields: ::steam_vent_proto_common::protobuf::SpecialFields,
1009}
1010
1011impl<'a> ::std::default::Default for &'a CMsgSteamDatagramCertificateRequest {
1012    fn default() -> &'a CMsgSteamDatagramCertificateRequest {
1013        <CMsgSteamDatagramCertificateRequest as ::steam_vent_proto_common::protobuf::Message>::default_instance()
1014    }
1015}
1016
1017impl CMsgSteamDatagramCertificateRequest {
1018    pub fn new() -> CMsgSteamDatagramCertificateRequest {
1019        ::std::default::Default::default()
1020    }
1021}
1022
1023impl ::steam_vent_proto_common::protobuf::Message for CMsgSteamDatagramCertificateRequest {
1024    const NAME: &'static str = "CMsgSteamDatagramCertificateRequest";
1025
1026    fn is_initialized(&self) -> bool {
1027        true
1028    }
1029
1030    fn merge_from(&mut self, is: &mut ::steam_vent_proto_common::protobuf::CodedInputStream<'_>) -> ::steam_vent_proto_common::protobuf::Result<()> {
1031        while let Some(tag) = is.read_raw_tag_or_eof()? {
1032            match tag {
1033                10 => {
1034                    ::steam_vent_proto_common::protobuf::rt::read_singular_message_into_field(is, &mut self.cert)?;
1035                },
1036                tag => {
1037                    ::steam_vent_proto_common::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
1038                },
1039            };
1040        }
1041        ::std::result::Result::Ok(())
1042    }
1043
1044    // Compute sizes of nested messages
1045    #[allow(unused_variables)]
1046    fn compute_size(&self) -> u64 {
1047        let mut my_size = 0;
1048        if let Some(v) = self.cert.as_ref() {
1049            let len = v.compute_size();
1050            my_size += 1 + ::steam_vent_proto_common::protobuf::rt::compute_raw_varint64_size(len) + len;
1051        }
1052        my_size += ::steam_vent_proto_common::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
1053        self.special_fields.cached_size().set(my_size as u32);
1054        my_size
1055    }
1056
1057    fn write_to_with_cached_sizes(&self, os: &mut ::steam_vent_proto_common::protobuf::CodedOutputStream<'_>) -> ::steam_vent_proto_common::protobuf::Result<()> {
1058        if let Some(v) = self.cert.as_ref() {
1059            ::steam_vent_proto_common::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
1060        }
1061        os.write_unknown_fields(self.special_fields.unknown_fields())?;
1062        ::std::result::Result::Ok(())
1063    }
1064
1065    fn special_fields(&self) -> &::steam_vent_proto_common::protobuf::SpecialFields {
1066        &self.special_fields
1067    }
1068
1069    fn mut_special_fields(&mut self) -> &mut ::steam_vent_proto_common::protobuf::SpecialFields {
1070        &mut self.special_fields
1071    }
1072
1073    fn new() -> CMsgSteamDatagramCertificateRequest {
1074        CMsgSteamDatagramCertificateRequest::new()
1075    }
1076
1077    fn clear(&mut self) {
1078        self.cert.clear();
1079        self.special_fields.clear();
1080    }
1081
1082    fn default_instance() -> &'static CMsgSteamDatagramCertificateRequest {
1083        static instance: CMsgSteamDatagramCertificateRequest = CMsgSteamDatagramCertificateRequest {
1084            cert: ::steam_vent_proto_common::protobuf::MessageField::none(),
1085            special_fields: ::steam_vent_proto_common::protobuf::SpecialFields::new(),
1086        };
1087        &instance
1088    }
1089}
1090
1091
1092const _VENT_PROTO_VERSION_CHECK: () = ::steam_vent_proto_common::VERSION_0_5_0;
1093
1094impl ::steam_vent_proto_common::RpcMessage for CMsgSteamNetworkingIdentityLegacyBinary {
1095    fn parse(reader: &mut dyn std::io::Read) -> ::steam_vent_proto_common::protobuf::Result<Self> {
1096        <Self as ::steam_vent_proto_common::protobuf::Message>::parse_from_reader(reader)
1097    }
1098    fn write(&self, writer: &mut dyn std::io::Write) -> ::steam_vent_proto_common::protobuf::Result<()> {
1099        use ::steam_vent_proto_common::protobuf::Message;
1100        self.write_to_writer(writer)
1101    }
1102    fn encode_size(&self) -> usize {
1103        use ::steam_vent_proto_common::protobuf::Message;
1104        self.compute_size() as usize
1105    }
1106}
1107impl ::steam_vent_proto_common::RpcMessage for CMsgSteamDatagramCertificate {
1108    fn parse(reader: &mut dyn std::io::Read) -> ::steam_vent_proto_common::protobuf::Result<Self> {
1109        <Self as ::steam_vent_proto_common::protobuf::Message>::parse_from_reader(reader)
1110    }
1111    fn write(&self, writer: &mut dyn std::io::Write) -> ::steam_vent_proto_common::protobuf::Result<()> {
1112        use ::steam_vent_proto_common::protobuf::Message;
1113        self.write_to_writer(writer)
1114    }
1115    fn encode_size(&self) -> usize {
1116        use ::steam_vent_proto_common::protobuf::Message;
1117        self.compute_size() as usize
1118    }
1119}
1120impl ::steam_vent_proto_common::RpcMessage for CMsgSteamDatagramCertificateSigned {
1121    fn parse(reader: &mut dyn std::io::Read) -> ::steam_vent_proto_common::protobuf::Result<Self> {
1122        <Self as ::steam_vent_proto_common::protobuf::Message>::parse_from_reader(reader)
1123    }
1124    fn write(&self, writer: &mut dyn std::io::Write) -> ::steam_vent_proto_common::protobuf::Result<()> {
1125        use ::steam_vent_proto_common::protobuf::Message;
1126        self.write_to_writer(writer)
1127    }
1128    fn encode_size(&self) -> usize {
1129        use ::steam_vent_proto_common::protobuf::Message;
1130        self.compute_size() as usize
1131    }
1132}
1133impl ::steam_vent_proto_common::RpcMessage for CMsgSteamDatagramCertificateRequest {
1134    fn parse(reader: &mut dyn std::io::Read) -> ::steam_vent_proto_common::protobuf::Result<Self> {
1135        <Self as ::steam_vent_proto_common::protobuf::Message>::parse_from_reader(reader)
1136    }
1137    fn write(&self, writer: &mut dyn std::io::Write) -> ::steam_vent_proto_common::protobuf::Result<()> {
1138        use ::steam_vent_proto_common::protobuf::Message;
1139        self.write_to_writer(writer)
1140    }
1141    fn encode_size(&self) -> usize {
1142        use ::steam_vent_proto_common::protobuf::Message;
1143        self.compute_size() as usize
1144    }
1145}