// This file is generated by rust-protobuf 3.7.2. 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 `devices.proto`

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

// @@protoc_insertion_point(message:spotify.connectstate.devices.DeviceAlias)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct DeviceAlias {
    // message fields
    // @@protoc_insertion_point(field:spotify.connectstate.devices.DeviceAlias.id)
    pub id: u32,
    // @@protoc_insertion_point(field:spotify.connectstate.devices.DeviceAlias.display_name)
    pub display_name: ::std::string::String,
    // @@protoc_insertion_point(field:spotify.connectstate.devices.DeviceAlias.is_group)
    pub is_group: bool,
    // special fields
    // @@protoc_insertion_point(special_field:spotify.connectstate.devices.DeviceAlias.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(3);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "id",
            |m: &DeviceAlias| { &m.id },
            |m: &mut DeviceAlias| { &mut m.id },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "display_name",
            |m: &DeviceAlias| { &m.display_name },
            |m: &mut DeviceAlias| { &mut m.display_name },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "is_group",
            |m: &DeviceAlias| { &m.is_group },
            |m: &mut DeviceAlias| { &mut m.is_group },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<DeviceAlias>(
            "DeviceAlias",
            fields,
            oneofs,
        )
    }
}

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

    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.id = is.read_uint32()?;
                },
                18 => {
                    self.display_name = is.read_string()?;
                },
                24 => {
                    self.is_group = is.read_bool()?;
                },
                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.id != 0 {
            my_size += ::protobuf::rt::uint32_size(1, self.id);
        }
        if !self.display_name.is_empty() {
            my_size += ::protobuf::rt::string_size(2, &self.display_name);
        }
        if self.is_group != false {
            my_size += 1 + 1;
        }
        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.id != 0 {
            os.write_uint32(1, self.id)?;
        }
        if !self.display_name.is_empty() {
            os.write_string(2, &self.display_name)?;
        }
        if self.is_group != false {
            os.write_bool(3, self.is_group)?;
        }
        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() -> DeviceAlias {
        DeviceAlias::new()
    }

    fn clear(&mut self) {
        self.id = 0;
        self.display_name.clear();
        self.is_group = false;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static DeviceAlias {
        static instance: DeviceAlias = DeviceAlias {
            id: 0,
            display_name: ::std::string::String::new(),
            is_group: false,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

impl ::protobuf::MessageFull for DeviceAlias {
    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("DeviceAlias").unwrap()).clone()
    }
}

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

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

#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
// @@protoc_insertion_point(enum:spotify.connectstate.devices.DeviceType)
pub enum DeviceType {
    // @@protoc_insertion_point(enum_value:spotify.connectstate.devices.DeviceType.UNKNOWN)
    UNKNOWN = 0,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.devices.DeviceType.COMPUTER)
    COMPUTER = 1,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.devices.DeviceType.TABLET)
    TABLET = 2,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.devices.DeviceType.SMARTPHONE)
    SMARTPHONE = 3,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.devices.DeviceType.SPEAKER)
    SPEAKER = 4,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.devices.DeviceType.TV)
    TV = 5,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.devices.DeviceType.AVR)
    AVR = 6,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.devices.DeviceType.STB)
    STB = 7,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.devices.DeviceType.AUDIO_DONGLE)
    AUDIO_DONGLE = 8,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.devices.DeviceType.GAME_CONSOLE)
    GAME_CONSOLE = 9,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.devices.DeviceType.CAST_VIDEO)
    CAST_VIDEO = 10,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.devices.DeviceType.CAST_AUDIO)
    CAST_AUDIO = 11,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.devices.DeviceType.AUTOMOBILE)
    AUTOMOBILE = 12,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.devices.DeviceType.SMARTWATCH)
    SMARTWATCH = 13,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.devices.DeviceType.CHROMEBOOK)
    CHROMEBOOK = 14,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.devices.DeviceType.UNKNOWN_SPOTIFY)
    UNKNOWN_SPOTIFY = 100,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.devices.DeviceType.CAR_THING)
    CAR_THING = 101,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.devices.DeviceType.OBSERVER)
    OBSERVER = 102,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.devices.DeviceType.HOME_THING)
    HOME_THING = 103,
}

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

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

    fn from_i32(value: i32) -> ::std::option::Option<DeviceType> {
        match value {
            0 => ::std::option::Option::Some(DeviceType::UNKNOWN),
            1 => ::std::option::Option::Some(DeviceType::COMPUTER),
            2 => ::std::option::Option::Some(DeviceType::TABLET),
            3 => ::std::option::Option::Some(DeviceType::SMARTPHONE),
            4 => ::std::option::Option::Some(DeviceType::SPEAKER),
            5 => ::std::option::Option::Some(DeviceType::TV),
            6 => ::std::option::Option::Some(DeviceType::AVR),
            7 => ::std::option::Option::Some(DeviceType::STB),
            8 => ::std::option::Option::Some(DeviceType::AUDIO_DONGLE),
            9 => ::std::option::Option::Some(DeviceType::GAME_CONSOLE),
            10 => ::std::option::Option::Some(DeviceType::CAST_VIDEO),
            11 => ::std::option::Option::Some(DeviceType::CAST_AUDIO),
            12 => ::std::option::Option::Some(DeviceType::AUTOMOBILE),
            13 => ::std::option::Option::Some(DeviceType::SMARTWATCH),
            14 => ::std::option::Option::Some(DeviceType::CHROMEBOOK),
            100 => ::std::option::Option::Some(DeviceType::UNKNOWN_SPOTIFY),
            101 => ::std::option::Option::Some(DeviceType::CAR_THING),
            102 => ::std::option::Option::Some(DeviceType::OBSERVER),
            103 => ::std::option::Option::Some(DeviceType::HOME_THING),
            _ => ::std::option::Option::None
        }
    }

    fn from_str(str: &str) -> ::std::option::Option<DeviceType> {
        match str {
            "UNKNOWN" => ::std::option::Option::Some(DeviceType::UNKNOWN),
            "COMPUTER" => ::std::option::Option::Some(DeviceType::COMPUTER),
            "TABLET" => ::std::option::Option::Some(DeviceType::TABLET),
            "SMARTPHONE" => ::std::option::Option::Some(DeviceType::SMARTPHONE),
            "SPEAKER" => ::std::option::Option::Some(DeviceType::SPEAKER),
            "TV" => ::std::option::Option::Some(DeviceType::TV),
            "AVR" => ::std::option::Option::Some(DeviceType::AVR),
            "STB" => ::std::option::Option::Some(DeviceType::STB),
            "AUDIO_DONGLE" => ::std::option::Option::Some(DeviceType::AUDIO_DONGLE),
            "GAME_CONSOLE" => ::std::option::Option::Some(DeviceType::GAME_CONSOLE),
            "CAST_VIDEO" => ::std::option::Option::Some(DeviceType::CAST_VIDEO),
            "CAST_AUDIO" => ::std::option::Option::Some(DeviceType::CAST_AUDIO),
            "AUTOMOBILE" => ::std::option::Option::Some(DeviceType::AUTOMOBILE),
            "SMARTWATCH" => ::std::option::Option::Some(DeviceType::SMARTWATCH),
            "CHROMEBOOK" => ::std::option::Option::Some(DeviceType::CHROMEBOOK),
            "UNKNOWN_SPOTIFY" => ::std::option::Option::Some(DeviceType::UNKNOWN_SPOTIFY),
            "CAR_THING" => ::std::option::Option::Some(DeviceType::CAR_THING),
            "OBSERVER" => ::std::option::Option::Some(DeviceType::OBSERVER),
            "HOME_THING" => ::std::option::Option::Some(DeviceType::HOME_THING),
            _ => ::std::option::Option::None
        }
    }

    const VALUES: &'static [DeviceType] = &[
        DeviceType::UNKNOWN,
        DeviceType::COMPUTER,
        DeviceType::TABLET,
        DeviceType::SMARTPHONE,
        DeviceType::SPEAKER,
        DeviceType::TV,
        DeviceType::AVR,
        DeviceType::STB,
        DeviceType::AUDIO_DONGLE,
        DeviceType::GAME_CONSOLE,
        DeviceType::CAST_VIDEO,
        DeviceType::CAST_AUDIO,
        DeviceType::AUTOMOBILE,
        DeviceType::SMARTWATCH,
        DeviceType::CHROMEBOOK,
        DeviceType::UNKNOWN_SPOTIFY,
        DeviceType::CAR_THING,
        DeviceType::OBSERVER,
        DeviceType::HOME_THING,
    ];
}

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

    fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
        let index = match self {
            DeviceType::UNKNOWN => 0,
            DeviceType::COMPUTER => 1,
            DeviceType::TABLET => 2,
            DeviceType::SMARTPHONE => 3,
            DeviceType::SPEAKER => 4,
            DeviceType::TV => 5,
            DeviceType::AVR => 6,
            DeviceType::STB => 7,
            DeviceType::AUDIO_DONGLE => 8,
            DeviceType::GAME_CONSOLE => 9,
            DeviceType::CAST_VIDEO => 10,
            DeviceType::CAST_AUDIO => 11,
            DeviceType::AUTOMOBILE => 12,
            DeviceType::SMARTWATCH => 13,
            DeviceType::CHROMEBOOK => 14,
            DeviceType::UNKNOWN_SPOTIFY => 15,
            DeviceType::CAR_THING => 16,
            DeviceType::OBSERVER => 17,
            DeviceType::HOME_THING => 18,
        };
        Self::enum_descriptor().value_by_index(index)
    }
}

