// 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 `player.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.PlayerState)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct PlayerState {
    // message fields
    // @@protoc_insertion_point(field:spotify.connectstate.PlayerState.timestamp)
    pub timestamp: i64,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayerState.context_uri)
    pub context_uri: ::std::string::String,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayerState.context_url)
    pub context_url: ::std::string::String,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayerState.context_restrictions)
    pub context_restrictions: ::protobuf::MessageField<Restrictions>,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayerState.play_origin)
    pub play_origin: ::protobuf::MessageField<PlayOrigin>,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayerState.index)
    pub index: ::protobuf::MessageField<ContextIndex>,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayerState.track)
    pub track: ::protobuf::MessageField<ProvidedTrack>,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayerState.playback_id)
    pub playback_id: ::std::string::String,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayerState.playback_speed)
    pub playback_speed: f64,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayerState.position_as_of_timestamp)
    pub position_as_of_timestamp: i64,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayerState.duration)
    pub duration: i64,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayerState.is_playing)
    pub is_playing: bool,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayerState.is_paused)
    pub is_paused: bool,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayerState.is_buffering)
    pub is_buffering: bool,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayerState.is_system_initiated)
    pub is_system_initiated: bool,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayerState.options)
    pub options: ::protobuf::MessageField<ContextPlayerOptions>,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayerState.restrictions)
    pub restrictions: ::protobuf::MessageField<Restrictions>,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayerState.suppressions)
    pub suppressions: ::protobuf::MessageField<Suppressions>,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayerState.prev_tracks)
    pub prev_tracks: ::std::vec::Vec<ProvidedTrack>,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayerState.next_tracks)
    pub next_tracks: ::std::vec::Vec<ProvidedTrack>,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayerState.context_metadata)
    pub context_metadata: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayerState.page_metadata)
    pub page_metadata: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayerState.session_id)
    pub session_id: ::std::string::String,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayerState.queue_revision)
    pub queue_revision: ::std::string::String,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayerState.position)
    pub position: i64,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayerState.playback_quality)
    pub playback_quality: ::protobuf::MessageField<PlaybackQuality>,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayerState.signals)
    pub signals: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayerState.session_command_id)
    pub session_command_id: ::std::string::String,
    // special fields
    // @@protoc_insertion_point(special_field:spotify.connectstate.PlayerState.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(28);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "timestamp",
            |m: &PlayerState| { &m.timestamp },
            |m: &mut PlayerState| { &mut m.timestamp },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "context_uri",
            |m: &PlayerState| { &m.context_uri },
            |m: &mut PlayerState| { &mut m.context_uri },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "context_url",
            |m: &PlayerState| { &m.context_url },
            |m: &mut PlayerState| { &mut m.context_url },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Restrictions>(
            "context_restrictions",
            |m: &PlayerState| { &m.context_restrictions },
            |m: &mut PlayerState| { &mut m.context_restrictions },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, PlayOrigin>(
            "play_origin",
            |m: &PlayerState| { &m.play_origin },
            |m: &mut PlayerState| { &mut m.play_origin },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ContextIndex>(
            "index",
            |m: &PlayerState| { &m.index },
            |m: &mut PlayerState| { &mut m.index },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ProvidedTrack>(
            "track",
            |m: &PlayerState| { &m.track },
            |m: &mut PlayerState| { &mut m.track },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "playback_id",
            |m: &PlayerState| { &m.playback_id },
            |m: &mut PlayerState| { &mut m.playback_id },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "playback_speed",
            |m: &PlayerState| { &m.playback_speed },
            |m: &mut PlayerState| { &mut m.playback_speed },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "position_as_of_timestamp",
            |m: &PlayerState| { &m.position_as_of_timestamp },
            |m: &mut PlayerState| { &mut m.position_as_of_timestamp },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "duration",
            |m: &PlayerState| { &m.duration },
            |m: &mut PlayerState| { &mut m.duration },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "is_playing",
            |m: &PlayerState| { &m.is_playing },
            |m: &mut PlayerState| { &mut m.is_playing },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "is_paused",
            |m: &PlayerState| { &m.is_paused },
            |m: &mut PlayerState| { &mut m.is_paused },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "is_buffering",
            |m: &PlayerState| { &m.is_buffering },
            |m: &mut PlayerState| { &mut m.is_buffering },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "is_system_initiated",
            |m: &PlayerState| { &m.is_system_initiated },
            |m: &mut PlayerState| { &mut m.is_system_initiated },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ContextPlayerOptions>(
            "options",
            |m: &PlayerState| { &m.options },
            |m: &mut PlayerState| { &mut m.options },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Restrictions>(
            "restrictions",
            |m: &PlayerState| { &m.restrictions },
            |m: &mut PlayerState| { &mut m.restrictions },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Suppressions>(
            "suppressions",
            |m: &PlayerState| { &m.suppressions },
            |m: &mut PlayerState| { &mut m.suppressions },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "prev_tracks",
            |m: &PlayerState| { &m.prev_tracks },
            |m: &mut PlayerState| { &mut m.prev_tracks },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "next_tracks",
            |m: &PlayerState| { &m.next_tracks },
            |m: &mut PlayerState| { &mut m.next_tracks },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_map_simpler_accessor_new::<_, _>(
            "context_metadata",
            |m: &PlayerState| { &m.context_metadata },
            |m: &mut PlayerState| { &mut m.context_metadata },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_map_simpler_accessor_new::<_, _>(
            "page_metadata",
            |m: &PlayerState| { &m.page_metadata },
            |m: &mut PlayerState| { &mut m.page_metadata },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "session_id",
            |m: &PlayerState| { &m.session_id },
            |m: &mut PlayerState| { &mut m.session_id },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "queue_revision",
            |m: &PlayerState| { &m.queue_revision },
            |m: &mut PlayerState| { &mut m.queue_revision },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "position",
            |m: &PlayerState| { &m.position },
            |m: &mut PlayerState| { &mut m.position },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, PlaybackQuality>(
            "playback_quality",
            |m: &PlayerState| { &m.playback_quality },
            |m: &mut PlayerState| { &mut m.playback_quality },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "signals",
            |m: &PlayerState| { &m.signals },
            |m: &mut PlayerState| { &mut m.signals },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "session_command_id",
            |m: &PlayerState| { &m.session_command_id },
            |m: &mut PlayerState| { &mut m.session_command_id },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<PlayerState>(
            "PlayerState",
            fields,
            oneofs,
        )
    }
}

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

    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.timestamp = is.read_int64()?;
                },
                18 => {
                    self.context_uri = is.read_string()?;
                },
                26 => {
                    self.context_url = is.read_string()?;
                },
                34 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.context_restrictions)?;
                },
                42 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.play_origin)?;
                },
                50 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.index)?;
                },
                58 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.track)?;
                },
                66 => {
                    self.playback_id = is.read_string()?;
                },
                73 => {
                    self.playback_speed = is.read_double()?;
                },
                80 => {
                    self.position_as_of_timestamp = is.read_int64()?;
                },
                88 => {
                    self.duration = is.read_int64()?;
                },
                96 => {
                    self.is_playing = is.read_bool()?;
                },
                104 => {
                    self.is_paused = is.read_bool()?;
                },
                112 => {
                    self.is_buffering = is.read_bool()?;
                },
                120 => {
                    self.is_system_initiated = is.read_bool()?;
                },
                130 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.options)?;
                },
                138 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.restrictions)?;
                },
                146 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.suppressions)?;
                },
                154 => {
                    self.prev_tracks.push(is.read_message()?);
                },
                162 => {
                    self.next_tracks.push(is.read_message()?);
                },
                170 => {
                    let len = is.read_raw_varint32()?;
                    let old_limit = is.push_limit(len as u64)?;
                    let mut key = ::std::default::Default::default();
                    let mut value = ::std::default::Default::default();
                    while let Some(tag) = is.read_raw_tag_or_eof()? {
                        match tag {
                            10 => key = is.read_string()?,
                            18 => value = is.read_string()?,
                            _ => ::protobuf::rt::skip_field_for_tag(tag, is)?,
                        };
                    }
                    is.pop_limit(old_limit);
                    self.context_metadata.insert(key, value);
                },
                178 => {
                    let len = is.read_raw_varint32()?;
                    let old_limit = is.push_limit(len as u64)?;
                    let mut key = ::std::default::Default::default();
                    let mut value = ::std::default::Default::default();
                    while let Some(tag) = is.read_raw_tag_or_eof()? {
                        match tag {
                            10 => key = is.read_string()?,
                            18 => value = is.read_string()?,
                            _ => ::protobuf::rt::skip_field_for_tag(tag, is)?,
                        };
                    }
                    is.pop_limit(old_limit);
                    self.page_metadata.insert(key, value);
                },
                186 => {
                    self.session_id = is.read_string()?;
                },
                194 => {
                    self.queue_revision = is.read_string()?;
                },
                200 => {
                    self.position = is.read_int64()?;
                },
                258 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.playback_quality)?;
                },
                266 => {
                    self.signals.push(is.read_string()?);
                },
                282 => {
                    self.session_command_id = is.read_string()?;
                },
                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.timestamp != 0 {
            my_size += ::protobuf::rt::int64_size(1, self.timestamp);
        }
        if !self.context_uri.is_empty() {
            my_size += ::protobuf::rt::string_size(2, &self.context_uri);
        }
        if !self.context_url.is_empty() {
            my_size += ::protobuf::rt::string_size(3, &self.context_url);
        }
        if let Some(v) = self.context_restrictions.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.play_origin.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.index.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.track.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if !self.playback_id.is_empty() {
            my_size += ::protobuf::rt::string_size(8, &self.playback_id);
        }
        if self.playback_speed != 0. {
            my_size += 1 + 8;
        }
        if self.position_as_of_timestamp != 0 {
            my_size += ::protobuf::rt::int64_size(10, self.position_as_of_timestamp);
        }
        if self.duration != 0 {
            my_size += ::protobuf::rt::int64_size(11, self.duration);
        }
        if self.is_playing != false {
            my_size += 1 + 1;
        }
        if self.is_paused != false {
            my_size += 1 + 1;
        }
        if self.is_buffering != false {
            my_size += 1 + 1;
        }
        if self.is_system_initiated != false {
            my_size += 1 + 1;
        }
        if let Some(v) = self.options.as_ref() {
            let len = v.compute_size();
            my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.restrictions.as_ref() {
            let len = v.compute_size();
            my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.suppressions.as_ref() {
            let len = v.compute_size();
            my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        for value in &self.prev_tracks {
            let len = value.compute_size();
            my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        };
        for value in &self.next_tracks {
            let len = value.compute_size();
            my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        };
        for (k, v) in &self.context_metadata {
            let mut entry_size = 0;
            entry_size += ::protobuf::rt::string_size(1, &k);
            entry_size += ::protobuf::rt::string_size(2, &v);
            my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(entry_size) + entry_size
        };
        for (k, v) in &self.page_metadata {
            let mut entry_size = 0;
            entry_size += ::protobuf::rt::string_size(1, &k);
            entry_size += ::protobuf::rt::string_size(2, &v);
            my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(entry_size) + entry_size
        };
        if !self.session_id.is_empty() {
            my_size += ::protobuf::rt::string_size(23, &self.session_id);
        }
        if !self.queue_revision.is_empty() {
            my_size += ::protobuf::rt::string_size(24, &self.queue_revision);
        }
        if self.position != 0 {
            my_size += ::protobuf::rt::int64_size(25, self.position);
        }
        if let Some(v) = self.playback_quality.as_ref() {
            let len = v.compute_size();
            my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        for value in &self.signals {
            my_size += ::protobuf::rt::string_size(33, &value);
        };
        if !self.session_command_id.is_empty() {
            my_size += ::protobuf::rt::string_size(35, &self.session_command_id);
        }
        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.timestamp != 0 {
            os.write_int64(1, self.timestamp)?;
        }
        if !self.context_uri.is_empty() {
            os.write_string(2, &self.context_uri)?;
        }
        if !self.context_url.is_empty() {
            os.write_string(3, &self.context_url)?;
        }
        if let Some(v) = self.context_restrictions.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?;
        }
        if let Some(v) = self.play_origin.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?;
        }
        if let Some(v) = self.index.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?;
        }
        if let Some(v) = self.track.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?;
        }
        if !self.playback_id.is_empty() {
            os.write_string(8, &self.playback_id)?;
        }
        if self.playback_speed != 0. {
            os.write_double(9, self.playback_speed)?;
        }
        if self.position_as_of_timestamp != 0 {
            os.write_int64(10, self.position_as_of_timestamp)?;
        }
        if self.duration != 0 {
            os.write_int64(11, self.duration)?;
        }
        if self.is_playing != false {
            os.write_bool(12, self.is_playing)?;
        }
        if self.is_paused != false {
            os.write_bool(13, self.is_paused)?;
        }
        if self.is_buffering != false {
            os.write_bool(14, self.is_buffering)?;
        }
        if self.is_system_initiated != false {
            os.write_bool(15, self.is_system_initiated)?;
        }
        if let Some(v) = self.options.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(16, v, os)?;
        }
        if let Some(v) = self.restrictions.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(17, v, os)?;
        }
        if let Some(v) = self.suppressions.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(18, v, os)?;
        }
        for v in &self.prev_tracks {
            ::protobuf::rt::write_message_field_with_cached_size(19, v, os)?;
        };
        for v in &self.next_tracks {
            ::protobuf::rt::write_message_field_with_cached_size(20, v, os)?;
        };
        for (k, v) in &self.context_metadata {
            let mut entry_size = 0;
            entry_size += ::protobuf::rt::string_size(1, &k);
            entry_size += ::protobuf::rt::string_size(2, &v);
            os.write_raw_varint32(170)?; // Tag.
            os.write_raw_varint32(entry_size as u32)?;
            os.write_string(1, &k)?;
            os.write_string(2, &v)?;
        };
        for (k, v) in &self.page_metadata {
            let mut entry_size = 0;
            entry_size += ::protobuf::rt::string_size(1, &k);
            entry_size += ::protobuf::rt::string_size(2, &v);
            os.write_raw_varint32(178)?; // Tag.
            os.write_raw_varint32(entry_size as u32)?;
            os.write_string(1, &k)?;
            os.write_string(2, &v)?;
        };
        if !self.session_id.is_empty() {
            os.write_string(23, &self.session_id)?;
        }
        if !self.queue_revision.is_empty() {
            os.write_string(24, &self.queue_revision)?;
        }
        if self.position != 0 {
            os.write_int64(25, self.position)?;
        }
        if let Some(v) = self.playback_quality.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(32, v, os)?;
        }
        for v in &self.signals {
            os.write_string(33, &v)?;
        };
        if !self.session_command_id.is_empty() {
            os.write_string(35, &self.session_command_id)?;
        }
        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() -> PlayerState {
        PlayerState::new()
    }

    fn clear(&mut self) {
        self.timestamp = 0;
        self.context_uri.clear();
        self.context_url.clear();
        self.context_restrictions.clear();
        self.play_origin.clear();
        self.index.clear();
        self.track.clear();
        self.playback_id.clear();
        self.playback_speed = 0.;
        self.position_as_of_timestamp = 0;
        self.duration = 0;
        self.is_playing = false;
        self.is_paused = false;
        self.is_buffering = false;
        self.is_system_initiated = false;
        self.options.clear();
        self.restrictions.clear();
        self.suppressions.clear();
        self.prev_tracks.clear();
        self.next_tracks.clear();
        self.context_metadata.clear();
        self.page_metadata.clear();
        self.session_id.clear();
        self.queue_revision.clear();
        self.position = 0;
        self.playback_quality.clear();
        self.signals.clear();
        self.session_command_id.clear();
        self.special_fields.clear();
    }

    fn default_instance() -> &'static PlayerState {
        static instance: ::protobuf::rt::Lazy<PlayerState> = ::protobuf::rt::Lazy::new();
        instance.get(PlayerState::new)
    }
}

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

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

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

