// This file is generated by rust-protobuf 3.7.2. Do not edit
// .proto file is parsed by protoc --rs_out=...
// @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 `designers.proto`

/// Generated files are compatible only with the same version
/// of protobuf runtime.
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_7_2;

///  A designer listed on the catalog:
// @@protoc_insertion_point(message:DesignerInfoProto)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct DesignerInfoProto {
    // message fields
    ///  Designer or typefoundry name:
    // @@protoc_insertion_point(field:DesignerInfoProto.designer)
    pub designer: ::std::option::Option<::std::string::String>,
    ///  URL for more info on this designer:
    // @@protoc_insertion_point(field:DesignerInfoProto.link)
    pub link: ::std::option::Option<::std::string::String>,
    ///  Photo or logo:
    // @@protoc_insertion_point(field:DesignerInfoProto.avatar)
    pub avatar: ::protobuf::MessageField<AvatarProto>,
    // special fields
    // @@protoc_insertion_point(special_field:DesignerInfoProto.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    // optional string designer = 1;

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

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

    pub fn has_designer(&self) -> bool {
        self.designer.is_some()
    }

    // Param is passed by value, moved
    pub fn set_designer(&mut self, v: ::std::string::String) {
        self.designer = ::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_designer(&mut self) -> &mut ::std::string::String {
        if self.designer.is_none() {
            self.designer = ::std::option::Option::Some(::std::string::String::new());
        }
        self.designer.as_mut().unwrap()
    }

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

    // optional string link = 2;

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

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

    pub fn has_link(&self) -> bool {
        self.link.is_some()
    }

    // Param is passed by value, moved
    pub fn set_link(&mut self, v: ::std::string::String) {
        self.link = ::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_link(&mut self) -> &mut ::std::string::String {
        if self.link.is_none() {
            self.link = ::std::option::Option::Some(::std::string::String::new());
        }
        self.link.as_mut().unwrap()
    }

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

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(3);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "designer",
            |m: &DesignerInfoProto| { &m.designer },
            |m: &mut DesignerInfoProto| { &mut m.designer },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "link",
            |m: &DesignerInfoProto| { &m.link },
            |m: &mut DesignerInfoProto| { &mut m.link },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, AvatarProto>(
            "avatar",
            |m: &DesignerInfoProto| { &m.avatar },
            |m: &mut DesignerInfoProto| { &mut m.avatar },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<DesignerInfoProto>(
            "DesignerInfoProto",
            fields,
            oneofs,
        )
    }
}

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

    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.designer = ::std::option::Option::Some(is.read_string()?);
                },
                18 => {
                    self.link = ::std::option::Option::Some(is.read_string()?);
                },
                26 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.avatar)?;
                },
                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.designer.as_ref() {
            my_size += ::protobuf::rt::string_size(1, &v);
        }
        if let Some(v) = self.link.as_ref() {
            my_size += ::protobuf::rt::string_size(2, &v);
        }
        if let Some(v) = self.avatar.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.designer.as_ref() {
            os.write_string(1, v)?;
        }
        if let Some(v) = self.link.as_ref() {
            os.write_string(2, v)?;
        }
        if let Some(v) = self.avatar.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(3, 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() -> DesignerInfoProto {
        DesignerInfoProto::new()
    }

    fn clear(&mut self) {
        self.designer = ::std::option::Option::None;
        self.link = ::std::option::Option::None;
        self.avatar.clear();
        self.special_fields.clear();
    }

    fn default_instance() -> &'static DesignerInfoProto {
        static instance: DesignerInfoProto = DesignerInfoProto {
            designer: ::std::option::Option::None,
            link: ::std::option::Option::None,
            avatar: ::protobuf::MessageField::none(),
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

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

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

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

// @@protoc_insertion_point(message:AvatarProto)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct AvatarProto {
    // message fields
    // @@protoc_insertion_point(field:AvatarProto.file_name)
    pub file_name: ::std::option::Option<::std::string::String>,
    // special fields
    // @@protoc_insertion_point(special_field:AvatarProto.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    // optional string file_name = 1;

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

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

    pub fn has_file_name(&self) -> bool {
        self.file_name.is_some()
    }

    // Param is passed by value, moved
    pub fn set_file_name(&mut self, v: ::std::string::String) {
        self.file_name = ::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_file_name(&mut self) -> &mut ::std::string::String {
        if self.file_name.is_none() {
            self.file_name = ::std::option::Option::Some(::std::string::String::new());
        }
        self.file_name.as_mut().unwrap()
    }

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

    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_option_accessor::<_, _>(
            "file_name",
            |m: &AvatarProto| { &m.file_name },
            |m: &mut AvatarProto| { &mut m.file_name },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<AvatarProto>(
            "AvatarProto",
            fields,
            oneofs,
        )
    }
}

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

    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.file_name = ::std::option::Option::Some(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 let Some(v) = self.file_name.as_ref() {
            my_size += ::protobuf::rt::string_size(1, &v);
        }
        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.file_name.as_ref() {
            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() -> AvatarProto {
        AvatarProto::new()
    }

    fn clear(&mut self) {
        self.file_name = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static AvatarProto {
        static instance: AvatarProto = AvatarProto {
            file_name: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

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

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

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

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\x0fdesigners.proto\"i\n\x11DesignerInfoProto\x12\x1a\n\x08designer\
    \x18\x01\x20\x01(\tR\x08designer\x12\x12\n\x04link\x18\x02\x20\x01(\tR\
    \x04link\x12$\n\x06avatar\x18\x03\x20\x01(\x0b2\x0c.AvatarProtoR\x06avat\
    ar\"*\n\x0bAvatarProto\x12\x1b\n\tfile_name\x18\x01\x20\x01(\tR\x08fileN\
    ameJ\xf3\x03\n\x06\x12\x04\0\0\x11\x01\n&\n\x01\x0c\x12\x03\0\0\x12\"\
    \x1c\x20GF\x20Designer\x20Profile\x20Protos\n\n/\n\x02\x04\0\x12\x04\x04\
    \0\r\x01\x1a#\x20A\x20designer\x20listed\x20on\x20the\x20catalog:\n\n\n\
    \n\x03\x04\0\x01\x12\x03\x04\x08\x19\n,\n\x04\x04\0\x02\0\x12\x03\x06\
    \x02\x1f\x1a\x1f\x20Designer\x20or\x20typefoundry\x20name:\n\n\x0c\n\x05\
    \x04\0\x02\0\x04\x12\x03\x06\x02\n\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\
    \x06\x0b\x11\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x06\x12\x1a\n\x0c\n\x05\
    \x04\0\x02\0\x03\x12\x03\x06\x1d\x1e\n2\n\x04\x04\0\x02\x01\x12\x03\t\
    \x02\x1b\x1a%\x20URL\x20for\x20more\x20info\x20on\x20this\x20designer:\n\
    \n\x0c\n\x05\x04\0\x02\x01\x04\x12\x03\t\x02\n\n\x0c\n\x05\x04\0\x02\x01\
    \x05\x12\x03\t\x0b\x11\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03\t\x12\x16\n\
    \x0c\n\x05\x04\0\x02\x01\x03\x12\x03\t\x19\x1a\n\x1d\n\x04\x04\0\x02\x02\
    \x12\x03\x0c\x02\"\x1a\x10\x20Photo\x20or\x20logo:\n\n\x0c\n\x05\x04\0\
    \x02\x02\x04\x12\x03\x0c\x02\n\n\x0c\n\x05\x04\0\x02\x02\x06\x12\x03\x0c\
    \x0b\x16\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03\x0c\x17\x1d\n\x0c\n\x05\
    \x04\0\x02\x02\x03\x12\x03\x0c\x20!\n\n\n\x02\x04\x01\x12\x04\x0f\0\x11\
    \x01\n\n\n\x03\x04\x01\x01\x12\x03\x0f\x08\x13\n\x0b\n\x04\x04\x01\x02\0\
    \x12\x03\x10\x02\x20\n\x0c\n\x05\x04\x01\x02\0\x04\x12\x03\x10\x02\n\n\
    \x0c\n\x05\x04\x01\x02\0\x05\x12\x03\x10\x0b\x11\n\x0c\n\x05\x04\x01\x02\
    \0\x01\x12\x03\x10\x12\x1b\n\x0c\n\x05\x04\x01\x02\0\x03\x12\x03\x10\x1e\
    \x1f\
";

/// `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(DesignerInfoProto::generated_message_descriptor_data());
            messages.push(AvatarProto::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)
    })
}