impl ::std::default::Default for DeviceType {
    fn default() -> Self {
        DeviceType::UNKNOWN
    }
}

impl DeviceType {
    fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
        ::protobuf::reflect::GeneratedEnumDescriptorData::new::<DeviceType>("DeviceType")
    }
}

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\rdevices.proto\x12\x1cspotify.connectstate.devices\"[\n\x0bDeviceAlia\
    s\x12\x0e\n\x02id\x18\x01\x20\x01(\rR\x02id\x12!\n\x0cdisplay_name\x18\
    \x02\x20\x01(\tR\x0bdisplayName\x12\x19\n\x08is_group\x18\x03\x20\x01(\
    \x08R\x07isGroup*\xa0\x02\n\nDeviceType\x12\x0b\n\x07UNKNOWN\x10\0\x12\
    \x0c\n\x08COMPUTER\x10\x01\x12\n\n\x06TABLET\x10\x02\x12\x0e\n\nSMARTPHO\
    NE\x10\x03\x12\x0b\n\x07SPEAKER\x10\x04\x12\x06\n\x02TV\x10\x05\x12\x07\
    \n\x03AVR\x10\x06\x12\x07\n\x03STB\x10\x07\x12\x10\n\x0cAUDIO_DONGLE\x10\
    \x08\x12\x10\n\x0cGAME_CONSOLE\x10\t\x12\x0e\n\nCAST_VIDEO\x10\n\x12\x0e\
    \n\nCAST_AUDIO\x10\x0b\x12\x0e\n\nAUTOMOBILE\x10\x0c\x12\x0e\n\nSMARTWAT\
    CH\x10\r\x12\x0e\n\nCHROMEBOOK\x10\x0e\x12\x13\n\x0fUNKNOWN_SPOTIFY\x10d\
    \x12\r\n\tCAR_THING\x10e\x12\x0c\n\x08OBSERVER\x10f\x12\x0e\n\nHOME_THIN\
    G\x10gB\x1a\n\x18com.spotify.common.protob\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(DeviceAlias::generated_message_descriptor_data());
            let mut enums = ::std::vec::Vec::with_capacity(1);
            enums.push(DeviceType::generated_enum_descriptor_data());
            ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
                file_descriptor_proto(),
                deps,
                messages,
                enums,
            )
        });
        ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
    })
}
