// This file is generated by rust-protobuf 3.5.1. Do not edit
// .proto file is parsed by pure
// @generated

// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]

#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]

#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_results)]
#![allow(unused_mut)]

//! Generated file from `steamnetworkingsockets_messages_udp.proto`
// Generated for lite runtime

/// Generated files are compatible only with the same version
/// of protobuf runtime.
const _PROTOBUF_VERSION_CHECK: () = ::steam_vent_proto_common::protobuf::VERSION_3_5_1;

// @@protoc_insertion_point(message:CMsgSteamSockets_UDP_ChallengeRequest)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct CMsgSteamSockets_UDP_ChallengeRequest {
    // message fields
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ChallengeRequest.connection_id)
    pub connection_id: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ChallengeRequest.my_timestamp)
    pub my_timestamp: ::std::option::Option<u64>,
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ChallengeRequest.protocol_version)
    pub protocol_version: ::std::option::Option<u32>,
    // special fields
    // @@protoc_insertion_point(special_field:CMsgSteamSockets_UDP_ChallengeRequest.special_fields)
    pub special_fields: ::steam_vent_proto_common::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a CMsgSteamSockets_UDP_ChallengeRequest {
    fn default() -> &'a CMsgSteamSockets_UDP_ChallengeRequest {
        <CMsgSteamSockets_UDP_ChallengeRequest as ::steam_vent_proto_common::protobuf::Message>::default_instance()
    }
}

impl CMsgSteamSockets_UDP_ChallengeRequest {
    pub fn new() -> CMsgSteamSockets_UDP_ChallengeRequest {
        ::std::default::Default::default()
    }

    // optional fixed32 connection_id = 1;

    pub fn connection_id(&self) -> u32 {
        self.connection_id.unwrap_or(0)
    }

    pub fn clear_connection_id(&mut self) {
        self.connection_id = ::std::option::Option::None;
    }

    pub fn has_connection_id(&self) -> bool {
        self.connection_id.is_some()
    }

    // Param is passed by value, moved
    pub fn set_connection_id(&mut self, v: u32) {
        self.connection_id = ::std::option::Option::Some(v);
    }

    // optional fixed64 my_timestamp = 3;

    pub fn my_timestamp(&self) -> u64 {
        self.my_timestamp.unwrap_or(0)
    }

    pub fn clear_my_timestamp(&mut self) {
        self.my_timestamp = ::std::option::Option::None;
    }

    pub fn has_my_timestamp(&self) -> bool {
        self.my_timestamp.is_some()
    }

    // Param is passed by value, moved
    pub fn set_my_timestamp(&mut self, v: u64) {
        self.my_timestamp = ::std::option::Option::Some(v);
    }

    // optional uint32 protocol_version = 4;

    pub fn protocol_version(&self) -> u32 {
        self.protocol_version.unwrap_or(0)
    }

    pub fn clear_protocol_version(&mut self) {
        self.protocol_version = ::std::option::Option::None;
    }

    pub fn has_protocol_version(&self) -> bool {
        self.protocol_version.is_some()
    }

    // Param is passed by value, moved
    pub fn set_protocol_version(&mut self, v: u32) {
        self.protocol_version = ::std::option::Option::Some(v);
    }
}

impl ::steam_vent_proto_common::protobuf::Message for CMsgSteamSockets_UDP_ChallengeRequest {
    const NAME: &'static str = "CMsgSteamSockets_UDP_ChallengeRequest";

    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::steam_vent_proto_common::protobuf::CodedInputStream<'_>) -> ::steam_vent_proto_common::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                13 => {
                    self.connection_id = ::std::option::Option::Some(is.read_fixed32()?);
                },
                25 => {
                    self.my_timestamp = ::std::option::Option::Some(is.read_fixed64()?);
                },
                32 => {
                    self.protocol_version = ::std::option::Option::Some(is.read_uint32()?);
                },
                tag => {
                    ::steam_vent_proto_common::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u64 {
        let mut my_size = 0;
        if let Some(v) = self.connection_id {
            my_size += 1 + 4;
        }
        if let Some(v) = self.my_timestamp {
            my_size += 1 + 8;
        }
        if let Some(v) = self.protocol_version {
            my_size += ::steam_vent_proto_common::protobuf::rt::uint32_size(4, v);
        }
        my_size += ::steam_vent_proto_common::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::steam_vent_proto_common::protobuf::CodedOutputStream<'_>) -> ::steam_vent_proto_common::protobuf::Result<()> {
        if let Some(v) = self.connection_id {
            os.write_fixed32(1, v)?;
        }
        if let Some(v) = self.my_timestamp {
            os.write_fixed64(3, v)?;
        }
        if let Some(v) = self.protocol_version {
            os.write_uint32(4, v)?;
        }
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn special_fields(&self) -> &::steam_vent_proto_common::protobuf::SpecialFields {
        &self.special_fields
    }

    fn mut_special_fields(&mut self) -> &mut ::steam_vent_proto_common::protobuf::SpecialFields {
        &mut self.special_fields
    }

    fn new() -> CMsgSteamSockets_UDP_ChallengeRequest {
        CMsgSteamSockets_UDP_ChallengeRequest::new()
    }

    fn clear(&mut self) {
        self.connection_id = ::std::option::Option::None;
        self.my_timestamp = ::std::option::Option::None;
        self.protocol_version = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static CMsgSteamSockets_UDP_ChallengeRequest {
        static instance: CMsgSteamSockets_UDP_ChallengeRequest = CMsgSteamSockets_UDP_ChallengeRequest {
            connection_id: ::std::option::Option::None,
            my_timestamp: ::std::option::Option::None,
            protocol_version: ::std::option::Option::None,
            special_fields: ::steam_vent_proto_common::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

// @@protoc_insertion_point(message:CMsgSteamSockets_UDP_ChallengeReply)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct CMsgSteamSockets_UDP_ChallengeReply {
    // message fields
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ChallengeReply.connection_id)
    pub connection_id: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ChallengeReply.challenge)
    pub challenge: ::std::option::Option<u64>,
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ChallengeReply.your_timestamp)
    pub your_timestamp: ::std::option::Option<u64>,
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ChallengeReply.protocol_version)
    pub protocol_version: ::std::option::Option<u32>,
    // special fields
    // @@protoc_insertion_point(special_field:CMsgSteamSockets_UDP_ChallengeReply.special_fields)
    pub special_fields: ::steam_vent_proto_common::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a CMsgSteamSockets_UDP_ChallengeReply {
    fn default() -> &'a CMsgSteamSockets_UDP_ChallengeReply {
        <CMsgSteamSockets_UDP_ChallengeReply as ::steam_vent_proto_common::protobuf::Message>::default_instance()
    }
}

impl CMsgSteamSockets_UDP_ChallengeReply {
    pub fn new() -> CMsgSteamSockets_UDP_ChallengeReply {
        ::std::default::Default::default()
    }

    // optional fixed32 connection_id = 1;

    pub fn connection_id(&self) -> u32 {
        self.connection_id.unwrap_or(0)
    }

    pub fn clear_connection_id(&mut self) {
        self.connection_id = ::std::option::Option::None;
    }

    pub fn has_connection_id(&self) -> bool {
        self.connection_id.is_some()
    }

    // Param is passed by value, moved
    pub fn set_connection_id(&mut self, v: u32) {
        self.connection_id = ::std::option::Option::Some(v);
    }

    // optional fixed64 challenge = 2;

    pub fn challenge(&self) -> u64 {
        self.challenge.unwrap_or(0)
    }

    pub fn clear_challenge(&mut self) {
        self.challenge = ::std::option::Option::None;
    }

    pub fn has_challenge(&self) -> bool {
        self.challenge.is_some()
    }

    // Param is passed by value, moved
    pub fn set_challenge(&mut self, v: u64) {
        self.challenge = ::std::option::Option::Some(v);
    }