// @@protoc_insertion_point(message:spotify.connectstate.ProvidedTrack)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct ProvidedTrack {
    // message fields
    // @@protoc_insertion_point(field:spotify.connectstate.ProvidedTrack.uri)
    pub uri: ::std::string::String,
    // @@protoc_insertion_point(field:spotify.connectstate.ProvidedTrack.uid)
    pub uid: ::std::string::String,
    // @@protoc_insertion_point(field:spotify.connectstate.ProvidedTrack.metadata)
    pub metadata: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.ProvidedTrack.removed)
    pub removed: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.ProvidedTrack.blocked)
    pub blocked: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.ProvidedTrack.provider)
    pub provider: ::std::string::String,
    // @@protoc_insertion_point(field:spotify.connectstate.ProvidedTrack.restrictions)
    pub restrictions: ::protobuf::MessageField<Restrictions>,
    // @@protoc_insertion_point(field:spotify.connectstate.ProvidedTrack.album_uri)
    pub album_uri: ::std::string::String,
    // @@protoc_insertion_point(field:spotify.connectstate.ProvidedTrack.disallow_reasons)
    pub disallow_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.ProvidedTrack.artist_uri)
    pub artist_uri: ::std::string::String,
    // special fields
    // @@protoc_insertion_point(special_field:spotify.connectstate.ProvidedTrack.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(10);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "uri",
            |m: &ProvidedTrack| { &m.uri },
            |m: &mut ProvidedTrack| { &mut m.uri },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "uid",
            |m: &ProvidedTrack| { &m.uid },
            |m: &mut ProvidedTrack| { &mut m.uid },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_map_simpler_accessor_new::<_, _>(
            "metadata",
            |m: &ProvidedTrack| { &m.metadata },
            |m: &mut ProvidedTrack| { &mut m.metadata },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "removed",
            |m: &ProvidedTrack| { &m.removed },
            |m: &mut ProvidedTrack| { &mut m.removed },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "blocked",
            |m: &ProvidedTrack| { &m.blocked },
            |m: &mut ProvidedTrack| { &mut m.blocked },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "provider",
            |m: &ProvidedTrack| { &m.provider },
            |m: &mut ProvidedTrack| { &mut m.provider },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, Restrictions>(
            "restrictions",
            |m: &ProvidedTrack| { &m.restrictions },
            |m: &mut ProvidedTrack| { &mut m.restrictions },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "album_uri",
            |m: &ProvidedTrack| { &m.album_uri },
            |m: &mut ProvidedTrack| { &mut m.album_uri },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "disallow_reasons",
            |m: &ProvidedTrack| { &m.disallow_reasons },
            |m: &mut ProvidedTrack| { &mut m.disallow_reasons },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "artist_uri",
            |m: &ProvidedTrack| { &m.artist_uri },
            |m: &mut ProvidedTrack| { &mut m.artist_uri },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ProvidedTrack>(
            "ProvidedTrack",
            fields,
            oneofs,
        )
    }
}

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

    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 {
                10 => {
                    self.uri = is.read_string()?;
                },
                18 => {
                    self.uid = is.read_string()?;
                },
                26 => {
                    let len = is.read_raw_varint32()?;
                    let old_limit = is.push_limit(len as u64)?;
                    let mut key = ::std::default::Default::default();
                    let mut value = ::std::default::Default::default();
                    while let Some(tag) = is.read_raw_tag_or_eof()? {
                        match tag {
                            10 => key = is.read_string()?,
                            18 => value = is.read_string()?,
                            _ => ::protobuf::rt::skip_field_for_tag(tag, is)?,
                        };
                    }
                    is.pop_limit(old_limit);
                    self.metadata.insert(key, value);
                },
                34 => {
                    self.removed.push(is.read_string()?);
                },
                42 => {
                    self.blocked.push(is.read_string()?);
                },
                50 => {
                    self.provider = is.read_string()?;
                },
                58 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.restrictions)?;
                },
                66 => {
                    self.album_uri = is.read_string()?;
                },
                74 => {
                    self.disallow_reasons.push(is.read_string()?);
                },
                82 => {
                    self.artist_uri = is.read_string()?;
                },
                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.uri.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &self.uri);
        }
        if !self.uid.is_empty() {
            my_size += ::protobuf::rt::string_size(2, &self.uid);
        }
        for (k, v) in &self.metadata {
            let mut entry_size = 0;
            entry_size += ::protobuf::rt::string_size(1, &k);
            entry_size += ::protobuf::rt::string_size(2, &v);
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(entry_size) + entry_size
        };
        for value in &self.removed {
            my_size += ::protobuf::rt::string_size(4, &value);
        };
        for value in &self.blocked {
            my_size += ::protobuf::rt::string_size(5, &value);
        };
        if !self.provider.is_empty() {
            my_size += ::protobuf::rt::string_size(6, &self.provider);
        }
        if let Some(v) = self.restrictions.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if !self.album_uri.is_empty() {
            my_size += ::protobuf::rt::string_size(8, &self.album_uri);
        }
        for value in &self.disallow_reasons {
            my_size += ::protobuf::rt::string_size(9, &value);
        };
        if !self.artist_uri.is_empty() {
            my_size += ::protobuf::rt::string_size(10, &self.artist_uri);
        }
        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.uri.is_empty() {
            os.write_string(1, &self.uri)?;
        }
        if !self.uid.is_empty() {
            os.write_string(2, &self.uid)?;
        }
        for (k, v) in &self.metadata {
            let mut entry_size = 0;
            entry_size += ::protobuf::rt::string_size(1, &k);
            entry_size += ::protobuf::rt::string_size(2, &v);
            os.write_raw_varint32(26)?; // Tag.
            os.write_raw_varint32(entry_size as u32)?;
            os.write_string(1, &k)?;
            os.write_string(2, &v)?;
        };
        for v in &self.removed {
            os.write_string(4, &v)?;
        };
        for v in &self.blocked {
            os.write_string(5, &v)?;
        };
        if !self.provider.is_empty() {
            os.write_string(6, &self.provider)?;
        }
        if let Some(v) = self.restrictions.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?;
        }
        if !self.album_uri.is_empty() {
            os.write_string(8, &self.album_uri)?;
        }
        for v in &self.disallow_reasons {
            os.write_string(9, &v)?;
        };
        if !self.artist_uri.is_empty() {
            os.write_string(10, &self.artist_uri)?;
        }
        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() -> ProvidedTrack {
        ProvidedTrack::new()
    }

    fn clear(&mut self) {
        self.uri.clear();
        self.uid.clear();
        self.metadata.clear();
        self.removed.clear();
        self.blocked.clear();
        self.provider.clear();
        self.restrictions.clear();
        self.album_uri.clear();
        self.disallow_reasons.clear();
        self.artist_uri.clear();
        self.special_fields.clear();
    }

    fn default_instance() -> &'static ProvidedTrack {
        static instance: ::protobuf::rt::Lazy<ProvidedTrack> = ::protobuf::rt::Lazy::new();
        instance.get(ProvidedTrack::new)
    }
}

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

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

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

