// 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 `spotify/login5/v3/user_info.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.login5.v3.UserInfo)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct UserInfo {
    // message fields
    // @@protoc_insertion_point(field:spotify.login5.v3.UserInfo.name)
    pub name: ::std::string::String,
    // @@protoc_insertion_point(field:spotify.login5.v3.UserInfo.email)
    pub email: ::std::string::String,
    // @@protoc_insertion_point(field:spotify.login5.v3.UserInfo.email_verified)
    pub email_verified: bool,
    // @@protoc_insertion_point(field:spotify.login5.v3.UserInfo.birthdate)
    pub birthdate: ::std::string::String,
    // @@protoc_insertion_point(field:spotify.login5.v3.UserInfo.gender)
    pub gender: ::protobuf::EnumOrUnknown<user_info::Gender>,
    // @@protoc_insertion_point(field:spotify.login5.v3.UserInfo.phone_number)
    pub phone_number: ::std::string::String,
    // @@protoc_insertion_point(field:spotify.login5.v3.UserInfo.phone_number_verified)
    pub phone_number_verified: bool,
    // @@protoc_insertion_point(field:spotify.login5.v3.UserInfo.email_already_registered)
    pub email_already_registered: bool,
    // special fields
    // @@protoc_insertion_point(special_field:spotify.login5.v3.UserInfo.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