    // optional fixed64 your_timestamp = 3;

    pub fn your_timestamp(&self) -> u64 {
        self.your_timestamp.unwrap_or(0)
    }

    pub fn clear_your_timestamp(&mut self) {
        self.your_timestamp = ::std::option::Option::None;
    }

    pub fn has_your_timestamp(&self) -> bool {
        self.your_timestamp.is_some()
    }

    // Param is passed by value, moved
    pub fn set_your_timestamp(&mut self, v: u64) {
        self.your_timestamp = ::std::option::Option::Some(v);
    }

    // optional uint32 protocol_version = 4;

    pub fn protocol_version(&self) -> u32 {
        self.protocol_version.unwrap_or(0)
    }

    pub fn clear_protocol_version(&mut self) {
        self.protocol_version = ::std::option::Option::None;
    }

    pub fn has_protocol_version(&self) -> bool {
        self.protocol_version.is_some()
    }

    // Param is passed by value, moved
    pub fn set_protocol_version(&mut self, v: u32) {
        self.protocol_version = ::std::option::Option::Some(v);
    }
}

impl ::steam_vent_proto_common::protobuf::Message for CMsgSteamSockets_UDP_ChallengeReply {
    const NAME: &'static str = "CMsgSteamSockets_UDP_ChallengeReply";

    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::steam_vent_proto_common::protobuf::CodedInputStream<'_>) -> ::steam_vent_proto_common::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                13 => {
                    self.connection_id = ::std::option::Option::Some(is.read_fixed32()?);
                },
                17 => {
                    self.challenge = ::std::option::Option::Some(is.read_fixed64()?);
                },
                25 => {
                    self.your_timestamp = ::std::option::Option::Some(is.read_fixed64()?);
                },
                32 => {
                    self.protocol_version = ::std::option::Option::Some(is.read_uint32()?);
                },
                tag => {
                    ::steam_vent_proto_common::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u64 {
        let mut my_size = 0;
        if let Some(v) = self.connection_id {
            my_size += 1 + 4;
        }
        if let Some(v) = self.challenge {
            my_size += 1 + 8;
        }
        if let Some(v) = self.your_timestamp {
            my_size += 1 + 8;
        }
        if let Some(v) = self.protocol_version {
            my_size += ::steam_vent_proto_common::protobuf::rt::uint32_size(4, v);
        }
        my_size += ::steam_vent_proto_common::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::steam_vent_proto_common::protobuf::CodedOutputStream<'_>) -> ::steam_vent_proto_common::protobuf::Result<()> {
        if let Some(v) = self.connection_id {
            os.write_fixed32(1, v)?;
        }
        if let Some(v) = self.challenge {
            os.write_fixed64(2, v)?;
        }
        if let Some(v) = self.your_timestamp {
            os.write_fixed64(3, v)?;
        }
        if let Some(v) = self.protocol_version {
            os.write_uint32(4, v)?;
        }
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn special_fields(&self) -> &::steam_vent_proto_common::protobuf::SpecialFields {
        &self.special_fields
    }

    fn mut_special_fields(&mut self) -> &mut ::steam_vent_proto_common::protobuf::SpecialFields {
        &mut self.special_fields
    }

    fn new() -> CMsgSteamSockets_UDP_ChallengeReply {
        CMsgSteamSockets_UDP_ChallengeReply::new()
    }

    fn clear(&mut self) {
        self.connection_id = ::std::option::Option::None;
        self.challenge = ::std::option::Option::None;
        self.your_timestamp = ::std::option::Option::None;
        self.protocol_version = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static CMsgSteamSockets_UDP_ChallengeReply {
        static instance: CMsgSteamSockets_UDP_ChallengeReply = CMsgSteamSockets_UDP_ChallengeReply {
            connection_id: ::std::option::Option::None,
            challenge: ::std::option::Option::None,
            your_timestamp: ::std::option::Option::None,
            protocol_version: ::std::option::Option::None,
            special_fields: ::steam_vent_proto_common::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

// @@protoc_insertion_point(message:CMsgSteamSockets_UDP_ConnectRequest)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct CMsgSteamSockets_UDP_ConnectRequest {
    // message fields
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ConnectRequest.client_connection_id)
    pub client_connection_id: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ConnectRequest.challenge)
    pub challenge: ::std::option::Option<u64>,
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ConnectRequest.my_timestamp)
    pub my_timestamp: ::std::option::Option<u64>,
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ConnectRequest.ping_est_ms)
    pub ping_est_ms: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ConnectRequest.crypt)
    pub crypt: ::steam_vent_proto_common::protobuf::MessageField<super::steamnetworkingsockets_messages::CMsgSteamDatagramSessionCryptInfoSigned>,
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ConnectRequest.cert)
    pub cert: ::steam_vent_proto_common::protobuf::MessageField<super::steamnetworkingsockets_messages_certs::CMsgSteamDatagramCertificateSigned>,
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ConnectRequest.legacy_protocol_version)
    pub legacy_protocol_version: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ConnectRequest.identity_string)
    pub identity_string: ::std::option::Option<::std::string::String>,
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ConnectRequest.legacy_client_steam_id)
    pub legacy_client_steam_id: ::std::option::Option<u64>,
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ConnectRequest.legacy_identity_binary)
    pub legacy_identity_binary: ::steam_vent_proto_common::protobuf::MessageField<super::steamnetworkingsockets_messages_certs::CMsgSteamNetworkingIdentityLegacyBinary>,
    // special fields
    // @@protoc_insertion_point(special_field:CMsgSteamSockets_UDP_ConnectRequest.special_fields)
    pub special_fields: ::steam_vent_proto_common::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a CMsgSteamSockets_UDP_ConnectRequest {
    fn default() -> &'a CMsgSteamSockets_UDP_ConnectRequest {
        <CMsgSteamSockets_UDP_ConnectRequest as ::steam_vent_proto_common::protobuf::Message>::default_instance()
    }
}

impl CMsgSteamSockets_UDP_ConnectRequest {
    pub fn new() -> CMsgSteamSockets_UDP_ConnectRequest {
        ::std::default::Default::default()
    }

    // optional fixed32 client_connection_id = 1;

    pub fn client_connection_id(&self) -> u32 {
        self.client_connection_id.unwrap_or(0)
    }

    pub fn clear_client_connection_id(&mut self) {
        self.client_connection_id = ::std::option::Option::None;
    }

    pub fn has_client_connection_id(&self) -> bool {
        self.client_connection_id.is_some()
    }

    // Param is passed by value, moved
    pub fn set_client_connection_id(&mut self, v: u32) {
        self.client_connection_id = ::std::option::Option::Some(v);
    }

    // optional fixed64 challenge = 2;

    pub fn challenge(&self) -> u64 {
        self.challenge.unwrap_or(0)
    }

    pub fn clear_challenge(&mut self) {
        self.challenge = ::std::option::Option::None;
    }

    pub fn has_challenge(&self) -> bool {
        self.challenge.is_some()
    }

    // Param is passed by value, moved
    pub fn set_challenge(&mut self, v: u64) {
        self.challenge = ::std::option::Option::Some(v);
    }

    // optional fixed64 my_timestamp = 5;

    pub fn my_timestamp(&self) -> u64 {
        self.my_timestamp.unwrap_or(0)
    }

    pub fn clear_my_timestamp(&mut self) {
        self.my_timestamp = ::std::option::Option::None;
    }

    pub fn has_my_timestamp(&self) -> bool {
        self.my_timestamp.is_some()
    }

    // Param is passed by value, moved
    pub fn set_my_timestamp(&mut self, v: u64) {
        self.my_timestamp = ::std::option::Option::Some(v);
    }

    // optional uint32 ping_est_ms = 6;

    pub fn ping_est_ms(&self) -> u32 {
        self.ping_est_ms.unwrap_or(0)
    }