// @@protoc_insertion_point(message:spotify.connectstate.ContextIndex)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct ContextIndex {
    // message fields
    // @@protoc_insertion_point(field:spotify.connectstate.ContextIndex.page)
    pub page: u32,
    // @@protoc_insertion_point(field:spotify.connectstate.ContextIndex.track)
    pub track: u32,
    // special fields
    // @@protoc_insertion_point(special_field:spotify.connectstate.ContextIndex.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

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

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

    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.page = is.read_uint32()?;
                },
                16 => {
                    self.track = is.read_uint32()?;
                },
                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.page != 0 {
            my_size += ::protobuf::rt::uint32_size(1, self.page);
        }
        if self.track != 0 {
            my_size += ::protobuf::rt::uint32_size(2, self.track);
        }
        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.page != 0 {
            os.write_uint32(1, self.page)?;
        }
        if self.track != 0 {
            os.write_uint32(2, self.track)?;
        }
        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() -> ContextIndex {
        ContextIndex::new()
    }

    fn clear(&mut self) {
        self.page = 0;
        self.track = 0;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static ContextIndex {
        static instance: ContextIndex = ContextIndex {
            page: 0,
            track: 0,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

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

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

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

// @@protoc_insertion_point(message:spotify.connectstate.ModeRestrictions)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct ModeRestrictions {
    // message fields
    // @@protoc_insertion_point(field:spotify.connectstate.ModeRestrictions.values)
    pub values: ::std::collections::HashMap<::std::string::String, RestrictionReasons>,
    // special fields
    // @@protoc_insertion_point(special_field:spotify.connectstate.ModeRestrictions.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(1);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_map_simpler_accessor_new::<_, _>(
            "values",
            |m: &ModeRestrictions| { &m.values },
            |m: &mut ModeRestrictions| { &mut m.values },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ModeRestrictions>(
            "ModeRestrictions",
            fields,
            oneofs,
        )
    }
}

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

    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 {
                10 => {
                    let len = is.read_raw_varint32()?;
                    let old_limit = is.push_limit(len as u64)?;
                    let mut key = ::std::default::Default::default();
                    let mut value = ::std::default::Default::default();
                    while let Some(tag) = is.read_raw_tag_or_eof()? {
                        match tag {
                            10 => key = is.read_string()?,
                            18 => value = is.read_message()?,
                            _ => ::protobuf::rt::skip_field_for_tag(tag, is)?,
                        };
                    }
                    is.pop_limit(old_limit);
                    self.values.insert(key, value);
                },
                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;
        for (k, v) in &self.values {
            let mut entry_size = 0;
            entry_size += ::protobuf::rt::string_size(1, &k);
            let len = v.compute_size();
            entry_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(entry_size) + entry_size
        };
        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<()> {
        for (k, v) in &self.values {
            let mut entry_size = 0;
            entry_size += ::protobuf::rt::string_size(1, &k);
            let len = v.cached_size() as u64;
            entry_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
            os.write_raw_varint32(10)?; // Tag.
            os.write_raw_varint32(entry_size as u32)?;
            os.write_string(1, &k)?;
            ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
        };
        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() -> ModeRestrictions {
        ModeRestrictions::new()
    }

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

    fn default_instance() -> &'static ModeRestrictions {
        static instance: ::protobuf::rt::Lazy<ModeRestrictions> = ::protobuf::rt::Lazy::new();
        instance.get(ModeRestrictions::new)
    }
}

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

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

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

// @@protoc_insertion_point(message:spotify.connectstate.RestrictionReasons)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct RestrictionReasons {
    // message fields
    // @@protoc_insertion_point(field:spotify.connectstate.RestrictionReasons.reasons)
    pub reasons: ::std::vec::Vec<::std::string::String>,
    // special fields
    // @@protoc_insertion_point(special_field:spotify.connectstate.RestrictionReasons.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(1);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "reasons",
            |m: &RestrictionReasons| { &m.reasons },
            |m: &mut RestrictionReasons| { &mut m.reasons },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<RestrictionReasons>(
            "RestrictionReasons",
            fields,
            oneofs,
        )
    }
}

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

    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 {
                10 => {
                    self.reasons.push(is.read_string()?);
                },
                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;
        for value in &self.reasons {
            my_size += ::protobuf::rt::string_size(1, &value);
        };
        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<()> {
        for v in &self.reasons {
            os.write_string(1, &v)?;
        };
        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() -> RestrictionReasons {
        RestrictionReasons::new()
    }

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

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

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

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

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

// @@protoc_insertion_point(message:spotify.connectstate.Restrictions)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct Restrictions {
    // message fields
    // @@protoc_insertion_point(field:spotify.connectstate.Restrictions.disallow_pausing_reasons)
    pub disallow_pausing_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.Restrictions.disallow_resuming_reasons)
    pub disallow_resuming_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.Restrictions.disallow_seeking_reasons)
    pub disallow_seeking_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.Restrictions.disallow_peeking_prev_reasons)
    pub disallow_peeking_prev_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.Restrictions.disallow_peeking_next_reasons)
    pub disallow_peeking_next_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.Restrictions.disallow_skipping_prev_reasons)
    pub disallow_skipping_prev_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.Restrictions.disallow_skipping_next_reasons)
    pub disallow_skipping_next_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.Restrictions.disallow_toggling_repeat_context_reasons)
    pub disallow_toggling_repeat_context_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.Restrictions.disallow_toggling_repeat_track_reasons)
    pub disallow_toggling_repeat_track_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.Restrictions.disallow_toggling_shuffle_reasons)
    pub disallow_toggling_shuffle_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.Restrictions.disallow_set_queue_reasons)
    pub disallow_set_queue_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.Restrictions.disallow_interrupting_playback_reasons)
    pub disallow_interrupting_playback_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.Restrictions.disallow_transferring_playback_reasons)
    pub disallow_transferring_playback_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.Restrictions.disallow_remote_control_reasons)
    pub disallow_remote_control_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.Restrictions.disallow_inserting_into_next_tracks_reasons)
    pub disallow_inserting_into_next_tracks_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.Restrictions.disallow_inserting_into_context_tracks_reasons)
    pub disallow_inserting_into_context_tracks_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.Restrictions.disallow_reordering_in_next_tracks_reasons)
    pub disallow_reordering_in_next_tracks_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.Restrictions.disallow_reordering_in_context_tracks_reasons)
    pub disallow_reordering_in_context_tracks_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.Restrictions.disallow_removing_from_next_tracks_reasons)
    pub disallow_removing_from_next_tracks_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.Restrictions.disallow_removing_from_context_tracks_reasons)
    pub disallow_removing_from_context_tracks_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.Restrictions.disallow_updating_context_reasons)
    pub disallow_updating_context_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.Restrictions.disallow_playing_reasons)
    pub disallow_playing_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.Restrictions.disallow_stopping_reasons)
    pub disallow_stopping_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.Restrictions.disallow_add_to_queue_reasons)
    pub disallow_add_to_queue_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.Restrictions.disallow_setting_playback_speed_reasons)
    pub disallow_setting_playback_speed_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.Restrictions.disallow_setting_modes)
    pub disallow_setting_modes: ::std::collections::HashMap<::std::string::String, ModeRestrictions>,
    // @@protoc_insertion_point(field:spotify.connectstate.Restrictions.disallow_signals)
    pub disallow_signals: ::std::collections::HashMap<::std::string::String, RestrictionReasons>,
    // special fields
    // @@protoc_insertion_point(special_field:spotify.connectstate.Restrictions.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(27);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "disallow_pausing_reasons",
            |m: &Restrictions| { &m.disallow_pausing_reasons },
            |m: &mut Restrictions| { &mut m.disallow_pausing_reasons },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "disallow_resuming_reasons",
            |m: &Restrictions| { &m.disallow_resuming_reasons },
            |m: &mut Restrictions| { &mut m.disallow_resuming_reasons },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "disallow_seeking_reasons",
            |m: &Restrictions| { &m.disallow_seeking_reasons },
            |m: &mut Restrictions| { &mut m.disallow_seeking_reasons },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "disallow_peeking_prev_reasons",
            |m: &Restrictions| { &m.disallow_peeking_prev_reasons },
            |m: &mut Restrictions| { &mut m.disallow_peeking_prev_reasons },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "disallow_peeking_next_reasons",
            |m: &Restrictions| { &m.disallow_peeking_next_reasons },
            |m: &mut Restrictions| { &mut m.disallow_peeking_next_reasons },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "disallow_skipping_prev_reasons",
            |m: &Restrictions| { &m.disallow_skipping_prev_reasons },
            |m: &mut Restrictions| { &mut m.disallow_skipping_prev_reasons },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "disallow_skipping_next_reasons",
            |m: &Restrictions| { &m.disallow_skipping_next_reasons },
            |m: &mut Restrictions| { &mut m.disallow_skipping_next_reasons },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "disallow_toggling_repeat_context_reasons",
            |m: &Restrictions| { &m.disallow_toggling_repeat_context_reasons },
            |m: &mut Restrictions| { &mut m.disallow_toggling_repeat_context_reasons },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "disallow_toggling_repeat_track_reasons",
            |m: &Restrictions| { &m.disallow_toggling_repeat_track_reasons },
            |m: &mut Restrictions| { &mut m.disallow_toggling_repeat_track_reasons },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "disallow_toggling_shuffle_reasons",
            |m: &Restrictions| { &m.disallow_toggling_shuffle_reasons },
            |m: &mut Restrictions| { &mut m.disallow_toggling_shuffle_reasons },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "disallow_set_queue_reasons",
            |m: &Restrictions| { &m.disallow_set_queue_reasons },
            |m: &mut Restrictions| { &mut m.disallow_set_queue_reasons },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "disallow_interrupting_playback_reasons",
            |m: &Restrictions| { &m.disallow_interrupting_playback_reasons },
            |m: &mut Restrictions| { &mut m.disallow_interrupting_playback_reasons },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "disallow_transferring_playback_reasons",
            |m: &Restrictions| { &m.disallow_transferring_playback_reasons },
            |m: &mut Restrictions| { &mut m.disallow_transferring_playback_reasons },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "disallow_remote_control_reasons",
            |m: &Restrictions| { &m.disallow_remote_control_reasons },
            |m: &mut Restrictions| { &mut m.disallow_remote_control_reasons },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "disallow_inserting_into_next_tracks_reasons",
            |m: &Restrictions| { &m.disallow_inserting_into_next_tracks_reasons },
            |m: &mut Restrictions| { &mut m.disallow_inserting_into_next_tracks_reasons },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "disallow_inserting_into_context_tracks_reasons",
            |m: &Restrictions| { &m.disallow_inserting_into_context_tracks_reasons },
            |m: &mut Restrictions| { &mut m.disallow_inserting_into_context_tracks_reasons },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "disallow_reordering_in_next_tracks_reasons",
            |m: &Restrictions| { &m.disallow_reordering_in_next_tracks_reasons },
            |m: &mut Restrictions| { &mut m.disallow_reordering_in_next_tracks_reasons },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "disallow_reordering_in_context_tracks_reasons",
            |m: &Restrictions| { &m.disallow_reordering_in_context_tracks_reasons },
            |m: &mut Restrictions| { &mut m.disallow_reordering_in_context_tracks_reasons },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "disallow_removing_from_next_tracks_reasons",
            |m: &Restrictions| { &m.disallow_removing_from_next_tracks_reasons },
            |m: &mut Restrictions| { &mut m.disallow_removing_from_next_tracks_reasons },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "disallow_removing_from_context_tracks_reasons",
            |m: &Restrictions| { &m.disallow_removing_from_context_tracks_reasons },
            |m: &mut Restrictions| { &mut m.disallow_removing_from_context_tracks_reasons },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "disallow_updating_context_reasons",
            |m: &Restrictions| { &m.disallow_updating_context_reasons },
            |m: &mut Restrictions| { &mut m.disallow_updating_context_reasons },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "disallow_playing_reasons",
            |m: &Restrictions| { &m.disallow_playing_reasons },
            |m: &mut Restrictions| { &mut m.disallow_playing_reasons },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "disallow_stopping_reasons",
            |m: &Restrictions| { &m.disallow_stopping_reasons },
            |m: &mut Restrictions| { &mut m.disallow_stopping_reasons },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "disallow_add_to_queue_reasons",
            |m: &Restrictions| { &m.disallow_add_to_queue_reasons },
            |m: &mut Restrictions| { &mut m.disallow_add_to_queue_reasons },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "disallow_setting_playback_speed_reasons",
            |m: &Restrictions| { &m.disallow_setting_playback_speed_reasons },
            |m: &mut Restrictions| { &mut m.disallow_setting_playback_speed_reasons },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_map_simpler_accessor_new::<_, _>(
            "disallow_setting_modes",
            |m: &Restrictions| { &m.disallow_setting_modes },
            |m: &mut Restrictions| { &mut m.disallow_setting_modes },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_map_simpler_accessor_new::<_, _>(
            "disallow_signals",
            |m: &Restrictions| { &m.disallow_signals },
            |m: &mut Restrictions| { &mut m.disallow_signals },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Restrictions>(
            "Restrictions",
            fields,
            oneofs,
        )
    }
}

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

    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 {
                10 => {
                    self.disallow_pausing_reasons.push(is.read_string()?);
                },
                18 => {
                    self.disallow_resuming_reasons.push(is.read_string()?);
                },
                26 => {
                    self.disallow_seeking_reasons.push(is.read_string()?);
                },
                34 => {
                    self.disallow_peeking_prev_reasons.push(is.read_string()?);
                },
                42 => {
                    self.disallow_peeking_next_reasons.push(is.read_string()?);
                },
                50 => {
                    self.disallow_skipping_prev_reasons.push(is.read_string()?);
                },
                58 => {
                    self.disallow_skipping_next_reasons.push(is.read_string()?);
                },
                66 => {
                    self.disallow_toggling_repeat_context_reasons.push(is.read_string()?);
                },
                74 => {
                    self.disallow_toggling_repeat_track_reasons.push(is.read_string()?);
                },
                82 => {
                    self.disallow_toggling_shuffle_reasons.push(is.read_string()?);
                },
                90 => {
                    self.disallow_set_queue_reasons.push(is.read_string()?);
                },
                98 => {
                    self.disallow_interrupting_playback_reasons.push(is.read_string()?);
                },
                106 => {
                    self.disallow_transferring_playback_reasons.push(is.read_string()?);
                },
                114 => {
                    self.disallow_remote_control_reasons.push(is.read_string()?);
                },
                122 => {
                    self.disallow_inserting_into_next_tracks_reasons.push(is.read_string()?);
                },
                130 => {
                    self.disallow_inserting_into_context_tracks_reasons.push(is.read_string()?);
                },
                138 => {
                    self.disallow_reordering_in_next_tracks_reasons.push(is.read_string()?);
                },
                146 => {
                    self.disallow_reordering_in_context_tracks_reasons.push(is.read_string()?);
                },
                154 => {
                    self.disallow_removing_from_next_tracks_reasons.push(is.read_string()?);
                },
                162 => {
                    self.disallow_removing_from_context_tracks_reasons.push(is.read_string()?);
                },
                170 => {
                    self.disallow_updating_context_reasons.push(is.read_string()?);
                },
                178 => {
                    self.disallow_playing_reasons.push(is.read_string()?);
                },
                186 => {
                    self.disallow_stopping_reasons.push(is.read_string()?);
                },
                194 => {
                    self.disallow_add_to_queue_reasons.push(is.read_string()?);
                },
                202 => {
                    self.disallow_setting_playback_speed_reasons.push(is.read_string()?);
                },
                226 => {
                    let len = is.read_raw_varint32()?;
                    let old_limit = is.push_limit(len as u64)?;
                    let mut key = ::std::default::Default::default();
                    let mut value = ::std::default::Default::default();
                    while let Some(tag) = is.read_raw_tag_or_eof()? {
                        match tag {
                            10 => key = is.read_string()?,
                            18 => value = is.read_message()?,
                            _ => ::protobuf::rt::skip_field_for_tag(tag, is)?,
                        };
                    }
                    is.pop_limit(old_limit);
                    self.disallow_setting_modes.insert(key, value);
                },
                234 => {
                    let len = is.read_raw_varint32()?;
                    let old_limit = is.push_limit(len as u64)?;
                    let mut key = ::std::default::Default::default();
                    let mut value = ::std::default::Default::default();
                    while let Some(tag) = is.read_raw_tag_or_eof()? {
                        match tag {
                            10 => key = is.read_string()?,
                            18 => value = is.read_message()?,
                            _ => ::protobuf::rt::skip_field_for_tag(tag, is)?,
                        };
                    }
                    is.pop_limit(old_limit);
                    self.disallow_signals.insert(key, value);
                },
                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;
        for value in &self.disallow_pausing_reasons {
            my_size += ::protobuf::rt::string_size(1, &value);
        };
        for value in &self.disallow_resuming_reasons {
            my_size += ::protobuf::rt::string_size(2, &value);
        };
        for value in &self.disallow_seeking_reasons {
            my_size += ::protobuf::rt::string_size(3, &value);
        };
        for value in &self.disallow_peeking_prev_reasons {
            my_size += ::protobuf::rt::string_size(4, &value);
        };
        for value in &self.disallow_peeking_next_reasons {
            my_size += ::protobuf::rt::string_size(5, &value);
        };
        for value in &self.disallow_skipping_prev_reasons {
            my_size += ::protobuf::rt::string_size(6, &value);
        };
        for value in &self.disallow_skipping_next_reasons {
            my_size += ::protobuf::rt::string_size(7, &value);
        };
        for value in &self.disallow_toggling_repeat_context_reasons {
            my_size += ::protobuf::rt::string_size(8, &value);
        };
        for value in &self.disallow_toggling_repeat_track_reasons {
            my_size += ::protobuf::rt::string_size(9, &value);
        };
        for value in &self.disallow_toggling_shuffle_reasons {
            my_size += ::protobuf::rt::string_size(10, &value);
        };
        for value in &self.disallow_set_queue_reasons {
            my_size += ::protobuf::rt::string_size(11, &value);
        };
        for value in &self.disallow_interrupting_playback_reasons {
            my_size += ::protobuf::rt::string_size(12, &value);
        };
        for value in &self.disallow_transferring_playback_reasons {
            my_size += ::protobuf::rt::string_size(13, &value);
        };
        for value in &self.disallow_remote_control_reasons {
            my_size += ::protobuf::rt::string_size(14, &value);
        };
        for value in &self.disallow_inserting_into_next_tracks_reasons {
            my_size += ::protobuf::rt::string_size(15, &value);
        };
        for value in &self.disallow_inserting_into_context_tracks_reasons {
            my_size += ::protobuf::rt::string_size(16, &value);
        };
        for value in &self.disallow_reordering_in_next_tracks_reasons {
            my_size += ::protobuf::rt::string_size(17, &value);
        };
        for value in &self.disallow_reordering_in_context_tracks_reasons {
            my_size += ::protobuf::rt::string_size(18, &value);
        };
        for value in &self.disallow_removing_from_next_tracks_reasons {
            my_size += ::protobuf::rt::string_size(19, &value);
        };
        for value in &self.disallow_removing_from_context_tracks_reasons {
            my_size += ::protobuf::rt::string_size(20, &value);
        };
        for value in &self.disallow_updating_context_reasons {
            my_size += ::protobuf::rt::string_size(21, &value);
        };
        for value in &self.disallow_playing_reasons {
            my_size += ::protobuf::rt::string_size(22, &value);
        };
        for value in &self.disallow_stopping_reasons {
            my_size += ::protobuf::rt::string_size(23, &value);
        };
        for value in &self.disallow_add_to_queue_reasons {
            my_size += ::protobuf::rt::string_size(24, &value);
        };
        for value in &self.disallow_setting_playback_speed_reasons {
            my_size += ::protobuf::rt::string_size(25, &value);
        };
        for (k, v) in &self.disallow_setting_modes {
            let mut entry_size = 0;
            entry_size += ::protobuf::rt::string_size(1, &k);
            let len = v.compute_size();
            entry_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
            my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(entry_size) + entry_size
        };
        for (k, v) in &self.disallow_signals {
            let mut entry_size = 0;
            entry_size += ::protobuf::rt::string_size(1, &k);
            let len = v.compute_size();
            entry_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
            my_size += 2 + ::protobuf::rt::compute_raw_varint64_size(entry_size) + entry_size
        };
        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<()> {
        for v in &self.disallow_pausing_reasons {
            os.write_string(1, &v)?;
        };
        for v in &self.disallow_resuming_reasons {
            os.write_string(2, &v)?;
        };
        for v in &self.disallow_seeking_reasons {
            os.write_string(3, &v)?;
        };
        for v in &self.disallow_peeking_prev_reasons {
            os.write_string(4, &v)?;
        };
        for v in &self.disallow_peeking_next_reasons {
            os.write_string(5, &v)?;
        };
        for v in &self.disallow_skipping_prev_reasons {
            os.write_string(6, &v)?;
        };
        for v in &self.disallow_skipping_next_reasons {
            os.write_string(7, &v)?;
        };
        for v in &self.disallow_toggling_repeat_context_reasons {
            os.write_string(8, &v)?;
        };
        for v in &self.disallow_toggling_repeat_track_reasons {
            os.write_string(9, &v)?;
        };
        for v in &self.disallow_toggling_shuffle_reasons {
            os.write_string(10, &v)?;
        };
        for v in &self.disallow_set_queue_reasons {
            os.write_string(11, &v)?;
        };
        for v in &self.disallow_interrupting_playback_reasons {
            os.write_string(12, &v)?;
        };
        for v in &self.disallow_transferring_playback_reasons {
            os.write_string(13, &v)?;
        };
        for v in &self.disallow_remote_control_reasons {
            os.write_string(14, &v)?;
        };
        for v in &self.disallow_inserting_into_next_tracks_reasons {
            os.write_string(15, &v)?;
        };
        for v in &self.disallow_inserting_into_context_tracks_reasons {
            os.write_string(16, &v)?;
        };
        for v in &self.disallow_reordering_in_next_tracks_reasons {
            os.write_string(17, &v)?;
        };
        for v in &self.disallow_reordering_in_context_tracks_reasons {
            os.write_string(18, &v)?;
        };
        for v in &self.disallow_removing_from_next_tracks_reasons {
            os.write_string(19, &v)?;
        };
        for v in &self.disallow_removing_from_context_tracks_reasons {
            os.write_string(20, &v)?;
        };
        for v in &self.disallow_updating_context_reasons {
            os.write_string(21, &v)?;
        };
        for v in &self.disallow_playing_reasons {
            os.write_string(22, &v)?;
        };
        for v in &self.disallow_stopping_reasons {
            os.write_string(23, &v)?;
        };
        for v in &self.disallow_add_to_queue_reasons {
            os.write_string(24, &v)?;
        };
        for v in &self.disallow_setting_playback_speed_reasons {
            os.write_string(25, &v)?;
        };
        for (k, v) in &self.disallow_setting_modes {
            let mut entry_size = 0;
            entry_size += ::protobuf::rt::string_size(1, &k);
            let len = v.cached_size() as u64;
            entry_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
            os.write_raw_varint32(226)?; // Tag.
            os.write_raw_varint32(entry_size as u32)?;
            os.write_string(1, &k)?;
            ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
        };
        for (k, v) in &self.disallow_signals {
            let mut entry_size = 0;
            entry_size += ::protobuf::rt::string_size(1, &k);
            let len = v.cached_size() as u64;
            entry_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
            os.write_raw_varint32(234)?; // Tag.
            os.write_raw_varint32(entry_size as u32)?;
            os.write_string(1, &k)?;
            ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
        };
        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() -> Restrictions {
        Restrictions::new()
    }

    fn clear(&mut self) {
        self.disallow_pausing_reasons.clear();
        self.disallow_resuming_reasons.clear();
        self.disallow_seeking_reasons.clear();
        self.disallow_peeking_prev_reasons.clear();
        self.disallow_peeking_next_reasons.clear();
        self.disallow_skipping_prev_reasons.clear();
        self.disallow_skipping_next_reasons.clear();
        self.disallow_toggling_repeat_context_reasons.clear();
        self.disallow_toggling_repeat_track_reasons.clear();
        self.disallow_toggling_shuffle_reasons.clear();
        self.disallow_set_queue_reasons.clear();
        self.disallow_interrupting_playback_reasons.clear();
        self.disallow_transferring_playback_reasons.clear();
        self.disallow_remote_control_reasons.clear();
        self.disallow_inserting_into_next_tracks_reasons.clear();
        self.disallow_inserting_into_context_tracks_reasons.clear();
        self.disallow_reordering_in_next_tracks_reasons.clear();
        self.disallow_reordering_in_context_tracks_reasons.clear();
        self.disallow_removing_from_next_tracks_reasons.clear();
        self.disallow_removing_from_context_tracks_reasons.clear();
        self.disallow_updating_context_reasons.clear();
        self.disallow_playing_reasons.clear();
        self.disallow_stopping_reasons.clear();
        self.disallow_add_to_queue_reasons.clear();
        self.disallow_setting_playback_speed_reasons.clear();
        self.disallow_setting_modes.clear();
        self.disallow_signals.clear();
        self.special_fields.clear();
    }

    fn default_instance() -> &'static Restrictions {
        static instance: ::protobuf::rt::Lazy<Restrictions> = ::protobuf::rt::Lazy::new();
        instance.get(Restrictions::new)
    }
}

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

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

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

