// 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 `user_attributes.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.user_attributes.proto.UserAttributesMutation)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct UserAttributesMutation {
    // message fields
    // @@protoc_insertion_point(field:spotify.user_attributes.proto.UserAttributesMutation.fields)
    pub fields: ::std::vec::Vec<MutatedField>,
    // @@protoc_insertion_point(field:spotify.user_attributes.proto.UserAttributesMutation.cmd)
    pub cmd: ::protobuf::MessageField<MutationCommand>,
    // special fields
    // @@protoc_insertion_point(special_field:spotify.user_attributes.proto.UserAttributesMutation.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

impl UserAttributesMutation {
    pub fn new() -> UserAttributesMutation {
        ::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::<_, _>(
            "fields",
            |m: &UserAttributesMutation| { &m.fields },
            |m: &mut UserAttributesMutation| { &mut m.fields },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, MutationCommand>(
            "cmd",
            |m: &UserAttributesMutation| { &m.cmd },
            |m: &mut UserAttributesMutation| { &mut m.cmd },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<UserAttributesMutation>(
            "UserAttributesMutation",
            fields,
            oneofs,
        )
    }
}

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

    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.fields.push(is.read_message()?);
                },
                18 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.cmd)?;
                },
                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.fields {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        };
        if let Some(v) = self.cmd.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<()> {
        for v in &self.fields {
            ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
        };
        if let Some(v) = self.cmd.as_ref() {
            ::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() -> UserAttributesMutation {
        UserAttributesMutation::new()
    }

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

    fn default_instance() -> &'static UserAttributesMutation {
        static instance: UserAttributesMutation = UserAttributesMutation {
            fields: ::std::vec::Vec::new(),
            cmd: ::protobuf::MessageField::none(),
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

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

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

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

// @@protoc_insertion_point(message:spotify.user_attributes.proto.MutatedField)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct MutatedField {
    // message fields
    // @@protoc_insertion_point(field:spotify.user_attributes.proto.MutatedField.name)
    pub name: ::std::string::String,
    // special fields
    // @@protoc_insertion_point(special_field:spotify.user_attributes.proto.MutatedField.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

impl MutatedField {
    pub fn new() -> MutatedField {
        ::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_simpler_field_accessor::<_, _>(
            "name",
            |m: &MutatedField| { &m.name },
            |m: &mut MutatedField| { &mut m.name },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<MutatedField>(
            "MutatedField",
            fields,
            oneofs,
        )
    }
}

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

    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.name = 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.name.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &self.name);
        }
        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.name.is_empty() {
            os.write_string(1, &self.name)?;
        }
        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() -> MutatedField {
        MutatedField::new()
    }

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

    fn default_instance() -> &'static MutatedField {
        static instance: MutatedField = MutatedField {
            name: ::std::string::String::new(),
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

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

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

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

// @@protoc_insertion_point(message:spotify.user_attributes.proto.MutationCommand)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct MutationCommand {
    // message fields
    // @@protoc_insertion_point(field:spotify.user_attributes.proto.MutationCommand.timestamp)
    pub timestamp: i64,
    // @@protoc_insertion_point(field:spotify.user_attributes.proto.MutationCommand.unknown)
    pub unknown: i32,
    // special fields
    // @@protoc_insertion_point(special_field:spotify.user_attributes.proto.MutationCommand.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

impl MutationCommand {
    pub fn new() -> MutationCommand {
        ::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::<_, _>(
            "timestamp",
            |m: &MutationCommand| { &m.timestamp },
            |m: &mut MutationCommand| { &mut m.timestamp },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "unknown",
            |m: &MutationCommand| { &m.unknown },
            |m: &mut MutationCommand| { &mut m.unknown },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<MutationCommand>(
            "MutationCommand",
            fields,
            oneofs,
        )
    }
}

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

    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()?;
                },
                16 => {
                    self.unknown = is.read_int32()?;
                },
                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.unknown != 0 {
            my_size += ::protobuf::rt::int32_size(2, self.unknown);
        }
        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.unknown != 0 {
            os.write_int32(2, self.unknown)?;
        }
        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() -> MutationCommand {
        MutationCommand::new()
    }

    fn clear(&mut self) {
        self.timestamp = 0;
        self.unknown = 0;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static MutationCommand {
        static instance: MutationCommand = MutationCommand {
            timestamp: 0,
            unknown: 0,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

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

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

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

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\x15user_attributes.proto\x12\x1dspotify.user_attributes.proto\"\x9f\
    \x01\n\x16UserAttributesMutation\x12C\n\x06fields\x18\x01\x20\x03(\x0b2+\
    .spotify.user_attributes.proto.MutatedFieldR\x06fields\x12@\n\x03cmd\x18\
    \x02\x20\x01(\x0b2..spotify.user_attributes.proto.MutationCommandR\x03cm\
    d\"\"\n\x0cMutatedField\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\"I\
    \n\x0fMutationCommand\x12\x1c\n\ttimestamp\x18\x01\x20\x01(\x03R\ttimest\
    amp\x12\x18\n\x07unknown\x18\x02\x20\x01(\x05R\x07unknownB\x02H\x02b\x06\
    proto3\
";

/// `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(UserAttributesMutation::generated_message_descriptor_data());
            messages.push(MutatedField::generated_message_descriptor_data());
            messages.push(MutationCommand::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)
    })
}
