// 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 `steammessages_gamerecording_objects.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:CGameRecording_AudioSessionsChanged_Notification)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct CGameRecording_AudioSessionsChanged_Notification {
    // message fields
    // @@protoc_insertion_point(field:CGameRecording_AudioSessionsChanged_Notification.sessions)
    pub sessions: ::std::vec::Vec<cgame_recording_audio_sessions_changed_notification::Session>,
    // special fields
    // @@protoc_insertion_point(special_field:CGameRecording_AudioSessionsChanged_Notification.special_fields)
    pub special_fields: ::steam_vent_proto_common::protobuf::SpecialFields,
}

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

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

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

    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 => {
                    self.sessions.push(is.read_message()?);
                },
                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;
        for value in &self.sessions {
            let len = value.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<()> {
        for v in &self.sessions {
            ::steam_vent_proto_common::protobuf::rt::write_message_field_with_cached_size(1, 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() -> CGameRecording_AudioSessionsChanged_Notification {
        CGameRecording_AudioSessionsChanged_Notification::new()
    }

    fn clear(&mut self) {
        self.sessions.clear();
        self.special_fields.clear();
    }

    fn default_instance() -> &'static CGameRecording_AudioSessionsChanged_Notification {
        static instance: CGameRecording_AudioSessionsChanged_Notification = CGameRecording_AudioSessionsChanged_Notification {
            sessions: ::std::vec::Vec::new(),
            special_fields: ::steam_vent_proto_common::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

/// Nested message and enums of message `CGameRecording_AudioSessionsChanged_Notification`
pub mod cgame_recording_audio_sessions_changed_notification {
    // @@protoc_insertion_point(message:CGameRecording_AudioSessionsChanged_Notification.Session)
    #[derive(PartialEq,Clone,Default,Debug)]
    pub struct Session {
        // message fields
        // @@protoc_insertion_point(field:CGameRecording_AudioSessionsChanged_Notification.Session.id)
        pub id: ::std::option::Option<::std::string::String>,
        // @@protoc_insertion_point(field:CGameRecording_AudioSessionsChanged_Notification.Session.name)
        pub name: ::std::option::Option<::std::string::String>,
        // @@protoc_insertion_point(field:CGameRecording_AudioSessionsChanged_Notification.Session.is_system)
        pub is_system: ::std::option::Option<bool>,
        // @@protoc_insertion_point(field:CGameRecording_AudioSessionsChanged_Notification.Session.is_muted)
        pub is_muted: ::std::option::Option<bool>,
        // @@protoc_insertion_point(field:CGameRecording_AudioSessionsChanged_Notification.Session.is_active)
        pub is_active: ::std::option::Option<bool>,
        // @@protoc_insertion_point(field:CGameRecording_AudioSessionsChanged_Notification.Session.is_captured)
        pub is_captured: ::std::option::Option<bool>,
        // @@protoc_insertion_point(field:CGameRecording_AudioSessionsChanged_Notification.Session.recent_peak)
        pub recent_peak: ::std::option::Option<f32>,
        // @@protoc_insertion_point(field:CGameRecording_AudioSessionsChanged_Notification.Session.is_game)
        pub is_game: ::std::option::Option<bool>,
        // @@protoc_insertion_point(field:CGameRecording_AudioSessionsChanged_Notification.Session.is_steam)
        pub is_steam: ::std::option::Option<bool>,
        // @@protoc_insertion_point(field:CGameRecording_AudioSessionsChanged_Notification.Session.is_saved)
        pub is_saved: ::std::option::Option<bool>,
        // special fields
        // @@protoc_insertion_point(special_field:CGameRecording_AudioSessionsChanged_Notification.Session.special_fields)
        pub special_fields: ::steam_vent_proto_common::protobuf::SpecialFields,
    }

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

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

        // optional string id = 1;

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

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

        pub fn has_id(&self) -> bool {
            self.id.is_some()
        }

        // Param is passed by value, moved
        pub fn set_id(&mut self, v: ::std::string::String) {
            self.id = ::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_id(&mut self) -> &mut ::std::string::String {
            if self.id.is_none() {
                self.id = ::std::option::Option::Some(::std::string::String::new());
            }
            self.id.as_mut().unwrap()
        }

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

        // optional string name = 2;

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

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

        pub fn has_name(&self) -> bool {
            self.name.is_some()
        }

        // Param is passed by value, moved
        pub fn set_name(&mut self, v: ::std::string::String) {
            self.name = ::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_name(&mut self) -> &mut ::std::string::String {
            if self.name.is_none() {
                self.name = ::std::option::Option::Some(::std::string::String::new());
            }
            self.name.as_mut().unwrap()
        }

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

        // optional bool is_system = 3;

        pub fn is_system(&self) -> bool {
            self.is_system.unwrap_or(false)
        }

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

        pub fn has_is_system(&self) -> bool {
            self.is_system.is_some()
        }

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

        // optional bool is_muted = 4;

        pub fn is_muted(&self) -> bool {
            self.is_muted.unwrap_or(false)
        }

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

        pub fn has_is_muted(&self) -> bool {
            self.is_muted.is_some()
        }

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

        // optional bool is_active = 5;

        pub fn is_active(&self) -> bool {
            self.is_active.unwrap_or(false)
        }

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

        pub fn has_is_active(&self) -> bool {
            self.is_active.is_some()
        }

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

        // optional bool is_captured = 6;

        pub fn is_captured(&self) -> bool {
            self.is_captured.unwrap_or(false)
        }

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

        pub fn has_is_captured(&self) -> bool {
            self.is_captured.is_some()
        }

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

        // optional float recent_peak = 7;

        pub fn recent_peak(&self) -> f32 {
            self.recent_peak.unwrap_or(0.)
        }

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

        pub fn has_recent_peak(&self) -> bool {
            self.recent_peak.is_some()
        }

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

        // optional bool is_game = 8;

        pub fn is_game(&self) -> bool {
            self.is_game.unwrap_or(false)
        }

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

        pub fn has_is_game(&self) -> bool {
            self.is_game.is_some()
        }

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

        // optional bool is_steam = 9;

        pub fn is_steam(&self) -> bool {
            self.is_steam.unwrap_or(false)
        }

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

        pub fn has_is_steam(&self) -> bool {
            self.is_steam.is_some()
        }

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

        // optional bool is_saved = 10;

        pub fn is_saved(&self) -> bool {
            self.is_saved.unwrap_or(false)
        }

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

        pub fn has_is_saved(&self) -> bool {
            self.is_saved.is_some()
        }

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

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

        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 => {
                        self.id = ::std::option::Option::Some(is.read_string()?);
                    },
                    18 => {
                        self.name = ::std::option::Option::Some(is.read_string()?);
                    },
                    24 => {
                        self.is_system = ::std::option::Option::Some(is.read_bool()?);
                    },
                    32 => {
                        self.is_muted = ::std::option::Option::Some(is.read_bool()?);
                    },
                    40 => {
                        self.is_active = ::std::option::Option::Some(is.read_bool()?);
                    },
                    48 => {
                        self.is_captured = ::std::option::Option::Some(is.read_bool()?);
                    },
                    61 => {
                        self.recent_peak = ::std::option::Option::Some(is.read_float()?);
                    },
                    64 => {
                        self.is_game = ::std::option::Option::Some(is.read_bool()?);
                    },
                    72 => {
                        self.is_steam = ::std::option::Option::Some(is.read_bool()?);
                    },
                    80 => {
                        self.is_saved = ::std::option::Option::Some(is.read_bool()?);
                    },
                    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.id.as_ref() {
                my_size += ::steam_vent_proto_common::protobuf::rt::string_size(1, &v);
            }
            if let Some(v) = self.name.as_ref() {
                my_size += ::steam_vent_proto_common::protobuf::rt::string_size(2, &v);
            }
            if let Some(v) = self.is_system {
                my_size += 1 + 1;
            }
            if let Some(v) = self.is_muted {
                my_size += 1 + 1;
            }
            if let Some(v) = self.is_active {
                my_size += 1 + 1;
            }
            if let Some(v) = self.is_captured {
                my_size += 1 + 1;
            }
            if let Some(v) = self.recent_peak {
                my_size += 1 + 4;
            }
            if let Some(v) = self.is_game {
                my_size += 1 + 1;
            }
            if let Some(v) = self.is_steam {
                my_size += 1 + 1;
            }
            if let Some(v) = self.is_saved {
                my_size += 1 + 1;
            }
            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.id.as_ref() {
                os.write_string(1, v)?;
            }
            if let Some(v) = self.name.as_ref() {
                os.write_string(2, v)?;
            }
            if let Some(v) = self.is_system {
                os.write_bool(3, v)?;
            }
            if let Some(v) = self.is_muted {
                os.write_bool(4, v)?;
            }
            if let Some(v) = self.is_active {
                os.write_bool(5, v)?;
            }
            if let Some(v) = self.is_captured {
                os.write_bool(6, v)?;
            }
            if let Some(v) = self.recent_peak {
                os.write_float(7, v)?;
            }
            if let Some(v) = self.is_game {
                os.write_bool(8, v)?;
            }
            if let Some(v) = self.is_steam {
                os.write_bool(9, v)?;
            }
            if let Some(v) = self.is_saved {
                os.write_bool(10, 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() -> Session {
            Session::new()
        }

        fn clear(&mut self) {
            self.id = ::std::option::Option::None;
            self.name = ::std::option::Option::None;
            self.is_system = ::std::option::Option::None;
            self.is_muted = ::std::option::Option::None;
            self.is_active = ::std::option::Option::None;
            self.is_captured = ::std::option::Option::None;
            self.recent_peak = ::std::option::Option::None;
            self.is_game = ::std::option::Option::None;
            self.is_steam = ::std::option::Option::None;
            self.is_saved = ::std::option::Option::None;
            self.special_fields.clear();
        }

        fn default_instance() -> &'static Session {
            static instance: Session = Session {
                id: ::std::option::Option::None,
                name: ::std::option::Option::None,
                is_system: ::std::option::Option::None,
                is_muted: ::std::option::Option::None,
                is_active: ::std::option::Option::None,
                is_captured: ::std::option::Option::None,
                recent_peak: ::std::option::Option::None,
                is_game: ::std::option::Option::None,
                is_steam: ::std::option::Option::None,
                is_saved: ::std::option::Option::None,
                special_fields: ::steam_vent_proto_common::protobuf::SpecialFields::new(),
            };
            &instance
        }
    }
}


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

#[allow(unused_imports)]
use crate::enums::*;
impl ::steam_vent_proto_common::RpcMessage
for CGameRecording_AudioSessionsChanged_Notification {
    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
    }
}