    pub fn clear_ping_est_ms(&mut self) {
        self.ping_est_ms = ::std::option::Option::None;
    }

    pub fn has_ping_est_ms(&self) -> bool {
        self.ping_est_ms.is_some()
    }

    // Param is passed by value, moved
    pub fn set_ping_est_ms(&mut self, v: u32) {
        self.ping_est_ms = ::std::option::Option::Some(v);
    }

    // optional uint32 legacy_protocol_version = 8;

    pub fn legacy_protocol_version(&self) -> u32 {
        self.legacy_protocol_version.unwrap_or(0)
    }

    pub fn clear_legacy_protocol_version(&mut self) {
        self.legacy_protocol_version = ::std::option::Option::None;
    }

    pub fn has_legacy_protocol_version(&self) -> bool {
        self.legacy_protocol_version.is_some()
    }

    // Param is passed by value, moved
    pub fn set_legacy_protocol_version(&mut self, v: u32) {
        self.legacy_protocol_version = ::std::option::Option::Some(v);
    }

    // optional string identity_string = 10;

    pub fn identity_string(&self) -> &str {
        match self.identity_string.as_ref() {
            Some(v) => v,
            None => "",
        }
    }

    pub fn clear_identity_string(&mut self) {
        self.identity_string = ::std::option::Option::None;
    }

    pub fn has_identity_string(&self) -> bool {
        self.identity_string.is_some()
    }

    // Param is passed by value, moved
    pub fn set_identity_string(&mut self, v: ::std::string::String) {
        self.identity_string = ::std::option::Option::Some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_identity_string(&mut self) -> &mut ::std::string::String {
        if self.identity_string.is_none() {
            self.identity_string = ::std::option::Option::Some(::std::string::String::new());
        }
        self.identity_string.as_mut().unwrap()
    }

    // Take field
    pub fn take_identity_string(&mut self) -> ::std::string::String {
        self.identity_string.take().unwrap_or_else(|| ::std::string::String::new())
    }

    // optional fixed64 legacy_client_steam_id = 3;

    pub fn legacy_client_steam_id(&self) -> u64 {
        self.legacy_client_steam_id.unwrap_or(0)
    }

    pub fn clear_legacy_client_steam_id(&mut self) {
        self.legacy_client_steam_id = ::std::option::Option::None;
    }

    pub fn has_legacy_client_steam_id(&self) -> bool {
        self.legacy_client_steam_id.is_some()
    }

    // Param is passed by value, moved
    pub fn set_legacy_client_steam_id(&mut self, v: u64) {
        self.legacy_client_steam_id = ::std::option::Option::Some(v);
    }
}

impl ::steam_vent_proto_common::protobuf::Message for CMsgSteamSockets_UDP_ConnectRequest {
    const NAME: &'static str = "CMsgSteamSockets_UDP_ConnectRequest";

    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::steam_vent_proto_common::protobuf::CodedInputStream<'_>) -> ::steam_vent_proto_common::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                13 => {
                    self.client_connection_id = ::std::option::Option::Some(is.read_fixed32()?);
                },
                17 => {
                    self.challenge = ::std::option::Option::Some(is.read_fixed64()?);
                },
                41 => {
                    self.my_timestamp = ::std::option::Option::Some(is.read_fixed64()?);
                },
                48 => {
                    self.ping_est_ms = ::std::option::Option::Some(is.read_uint32()?);
                },
                58 => {
                    ::steam_vent_proto_common::protobuf::rt::read_singular_message_into_field(is, &mut self.crypt)?;
                },
                34 => {
                    ::steam_vent_proto_common::protobuf::rt::read_singular_message_into_field(is, &mut self.cert)?;
                },
                64 => {
                    self.legacy_protocol_version = ::std::option::Option::Some(is.read_uint32()?);
                },
                82 => {
                    self.identity_string = ::std::option::Option::Some(is.read_string()?);
                },
                25 => {
                    self.legacy_client_steam_id = ::std::option::Option::Some(is.read_fixed64()?);
                },
                74 => {
                    ::steam_vent_proto_common::protobuf::rt::read_singular_message_into_field(is, &mut self.legacy_identity_binary)?;
                },
                tag => {
                    ::steam_vent_proto_common::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u64 {
        let mut my_size = 0;
        if let Some(v) = self.client_connection_id {
            my_size += 1 + 4;
        }
        if let Some(v) = self.challenge {
            my_size += 1 + 8;
        }
        if let Some(v) = self.my_timestamp {
            my_size += 1 + 8;
        }
        if let Some(v) = self.ping_est_ms {
            my_size += ::steam_vent_proto_common::protobuf::rt::uint32_size(6, v);
        }
        if let Some(v) = self.crypt.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::steam_vent_proto_common::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.cert.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::steam_vent_proto_common::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.legacy_protocol_version {
            my_size += ::steam_vent_proto_common::protobuf::rt::uint32_size(8, v);
        }
        if let Some(v) = self.identity_string.as_ref() {
            my_size += ::steam_vent_proto_common::protobuf::rt::string_size(10, &v);
        }
        if let Some(v) = self.legacy_client_steam_id {
            my_size += 1 + 8;
        }
        if let Some(v) = self.legacy_identity_binary.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::steam_vent_proto_common::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        my_size += ::steam_vent_proto_common::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::steam_vent_proto_common::protobuf::CodedOutputStream<'_>) -> ::steam_vent_proto_common::protobuf::Result<()> {
        if let Some(v) = self.client_connection_id {
            os.write_fixed32(1, v)?;
        }
        if let Some(v) = self.challenge {
            os.write_fixed64(2, v)?;
        }
        if let Some(v) = self.my_timestamp {
            os.write_fixed64(5, v)?;
        }
        if let Some(v) = self.ping_est_ms {
            os.write_uint32(6, v)?;
        }
        if let Some(v) = self.crypt.as_ref() {
            ::steam_vent_proto_common::protobuf::rt::write_message_field_with_cached_size(7, v, os)?;
        }
        if let Some(v) = self.cert.as_ref() {
            ::steam_vent_proto_common::protobuf::rt::write_message_field_with_cached_size(4, v, os)?;
        }
        if let Some(v) = self.legacy_protocol_version {
            os.write_uint32(8, v)?;
        }
        if let Some(v) = self.identity_string.as_ref() {
            os.write_string(10, v)?;
        }
        if let Some(v) = self.legacy_client_steam_id {
            os.write_fixed64(3, v)?;
        }
        if let Some(v) = self.legacy_identity_binary.as_ref() {
            ::steam_vent_proto_common::protobuf::rt::write_message_field_with_cached_size(9, v, os)?;
        }
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn special_fields(&self) -> &::steam_vent_proto_common::protobuf::SpecialFields {
        &self.special_fields
    }

    fn mut_special_fields(&mut self) -> &mut ::steam_vent_proto_common::protobuf::SpecialFields {
        &mut self.special_fields
    }

    fn new() -> CMsgSteamSockets_UDP_ConnectRequest {
        CMsgSteamSockets_UDP_ConnectRequest::new()
    }

    fn clear(&mut self) {
        self.client_connection_id = ::std::option::Option::None;
        self.challenge = ::std::option::Option::None;
        self.my_timestamp = ::std::option::Option::None;
        self.ping_est_ms = ::std::option::Option::None;
        self.crypt.clear();
        self.cert.clear();
        self.legacy_protocol_version = ::std::option::Option::None;
        self.identity_string = ::std::option::Option::None;
        self.legacy_client_steam_id = ::std::option::Option::None;
        self.legacy_identity_binary.clear();
        self.special_fields.clear();
    }

    fn default_instance() -> &'static CMsgSteamSockets_UDP_ConnectRequest {
        static instance: CMsgSteamSockets_UDP_ConnectRequest = CMsgSteamSockets_UDP_ConnectRequest {
            client_connection_id: ::std::option::Option::None,
            challenge: ::std::option::Option::None,
            my_timestamp: ::std::option::Option::None,
            ping_est_ms: ::std::option::Option::None,
            crypt: ::steam_vent_proto_common::protobuf::MessageField::none(),
            cert: ::steam_vent_proto_common::protobuf::MessageField::none(),
            legacy_protocol_version: ::std::option::Option::None,
            identity_string: ::std::option::Option::None,
            legacy_client_steam_id: ::std::option::Option::None,
            legacy_identity_binary: ::steam_vent_proto_common::protobuf::MessageField::none(),
            special_fields: ::steam_vent_proto_common::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

// @@protoc_insertion_point(message:CMsgSteamSockets_UDP_ConnectOK)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct CMsgSteamSockets_UDP_ConnectOK {
    // message fields
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ConnectOK.client_connection_id)
    pub client_connection_id: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ConnectOK.server_connection_id)
    pub server_connection_id: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ConnectOK.your_timestamp)
    pub your_timestamp: ::std::option::Option<u64>,
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ConnectOK.delay_time_usec)
    pub delay_time_usec: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ConnectOK.crypt)
    pub crypt: ::steam_vent_proto_common::protobuf::MessageField<super::steamnetworkingsockets_messages::CMsgSteamDatagramSessionCryptInfoSigned>,
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ConnectOK.cert)
    pub cert: ::steam_vent_proto_common::protobuf::MessageField<super::steamnetworkingsockets_messages_certs::CMsgSteamDatagramCertificateSigned>,
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ConnectOK.identity_string)
    pub identity_string: ::std::option::Option<::std::string::String>,
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ConnectOK.legacy_server_steam_id)
    pub legacy_server_steam_id: ::std::option::Option<u64>,
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ConnectOK.legacy_identity_binary)
    pub legacy_identity_binary: ::steam_vent_proto_common::protobuf::MessageField<super::steamnetworkingsockets_messages_certs::CMsgSteamNetworkingIdentityLegacyBinary>,
    // special fields
    // @@protoc_insertion_point(special_field:CMsgSteamSockets_UDP_ConnectOK.special_fields)
    pub special_fields: ::steam_vent_proto_common::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a CMsgSteamSockets_UDP_ConnectOK {
    fn default() -> &'a CMsgSteamSockets_UDP_ConnectOK {
        <CMsgSteamSockets_UDP_ConnectOK as ::steam_vent_proto_common::protobuf::Message>::default_instance()
    }
}

