videocall-types 4.0.1

types for the videocall streaming platform
Documentation
// This file is generated by rust-protobuf 3.7.1. Do not edit
// .proto file is parsed by protoc --rs_out=...
// @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 `types/meeting_packet.proto`

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

///  Meeting lifecycle messages sent between server and clients
// @@protoc_insertion_point(message:MeetingPacket)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct MeetingPacket {
    // message fields
    // @@protoc_insertion_point(field:MeetingPacket.event_type)
    pub event_type: ::protobuf::EnumOrUnknown<meeting_packet::MeetingEventType>,
    // @@protoc_insertion_point(field:MeetingPacket.room_id)
    pub room_id: ::std::string::String,
    // @@protoc_insertion_point(field:MeetingPacket.start_time_ms)
    pub start_time_ms: u64,
    // @@protoc_insertion_point(field:MeetingPacket.message)
    pub message: ::std::string::String,
    // @@protoc_insertion_point(field:MeetingPacket.creator_id)
    pub creator_id: ::std::string::String,
    // @@protoc_insertion_point(field:MeetingPacket.participant_count)
    pub participant_count: i64,
    // special fields
    // @@protoc_insertion_point(special_field:MeetingPacket.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(6);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "event_type",
            |m: &MeetingPacket| { &m.event_type },
            |m: &mut MeetingPacket| { &mut m.event_type },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "room_id",
            |m: &MeetingPacket| { &m.room_id },
            |m: &mut MeetingPacket| { &mut m.room_id },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "start_time_ms",
            |m: &MeetingPacket| { &m.start_time_ms },
            |m: &mut MeetingPacket| { &mut m.start_time_ms },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "message",
            |m: &MeetingPacket| { &m.message },
            |m: &mut MeetingPacket| { &mut m.message },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "creator_id",
            |m: &MeetingPacket| { &m.creator_id },
            |m: &mut MeetingPacket| { &mut m.creator_id },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "participant_count",
            |m: &MeetingPacket| { &m.participant_count },
            |m: &mut MeetingPacket| { &mut m.participant_count },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<MeetingPacket>(
            "MeetingPacket",
            fields,
            oneofs,
        )
    }
}

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

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

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                8 => {
                    self.event_type = is.read_enum_or_unknown()?;
                },
                18 => {
                    self.room_id = is.read_string()?;
                },
                24 => {
                    self.start_time_ms = is.read_uint64()?;
                },
                34 => {
                    self.message = is.read_string()?;
                },
                42 => {
                    self.creator_id = is.read_string()?;
                },
                48 => {
                    self.participant_count = is.read_int64()?;
                },
                tag => {
                    ::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 self.event_type != ::protobuf::EnumOrUnknown::new(meeting_packet::MeetingEventType::MEETING_EVENT_TYPE_UNKNOWN) {
            my_size += ::protobuf::rt::int32_size(1, self.event_type.value());
        }
        if !self.room_id.is_empty() {
            my_size += ::protobuf::rt::string_size(2, &self.room_id);
        }
        if self.start_time_ms != 0 {
            my_size += ::protobuf::rt::uint64_size(3, self.start_time_ms);
        }
        if !self.message.is_empty() {
            my_size += ::protobuf::rt::string_size(4, &self.message);
        }
        if !self.creator_id.is_empty() {
            my_size += ::protobuf::rt::string_size(5, &self.creator_id);
        }
        if self.participant_count != 0 {
            my_size += ::protobuf::rt::int64_size(6, self.participant_count);
        }
        my_size += ::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 ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
        if self.event_type != ::protobuf::EnumOrUnknown::new(meeting_packet::MeetingEventType::MEETING_EVENT_TYPE_UNKNOWN) {
            os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.event_type))?;
        }
        if !self.room_id.is_empty() {
            os.write_string(2, &self.room_id)?;
        }
        if self.start_time_ms != 0 {
            os.write_uint64(3, self.start_time_ms)?;
        }
        if !self.message.is_empty() {
            os.write_string(4, &self.message)?;
        }
        if !self.creator_id.is_empty() {
            os.write_string(5, &self.creator_id)?;
        }
        if self.participant_count != 0 {
            os.write_int64(6, self.participant_count)?;
        }
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

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

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

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

    fn clear(&mut self) {
        self.event_type = ::protobuf::EnumOrUnknown::new(meeting_packet::MeetingEventType::MEETING_EVENT_TYPE_UNKNOWN);
        self.room_id.clear();
        self.start_time_ms = 0;
        self.message.clear();
        self.creator_id.clear();
        self.participant_count = 0;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static MeetingPacket {
        static instance: MeetingPacket = MeetingPacket {
            event_type: ::protobuf::EnumOrUnknown::from_i32(0),
            room_id: ::std::string::String::new(),
            start_time_ms: 0,
            message: ::std::string::String::new(),
            creator_id: ::std::string::String::new(),
            participant_count: 0,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for MeetingPacket {
    fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
        descriptor.get(|| file_descriptor().message_by_package_relative_name("MeetingPacket").unwrap()).clone()
    }
}

impl ::std::fmt::Display for MeetingPacket {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        ::protobuf::text_format::fmt(self, f)
    }
}

impl ::protobuf::reflect::ProtobufValue for MeetingPacket {
    type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}

/// Nested message and enums of message `MeetingPacket`
pub mod meeting_packet {
    #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
    // @@protoc_insertion_point(enum:MeetingPacket.MeetingEventType)
    pub enum MeetingEventType {
        // @@protoc_insertion_point(enum_value:MeetingPacket.MeetingEventType.MEETING_EVENT_TYPE_UNKNOWN)
        MEETING_EVENT_TYPE_UNKNOWN = 0,
        // @@protoc_insertion_point(enum_value:MeetingPacket.MeetingEventType.MEETING_STARTED)
        MEETING_STARTED = 1,
        // @@protoc_insertion_point(enum_value:MeetingPacket.MeetingEventType.MEETING_ENDED)
        MEETING_ENDED = 2,
        // @@protoc_insertion_point(enum_value:MeetingPacket.MeetingEventType.PARTICIPANT_JOINED)
        PARTICIPANT_JOINED = 3,
        // @@protoc_insertion_point(enum_value:MeetingPacket.MeetingEventType.PARTICIPANT_LEFT)
        PARTICIPANT_LEFT = 4,
    }

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

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

        fn from_i32(value: i32) -> ::std::option::Option<MeetingEventType> {
            match value {
                0 => ::std::option::Option::Some(MeetingEventType::MEETING_EVENT_TYPE_UNKNOWN),
                1 => ::std::option::Option::Some(MeetingEventType::MEETING_STARTED),
                2 => ::std::option::Option::Some(MeetingEventType::MEETING_ENDED),
                3 => ::std::option::Option::Some(MeetingEventType::PARTICIPANT_JOINED),
                4 => ::std::option::Option::Some(MeetingEventType::PARTICIPANT_LEFT),
                _ => ::std::option::Option::None
            }
        }

        fn from_str(str: &str) -> ::std::option::Option<MeetingEventType> {
            match str {
                "MEETING_EVENT_TYPE_UNKNOWN" => ::std::option::Option::Some(MeetingEventType::MEETING_EVENT_TYPE_UNKNOWN),
                "MEETING_STARTED" => ::std::option::Option::Some(MeetingEventType::MEETING_STARTED),
                "MEETING_ENDED" => ::std::option::Option::Some(MeetingEventType::MEETING_ENDED),
                "PARTICIPANT_JOINED" => ::std::option::Option::Some(MeetingEventType::PARTICIPANT_JOINED),
                "PARTICIPANT_LEFT" => ::std::option::Option::Some(MeetingEventType::PARTICIPANT_LEFT),
                _ => ::std::option::Option::None
            }
        }

        const VALUES: &'static [MeetingEventType] = &[
            MeetingEventType::MEETING_EVENT_TYPE_UNKNOWN,
            MeetingEventType::MEETING_STARTED,
            MeetingEventType::MEETING_ENDED,
            MeetingEventType::PARTICIPANT_JOINED,
            MeetingEventType::PARTICIPANT_LEFT,
        ];
    }

    impl ::protobuf::EnumFull for MeetingEventType {
        fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
            static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
            descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("MeetingPacket.MeetingEventType").unwrap()).clone()
        }

        fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
            let index = *self as usize;
            Self::enum_descriptor().value_by_index(index)
        }
    }

    impl ::std::default::Default for MeetingEventType {
        fn default() -> Self {
            MeetingEventType::MEETING_EVENT_TYPE_UNKNOWN
        }
    }

    impl MeetingEventType {
        pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
            ::protobuf::reflect::GeneratedEnumDescriptorData::new::<MeetingEventType>("MeetingPacket.MeetingEventType")
        }
    }
}

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\x1atypes/meeting_packet.proto\"\xfd\x02\n\rMeetingPacket\x12>\n\neven\
    t_type\x18\x01\x20\x01(\x0e2\x1f.MeetingPacket.MeetingEventTypeR\teventT\
    ype\x12\x17\n\x07room_id\x18\x02\x20\x01(\tR\x06roomId\x12\"\n\rstart_ti\
    me_ms\x18\x03\x20\x01(\x04R\x0bstartTimeMs\x12\x18\n\x07message\x18\x04\
    \x20\x01(\tR\x07message\x12\x1d\n\ncreator_id\x18\x05\x20\x01(\tR\tcreat\
    orId\x12+\n\x11participant_count\x18\x06\x20\x01(\x03R\x10participantCou\
    nt\"\x88\x01\n\x10MeetingEventType\x12\x1e\n\x1aMEETING_EVENT_TYPE_UNKNO\
    WN\x10\0\x12\x13\n\x0fMEETING_STARTED\x10\x01\x12\x11\n\rMEETING_ENDED\
    \x10\x02\x12\x16\n\x12PARTICIPANT_JOINED\x10\x03\x12\x14\n\x10PARTICIPAN\
    T_LEFT\x10\x04J\xf8\x06\n\x06\x12\x04\0\0\x16\x01\n\x08\n\x01\x0c\x12\
    \x03\0\0\x12\nH\n\x02\x04\0\x12\x04\x03\0\x16\x01\x1a<\x20Meeting\x20lif\
    ecycle\x20messages\x20sent\x20between\x20server\x20and\x20clients\n\n\n\
    \n\x03\x04\0\x01\x12\x03\x03\x08\x15\n\x0c\n\x04\x04\0\x04\0\x12\x04\x04\
    \x02\x0e\x03\n\x0c\n\x05\x04\0\x04\0\x01\x12\x03\x04\x07\x17\n\r\n\x06\
    \x04\0\x04\0\x02\0\x12\x03\x05\x04#\n\x0e\n\x07\x04\0\x04\0\x02\0\x01\
    \x12\x03\x05\x04\x1e\n\x0e\n\x07\x04\0\x04\0\x02\0\x02\x12\x03\x05!\"\nF\
    \n\x06\x04\0\x04\0\x02\x01\x12\x03\x07\x04\x18\x1a7\x20Meeting\x20starte\
    d\x20-\x20sent\x20to\x20participants\x20when\x20they\x20join\n\n\x0e\n\
    \x07\x04\0\x04\0\x02\x01\x01\x12\x03\x07\x04\x13\n\x0e\n\x07\x04\0\x04\0\
    \x02\x01\x02\x12\x03\x07\x16\x17\nQ\n\x06\x04\0\x04\0\x02\x02\x12\x03\t\
    \x04\x16\x1aB\x20Meeting\x20ended\x20-\x20sent\x20when\x20host\x20leaves\
    \x20or\x20last\x20participant\x20leaves\n\n\x0e\n\x07\x04\0\x04\0\x02\
    \x02\x01\x12\x03\t\x04\x11\n\x0e\n\x07\x04\0\x04\0\x02\x02\x02\x12\x03\t\
    \x14\x15\n/\n\x06\x04\0\x04\0\x02\x03\x12\x03\x0b\x04\x1b\x1a\x20\x20Par\
    ticipant\x20joined\x20the\x20meeting\n\n\x0e\n\x07\x04\0\x04\0\x02\x03\
    \x01\x12\x03\x0b\x04\x16\n\x0e\n\x07\x04\0\x04\0\x02\x03\x02\x12\x03\x0b\
    \x19\x1a\n-\n\x06\x04\0\x04\0\x02\x04\x12\x03\r\x04\x19\x1a\x1e\x20Parti\
    cipant\x20left\x20the\x20meeting\n\n\x0e\n\x07\x04\0\x04\0\x02\x04\x01\
    \x12\x03\r\x04\x14\n\x0e\n\x07\x04\0\x04\0\x02\x04\x02\x12\x03\r\x17\x18\
    \n\x0b\n\x04\x04\0\x02\0\x12\x03\x10\x02\"\n\x0c\n\x05\x04\0\x02\0\x06\
    \x12\x03\x10\x02\x12\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x10\x13\x1d\n\
    \x0c\n\x05\x04\0\x02\0\x03\x12\x03\x10\x20!\n\x0b\n\x04\x04\0\x02\x01\
    \x12\x03\x11\x02\x15\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03\x11\x02\x08\n\
    \x0c\n\x05\x04\0\x02\x01\x01\x12\x03\x11\t\x10\n\x0c\n\x05\x04\0\x02\x01\
    \x03\x12\x03\x11\x13\x14\n\x0b\n\x04\x04\0\x02\x02\x12\x03\x12\x02\x1b\n\
    \x0c\n\x05\x04\0\x02\x02\x05\x12\x03\x12\x02\x08\n\x0c\n\x05\x04\0\x02\
    \x02\x01\x12\x03\x12\t\x16\n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03\x12\x19\
    \x1a\n\x0b\n\x04\x04\0\x02\x03\x12\x03\x13\x02\x15\n\x0c\n\x05\x04\0\x02\
    \x03\x05\x12\x03\x13\x02\x08\n\x0c\n\x05\x04\0\x02\x03\x01\x12\x03\x13\t\
    \x10\n\x0c\n\x05\x04\0\x02\x03\x03\x12\x03\x13\x13\x14\n\x0b\n\x04\x04\0\
    \x02\x04\x12\x03\x14\x02\x18\n\x0c\n\x05\x04\0\x02\x04\x05\x12\x03\x14\
    \x02\x08\n\x0c\n\x05\x04\0\x02\x04\x01\x12\x03\x14\t\x13\n\x0c\n\x05\x04\
    \0\x02\x04\x03\x12\x03\x14\x16\x17\n\x0b\n\x04\x04\0\x02\x05\x12\x03\x15\
    \x02\x1e\n\x0c\n\x05\x04\0\x02\x05\x05\x12\x03\x15\x02\x07\n\x0c\n\x05\
    \x04\0\x02\x05\x01\x12\x03\x15\x08\x19\n\x0c\n\x05\x04\0\x02\x05\x03\x12\
    \x03\x15\x1c\x1db\x06proto3\
";

/// `FileDescriptorProto` object which was a source for this generated file
fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
    static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
    file_descriptor_proto_lazy.get(|| {
        ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
    })
}

/// `FileDescriptor` object which allows dynamic access to files
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
    static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
    static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
    file_descriptor.get(|| {
        let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
            let mut deps = ::std::vec::Vec::with_capacity(0);
            let mut messages = ::std::vec::Vec::with_capacity(1);
            messages.push(MeetingPacket::generated_message_descriptor_data());
            let mut enums = ::std::vec::Vec::with_capacity(1);
            enums.push(meeting_packet::MeetingEventType::generated_enum_descriptor_data());
            ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
                file_descriptor_proto(),
                deps,
                messages,
                enums,
            )
        });
        ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
    })
}