// 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 `restrictions.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.player.proto.ModeRestrictions)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct ModeRestrictions {
    // message fields
    // @@protoc_insertion_point(field:spotify.player.proto.ModeRestrictions.values)
    pub values: ::std::collections::HashMap<::std::string::String, RestrictionReasons>,
    // special fields
    // @@protoc_insertion_point(special_field:spotify.player.proto.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.player.proto.RestrictionReasons)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct RestrictionReasons {
    // message fields
    // @@protoc_insertion_point(field:spotify.player.proto.RestrictionReasons.reasons)
    pub reasons: ::std::vec::Vec<::std::string::String>,
    // special fields
    // @@protoc_insertion_point(special_field:spotify.player.proto.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.player.proto.Restrictions)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct Restrictions {
    // message fields
    // @@protoc_insertion_point(field:spotify.player.proto.Restrictions.disallow_pausing_reasons)
    pub disallow_pausing_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.player.proto.Restrictions.disallow_resuming_reasons)
    pub disallow_resuming_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.player.proto.Restrictions.disallow_seeking_reasons)
    pub disallow_seeking_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.player.proto.Restrictions.disallow_peeking_prev_reasons)
    pub disallow_peeking_prev_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.player.proto.Restrictions.disallow_peeking_next_reasons)
    pub disallow_peeking_next_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.player.proto.Restrictions.disallow_skipping_prev_reasons)
    pub disallow_skipping_prev_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.player.proto.Restrictions.disallow_skipping_next_reasons)
    pub disallow_skipping_next_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.player.proto.Restrictions.disallow_toggling_repeat_context_reasons)
    pub disallow_toggling_repeat_context_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.player.proto.Restrictions.disallow_toggling_repeat_track_reasons)
    pub disallow_toggling_repeat_track_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.player.proto.Restrictions.disallow_toggling_shuffle_reasons)
    pub disallow_toggling_shuffle_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.player.proto.Restrictions.disallow_set_queue_reasons)
    pub disallow_set_queue_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.player.proto.Restrictions.disallow_interrupting_playback_reasons)
    pub disallow_interrupting_playback_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.player.proto.Restrictions.disallow_transferring_playback_reasons)
    pub disallow_transferring_playback_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.player.proto.Restrictions.disallow_remote_control_reasons)
    pub disallow_remote_control_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.player.proto.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.player.proto.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.player.proto.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.player.proto.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.player.proto.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.player.proto.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.player.proto.Restrictions.disallow_updating_context_reasons)
    pub disallow_updating_context_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.player.proto.Restrictions.disallow_add_to_queue_reasons)
    pub disallow_add_to_queue_reasons: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.player.proto.Restrictions.disallow_setting_playback_speed)
    pub disallow_setting_playback_speed: ::std::vec::Vec<::std::string::String>,
    // @@protoc_insertion_point(field:spotify.player.proto.Restrictions.disallow_setting_modes)
    pub disallow_setting_modes: ::std::collections::HashMap<::std::string::String, ModeRestrictions>,
    // @@protoc_insertion_point(field:spotify.player.proto.Restrictions.disallow_signals)
    pub disallow_signals: ::std::collections::HashMap<::std::string::String, RestrictionReasons>,
    // special fields
    // @@protoc_insertion_point(special_field:spotify.player.proto.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(25);
        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_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",
            |m: &Restrictions| { &m.disallow_setting_playback_speed },
            |m: &mut Restrictions| { &mut m.disallow_setting_playback_speed },
        ));
        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_add_to_queue_reasons.push(is.read_string()?);
                },
                186 => {
                    self.disallow_setting_playback_speed.push(is.read_string()?);
                },
                202 => {
                    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);
                },
                210 => {
                    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_add_to_queue_reasons {
            my_size += ::protobuf::rt::string_size(22, &value);
        };
        for value in &self.disallow_setting_playback_speed {
            my_size += ::protobuf::rt::string_size(23, &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_add_to_queue_reasons {
            os.write_string(22, &v)?;
        };
        for v in &self.disallow_setting_playback_speed {
            os.write_string(23, &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(202)?; // 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(210)?; // 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_add_to_queue_reasons.clear();
        self.disallow_setting_playback_speed.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>;
}

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\x12restrictions.proto\x12\x14spotify.player.proto\"\xc3\x01\n\x10Mode\
    Restrictions\x12J\n\x06values\x18\x01\x20\x03(\x0b22.spotify.player.prot\
    o.ModeRestrictions.ValuesEntryR\x06values\x1ac\n\x0bValuesEntry\x12\x10\
    \n\x03key\x18\x01\x20\x01(\tR\x03key\x12>\n\x05value\x18\x02\x20\x01(\
    \x0b2(.spotify.player.proto.RestrictionReasonsR\x05value:\x028\x01\".\n\
    \x12RestrictionReasons\x12\x18\n\x07reasons\x18\x01\x20\x03(\tR\x07reaso\
    ns\"\xbc\x11\n\x0cRestrictions\x128\n\x18disallow_pausing_reasons\x18\
    \x01\x20\x03(\tR\x16disallowPausingReasons\x12:\n\x19disallow_resuming_r\
    easons\x18\x02\x20\x03(\tR\x17disallowResumingReasons\x128\n\x18disallow\
    _seeking_reasons\x18\x03\x20\x03(\tR\x16disallowSeekingReasons\x12A\n\
    \x1ddisallow_peeking_prev_reasons\x18\x04\x20\x03(\tR\x1adisallowPeeking\
    PrevReasons\x12A\n\x1ddisallow_peeking_next_reasons\x18\x05\x20\x03(\tR\
    \x1adisallowPeekingNextReasons\x12C\n\x1edisallow_skipping_prev_reasons\
    \x18\x06\x20\x03(\tR\x1bdisallowSkippingPrevReasons\x12C\n\x1edisallow_s\
    kipping_next_reasons\x18\x07\x20\x03(\tR\x1bdisallowSkippingNextReasons\
    \x12V\n(disallow_toggling_repeat_context_reasons\x18\x08\x20\x03(\tR$dis\
    allowTogglingRepeatContextReasons\x12R\n&disallow_toggling_repeat_track_\
    reasons\x18\t\x20\x03(\tR\"disallowTogglingRepeatTrackReasons\x12I\n!dis\
    allow_toggling_shuffle_reasons\x18\n\x20\x03(\tR\x1edisallowTogglingShuf\
    fleReasons\x12;\n\x1adisallow_set_queue_reasons\x18\x0b\x20\x03(\tR\x17d\
    isallowSetQueueReasons\x12S\n&disallow_interrupting_playback_reasons\x18\
    \x0c\x20\x03(\tR#disallowInterruptingPlaybackReasons\x12S\n&disallow_tra\
    nsferring_playback_reasons\x18\r\x20\x03(\tR#disallowTransferringPlaybac\
    kReasons\x12E\n\x1fdisallow_remote_control_reasons\x18\x0e\x20\x03(\tR\
    \x1cdisallowRemoteControlReasons\x12[\n+disallow_inserting_into_next_tra\
    cks_reasons\x18\x0f\x20\x03(\tR&disallowInsertingIntoNextTracksReasons\
    \x12a\n.disallow_inserting_into_context_tracks_reasons\x18\x10\x20\x03(\
    \tR)disallowInsertingIntoContextTracksReasons\x12Y\n*disallow_reordering\
    _in_next_tracks_reasons\x18\x11\x20\x03(\tR%disallowReorderingInNextTrac\
    ksReasons\x12_\n-disallow_reordering_in_context_tracks_reasons\x18\x12\
    \x20\x03(\tR(disallowReorderingInContextTracksReasons\x12Y\n*disallow_re\
    moving_from_next_tracks_reasons\x18\x13\x20\x03(\tR%disallowRemovingFrom\
    NextTracksReasons\x12_\n-disallow_removing_from_context_tracks_reasons\
    \x18\x14\x20\x03(\tR(disallowRemovingFromContextTracksReasons\x12I\n!dis\
    allow_updating_context_reasons\x18\x15\x20\x03(\tR\x1edisallowUpdatingCo\
    ntextReasons\x12@\n\x1ddisallow_add_to_queue_reasons\x18\x16\x20\x03(\tR\
    \x19disallowAddToQueueReasons\x12E\n\x1fdisallow_setting_playback_speed\
    \x18\x17\x20\x03(\tR\x1cdisallowSettingPlaybackSpeed\x12r\n\x16disallow_\
    setting_modes\x18\x19\x20\x03(\x0b2<.spotify.player.proto.Restrictions.D\
    isallowSettingModesEntryR\x14disallowSettingModes\x12b\n\x10disallow_sig\
    nals\x18\x1a\x20\x03(\x0b27.spotify.player.proto.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.player.proto.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.player.proto.RestrictionReas\
    onsR\x05value:\x028\x01J\x04\x08\x18\x10\x19B\x02H\x02b\x06proto2\
";

/// `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(3);
            messages.push(ModeRestrictions::generated_message_descriptor_data());
            messages.push(RestrictionReasons::generated_message_descriptor_data());
            messages.push(Restrictions::generated_message_descriptor_data());
            let mut enums = ::std::vec::Vec::with_capacity(0);
            ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
                file_descriptor_proto(),
                deps,
                messages,
                enums,
            )
        });
        ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
    })
}