// @@protoc_insertion_point(message:spotify.connectstate.PlayOrigin)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct PlayOrigin {
    // message fields
    // @@protoc_insertion_point(field:spotify.connectstate.PlayOrigin.feature_identifier)
    pub feature_identifier: ::std::string::String,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayOrigin.feature_version)
    pub feature_version: ::std::string::String,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayOrigin.view_uri)
    pub view_uri: ::std::string::String,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayOrigin.external_referrer)
    pub external_referrer: ::std::string::String,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayOrigin.referrer_identifier)
    pub referrer_identifier: ::std::string::String,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayOrigin.device_identifier)
    pub device_identifier: ::std::string::String,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayOrigin.feature_classes)
    pub feature_classes: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.PlayOrigin.restriction_identifier)
    pub restriction_identifier: ::std::string::String,
    // special fields
    // @@protoc_insertion_point(special_field:spotify.connectstate.PlayOrigin.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(8);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "feature_identifier",
            |m: &PlayOrigin| { &m.feature_identifier },
            |m: &mut PlayOrigin| { &mut m.feature_identifier },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "feature_version",
            |m: &PlayOrigin| { &m.feature_version },
            |m: &mut PlayOrigin| { &mut m.feature_version },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "view_uri",
            |m: &PlayOrigin| { &m.view_uri },
            |m: &mut PlayOrigin| { &mut m.view_uri },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "external_referrer",
            |m: &PlayOrigin| { &m.external_referrer },
            |m: &mut PlayOrigin| { &mut m.external_referrer },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "referrer_identifier",
            |m: &PlayOrigin| { &m.referrer_identifier },
            |m: &mut PlayOrigin| { &mut m.referrer_identifier },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "device_identifier",
            |m: &PlayOrigin| { &m.device_identifier },
            |m: &mut PlayOrigin| { &mut m.device_identifier },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "feature_classes",
            |m: &PlayOrigin| { &m.feature_classes },
            |m: &mut PlayOrigin| { &mut m.feature_classes },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "restriction_identifier",
            |m: &PlayOrigin| { &m.restriction_identifier },
            |m: &mut PlayOrigin| { &mut m.restriction_identifier },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<PlayOrigin>(
            "PlayOrigin",
            fields,
            oneofs,
        )
    }
}

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

    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 {
                10 => {
                    self.feature_identifier = is.read_string()?;
                },
                18 => {
                    self.feature_version = is.read_string()?;
                },
                26 => {
                    self.view_uri = is.read_string()?;
                },
                34 => {
                    self.external_referrer = is.read_string()?;
                },
                42 => {
                    self.referrer_identifier = is.read_string()?;
                },
                50 => {
                    self.device_identifier = is.read_string()?;
                },
                58 => {
                    self.feature_classes.push(is.read_string()?);
                },
                66 => {
                    self.restriction_identifier = is.read_string()?;
                },
                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.feature_identifier.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &self.feature_identifier);
        }
        if !self.feature_version.is_empty() {
            my_size += ::protobuf::rt::string_size(2, &self.feature_version);
        }
        if !self.view_uri.is_empty() {
            my_size += ::protobuf::rt::string_size(3, &self.view_uri);
        }
        if !self.external_referrer.is_empty() {
            my_size += ::protobuf::rt::string_size(4, &self.external_referrer);
        }
        if !self.referrer_identifier.is_empty() {
            my_size += ::protobuf::rt::string_size(5, &self.referrer_identifier);
        }
        if !self.device_identifier.is_empty() {
            my_size += ::protobuf::rt::string_size(6, &self.device_identifier);
        }
        for value in &self.feature_classes {
            my_size += ::protobuf::rt::string_size(7, &value);
        };
        if !self.restriction_identifier.is_empty() {
            my_size += ::protobuf::rt::string_size(8, &self.restriction_identifier);
        }
        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.feature_identifier.is_empty() {
            os.write_string(1, &self.feature_identifier)?;
        }
        if !self.feature_version.is_empty() {
            os.write_string(2, &self.feature_version)?;
        }
        if !self.view_uri.is_empty() {
            os.write_string(3, &self.view_uri)?;
        }
        if !self.external_referrer.is_empty() {
            os.write_string(4, &self.external_referrer)?;
        }
        if !self.referrer_identifier.is_empty() {
            os.write_string(5, &self.referrer_identifier)?;
        }
        if !self.device_identifier.is_empty() {
            os.write_string(6, &self.device_identifier)?;
        }
        for v in &self.feature_classes {
            os.write_string(7, &v)?;
        };
        if !self.restriction_identifier.is_empty() {
            os.write_string(8, &self.restriction_identifier)?;
        }
        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() -> PlayOrigin {
        PlayOrigin::new()
    }

    fn clear(&mut self) {
        self.feature_identifier.clear();
        self.feature_version.clear();
        self.view_uri.clear();
        self.external_referrer.clear();
        self.referrer_identifier.clear();
        self.device_identifier.clear();
        self.feature_classes.clear();
        self.restriction_identifier.clear();
        self.special_fields.clear();
    }

    fn default_instance() -> &'static PlayOrigin {
        static instance: PlayOrigin = PlayOrigin {
            feature_identifier: ::std::string::String::new(),
            feature_version: ::std::string::String::new(),
            view_uri: ::std::string::String::new(),
            external_referrer: ::std::string::String::new(),
            referrer_identifier: ::std::string::String::new(),
            device_identifier: ::std::string::String::new(),
            feature_classes: ::std::vec::Vec::new(),
            restriction_identifier: ::std::string::String::new(),
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

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

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

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

// @@protoc_insertion_point(message:spotify.connectstate.ContextPlayerOptions)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct ContextPlayerOptions {
    // message fields
    // @@protoc_insertion_point(field:spotify.connectstate.ContextPlayerOptions.shuffling_context)
    pub shuffling_context: bool,
    // @@protoc_insertion_point(field:spotify.connectstate.ContextPlayerOptions.repeating_context)
    pub repeating_context: bool,
    // @@protoc_insertion_point(field:spotify.connectstate.ContextPlayerOptions.repeating_track)
    pub repeating_track: bool,
    // @@protoc_insertion_point(field:spotify.connectstate.ContextPlayerOptions.modes)
    pub modes: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
    // @@protoc_insertion_point(field:spotify.connectstate.ContextPlayerOptions.playback_speed)
    pub playback_speed: ::std::option::Option<f32>,
    // special fields
    // @@protoc_insertion_point(special_field:spotify.connectstate.ContextPlayerOptions.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(5);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "shuffling_context",
            |m: &ContextPlayerOptions| { &m.shuffling_context },
            |m: &mut ContextPlayerOptions| { &mut m.shuffling_context },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "repeating_context",
            |m: &ContextPlayerOptions| { &m.repeating_context },
            |m: &mut ContextPlayerOptions| { &mut m.repeating_context },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "repeating_track",
            |m: &ContextPlayerOptions| { &m.repeating_track },
            |m: &mut ContextPlayerOptions| { &mut m.repeating_track },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_map_simpler_accessor_new::<_, _>(
            "modes",
            |m: &ContextPlayerOptions| { &m.modes },
            |m: &mut ContextPlayerOptions| { &mut m.modes },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "playback_speed",
            |m: &ContextPlayerOptions| { &m.playback_speed },
            |m: &mut ContextPlayerOptions| { &mut m.playback_speed },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ContextPlayerOptions>(
            "ContextPlayerOptions",
            fields,
            oneofs,
        )
    }
}

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

    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.shuffling_context = is.read_bool()?;
                },
                16 => {
                    self.repeating_context = is.read_bool()?;
                },
                24 => {
                    self.repeating_track = is.read_bool()?;
                },
                42 => {
                    let len = is.read_raw_varint32()?;
                    let old_limit = is.push_limit(len as u64)?;
                    let mut key = ::std::default::Default::default();
                    let mut value = ::std::default::Default::default();
                    while let Some(tag) = is.read_raw_tag_or_eof()? {
                        match tag {
                            10 => key = is.read_string()?,
                            18 => value = is.read_string()?,
                            _ => ::protobuf::rt::skip_field_for_tag(tag, is)?,
                        };
                    }
                    is.pop_limit(old_limit);
                    self.modes.insert(key, value);
                },
                37 => {
                    self.playback_speed = ::std::option::Option::Some(is.read_float()?);
                },
                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.shuffling_context != false {
            my_size += 1 + 1;
        }
        if self.repeating_context != false {
            my_size += 1 + 1;
        }
        if self.repeating_track != false {
            my_size += 1 + 1;
        }
        for (k, v) in &self.modes {
            let mut entry_size = 0;
            entry_size += ::protobuf::rt::string_size(1, &k);
            entry_size += ::protobuf::rt::string_size(2, &v);
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(entry_size) + entry_size
        };
        if let Some(v) = self.playback_speed {
            my_size += 1 + 4;
        }
        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.shuffling_context != false {
            os.write_bool(1, self.shuffling_context)?;
        }
        if self.repeating_context != false {
            os.write_bool(2, self.repeating_context)?;
        }
        if self.repeating_track != false {
            os.write_bool(3, self.repeating_track)?;
        }
        for (k, v) in &self.modes {
            let mut entry_size = 0;
            entry_size += ::protobuf::rt::string_size(1, &k);
            entry_size += ::protobuf::rt::string_size(2, &v);
            os.write_raw_varint32(42)?; // Tag.
            os.write_raw_varint32(entry_size as u32)?;
            os.write_string(1, &k)?;
            os.write_string(2, &v)?;
        };
        if let Some(v) = self.playback_speed {
            os.write_float(4, v)?;
        }
        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() -> ContextPlayerOptions {
        ContextPlayerOptions::new()
    }

    fn clear(&mut self) {
        self.shuffling_context = false;
        self.repeating_context = false;
        self.repeating_track = false;
        self.modes.clear();
        self.playback_speed = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static ContextPlayerOptions {
        static instance: ::protobuf::rt::Lazy<ContextPlayerOptions> = ::protobuf::rt::Lazy::new();
        instance.get(ContextPlayerOptions::new)
    }
}

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

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

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