impl CMsgSteamSockets_UDP_ConnectOK {
    pub fn new() -> CMsgSteamSockets_UDP_ConnectOK {
        ::std::default::Default::default()
    }

    // optional fixed32 client_connection_id = 1;

    pub fn client_connection_id(&self) -> u32 {
        self.client_connection_id.unwrap_or(0)
    }

    pub fn clear_client_connection_id(&mut self) {
        self.client_connection_id = ::std::option::Option::None;
    }

    pub fn has_client_connection_id(&self) -> bool {
        self.client_connection_id.is_some()
    }

    // Param is passed by value, moved
    pub fn set_client_connection_id(&mut self, v: u32) {
        self.client_connection_id = ::std::option::Option::Some(v);
    }

    // optional fixed32 server_connection_id = 5;

    pub fn server_connection_id(&self) -> u32 {
        self.server_connection_id.unwrap_or(0)
    }

    pub fn clear_server_connection_id(&mut self) {
        self.server_connection_id = ::std::option::Option::None;
    }

    pub fn has_server_connection_id(&self) -> bool {
        self.server_connection_id.is_some()
    }

    // Param is passed by value, moved
    pub fn set_server_connection_id(&mut self, v: u32) {
        self.server_connection_id = ::std::option::Option::Some(v);
    }

    // optional fixed64 your_timestamp = 3;

    pub fn your_timestamp(&self) -> u64 {
        self.your_timestamp.unwrap_or(0)
    }

    pub fn clear_your_timestamp(&mut self) {
        self.your_timestamp = ::std::option::Option::None;
    }

    pub fn has_your_timestamp(&self) -> bool {
        self.your_timestamp.is_some()
    }

    // Param is passed by value, moved
    pub fn set_your_timestamp(&mut self, v: u64) {
        self.your_timestamp = ::std::option::Option::Some(v);
    }

    // optional uint32 delay_time_usec = 4;

    pub fn delay_time_usec(&self) -> u32 {
        self.delay_time_usec.unwrap_or(0)
    }

    pub fn clear_delay_time_usec(&mut self) {
        self.delay_time_usec = ::std::option::Option::None;
    }

    pub fn has_delay_time_usec(&self) -> bool {
        self.delay_time_usec.is_some()
    }

    // Param is passed by value, moved
    pub fn set_delay_time_usec(&mut self, v: u32) {
        self.delay_time_usec = ::std::option::Option::Some(v);
    }

    // optional string identity_string = 11;

    pub fn identity_string(&self) -> &str {
        match self.identity_string.as_ref() {
            Some(v) => v,
            None => "",
        }
    }

    pub fn clear_identity_string(&mut self) {
        self.identity_string = ::std::option::Option::None;
    }

    pub fn has_identity_string(&self) -> bool {
        self.identity_string.is_some()
    }