impl UserInfo {
    pub fn new() -> UserInfo {
        ::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::<_, _>(
            "name",
            |m: &UserInfo| { &m.name },
            |m: &mut UserInfo| { &mut m.name },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "email",
            |m: &UserInfo| { &m.email },
            |m: &mut UserInfo| { &mut m.email },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "email_verified",
            |m: &UserInfo| { &m.email_verified },
            |m: &mut UserInfo| { &mut m.email_verified },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "birthdate",
            |m: &UserInfo| { &m.birthdate },
            |m: &mut UserInfo| { &mut m.birthdate },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "gender",
            |m: &UserInfo| { &m.gender },
            |m: &mut UserInfo| { &mut m.gender },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "phone_number",
            |m: &UserInfo| { &m.phone_number },
            |m: &mut UserInfo| { &mut m.phone_number },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "phone_number_verified",
            |m: &UserInfo| { &m.phone_number_verified },
            |m: &mut UserInfo| { &mut m.phone_number_verified },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
            "email_already_registered",
            |m: &UserInfo| { &m.email_already_registered },
            |m: &mut UserInfo| { &mut m.email_already_registered },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<UserInfo>(
            "UserInfo",
            fields,
            oneofs,
        )
    }
}

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

    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()?;
                },
                18 => {
                    self.email = is.read_string()?;
                },
                24 => {
                    self.email_verified = is.read_bool()?;
                },
                34 => {
                    self.birthdate = is.read_string()?;
                },
                40 => {
                    self.gender = is.read_enum_or_unknown()?;
                },
                50 => {
                    self.phone_number = is.read_string()?;
                },
                56 => {
                    self.phone_number_verified = is.read_bool()?;
                },
                64 => {
                    self.email_already_registered = is.read_bool()?;
                },
                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);
        }
        if !self.email.is_empty() {
            my_size += ::protobuf::rt::string_size(2, &self.email);
        }
        if self.email_verified != false {
            my_size += 1 + 1;
        }
        if !self.birthdate.is_empty() {
            my_size += ::protobuf::rt::string_size(4, &self.birthdate);
        }
        if self.gender != ::protobuf::EnumOrUnknown::new(user_info::Gender::UNKNOWN) {
            my_size += ::protobuf::rt::int32_size(5, self.gender.value());
        }
        if !self.phone_number.is_empty() {
            my_size += ::protobuf::rt::string_size(6, &self.phone_number);
        }
        if self.phone_number_verified != false {
            my_size += 1 + 1;
        }
        if self.email_already_registered != false {
            my_size += 1 + 1;
        }
        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)?;
        }
        if !self.email.is_empty() {
            os.write_string(2, &self.email)?;
        }
        if self.email_verified != false {
            os.write_bool(3, self.email_verified)?;
        }
        if !self.birthdate.is_empty() {
            os.write_string(4, &self.birthdate)?;
        }
        if self.gender != ::protobuf::EnumOrUnknown::new(user_info::Gender::UNKNOWN) {
            os.write_enum(5, ::protobuf::EnumOrUnknown::value(&self.gender))?;
        }
        if !self.phone_number.is_empty() {
            os.write_string(6, &self.phone_number)?;
        }
        if self.phone_number_verified != false {
            os.write_bool(7, self.phone_number_verified)?;
        }
        if self.email_already_registered != false {
            os.write_bool(8, self.email_already_registered)?;
        }
        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() -> UserInfo {
        UserInfo::new()
    }

    fn clear(&mut self) {
        self.name.clear();
        self.email.clear();
        self.email_verified = false;
        self.birthdate.clear();
        self.gender = ::protobuf::EnumOrUnknown::new(user_info::Gender::UNKNOWN);
        self.phone_number.clear();
        self.phone_number_verified = false;
        self.email_already_registered = false;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static UserInfo {
        static instance: UserInfo = UserInfo {
            name: ::std::string::String::new(),
            email: ::std::string::String::new(),
            email_verified: false,
            birthdate: ::std::string::String::new(),
            gender: ::protobuf::EnumOrUnknown::from_i32(0),
            phone_number: ::std::string::String::new(),
            phone_number_verified: false,
            email_already_registered: false,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

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

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

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

/// Nested message and enums of message `UserInfo`
pub mod user_info {
    #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
    // @@protoc_insertion_point(enum:spotify.login5.v3.UserInfo.Gender)
    pub enum Gender {
        // @@protoc_insertion_point(enum_value:spotify.login5.v3.UserInfo.Gender.UNKNOWN)
        UNKNOWN = 0,
        // @@protoc_insertion_point(enum_value:spotify.login5.v3.UserInfo.Gender.MALE)
        MALE = 1,
        // @@protoc_insertion_point(enum_value:spotify.login5.v3.UserInfo.Gender.FEMALE)
        FEMALE = 2,
        // @@protoc_insertion_point(enum_value:spotify.login5.v3.UserInfo.Gender.NEUTRAL)
        NEUTRAL = 3,
    }

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

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

        fn from_i32(value: i32) -> ::std::option::Option<Gender> {
            match value {
                0 => ::std::option::Option::Some(Gender::UNKNOWN),
                1 => ::std::option::Option::Some(Gender::MALE),
                2 => ::std::option::Option::Some(Gender::FEMALE),
                3 => ::std::option::Option::Some(Gender::NEUTRAL),
                _ => ::std::option::Option::None
            }
        }

        fn from_str(str: &str) -> ::std::option::Option<Gender> {
            match str {
                "UNKNOWN" => ::std::option::Option::Some(Gender::UNKNOWN),
                "MALE" => ::std::option::Option::Some(Gender::MALE),
                "FEMALE" => ::std::option::Option::Some(Gender::FEMALE),
                "NEUTRAL" => ::std::option::Option::Some(Gender::NEUTRAL),
                _ => ::std::option::Option::None
            }
        }

        const VALUES: &'static [Gender] = &[
            Gender::UNKNOWN,
            Gender::MALE,
            Gender::FEMALE,
            Gender::NEUTRAL,
        ];
    }

    impl ::protobuf::EnumFull for Gender {
        fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
            static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
            descriptor.get(|| super::file_descriptor().enum_by_package_relative_name("UserInfo.Gender").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 Gender {
        fn default() -> Self {
            Gender::UNKNOWN
        }
    }

    impl Gender {
        pub(in super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
            ::protobuf::reflect::GeneratedEnumDescriptorData::new::<Gender>("UserInfo.Gender")
        }
    }
}

static file_descriptor_proto_data: &'static [u8] = b"\
    \n!spotify/login5/v3/user_info.proto\x12\x11spotify.login5.v3\"\x80\x03\
    \n\x08UserInfo\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\x12\x14\n\
    \x05email\x18\x02\x20\x01(\tR\x05email\x12%\n\x0eemail_verified\x18\x03\
    \x20\x01(\x08R\remailVerified\x12\x1c\n\tbirthdate\x18\x04\x20\x01(\tR\t\
    birthdate\x12:\n\x06gender\x18\x05\x20\x01(\x0e2\".spotify.login5.v3.Use\
    rInfo.GenderR\x06gender\x12!\n\x0cphone_number\x18\x06\x20\x01(\tR\x0bph\
    oneNumber\x122\n\x15phone_number_verified\x18\x07\x20\x01(\x08R\x13phone\
    NumberVerified\x128\n\x18email_already_registered\x18\x08\x20\x01(\x08R\
    \x16emailAlreadyRegistered\"8\n\x06Gender\x12\x0b\n\x07UNKNOWN\x10\0\x12\
    \x08\n\x04MALE\x10\x01\x12\n\n\x06FEMALE\x10\x02\x12\x0b\n\x07NEUTRAL\
    \x10\x03B-\n\x1bcom.spotify.login5.v3.protoP\x01H\x02\xa2\x02\tSPTLogin5\
    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(1);
            messages.push(UserInfo::generated_message_descriptor_data());
            let mut enums = ::std::vec::Vec::with_capacity(1);
            enums.push(user_info::Gender::generated_enum_descriptor_data());
            ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
                file_descriptor_proto(),
                deps,
                messages,
                enums,
            )
        });
        ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
    })
}