// @@protoc_insertion_point(message:spotify.connectstate.Suppressions)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct Suppressions {
    // message fields
    // @@protoc_insertion_point(field:spotify.connectstate.Suppressions.providers)
    pub providers: ::std::vec::Vec<::std::string::String>,
    // special fields
    // @@protoc_insertion_point(special_field:spotify.connectstate.Suppressions.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(1);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "providers",
            |m: &Suppressions| { &m.providers },
            |m: &mut Suppressions| { &mut m.providers },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Suppressions>(
            "Suppressions",
            fields,
            oneofs,
        )
    }
}

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

    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 {
                10 => {
                    self.providers.push(is.read_string()?);
                },
                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;
        for value in &self.providers {
            my_size += ::protobuf::rt::string_size(1, &value);
        };
        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<()> {
        for v in &self.providers {
            os.write_string(1, &v)?;
        };
        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() -> Suppressions {
        Suppressions::new()
    }

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

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

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

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

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

// @@protoc_insertion_point(message:spotify.connectstate.PlaybackQuality)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct PlaybackQuality {
    // message fields
    // @@protoc_insertion_point(field:spotify.connectstate.PlaybackQuality.bitrate_level)
    pub bitrate_level: ::protobuf::EnumOrUnknown<BitrateLevel>,
    // @@protoc_insertion_point(field:spotify.connectstate.PlaybackQuality.strategy)
    pub strategy: ::protobuf::EnumOrUnknown<BitrateStrategy>,
    // @@protoc_insertion_point(field:spotify.connectstate.PlaybackQuality.target_bitrate_level)
    pub target_bitrate_level: ::protobuf::EnumOrUnknown<BitrateLevel>,
    // @@protoc_insertion_point(field:spotify.connectstate.PlaybackQuality.target_bitrate_available)
    pub target_bitrate_available: bool,
    // @@protoc_insertion_point(field:spotify.connectstate.PlaybackQuality.hifi_status)
    pub hifi_status: ::protobuf::EnumOrUnknown<HiFiStatus>,
    // special fields
    // @@protoc_insertion_point(special_field:spotify.connectstate.PlaybackQuality.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(5);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "bitrate_level",
            |m: &PlaybackQuality| { &m.bitrate_level },
            |m: &mut PlaybackQuality| { &mut m.bitrate_level },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "strategy",
            |m: &PlaybackQuality| { &m.strategy },
            |m: &mut PlaybackQuality| { &mut m.strategy },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "target_bitrate_level",
            |m: &PlaybackQuality| { &m.target_bitrate_level },
            |m: &mut PlaybackQuality| { &mut m.target_bitrate_level },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "target_bitrate_available",
            |m: &PlaybackQuality| { &m.target_bitrate_available },
            |m: &mut PlaybackQuality| { &mut m.target_bitrate_available },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "hifi_status",
            |m: &PlaybackQuality| { &m.hifi_status },
            |m: &mut PlaybackQuality| { &mut m.hifi_status },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<PlaybackQuality>(
            "PlaybackQuality",
            fields,
            oneofs,
        )
    }
}

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

    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.bitrate_level = is.read_enum_or_unknown()?;
                },
                16 => {
                    self.strategy = is.read_enum_or_unknown()?;
                },
                24 => {
                    self.target_bitrate_level = is.read_enum_or_unknown()?;
                },
                32 => {
                    self.target_bitrate_available = is.read_bool()?;
                },
                40 => {
                    self.hifi_status = is.read_enum_or_unknown()?;
                },
                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.bitrate_level != ::protobuf::EnumOrUnknown::new(BitrateLevel::unknown_bitrate_level) {
            my_size += ::protobuf::rt::int32_size(1, self.bitrate_level.value());
        }
        if self.strategy != ::protobuf::EnumOrUnknown::new(BitrateStrategy::unknown_strategy) {
            my_size += ::protobuf::rt::int32_size(2, self.strategy.value());
        }
        if self.target_bitrate_level != ::protobuf::EnumOrUnknown::new(BitrateLevel::unknown_bitrate_level) {
            my_size += ::protobuf::rt::int32_size(3, self.target_bitrate_level.value());
        }
        if self.target_bitrate_available != false {
            my_size += 1 + 1;
        }
        if self.hifi_status != ::protobuf::EnumOrUnknown::new(HiFiStatus::none) {
            my_size += ::protobuf::rt::int32_size(5, self.hifi_status.value());
        }
        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.bitrate_level != ::protobuf::EnumOrUnknown::new(BitrateLevel::unknown_bitrate_level) {
            os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.bitrate_level))?;
        }
        if self.strategy != ::protobuf::EnumOrUnknown::new(BitrateStrategy::unknown_strategy) {
            os.write_enum(2, ::protobuf::EnumOrUnknown::value(&self.strategy))?;
        }
        if self.target_bitrate_level != ::protobuf::EnumOrUnknown::new(BitrateLevel::unknown_bitrate_level) {
            os.write_enum(3, ::protobuf::EnumOrUnknown::value(&self.target_bitrate_level))?;
        }
        if self.target_bitrate_available != false {
            os.write_bool(4, self.target_bitrate_available)?;
        }
        if self.hifi_status != ::protobuf::EnumOrUnknown::new(HiFiStatus::none) {
            os.write_enum(5, ::protobuf::EnumOrUnknown::value(&self.hifi_status))?;
        }
        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() -> PlaybackQuality {
        PlaybackQuality::new()
    }

    fn clear(&mut self) {
        self.bitrate_level = ::protobuf::EnumOrUnknown::new(BitrateLevel::unknown_bitrate_level);
        self.strategy = ::protobuf::EnumOrUnknown::new(BitrateStrategy::unknown_strategy);
        self.target_bitrate_level = ::protobuf::EnumOrUnknown::new(BitrateLevel::unknown_bitrate_level);
        self.target_bitrate_available = false;
        self.hifi_status = ::protobuf::EnumOrUnknown::new(HiFiStatus::none);
        self.special_fields.clear();
    }

    fn default_instance() -> &'static PlaybackQuality {
        static instance: PlaybackQuality = PlaybackQuality {
            bitrate_level: ::protobuf::EnumOrUnknown::from_i32(0),
            strategy: ::protobuf::EnumOrUnknown::from_i32(0),
            target_bitrate_level: ::protobuf::EnumOrUnknown::from_i32(0),
            target_bitrate_available: false,
            hifi_status: ::protobuf::EnumOrUnknown::from_i32(0),
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

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

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

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

#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
// @@protoc_insertion_point(enum:spotify.connectstate.BitrateLevel)
pub enum BitrateLevel {
    // @@protoc_insertion_point(enum_value:spotify.connectstate.BitrateLevel.unknown_bitrate_level)
    unknown_bitrate_level = 0,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.BitrateLevel.low)
    low = 1,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.BitrateLevel.normal)
    normal = 2,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.BitrateLevel.high)
    high = 3,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.BitrateLevel.very_high)
    very_high = 4,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.BitrateLevel.hifi)
    hifi = 5,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.BitrateLevel.hifi24)
    hifi24 = 6,
}

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

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

    fn from_i32(value: i32) -> ::std::option::Option<BitrateLevel> {
        match value {
            0 => ::std::option::Option::Some(BitrateLevel::unknown_bitrate_level),
            1 => ::std::option::Option::Some(BitrateLevel::low),
            2 => ::std::option::Option::Some(BitrateLevel::normal),
            3 => ::std::option::Option::Some(BitrateLevel::high),
            4 => ::std::option::Option::Some(BitrateLevel::very_high),
            5 => ::std::option::Option::Some(BitrateLevel::hifi),
            6 => ::std::option::Option::Some(BitrateLevel::hifi24),
            _ => ::std::option::Option::None
        }
    }

    fn from_str(str: &str) -> ::std::option::Option<BitrateLevel> {
        match str {
            "unknown_bitrate_level" => ::std::option::Option::Some(BitrateLevel::unknown_bitrate_level),
            "low" => ::std::option::Option::Some(BitrateLevel::low),
            "normal" => ::std::option::Option::Some(BitrateLevel::normal),
            "high" => ::std::option::Option::Some(BitrateLevel::high),
            "very_high" => ::std::option::Option::Some(BitrateLevel::very_high),
            "hifi" => ::std::option::Option::Some(BitrateLevel::hifi),
            "hifi24" => ::std::option::Option::Some(BitrateLevel::hifi24),
            _ => ::std::option::Option::None
        }
    }

    const VALUES: &'static [BitrateLevel] = &[
        BitrateLevel::unknown_bitrate_level,
        BitrateLevel::low,
        BitrateLevel::normal,
        BitrateLevel::high,
        BitrateLevel::very_high,
        BitrateLevel::hifi,
        BitrateLevel::hifi24,
    ];
}

