// 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 `transfer_state.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.TransferState)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TransferState {
    // message fields
    // @@protoc_insertion_point(field:spotify.player.proto.transfer.TransferState.options)
    pub options: ::protobuf::MessageField<super::context_player_options::ContextPlayerOptions>,
    // @@protoc_insertion_point(field:spotify.player.proto.transfer.TransferState.playback)
    pub playback: ::protobuf::MessageField<super::playback::Playback>,
    // @@protoc_insertion_point(field:spotify.player.proto.transfer.TransferState.current_session)
    pub current_session: ::protobuf::MessageField<super::session::Session>,
    // @@protoc_insertion_point(field:spotify.player.proto.transfer.TransferState.queue)
    pub queue: ::protobuf::MessageField<super::queue::Queue>,
    // @@protoc_insertion_point(field:spotify.player.proto.transfer.TransferState.play_history)
    pub play_history: ::protobuf::MessageField<super::play_history::PlayHistory>,
    // special fields
    // @@protoc_insertion_point(special_field:spotify.player.proto.transfer.TransferState.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

impl TransferState {
    pub fn new() -> TransferState {
        ::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_message_field_accessor::<_, super::context_player_options::ContextPlayerOptions>(
            "options",
            |m: &TransferState| { &m.options },
            |m: &mut TransferState| { &mut m.options },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::playback::Playback>(
            "playback",
            |m: &TransferState| { &m.playback },
            |m: &mut TransferState| { &mut m.playback },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::session::Session>(
            "current_session",
            |m: &TransferState| { &m.current_session },
            |m: &mut TransferState| { &mut m.current_session },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::queue::Queue>(
            "queue",
            |m: &TransferState| { &m.queue },
            |m: &mut TransferState| { &mut m.queue },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::play_history::PlayHistory>(
            "play_history",
            |m: &TransferState| { &m.play_history },
            |m: &mut TransferState| { &mut m.play_history },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TransferState>(
            "TransferState",
            fields,
            oneofs,
        )
    }
}

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

    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 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.options)?;
                },
                18 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.playback)?;
                },
                26 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.current_session)?;
                },
                34 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.queue)?;
                },
                42 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.play_history)?;
                },
                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.options.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.playback.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.current_session.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.queue.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.play_history.as_ref() {
            let len = v.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.options.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
        }
        if let Some(v) = self.playback.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
        }
        if let Some(v) = self.current_session.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?;
        }
        if let Some(v) = self.queue.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?;
        }
        if let Some(v) = self.play_history.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(5, 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() -> TransferState {
        TransferState::new()
    }

    fn clear(&mut self) {
        self.options.clear();
        self.playback.clear();
        self.current_session.clear();
        self.queue.clear();
        self.play_history.clear();
        self.special_fields.clear();
    }

    fn default_instance() -> &'static TransferState {
        static instance: TransferState = TransferState {
            options: ::protobuf::MessageField::none(),
            playback: ::protobuf::MessageField::none(),
            current_session: ::protobuf::MessageField::none(),
            queue: ::protobuf::MessageField::none(),
            play_history: ::protobuf::MessageField::none(),
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

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

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

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

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\x14transfer_state.proto\x12\x1dspotify.player.proto.transfer\x1a\x1cc\
    ontext_player_options.proto\x1a\x0eplayback.proto\x1a\x12play_history.pr\
    oto\x1a\rsession.proto\x1a\x0bqueue.proto\"\xf6\x02\n\rTransferState\x12\
    D\n\x07options\x18\x01\x20\x01(\x0b2*.spotify.player.proto.ContextPlayer\
    OptionsR\x07options\x12C\n\x08playback\x18\x02\x20\x01(\x0b2'.spotify.pl\
    ayer.proto.transfer.PlaybackR\x08playback\x12O\n\x0fcurrent_session\x18\
    \x03\x20\x01(\x0b2&.spotify.player.proto.transfer.SessionR\x0ecurrentSes\
    sion\x12:\n\x05queue\x18\x04\x20\x01(\x0b2$.spotify.player.proto.transfe\
    r.QueueR\x05queue\x12M\n\x0cplay_history\x18\x05\x20\x01(\x0b2*.spotify.\
    player.proto.transfer.PlayHistoryR\x0bplayHistoryB\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(5);
            deps.push(super::context_player_options::file_descriptor().clone());
            deps.push(super::playback::file_descriptor().clone());
            deps.push(super::play_history::file_descriptor().clone());
            deps.push(super::session::file_descriptor().clone());
            deps.push(super::queue::file_descriptor().clone());
            let mut messages = ::std::vec::Vec::with_capacity(1);
            messages.push(TransferState::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)
    })
}