    // Param is passed by value, moved
    pub fn set_identity_string(&mut self, v: ::std::string::String) {
        self.identity_string = ::std::option::Option::Some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_identity_string(&mut self) -> &mut ::std::string::String {
        if self.identity_string.is_none() {
            self.identity_string = ::std::option::Option::Some(::std::string::String::new());
        }
        self.identity_string.as_mut().unwrap()
    }

    // Take field
    pub fn take_identity_string(&mut self) -> ::std::string::String {
        self.identity_string.take().unwrap_or_else(|| ::std::string::String::new())
    }

    // optional fixed64 legacy_server_steam_id = 2;

    pub fn legacy_server_steam_id(&self) -> u64 {
        self.legacy_server_steam_id.unwrap_or(0)
    }

    pub fn clear_legacy_server_steam_id(&mut self) {
        self.legacy_server_steam_id = ::std::option::Option::None;
    }

    pub fn has_legacy_server_steam_id(&self) -> bool {
        self.legacy_server_steam_id.is_some()
    }

    // Param is passed by value, moved
    pub fn set_legacy_server_steam_id(&mut self, v: u64) {
        self.legacy_server_steam_id = ::std::option::Option::Some(v);
    }
}

impl ::steam_vent_proto_common::protobuf::Message for CMsgSteamSockets_UDP_ConnectOK {
    const NAME: &'static str = "CMsgSteamSockets_UDP_ConnectOK";

    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::steam_vent_proto_common::protobuf::CodedInputStream<'_>) -> ::steam_vent_proto_common::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                13 => {
                    self.client_connection_id = ::std::option::Option::Some(is.read_fixed32()?);
                },
                45 => {
                    self.server_connection_id = ::std::option::Option::Some(is.read_fixed32()?);
                },
                25 => {
                    self.your_timestamp = ::std::option::Option::Some(is.read_fixed64()?);
                },
                32 => {
                    self.delay_time_usec = ::std::option::Option::Some(is.read_uint32()?);
                },
                58 => {
                    ::steam_vent_proto_common::protobuf::rt::read_singular_message_into_field(is, &mut self.crypt)?;
                },
                66 => {
                    ::steam_vent_proto_common::protobuf::rt::read_singular_message_into_field(is, &mut self.cert)?;
                },
                90 => {
                    self.identity_string = ::std::option::Option::Some(is.read_string()?);
                },
                17 => {
                    self.legacy_server_steam_id = ::std::option::Option::Some(is.read_fixed64()?);
                },
                82 => {
                    ::steam_vent_proto_common::protobuf::rt::read_singular_message_into_field(is, &mut self.legacy_identity_binary)?;
                },
                tag => {
                    ::steam_vent_proto_common::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u64 {
        let mut my_size = 0;
        if let Some(v) = self.client_connection_id {
            my_size += 1 + 4;
        }
        if let Some(v) = self.server_connection_id {
            my_size += 1 + 4;
        }
        if let Some(v) = self.your_timestamp {
            my_size += 1 + 8;
        }
        if let Some(v) = self.delay_time_usec {
            my_size += ::steam_vent_proto_common::protobuf::rt::uint32_size(4, v);
        }
        if let Some(v) = self.crypt.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::steam_vent_proto_common::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.cert.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::steam_vent_proto_common::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.identity_string.as_ref() {
            my_size += ::steam_vent_proto_common::protobuf::rt::string_size(11, &v);
        }
        if let Some(v) = self.legacy_server_steam_id {
            my_size += 1 + 8;
        }
        if let Some(v) = self.legacy_identity_binary.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::steam_vent_proto_common::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        my_size += ::steam_vent_proto_common::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::steam_vent_proto_common::protobuf::CodedOutputStream<'_>) -> ::steam_vent_proto_common::protobuf::Result<()> {
        if let Some(v) = self.client_connection_id {
            os.write_fixed32(1, v)?;
        }
        if let Some(v) = self.server_connection_id {
            os.write_fixed32(5, v)?;
        }
        if let Some(v) = self.your_timestamp {
            os.write_fixed64(3, v)?;
        }
        if let Some(v) = self.delay_time_usec {
            os.write_uint32(4, v)?;
        }
        if let Some(v) = self.crypt.as_ref() {
            ::steam_vent_proto_common::protobuf::rt::write_message_field_with_cached_size(7, v, os)?;
        }
        if let Some(v) = self.cert.as_ref() {
            ::steam_vent_proto_common::protobuf::rt::write_message_field_with_cached_size(8, v, os)?;
        }
        if let Some(v) = self.identity_string.as_ref() {
            os.write_string(11, v)?;
        }
        if let Some(v) = self.legacy_server_steam_id {
            os.write_fixed64(2, v)?;
        }
        if let Some(v) = self.legacy_identity_binary.as_ref() {
            ::steam_vent_proto_common::protobuf::rt::write_message_field_with_cached_size(10, v, os)?;
        }
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn special_fields(&self) -> &::steam_vent_proto_common::protobuf::SpecialFields {
        &self.special_fields
    }

    fn mut_special_fields(&mut self) -> &mut ::steam_vent_proto_common::protobuf::SpecialFields {
        &mut self.special_fields
    }

    fn new() -> CMsgSteamSockets_UDP_ConnectOK {
        CMsgSteamSockets_UDP_ConnectOK::new()
    }

    fn clear(&mut self) {
        self.client_connection_id = ::std::option::Option::None;
        self.server_connection_id = ::std::option::Option::None;
        self.your_timestamp = ::std::option::Option::None;
        self.delay_time_usec = ::std::option::Option::None;
        self.crypt.clear();
        self.cert.clear();
        self.identity_string = ::std::option::Option::None;
        self.legacy_server_steam_id = ::std::option::Option::None;
        self.legacy_identity_binary.clear();
        self.special_fields.clear();
    }

    fn default_instance() -> &'static CMsgSteamSockets_UDP_ConnectOK {
        static instance: CMsgSteamSockets_UDP_ConnectOK = CMsgSteamSockets_UDP_ConnectOK {
            client_connection_id: ::std::option::Option::None,
            server_connection_id: ::std::option::Option::None,
            your_timestamp: ::std::option::Option::None,
            delay_time_usec: ::std::option::Option::None,
            crypt: ::steam_vent_proto_common::protobuf::MessageField::none(),
            cert: ::steam_vent_proto_common::protobuf::MessageField::none(),
            identity_string: ::std::option::Option::None,
            legacy_server_steam_id: ::std::option::Option::None,
            legacy_identity_binary: ::steam_vent_proto_common::protobuf::MessageField::none(),
            special_fields: ::steam_vent_proto_common::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

// @@protoc_insertion_point(message:CMsgSteamSockets_UDP_ConnectionClosed)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct CMsgSteamSockets_UDP_ConnectionClosed {
    // message fields
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ConnectionClosed.to_connection_id)
    pub to_connection_id: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ConnectionClosed.from_connection_id)
    pub from_connection_id: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ConnectionClosed.debug)
    pub debug: ::std::option::Option<::std::string::String>,
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_ConnectionClosed.reason_code)
    pub reason_code: ::std::option::Option<u32>,
    // special fields
    // @@protoc_insertion_point(special_field:CMsgSteamSockets_UDP_ConnectionClosed.special_fields)
    pub special_fields: ::steam_vent_proto_common::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a CMsgSteamSockets_UDP_ConnectionClosed {
    fn default() -> &'a CMsgSteamSockets_UDP_ConnectionClosed {
        <CMsgSteamSockets_UDP_ConnectionClosed as ::steam_vent_proto_common::protobuf::Message>::default_instance()
    }
}

impl CMsgSteamSockets_UDP_ConnectionClosed {
    pub fn new() -> CMsgSteamSockets_UDP_ConnectionClosed {
        ::std::default::Default::default()
    }

    // optional fixed32 to_connection_id = 4;

    pub fn to_connection_id(&self) -> u32 {
        self.to_connection_id.unwrap_or(0)
    }

    pub fn clear_to_connection_id(&mut self) {
        self.to_connection_id = ::std::option::Option::None;
    }

    pub fn has_to_connection_id(&self) -> bool {
        self.to_connection_id.is_some()
    }

    // Param is passed by value, moved
    pub fn set_to_connection_id(&mut self, v: u32) {
        self.to_connection_id = ::std::option::Option::Some(v);
    }

    // optional fixed32 from_connection_id = 5;

    pub fn from_connection_id(&self) -> u32 {
        self.from_connection_id.unwrap_or(0)
    }

    pub fn clear_from_connection_id(&mut self) {
        self.from_connection_id = ::std::option::Option::None;
    }

    pub fn has_from_connection_id(&self) -> bool {
        self.from_connection_id.is_some()
    }

    // Param is passed by value, moved
    pub fn set_from_connection_id(&mut self, v: u32) {
        self.from_connection_id = ::std::option::Option::Some(v);
    }

    // optional string debug = 2;

    pub fn debug(&self) -> &str {
        match self.debug.as_ref() {
            Some(v) => v,
            None => "",
        }
    }

    pub fn clear_debug(&mut self) {
        self.debug = ::std::option::Option::None;
    }

    pub fn has_debug(&self) -> bool {
        self.debug.is_some()
    }