impl ::protobuf::EnumFull for BitrateLevel {
    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("BitrateLevel").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 BitrateLevel {
    fn default() -> Self {
        BitrateLevel::unknown_bitrate_level
    }
}

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

#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
// @@protoc_insertion_point(enum:spotify.connectstate.BitrateStrategy)
pub enum BitrateStrategy {
    // @@protoc_insertion_point(enum_value:spotify.connectstate.BitrateStrategy.unknown_strategy)
    unknown_strategy = 0,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.BitrateStrategy.best_matching)
    best_matching = 1,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.BitrateStrategy.backend_advised)
    backend_advised = 2,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.BitrateStrategy.offlined_file)
    offlined_file = 3,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.BitrateStrategy.cached_file)
    cached_file = 4,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.BitrateStrategy.local_file)
    local_file = 5,
}

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

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

    fn from_i32(value: i32) -> ::std::option::Option<BitrateStrategy> {
        match value {
            0 => ::std::option::Option::Some(BitrateStrategy::unknown_strategy),
            1 => ::std::option::Option::Some(BitrateStrategy::best_matching),
            2 => ::std::option::Option::Some(BitrateStrategy::backend_advised),
            3 => ::std::option::Option::Some(BitrateStrategy::offlined_file),
            4 => ::std::option::Option::Some(BitrateStrategy::cached_file),
            5 => ::std::option::Option::Some(BitrateStrategy::local_file),
            _ => ::std::option::Option::None
        }
    }

    fn from_str(str: &str) -> ::std::option::Option<BitrateStrategy> {
        match str {
            "unknown_strategy" => ::std::option::Option::Some(BitrateStrategy::unknown_strategy),
            "best_matching" => ::std::option::Option::Some(BitrateStrategy::best_matching),
            "backend_advised" => ::std::option::Option::Some(BitrateStrategy::backend_advised),
            "offlined_file" => ::std::option::Option::Some(BitrateStrategy::offlined_file),
            "cached_file" => ::std::option::Option::Some(BitrateStrategy::cached_file),
            "local_file" => ::std::option::Option::Some(BitrateStrategy::local_file),
            _ => ::std::option::Option::None
        }
    }

    const VALUES: &'static [BitrateStrategy] = &[
        BitrateStrategy::unknown_strategy,
        BitrateStrategy::best_matching,
        BitrateStrategy::backend_advised,
        BitrateStrategy::offlined_file,
        BitrateStrategy::cached_file,
        BitrateStrategy::local_file,
    ];
}

