// 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 `play_history.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.transfer.PlayHistory)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct PlayHistory {
    // message fields
    // @@protoc_insertion_point(field:spotify.player.proto.transfer.PlayHistory.backward_items)
    pub backward_items: ::std::vec::Vec<play_history::Item>,
    // @@protoc_insertion_point(field:spotify.player.proto.transfer.PlayHistory.forward_items)
    pub forward_items: ::std::vec::Vec<play_history::Item>,
    // special fields
    // @@protoc_insertion_point(special_field:spotify.player.proto.transfer.PlayHistory.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

impl PlayHistory {
    pub fn new() -> PlayHistory {
        ::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_vec_simpler_accessor::<_, _>(
            "backward_items",
            |m: &PlayHistory| { &m.backward_items },
            |m: &mut PlayHistory| { &mut m.backward_items },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "forward_items",
            |m: &PlayHistory| { &m.forward_items },
            |m: &mut PlayHistory| { &mut m.forward_items },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<PlayHistory>(
            "PlayHistory",
            fields,
            oneofs,
        )
    }
}

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

    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.backward_items.push(is.read_message()?);
                },
                18 => {
                    self.forward_items.push(is.read_message()?);
                },
                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.backward_items {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        };
        for value in &self.forward_items {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        };
        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.backward_items {
            ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
        };
        for v in &self.forward_items {
            ::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() -> PlayHistory {
        PlayHistory::new()
    }

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

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

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

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

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

/// Nested message and enums of message `PlayHistory`
pub mod play_history {
    // @@protoc_insertion_point(message:spotify.player.proto.transfer.PlayHistory.Item)
    #[derive(PartialEq,Clone,Default,Debug)]
    pub struct Item {
        // message fields
        // @@protoc_insertion_point(field:spotify.player.proto.transfer.PlayHistory.Item.context_id)
        pub context_id: ::std::option::Option<::std::string::String>,
        // @@protoc_insertion_point(field:spotify.player.proto.transfer.PlayHistory.Item.uid)
        pub uid: ::std::option::Option<::std::string::String>,
        // @@protoc_insertion_point(field:spotify.player.proto.transfer.PlayHistory.Item.disliked)
        pub disliked: ::std::option::Option<bool>,
        // @@protoc_insertion_point(field:spotify.player.proto.transfer.PlayHistory.Item.children)
        pub children: ::std::vec::Vec<Item>,
        // special fields
        // @@protoc_insertion_point(special_field:spotify.player.proto.transfer.PlayHistory.Item.special_fields)
        pub special_fields: ::protobuf::SpecialFields,
    }

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

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

        // optional string context_id = 1;

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

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

        pub fn has_context_id(&self) -> bool {
            self.context_id.is_some()
        }

        // Param is passed by value, moved
        pub fn set_context_id(&mut self, v: ::std::string::String) {
            self.context_id = ::std::option::Option::Some(v);
        }

        // Mutable pointer to the field.
        // If field is not initialized, it is initialized with default value first.
        pub fn mut_context_id(&mut self) -> &mut ::std::string::String {
            if self.context_id.is_none() {
                self.context_id = ::std::option::Option::Some(::std::string::String::new());
            }
            self.context_id.as_mut().unwrap()
        }

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

        // optional string uid = 2;

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

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

        pub fn has_uid(&self) -> bool {
            self.uid.is_some()
        }

        // Param is passed by value, moved
        pub fn set_uid(&mut self, v: ::std::string::String) {
            self.uid = ::std::option::Option::Some(v);
        }

        // Mutable pointer to the field.
        // If field is not initialized, it is initialized with default value first.
        pub fn mut_uid(&mut self) -> &mut ::std::string::String {
            if self.uid.is_none() {
                self.uid = ::std::option::Option::Some(::std::string::String::new());
            }
            self.uid.as_mut().unwrap()
        }

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

        // optional bool disliked = 3;

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

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

        pub fn has_disliked(&self) -> bool {
            self.disliked.is_some()
        }

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

        pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
            let mut fields = ::std::vec::Vec::with_capacity(4);
            let mut oneofs = ::std::vec::Vec::with_capacity(0);
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "context_id",
                |m: &Item| { &m.context_id },
                |m: &mut Item| { &mut m.context_id },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "uid",
                |m: &Item| { &m.uid },
                |m: &mut Item| { &mut m.uid },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "disliked",
                |m: &Item| { &m.disliked },
                |m: &mut Item| { &mut m.disliked },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
                "children",
                |m: &Item| { &m.children },
                |m: &mut Item| { &mut m.children },
            ));
            ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Item>(
                "PlayHistory.Item",
                fields,
                oneofs,
            )
        }
    }

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

        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.context_id = ::std::option::Option::Some(is.read_string()?);
                    },
                    18 => {
                        self.uid = ::std::option::Option::Some(is.read_string()?);
                    },
                    24 => {
                        self.disliked = ::std::option::Option::Some(is.read_bool()?);
                    },
                    34 => {
                        self.children.push(is.read_message()?);
                    },
                    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 let Some(v) = self.context_id.as_ref() {
                my_size += ::protobuf::rt::string_size(1, &v);
            }
            if let Some(v) = self.uid.as_ref() {
                my_size += ::protobuf::rt::string_size(2, &v);
            }
            if let Some(v) = self.disliked {
                my_size += 1 + 1;
            }
            for value in &self.children {
                let len = value.compute_size();
                my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
            };
            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 let Some(v) = self.context_id.as_ref() {
                os.write_string(1, v)?;
            }
            if let Some(v) = self.uid.as_ref() {
                os.write_string(2, v)?;
            }
            if let Some(v) = self.disliked {
                os.write_bool(3, v)?;
            }
            for v in &self.children {
                ::protobuf::rt::write_message_field_with_cached_size(4, 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() -> Item {
            Item::new()
        }

        fn clear(&mut self) {
            self.context_id = ::std::option::Option::None;
            self.uid = ::std::option::Option::None;
            self.disliked = ::std::option::Option::None;
            self.children.clear();
            self.special_fields.clear();
        }

        fn default_instance() -> &'static Item {
            static instance: Item = Item {
                context_id: ::std::option::Option::None,
                uid: ::std::option::Option::None,
                disliked: ::std::option::Option::None,
                children: ::std::vec::Vec::new(),
                special_fields: ::protobuf::SpecialFields::new(),
            };
            &instance
        }
    }

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

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

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

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\x12play_history.proto\x12\x1dspotify.player.proto.transfer\"\xde\x02\
    \n\x0bPlayHistory\x12V\n\x0ebackward_items\x18\x01\x20\x03(\x0b2/.spotif\
    y.player.proto.transfer.PlayHistory.ItemR\rbackwardItems\x12T\n\rforward\
    _items\x18\x02\x20\x03(\x0b2/.spotify.player.proto.transfer.PlayHistory.\
    ItemR\x0cforwardItems\x1a\xa0\x01\n\x04Item\x12\x1d\n\ncontext_id\x18\
    \x01\x20\x01(\tR\tcontextId\x12\x10\n\x03uid\x18\x02\x20\x01(\tR\x03uid\
    \x12\x1a\n\x08disliked\x18\x03\x20\x01(\x08R\x08disliked\x12K\n\x08child\
    ren\x18\x04\x20\x03(\x0b2/.spotify.player.proto.transfer.PlayHistory.Ite\
    mR\x08childrenB\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(2);
            messages.push(PlayHistory::generated_message_descriptor_data());
            messages.push(play_history::Item::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)
    })
}