    // Param is passed by value, moved
    pub fn set_debug(&mut self, v: ::std::string::String) {
        self.debug = ::std::option::Option::Some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_debug(&mut self) -> &mut ::std::string::String {
        if self.debug.is_none() {
            self.debug = ::std::option::Option::Some(::std::string::String::new());
        }
        self.debug.as_mut().unwrap()
    }

    // Take field
    pub fn take_debug(&mut self) -> ::std::string::String {
        self.debug.take().unwrap_or_else(|| ::std::string::String::new())
    }

    // optional uint32 reason_code = 3;

    pub fn reason_code(&self) -> u32 {
        self.reason_code.unwrap_or(0)
    }

    pub fn clear_reason_code(&mut self) {
        self.reason_code = ::std::option::Option::None;
    }

    pub fn has_reason_code(&self) -> bool {
        self.reason_code.is_some()
    }

    // Param is passed by value, moved
    pub fn set_reason_code(&mut self, v: u32) {
        self.reason_code = ::std::option::Option::Some(v);
    }
}

impl ::steam_vent_proto_common::protobuf::Message for CMsgSteamSockets_UDP_ConnectionClosed {
    const NAME: &'static str = "CMsgSteamSockets_UDP_ConnectionClosed";

    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::steam_vent_proto_common::protobuf::CodedInputStream<'_>) -> ::steam_vent_proto_common::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                37 => {
                    self.to_connection_id = ::std::option::Option::Some(is.read_fixed32()?);
                },
                45 => {
                    self.from_connection_id = ::std::option::Option::Some(is.read_fixed32()?);
                },
                18 => {
                    self.debug = ::std::option::Option::Some(is.read_string()?);
                },
                24 => {
                    self.reason_code = ::std::option::Option::Some(is.read_uint32()?);
                },
                tag => {
                    ::steam_vent_proto_common::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u64 {
        let mut my_size = 0;
        if let Some(v) = self.to_connection_id {
            my_size += 1 + 4;
        }
        if let Some(v) = self.from_connection_id {
            my_size += 1 + 4;
        }
        if let Some(v) = self.debug.as_ref() {
            my_size += ::steam_vent_proto_common::protobuf::rt::string_size(2, &v);
        }
        if let Some(v) = self.reason_code {
            my_size += ::steam_vent_proto_common::protobuf::rt::uint32_size(3, v);
        }
        my_size += ::steam_vent_proto_common::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::steam_vent_proto_common::protobuf::CodedOutputStream<'_>) -> ::steam_vent_proto_common::protobuf::Result<()> {
        if let Some(v) = self.to_connection_id {
            os.write_fixed32(4, v)?;
        }
        if let Some(v) = self.from_connection_id {
            os.write_fixed32(5, v)?;
        }
        if let Some(v) = self.debug.as_ref() {
            os.write_string(2, v)?;
        }
        if let Some(v) = self.reason_code {
            os.write_uint32(3, v)?;
        }
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn special_fields(&self) -> &::steam_vent_proto_common::protobuf::SpecialFields {
        &self.special_fields
    }

    fn mut_special_fields(&mut self) -> &mut ::steam_vent_proto_common::protobuf::SpecialFields {
        &mut self.special_fields
    }

    fn new() -> CMsgSteamSockets_UDP_ConnectionClosed {
        CMsgSteamSockets_UDP_ConnectionClosed::new()
    }

    fn clear(&mut self) {
        self.to_connection_id = ::std::option::Option::None;
        self.from_connection_id = ::std::option::Option::None;
        self.debug = ::std::option::Option::None;
        self.reason_code = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static CMsgSteamSockets_UDP_ConnectionClosed {
        static instance: CMsgSteamSockets_UDP_ConnectionClosed = CMsgSteamSockets_UDP_ConnectionClosed {
            to_connection_id: ::std::option::Option::None,
            from_connection_id: ::std::option::Option::None,
            debug: ::std::option::Option::None,
            reason_code: ::std::option::Option::None,
            special_fields: ::steam_vent_proto_common::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

// @@protoc_insertion_point(message:CMsgSteamSockets_UDP_NoConnection)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct CMsgSteamSockets_UDP_NoConnection {
    // message fields
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_NoConnection.from_connection_id)
    pub from_connection_id: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_NoConnection.to_connection_id)
    pub to_connection_id: ::std::option::Option<u32>,
    // special fields
    // @@protoc_insertion_point(special_field:CMsgSteamSockets_UDP_NoConnection.special_fields)
    pub special_fields: ::steam_vent_proto_common::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a CMsgSteamSockets_UDP_NoConnection {
    fn default() -> &'a CMsgSteamSockets_UDP_NoConnection {
        <CMsgSteamSockets_UDP_NoConnection as ::steam_vent_proto_common::protobuf::Message>::default_instance()
    }
}

impl CMsgSteamSockets_UDP_NoConnection {
    pub fn new() -> CMsgSteamSockets_UDP_NoConnection {
        ::std::default::Default::default()
    }

    // optional fixed32 from_connection_id = 2;

    pub fn from_connection_id(&self) -> u32 {
        self.from_connection_id.unwrap_or(0)
    }

    pub fn clear_from_connection_id(&mut self) {
        self.from_connection_id = ::std::option::Option::None;
    }

    pub fn has_from_connection_id(&self) -> bool {
        self.from_connection_id.is_some()
    }

    // Param is passed by value, moved
    pub fn set_from_connection_id(&mut self, v: u32) {
        self.from_connection_id = ::std::option::Option::Some(v);
    }

    // optional fixed32 to_connection_id = 3;

    pub fn to_connection_id(&self) -> u32 {
        self.to_connection_id.unwrap_or(0)
    }

    pub fn clear_to_connection_id(&mut self) {
        self.to_connection_id = ::std::option::Option::None;
    }

    pub fn has_to_connection_id(&self) -> bool {
        self.to_connection_id.is_some()
    }

    // Param is passed by value, moved
    pub fn set_to_connection_id(&mut self, v: u32) {
        self.to_connection_id = ::std::option::Option::Some(v);
    }
}

impl ::steam_vent_proto_common::protobuf::Message for CMsgSteamSockets_UDP_NoConnection {
    const NAME: &'static str = "CMsgSteamSockets_UDP_NoConnection";

    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::steam_vent_proto_common::protobuf::CodedInputStream<'_>) -> ::steam_vent_proto_common::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                21 => {
                    self.from_connection_id = ::std::option::Option::Some(is.read_fixed32()?);
                },
                29 => {
                    self.to_connection_id = ::std::option::Option::Some(is.read_fixed32()?);
                },
                tag => {
                    ::steam_vent_proto_common::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u64 {
        let mut my_size = 0;
        if let Some(v) = self.from_connection_id {
            my_size += 1 + 4;
        }
        if let Some(v) = self.to_connection_id {
            my_size += 1 + 4;
        }
        my_size += ::steam_vent_proto_common::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::steam_vent_proto_common::protobuf::CodedOutputStream<'_>) -> ::steam_vent_proto_common::protobuf::Result<()> {
        if let Some(v) = self.from_connection_id {
            os.write_fixed32(2, v)?;
        }
        if let Some(v) = self.to_connection_id {
            os.write_fixed32(3, v)?;
        }
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn special_fields(&self) -> &::steam_vent_proto_common::protobuf::SpecialFields {
        &self.special_fields
    }

    fn mut_special_fields(&mut self) -> &mut ::steam_vent_proto_common::protobuf::SpecialFields {
        &mut self.special_fields
    }

    fn new() -> CMsgSteamSockets_UDP_NoConnection {
        CMsgSteamSockets_UDP_NoConnection::new()
    }

    fn clear(&mut self) {
        self.from_connection_id = ::std::option::Option::None;
        self.to_connection_id = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static CMsgSteamSockets_UDP_NoConnection {
        static instance: CMsgSteamSockets_UDP_NoConnection = CMsgSteamSockets_UDP_NoConnection {
            from_connection_id: ::std::option::Option::None,
            to_connection_id: ::std::option::Option::None,
            special_fields: ::steam_vent_proto_common::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

// @@protoc_insertion_point(message:CMsgSteamSockets_UDP_Stats)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct CMsgSteamSockets_UDP_Stats {
    // message fields
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_Stats.stats)
    pub stats: ::steam_vent_proto_common::protobuf::MessageField<super::steamnetworkingsockets_messages::CMsgSteamDatagramConnectionQuality>,
    // @@protoc_insertion_point(field:CMsgSteamSockets_UDP_Stats.flags)
    pub flags: ::std::option::Option<u32>,
    // special fields
    // @@protoc_insertion_point(special_field:CMsgSteamSockets_UDP_Stats.special_fields)
    pub special_fields: ::steam_vent_proto_common::protobuf::SpecialFields,
}

impl<'a> ::std::default::Default for &'a CMsgSteamSockets_UDP_Stats {
    fn default() -> &'a CMsgSteamSockets_UDP_Stats {
        <CMsgSteamSockets_UDP_Stats as ::steam_vent_proto_common::protobuf::Message>::default_instance()
    }
}

impl CMsgSteamSockets_UDP_Stats {
    pub fn new() -> CMsgSteamSockets_UDP_Stats {
        ::std::default::Default::default()
    }

    // optional uint32 flags = 3;

    pub fn flags(&self) -> u32 {
        self.flags.unwrap_or(0)
    }

    pub fn clear_flags(&mut self) {
        self.flags = ::std::option::Option::None;
    }

    pub fn has_flags(&self) -> bool {
        self.flags.is_some()
    }

    // Param is passed by value, moved
    pub fn set_flags(&mut self, v: u32) {
        self.flags = ::std::option::Option::Some(v);
    }
}

impl ::steam_vent_proto_common::protobuf::Message for CMsgSteamSockets_UDP_Stats {
    const NAME: &'static str = "CMsgSteamSockets_UDP_Stats";

    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::steam_vent_proto_common::protobuf::CodedInputStream<'_>) -> ::steam_vent_proto_common::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                10 => {
                    ::steam_vent_proto_common::protobuf::rt::read_singular_message_into_field(is, &mut self.stats)?;
                },
                24 => {
                    self.flags = ::std::option::Option::Some(is.read_uint32()?);
                },
                tag => {
                    ::steam_vent_proto_common::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u64 {
        let mut my_size = 0;
        if let Some(v) = self.stats.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::steam_vent_proto_common::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.flags {
            my_size += ::steam_vent_proto_common::protobuf::rt::uint32_size(3, v);
        }
        my_size += ::steam_vent_proto_common::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::steam_vent_proto_common::protobuf::CodedOutputStream<'_>) -> ::steam_vent_proto_common::protobuf::Result<()> {
        if let Some(v) = self.stats.as_ref() {
            ::steam_vent_proto_common::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
        }
        if let Some(v) = self.flags {
            os.write_uint32(3, v)?;
        }
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn special_fields(&self) -> &::steam_vent_proto_common::protobuf::SpecialFields {
        &self.special_fields
    }

    fn mut_special_fields(&mut self) -> &mut ::steam_vent_proto_common::protobuf::SpecialFields {
        &mut self.special_fields
    }

    fn new() -> CMsgSteamSockets_UDP_Stats {
        CMsgSteamSockets_UDP_Stats::new()
    }

    fn clear(&mut self) {
        self.stats.clear();
        self.flags = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static CMsgSteamSockets_UDP_Stats {
        static instance: CMsgSteamSockets_UDP_Stats = CMsgSteamSockets_UDP_Stats {
            stats: ::steam_vent_proto_common::protobuf::MessageField::none(),
            flags: ::std::option::Option::None,
            special_fields: ::steam_vent_proto_common::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

/// Nested message and enums of message `CMsgSteamSockets_UDP_Stats`
pub mod cmsg_steam_sockets_udp_stats {
    #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
    // @@protoc_insertion_point(enum:CMsgSteamSockets_UDP_Stats.Flags)
    pub enum Flags {
        // @@protoc_insertion_point(enum_value:CMsgSteamSockets_UDP_Stats.Flags.ACK_REQUEST_E2E)
        ACK_REQUEST_E2E = 2,
        // @@protoc_insertion_point(enum_value:CMsgSteamSockets_UDP_Stats.Flags.ACK_REQUEST_IMMEDIATE)
        ACK_REQUEST_IMMEDIATE = 4,
        // @@protoc_insertion_point(enum_value:CMsgSteamSockets_UDP_Stats.Flags.NOT_PRIMARY_TRANSPORT_E2E)
        NOT_PRIMARY_TRANSPORT_E2E = 16,
    }

    impl ::steam_vent_proto_common::protobuf::Enum for Flags {
        const NAME: &'static str = "Flags";

        fn value(&self) -> i32 {
            *self as i32
        }

        fn from_i32(value: i32) -> ::std::option::Option<Flags> {
            match value {
                2 => ::std::option::Option::Some(Flags::ACK_REQUEST_E2E),
                4 => ::std::option::Option::Some(Flags::ACK_REQUEST_IMMEDIATE),
                16 => ::std::option::Option::Some(Flags::NOT_PRIMARY_TRANSPORT_E2E),
                _ => ::std::option::Option::None
            }
        }

        fn from_str(str: &str) -> ::std::option::Option<Flags> {
            match str {
                "ACK_REQUEST_E2E" => ::std::option::Option::Some(Flags::ACK_REQUEST_E2E),
                "ACK_REQUEST_IMMEDIATE" => ::std::option::Option::Some(Flags::ACK_REQUEST_IMMEDIATE),
                "NOT_PRIMARY_TRANSPORT_E2E" => ::std::option::Option::Some(Flags::NOT_PRIMARY_TRANSPORT_E2E),
                _ => ::std::option::Option::None
            }
        }

        const VALUES: &'static [Flags] = &[
            Flags::ACK_REQUEST_E2E,
            Flags::ACK_REQUEST_IMMEDIATE,
            Flags::NOT_PRIMARY_TRANSPORT_E2E,
        ];
    }

    // Note, `Default` is implemented although default value is not 0
    impl ::std::default::Default for Flags {
        fn default() -> Self {
            Flags::ACK_REQUEST_E2E
        }
    }

}

#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
// @@protoc_insertion_point(enum:ESteamNetworkingUDPMsgID)
pub enum ESteamNetworkingUDPMsgID {
    // @@protoc_insertion_point(enum_value:ESteamNetworkingUDPMsgID.k_ESteamNetworkingUDPMsg_ChallengeRequest)
    k_ESteamNetworkingUDPMsg_ChallengeRequest = 32,
    // @@protoc_insertion_point(enum_value:ESteamNetworkingUDPMsgID.k_ESteamNetworkingUDPMsg_ChallengeReply)
    k_ESteamNetworkingUDPMsg_ChallengeReply = 33,
    // @@protoc_insertion_point(enum_value:ESteamNetworkingUDPMsgID.k_ESteamNetworkingUDPMsg_ConnectRequest)
    k_ESteamNetworkingUDPMsg_ConnectRequest = 34,
    // @@protoc_insertion_point(enum_value:ESteamNetworkingUDPMsgID.k_ESteamNetworkingUDPMsg_ConnectOK)
    k_ESteamNetworkingUDPMsg_ConnectOK = 35,
    // @@protoc_insertion_point(enum_value:ESteamNetworkingUDPMsgID.k_ESteamNetworkingUDPMsg_ConnectionClosed)
    k_ESteamNetworkingUDPMsg_ConnectionClosed = 36,
    // @@protoc_insertion_point(enum_value:ESteamNetworkingUDPMsgID.k_ESteamNetworkingUDPMsg_NoConnection)
    k_ESteamNetworkingUDPMsg_NoConnection = 37,
}

impl ::steam_vent_proto_common::protobuf::Enum for ESteamNetworkingUDPMsgID {
    const NAME: &'static str = "ESteamNetworkingUDPMsgID";

    fn value(&self) -> i32 {
        *self as i32
    }

    fn from_i32(value: i32) -> ::std::option::Option<ESteamNetworkingUDPMsgID> {
        match value {
            32 => ::std::option::Option::Some(ESteamNetworkingUDPMsgID::k_ESteamNetworkingUDPMsg_ChallengeRequest),
            33 => ::std::option::Option::Some(ESteamNetworkingUDPMsgID::k_ESteamNetworkingUDPMsg_ChallengeReply),
            34 => ::std::option::Option::Some(ESteamNetworkingUDPMsgID::k_ESteamNetworkingUDPMsg_ConnectRequest),
            35 => ::std::option::Option::Some(ESteamNetworkingUDPMsgID::k_ESteamNetworkingUDPMsg_ConnectOK),
            36 => ::std::option::Option::Some(ESteamNetworkingUDPMsgID::k_ESteamNetworkingUDPMsg_ConnectionClosed),
            37 => ::std::option::Option::Some(ESteamNetworkingUDPMsgID::k_ESteamNetworkingUDPMsg_NoConnection),
            _ => ::std::option::Option::None
        }
    }

    fn from_str(str: &str) -> ::std::option::Option<ESteamNetworkingUDPMsgID> {
        match str {
            "k_ESteamNetworkingUDPMsg_ChallengeRequest" => ::std::option::Option::Some(ESteamNetworkingUDPMsgID::k_ESteamNetworkingUDPMsg_ChallengeRequest),
            "k_ESteamNetworkingUDPMsg_ChallengeReply" => ::std::option::Option::Some(ESteamNetworkingUDPMsgID::k_ESteamNetworkingUDPMsg_ChallengeReply),
            "k_ESteamNetworkingUDPMsg_ConnectRequest" => ::std::option::Option::Some(ESteamNetworkingUDPMsgID::k_ESteamNetworkingUDPMsg_ConnectRequest),
            "k_ESteamNetworkingUDPMsg_ConnectOK" => ::std::option::Option::Some(ESteamNetworkingUDPMsgID::k_ESteamNetworkingUDPMsg_ConnectOK),
            "k_ESteamNetworkingUDPMsg_ConnectionClosed" => ::std::option::Option::Some(ESteamNetworkingUDPMsgID::k_ESteamNetworkingUDPMsg_ConnectionClosed),
            "k_ESteamNetworkingUDPMsg_NoConnection" => ::std::option::Option::Some(ESteamNetworkingUDPMsgID::k_ESteamNetworkingUDPMsg_NoConnection),
            _ => ::std::option::Option::None
        }
    }

    const VALUES: &'static [ESteamNetworkingUDPMsgID] = &[
        ESteamNetworkingUDPMsgID::k_ESteamNetworkingUDPMsg_ChallengeRequest,
        ESteamNetworkingUDPMsgID::k_ESteamNetworkingUDPMsg_ChallengeReply,
        ESteamNetworkingUDPMsgID::k_ESteamNetworkingUDPMsg_ConnectRequest,
        ESteamNetworkingUDPMsgID::k_ESteamNetworkingUDPMsg_ConnectOK,
        ESteamNetworkingUDPMsgID::k_ESteamNetworkingUDPMsg_ConnectionClosed,
        ESteamNetworkingUDPMsgID::k_ESteamNetworkingUDPMsg_NoConnection,
    ];
}

// Note, `Default` is implemented although default value is not 0
impl ::std::default::Default for ESteamNetworkingUDPMsgID {
    fn default() -> Self {
        ESteamNetworkingUDPMsgID::k_ESteamNetworkingUDPMsg_ChallengeRequest
    }
}



const _VENT_PROTO_VERSION_CHECK: () = ::steam_vent_proto_common::VERSION_0_5_0;

#[allow(unused_imports)]
use crate::steamnetworkingsockets_messages_certs::*;
#[allow(unused_imports)]
use crate::steamnetworkingsockets_messages::*;
impl ::steam_vent_proto_common::RpcMessage for CMsgSteamSockets_UDP_ChallengeRequest {
    fn parse(reader: &mut dyn std::io::Read) -> ::steam_vent_proto_common::protobuf::Result<Self> {
        <Self as ::steam_vent_proto_common::protobuf::Message>::parse_from_reader(reader)
    }
    fn write(&self, writer: &mut dyn std::io::Write) -> ::steam_vent_proto_common::protobuf::Result<()> {
        use ::steam_vent_proto_common::protobuf::Message;
        self.write_to_writer(writer)
    }
    fn encode_size(&self) -> usize {
        use ::steam_vent_proto_common::protobuf::Message;
        self.compute_size() as usize
    }
}
impl ::steam_vent_proto_common::RpcMessage for CMsgSteamSockets_UDP_ChallengeReply {
    fn parse(reader: &mut dyn std::io::Read) -> ::steam_vent_proto_common::protobuf::Result<Self> {
        <Self as ::steam_vent_proto_common::protobuf::Message>::parse_from_reader(reader)
    }
    fn write(&self, writer: &mut dyn std::io::Write) -> ::steam_vent_proto_common::protobuf::Result<()> {
        use ::steam_vent_proto_common::protobuf::Message;
        self.write_to_writer(writer)
    }
    fn encode_size(&self) -> usize {
        use ::steam_vent_proto_common::protobuf::Message;
        self.compute_size() as usize
    }
}
impl ::steam_vent_proto_common::RpcMessage for CMsgSteamSockets_UDP_ConnectRequest {
    fn parse(reader: &mut dyn std::io::Read) -> ::steam_vent_proto_common::protobuf::Result<Self> {
        <Self as ::steam_vent_proto_common::protobuf::Message>::parse_from_reader(reader)
    }
    fn write(&self, writer: &mut dyn std::io::Write) -> ::steam_vent_proto_common::protobuf::Result<()> {
        use ::steam_vent_proto_common::protobuf::Message;
        self.write_to_writer(writer)
    }
    fn encode_size(&self) -> usize {
        use ::steam_vent_proto_common::protobuf::Message;
        self.compute_size() as usize
    }
}
impl ::steam_vent_proto_common::RpcMessage for CMsgSteamSockets_UDP_ConnectOK {
    fn parse(reader: &mut dyn std::io::Read) -> ::steam_vent_proto_common::protobuf::Result<Self> {
        <Self as ::steam_vent_proto_common::protobuf::Message>::parse_from_reader(reader)
    }
    fn write(&self, writer: &mut dyn std::io::Write) -> ::steam_vent_proto_common::protobuf::Result<()> {
        use ::steam_vent_proto_common::protobuf::Message;
        self.write_to_writer(writer)
    }
    fn encode_size(&self) -> usize {
        use ::steam_vent_proto_common::protobuf::Message;
        self.compute_size() as usize
    }
}
impl ::steam_vent_proto_common::RpcMessage for CMsgSteamSockets_UDP_ConnectionClosed {
    fn parse(reader: &mut dyn std::io::Read) -> ::steam_vent_proto_common::protobuf::Result<Self> {
        <Self as ::steam_vent_proto_common::protobuf::Message>::parse_from_reader(reader)
    }
    fn write(&self, writer: &mut dyn std::io::Write) -> ::steam_vent_proto_common::protobuf::Result<()> {
        use ::steam_vent_proto_common::protobuf::Message;
        self.write_to_writer(writer)
    }
    fn encode_size(&self) -> usize {
        use ::steam_vent_proto_common::protobuf::Message;
        self.compute_size() as usize
    }
}
impl ::steam_vent_proto_common::RpcMessage for CMsgSteamSockets_UDP_NoConnection {
    fn parse(reader: &mut dyn std::io::Read) -> ::steam_vent_proto_common::protobuf::Result<Self> {
        <Self as ::steam_vent_proto_common::protobuf::Message>::parse_from_reader(reader)
    }
    fn write(&self, writer: &mut dyn std::io::Write) -> ::steam_vent_proto_common::protobuf::Result<()> {
        use ::steam_vent_proto_common::protobuf::Message;
        self.write_to_writer(writer)
    }
    fn encode_size(&self) -> usize {
        use ::steam_vent_proto_common::protobuf::Message;
        self.compute_size() as usize
    }
}
impl ::steam_vent_proto_common::RpcMessage for CMsgSteamSockets_UDP_Stats {
    fn parse(reader: &mut dyn std::io::Read) -> ::steam_vent_proto_common::protobuf::Result<Self> {
        <Self as ::steam_vent_proto_common::protobuf::Message>::parse_from_reader(reader)
    }
    fn write(&self, writer: &mut dyn std::io::Write) -> ::steam_vent_proto_common::protobuf::Result<()> {
        use ::steam_vent_proto_common::protobuf::Message;
        self.write_to_writer(writer)
    }
    fn encode_size(&self) -> usize {
        use ::steam_vent_proto_common::protobuf::Message;
        self.compute_size() as usize
    }
}