impl ::protobuf::EnumFull for BitrateStrategy {
    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("BitrateStrategy").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 BitrateStrategy {
    fn default() -> Self {
        BitrateStrategy::unknown_strategy
    }
}

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

#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
// @@protoc_insertion_point(enum:spotify.connectstate.HiFiStatus)
pub enum HiFiStatus {
    // @@protoc_insertion_point(enum_value:spotify.connectstate.HiFiStatus.none)
    none = 0,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.HiFiStatus.off)
    off = 1,
    // @@protoc_insertion_point(enum_value:spotify.connectstate.HiFiStatus.on)
    on = 2,
}

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

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

    fn from_i32(value: i32) -> ::std::option::Option<HiFiStatus> {
        match value {
            0 => ::std::option::Option::Some(HiFiStatus::none),
            1 => ::std::option::Option::Some(HiFiStatus::off),
            2 => ::std::option::Option::Some(HiFiStatus::on),
            _ => ::std::option::Option::None
        }
    }

    fn from_str(str: &str) -> ::std::option::Option<HiFiStatus> {
        match str {
            "none" => ::std::option::Option::Some(HiFiStatus::none),
            "off" => ::std::option::Option::Some(HiFiStatus::off),
            "on" => ::std::option::Option::Some(HiFiStatus::on),
            _ => ::std::option::Option::None
        }
    }

    const VALUES: &'static [HiFiStatus] = &[
        HiFiStatus::none,
        HiFiStatus::off,
        HiFiStatus::on,
    ];
}

impl ::protobuf::EnumFull for HiFiStatus {
    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("HiFiStatus").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 HiFiStatus {
    fn default() -> Self {
        HiFiStatus::none
    }
}

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

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\x0cplayer.proto\x12\x14spotify.connectstate\"\xf2\x0c\n\x0bPlayerStat\
    e\x12\x1c\n\ttimestamp\x18\x01\x20\x01(\x03R\ttimestamp\x12\x1f\n\x0bcon\
    text_uri\x18\x02\x20\x01(\tR\ncontextUri\x12\x1f\n\x0bcontext_url\x18\
    \x03\x20\x01(\tR\ncontextUrl\x12U\n\x14context_restrictions\x18\x04\x20\
    \x01(\x0b2\".spotify.connectstate.RestrictionsR\x13contextRestrictions\
    \x12A\n\x0bplay_origin\x18\x05\x20\x01(\x0b2\x20.spotify.connectstate.Pl\
    ayOriginR\nplayOrigin\x128\n\x05index\x18\x06\x20\x01(\x0b2\".spotify.co\
    nnectstate.ContextIndexR\x05index\x129\n\x05track\x18\x07\x20\x01(\x0b2#\
    .spotify.connectstate.ProvidedTrackR\x05track\x12\x1f\n\x0bplayback_id\
    \x18\x08\x20\x01(\tR\nplaybackId\x12%\n\x0eplayback_speed\x18\t\x20\x01(\
    \x01R\rplaybackSpeed\x127\n\x18position_as_of_timestamp\x18\n\x20\x01(\
    \x03R\x15positionAsOfTimestamp\x12\x1a\n\x08duration\x18\x0b\x20\x01(\
    \x03R\x08duration\x12\x1d\n\nis_playing\x18\x0c\x20\x01(\x08R\tisPlaying\
    \x12\x1b\n\tis_paused\x18\r\x20\x01(\x08R\x08isPaused\x12!\n\x0cis_buffe\
    ring\x18\x0e\x20\x01(\x08R\x0bisBuffering\x12.\n\x13is_system_initiated\
    \x18\x0f\x20\x01(\x08R\x11isSystemInitiated\x12D\n\x07options\x18\x10\
    \x20\x01(\x0b2*.spotify.connectstate.ContextPlayerOptionsR\x07options\
    \x12F\n\x0crestrictions\x18\x11\x20\x01(\x0b2\".spotify.connectstate.Res\
    trictionsR\x0crestrictions\x12F\n\x0csuppressions\x18\x12\x20\x01(\x0b2\
    \".spotify.connectstate.SuppressionsR\x0csuppressions\x12D\n\x0bprev_tra\
    cks\x18\x13\x20\x03(\x0b2#.spotify.connectstate.ProvidedTrackR\nprevTrac\
    ks\x12D\n\x0bnext_tracks\x18\x14\x20\x03(\x0b2#.spotify.connectstate.Pro\
    videdTrackR\nnextTracks\x12a\n\x10context_metadata\x18\x15\x20\x03(\x0b2\
    6.spotify.connectstate.PlayerState.ContextMetadataEntryR\x0fcontextMetad\
    ata\x12X\n\rpage_metadata\x18\x16\x20\x03(\x0b23.spotify.connectstate.Pl\
    ayerState.PageMetadataEntryR\x0cpageMetadata\x12\x1d\n\nsession_id\x18\
    \x17\x20\x01(\tR\tsessionId\x12%\n\x0equeue_revision\x18\x18\x20\x01(\tR\
    \rqueueRevision\x12\x1a\n\x08position\x18\x19\x20\x01(\x03R\x08position\
    \x12P\n\x10playback_quality\x18\x20\x20\x01(\x0b2%.spotify.connectstate.\
    PlaybackQualityR\x0fplaybackQuality\x12\x18\n\x07signals\x18!\x20\x03(\t\
    R\x07signals\x12,\n\x12session_command_id\x18#\x20\x01(\tR\x10sessionCom\
    mandId\x1aB\n\x14ContextMetadataEntry\x12\x10\n\x03key\x18\x01\x20\x01(\
    \tR\x03key\x12\x14\n\x05value\x18\x02\x20\x01(\tR\x05value:\x028\x01\x1a\
    ?\n\x11PageMetadataEntry\x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\x12\
    \x14\n\x05value\x18\x02\x20\x01(\tR\x05value:\x028\x01J\x04\x08\x1a\x10\
    \x1bJ\x04\x08\x1b\x10\x1cJ\x04\x08\x1c\x10\x1dJ\x04\x08\x1d\x10\x1eJ\x04\
    \x08\x1e\x10\x1fJ\x04\x08\x1f\x10\x20J\x04\x08\"\x10#\"\xc4\x03\n\rProvi\
    dedTrack\x12\x10\n\x03uri\x18\x01\x20\x01(\tR\x03uri\x12\x10\n\x03uid\
    \x18\x02\x20\x01(\tR\x03uid\x12M\n\x08metadata\x18\x03\x20\x03(\x0b21.sp\
    otify.connectstate.ProvidedTrack.MetadataEntryR\x08metadata\x12\x18\n\
    \x07removed\x18\x04\x20\x03(\tR\x07removed\x12\x18\n\x07blocked\x18\x05\
    \x20\x03(\tR\x07blocked\x12\x1a\n\x08provider\x18\x06\x20\x01(\tR\x08pro\
    vider\x12F\n\x0crestrictions\x18\x07\x20\x01(\x0b2\".spotify.connectstat\
    e.RestrictionsR\x0crestrictions\x12\x1b\n\talbum_uri\x18\x08\x20\x01(\tR\
    \x08albumUri\x12)\n\x10disallow_reasons\x18\t\x20\x03(\tR\x0fdisallowRea\
    sons\x12\x1d\n\nartist_uri\x18\n\x20\x01(\tR\tartistUri\x1a;\n\rMetadata\
    Entry\x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\x12\x14\n\x05value\x18\
    \x02\x20\x01(\tR\x05value:\x028\x01J\x04\x08\x0b\x10\x0c\"8\n\x0cContext\
    Index\x12\x12\n\x04page\x18\x01\x20\x01(\rR\x04page\x12\x14\n\x05track\
    \x18\x02\x20\x01(\rR\x05track\"\xc3\x01\n\x10ModeRestrictions\x12J\n\x06\
    values\x18\x01\x20\x03(\x0b22.spotify.connectstate.ModeRestrictions.Valu\
    esEntryR\x06values\x1ac\n\x0bValuesEntry\x12\x10\n\x03key\x18\x01\x20\
    \x01(\tR\x03key\x12>\n\x05value\x18\x02\x20\x01(\x0b2(.spotify.connectst\
    ate.RestrictionReasonsR\x05value:\x028\x01\".\n\x12RestrictionReasons\
    \x12\x18\n\x07reasons\x18\x01\x20\x03(\tR\x07reasons\"\xc7\x12\n\x0cRest\
    rictions\x128\n\x18disallow_pausing_reasons\x18\x01\x20\x03(\tR\x16disal\
    lowPausingReasons\x12:\n\x19disallow_resuming_reasons\x18\x02\x20\x03(\t\
    R\x17disallowResumingReasons\x128\n\x18disallow_seeking_reasons\x18\x03\
    \x20\x03(\tR\x16disallowSeekingReasons\x12A\n\x1ddisallow_peeking_prev_r\
    easons\x18\x04\x20\x03(\tR\x1adisallowPeekingPrevReasons\x12A\n\x1ddisal\
    low_peeking_next_reasons\x18\x05\x20\x03(\tR\x1adisallowPeekingNextReaso\
    ns\x12C\n\x1edisallow_skipping_prev_reasons\x18\x06\x20\x03(\tR\x1bdisal\
    lowSkippingPrevReasons\x12C\n\x1edisallow_skipping_next_reasons\x18\x07\
    \x20\x03(\tR\x1bdisallowSkippingNextReasons\x12V\n(disallow_toggling_rep\
    eat_context_reasons\x18\x08\x20\x03(\tR$disallowTogglingRepeatContextRea\
    sons\x12R\n&disallow_toggling_repeat_track_reasons\x18\t\x20\x03(\tR\"di\
    sallowTogglingRepeatTrackReasons\x12I\n!disallow_toggling_shuffle_reason\
    s\x18\n\x20\x03(\tR\x1edisallowTogglingShuffleReasons\x12;\n\x1adisallow\
    _set_queue_reasons\x18\x0b\x20\x03(\tR\x17disallowSetQueueReasons\x12S\n\
    &disallow_interrupting_playback_reasons\x18\x0c\x20\x03(\tR#disallowInte\
    rruptingPlaybackReasons\x12S\n&disallow_transferring_playback_reasons\
    \x18\r\x20\x03(\tR#disallowTransferringPlaybackReasons\x12E\n\x1fdisallo\
    w_remote_control_reasons\x18\x0e\x20\x03(\tR\x1cdisallowRemoteControlRea\
    sons\x12[\n+disallow_inserting_into_next_tracks_reasons\x18\x0f\x20\x03(\
    \tR&disallowInsertingIntoNextTracksReasons\x12a\n.disallow_inserting_int\
    o_context_tracks_reasons\x18\x10\x20\x03(\tR)disallowInsertingIntoContex\
    tTracksReasons\x12Y\n*disallow_reordering_in_next_tracks_reasons\x18\x11\
    \x20\x03(\tR%disallowReorderingInNextTracksReasons\x12_\n-disallow_reord\
    ering_in_context_tracks_reasons\x18\x12\x20\x03(\tR(disallowReorderingIn\
    ContextTracksReasons\x12Y\n*disallow_removing_from_next_tracks_reasons\
    \x18\x13\x20\x03(\tR%disallowRemovingFromNextTracksReasons\x12_\n-disall\
    ow_removing_from_context_tracks_reasons\x18\x14\x20\x03(\tR(disallowRemo\
    vingFromContextTracksReasons\x12I\n!disallow_updating_context_reasons\
    \x18\x15\x20\x03(\tR\x1edisallowUpdatingContextReasons\x128\n\x18disallo\
    w_playing_reasons\x18\x16\x20\x03(\tR\x16disallowPlayingReasons\x12:\n\
    \x19disallow_stopping_reasons\x18\x17\x20\x03(\tR\x17disallowStoppingRea\
    sons\x12@\n\x1ddisallow_add_to_queue_reasons\x18\x18\x20\x03(\tR\x19disa\
    llowAddToQueueReasons\x12T\n'disallow_setting_playback_speed_reasons\x18\
    \x19\x20\x03(\tR#disallowSettingPlaybackSpeedReasons\x12r\n\x16disallow_\
    setting_modes\x18\x1c\x20\x03(\x0b2<.spotify.connectstate.Restrictions.D\
    isallowSettingModesEntryR\x14disallowSettingModes\x12b\n\x10disallow_sig\
    nals\x18\x1d\x20\x03(\x0b27.spotify.connectstate.Restrictions.DisallowSi\
    gnalsEntryR\x0fdisallowSignals\x1ao\n\x19DisallowSettingModesEntry\x12\
    \x10\n\x03key\x18\x01\x20\x01(\tR\x03key\x12<\n\x05value\x18\x02\x20\x01\
    (\x0b2&.spotify.connectstate.ModeRestrictionsR\x05value:\x028\x01\x1al\n\
    \x14DisallowSignalsEntry\x12\x10\n\x03key\x18\x01\x20\x01(\tR\x03key\x12\
    >\n\x05value\x18\x02\x20\x01(\x0b2(.spotify.connectstate.RestrictionReas\
    onsR\x05value:\x028\x01J\x04\x08\x1a\x10\x1bJ\x04\x08\x1b\x10\x1c\"\xea\
    \x02\n\nPlayOrigin\x12-\n\x12feature_identifier\x18\x01\x20\x01(\tR\x11f\
    eatureIdentifier\x12'\n\x0ffeature_version\x18\x02\x20\x01(\tR\x0efeatur\
    eVersion\x12\x19\n\x08view_uri\x18\x03\x20\x01(\tR\x07viewUri\x12+\n\x11\
    external_referrer\x18\x04\x20\x01(\tR\x10externalReferrer\x12/\n\x13refe\
    rrer_identifier\x18\x05\x20\x01(\tR\x12referrerIdentifier\x12+\n\x11devi\
    ce_identifier\x18\x06\x20\x01(\tR\x10deviceIdentifier\x12'\n\x0ffeature_\
    classes\x18\x07\x20\x03(\tR\x0efeatureClasses\x125\n\x16restriction_iden\
    tifier\x18\x08\x20\x01(\tR\x15restrictionIdentifier\"\xdf\x02\n\x14Conte\
    xtPlayerOptions\x12+\n\x11shuffling_context\x18\x01\x20\x01(\x08R\x10shu\
    fflingContext\x12+\n\x11repeating_context\x18\x02\x20\x01(\x08R\x10repea\
    tingContext\x12'\n\x0frepeating_track\x18\x03\x20\x01(\x08R\x0erepeating\
    Track\x12K\n\x05modes\x18\x05\x20\x03(\x0b25.spotify.connectstate.Contex\
    tPlayerOptions.ModesEntryR\x05modes\x12*\n\x0eplayback_speed\x18\x04\x20\
    \x01(\x02H\0R\rplaybackSpeed\x88\x01\x01\x1a8\n\nModesEntry\x12\x10\n\
    \x03key\x18\x01\x20\x01(\tR\x03key\x12\x14\n\x05value\x18\x02\x20\x01(\t\
    R\x05value:\x028\x01B\x11\n\x0f_playback_speed\",\n\x0cSuppressions\x12\
    \x1c\n\tproviders\x18\x01\x20\x03(\tR\tproviders\"\xf0\x02\n\x0fPlayback\
    Quality\x12G\n\rbitrate_level\x18\x01\x20\x01(\x0e2\".spotify.connectsta\
    te.BitrateLevelR\x0cbitrateLevel\x12A\n\x08strategy\x18\x02\x20\x01(\x0e\
    2%.spotify.connectstate.BitrateStrategyR\x08strategy\x12T\n\x14target_bi\
    trate_level\x18\x03\x20\x01(\x0e2\".spotify.connectstate.BitrateLevelR\
    \x12targetBitrateLevel\x128\n\x18target_bitrate_available\x18\x04\x20\
    \x01(\x08R\x16targetBitrateAvailable\x12A\n\x0bhifi_status\x18\x05\x20\
    \x01(\x0e2\x20.spotify.connectstate.HiFiStatusR\nhifiStatus*m\n\x0cBitra\
    teLevel\x12\x19\n\x15unknown_bitrate_level\x10\0\x12\x07\n\x03low\x10\
    \x01\x12\n\n\x06normal\x10\x02\x12\x08\n\x04high\x10\x03\x12\r\n\tvery_h\
    igh\x10\x04\x12\x08\n\x04hifi\x10\x05\x12\n\n\x06hifi24\x10\x06*\x83\x01\
    \n\x0fBitrateStrategy\x12\x14\n\x10unknown_strategy\x10\0\x12\x11\n\rbes\
    t_matching\x10\x01\x12\x13\n\x0fbackend_advised\x10\x02\x12\x11\n\roffli\
    ned_file\x10\x03\x12\x0f\n\x0bcached_file\x10\x04\x12\x0e\n\nlocal_file\
    \x10\x05*'\n\nHiFiStatus\x12\x08\n\x04none\x10\0\x12\x07\n\x03off\x10\
    \x01\x12\x06\n\x02on\x10\x02B\"\n\x1ecom.spotify.connectstate.modelH\x02\
    b\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(10);
            messages.push(PlayerState::generated_message_descriptor_data());
            messages.push(ProvidedTrack::generated_message_descriptor_data());
            messages.push(ContextIndex::generated_message_descriptor_data());
            messages.push(ModeRestrictions::generated_message_descriptor_data());
            messages.push(RestrictionReasons::generated_message_descriptor_data());
            messages.push(Restrictions::generated_message_descriptor_data());
            messages.push(PlayOrigin::generated_message_descriptor_data());
            messages.push(ContextPlayerOptions::generated_message_descriptor_data());
            messages.push(Suppressions::generated_message_descriptor_data());
            messages.push(PlaybackQuality::generated_message_descriptor_data());
            let mut enums = ::std::vec::Vec::with_capacity(3);
            enums.push(BitrateLevel::generated_enum_descriptor_data());
            enums.push(BitrateStrategy::generated_enum_descriptor_data());
            enums.push(HiFiStatus::generated_enum_descriptor_data());
            ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
                file_descriptor_proto(),
                deps,
                messages,
                enums,
            )
        });
        ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
    })
}
