// This file is generated by rust-protobuf 2.20.0. Do not edit
// @generated

// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]

#![allow(unused_attributes)]
#![rustfmt::skip]

#![allow(box_pointers)]
#![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_imports)]
#![allow(unused_results)]
//! Generated file from `s2clientprotocol/data.proto`

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

#[derive(PartialEq,Clone,Default)]
pub struct AbilityData {
    // message fields
    pub ability_id: ::std::option::Option<u32>,
    pub link_name: ::protobuf::SingularField<::std::string::String>,
    pub link_index: ::std::option::Option<u32>,
    pub button_name: ::protobuf::SingularField<::std::string::String>,
    pub friendly_name: ::protobuf::SingularField<::std::string::String>,
    pub hotkey: ::protobuf::SingularField<::std::string::String>,
    pub remaps_to_ability_id: ::std::option::Option<u32>,
    pub available: ::std::option::Option<bool>,
    pub target: ::std::option::Option<AbilityData_Target>,
    pub allow_minimap: ::std::option::Option<bool>,
    pub allow_autocast: ::std::option::Option<bool>,
    pub is_building: ::std::option::Option<bool>,
    pub footprint_radius: ::std::option::Option<f32>,
    pub is_instant_placement: ::std::option::Option<bool>,
    pub cast_range: ::std::option::Option<f32>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

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

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

    // optional uint32 ability_id = 1;


    pub fn get_ability_id(&self) -> u32 {
        self.ability_id.unwrap_or(0)
    }
    pub fn clear_ability_id(&mut self) {
        self.ability_id = ::std::option::Option::None;
    }

    pub fn has_ability_id(&self) -> bool {
        self.ability_id.is_some()
    }

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

    // optional string link_name = 2;


    pub fn get_link_name(&self) -> &str {
        match self.link_name.as_ref() {
            Some(v) => &v,
            None => "",
        }
    }
    pub fn clear_link_name(&mut self) {
        self.link_name.clear();
    }

    pub fn has_link_name(&self) -> bool {
        self.link_name.is_some()
    }

    // Param is passed by value, moved
    pub fn set_link_name(&mut self, v: ::std::string::String) {
        self.link_name = ::protobuf::SingularField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_link_name(&mut self) -> &mut ::std::string::String {
        if self.link_name.is_none() {
            self.link_name.set_default();
        }
        self.link_name.as_mut().unwrap()
    }

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

    // optional uint32 link_index = 3;


    pub fn get_link_index(&self) -> u32 {
        self.link_index.unwrap_or(0)
    }
    pub fn clear_link_index(&mut self) {
        self.link_index = ::std::option::Option::None;
    }

    pub fn has_link_index(&self) -> bool {
        self.link_index.is_some()
    }

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

    // optional string button_name = 4;


    pub fn get_button_name(&self) -> &str {
        match self.button_name.as_ref() {
            Some(v) => &v,
            None => "",
        }
    }
    pub fn clear_button_name(&mut self) {
        self.button_name.clear();
    }

    pub fn has_button_name(&self) -> bool {
        self.button_name.is_some()
    }

    // Param is passed by value, moved
    pub fn set_button_name(&mut self, v: ::std::string::String) {
        self.button_name = ::protobuf::SingularField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_button_name(&mut self) -> &mut ::std::string::String {
        if self.button_name.is_none() {
            self.button_name.set_default();
        }
        self.button_name.as_mut().unwrap()
    }

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

    // optional string friendly_name = 5;


    pub fn get_friendly_name(&self) -> &str {
        match self.friendly_name.as_ref() {
            Some(v) => &v,
            None => "",
        }
    }
    pub fn clear_friendly_name(&mut self) {
        self.friendly_name.clear();
    }

    pub fn has_friendly_name(&self) -> bool {
        self.friendly_name.is_some()
    }

    // Param is passed by value, moved
    pub fn set_friendly_name(&mut self, v: ::std::string::String) {
        self.friendly_name = ::protobuf::SingularField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_friendly_name(&mut self) -> &mut ::std::string::String {
        if self.friendly_name.is_none() {
            self.friendly_name.set_default();
        }
        self.friendly_name.as_mut().unwrap()
    }

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

    // optional string hotkey = 6;


    pub fn get_hotkey(&self) -> &str {
        match self.hotkey.as_ref() {
            Some(v) => &v,
            None => "",
        }
    }
    pub fn clear_hotkey(&mut self) {
        self.hotkey.clear();
    }

    pub fn has_hotkey(&self) -> bool {
        self.hotkey.is_some()
    }

    // Param is passed by value, moved
    pub fn set_hotkey(&mut self, v: ::std::string::String) {
        self.hotkey = ::protobuf::SingularField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_hotkey(&mut self) -> &mut ::std::string::String {
        if self.hotkey.is_none() {
            self.hotkey.set_default();
        }
        self.hotkey.as_mut().unwrap()
    }

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

    // optional uint32 remaps_to_ability_id = 7;


    pub fn get_remaps_to_ability_id(&self) -> u32 {
        self.remaps_to_ability_id.unwrap_or(0)
    }
    pub fn clear_remaps_to_ability_id(&mut self) {
        self.remaps_to_ability_id = ::std::option::Option::None;
    }

    pub fn has_remaps_to_ability_id(&self) -> bool {
        self.remaps_to_ability_id.is_some()
    }

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

    // optional bool available = 8;


    pub fn get_available(&self) -> bool {
        self.available.unwrap_or(false)
    }
    pub fn clear_available(&mut self) {
        self.available = ::std::option::Option::None;
    }

    pub fn has_available(&self) -> bool {
        self.available.is_some()
    }

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

    // optional .SC2APIProtocol.AbilityData.Target target = 9;


    pub fn get_target(&self) -> AbilityData_Target {
        self.target.unwrap_or(AbilityData_Target::None)
    }
    pub fn clear_target(&mut self) {
        self.target = ::std::option::Option::None;
    }

    pub fn has_target(&self) -> bool {
        self.target.is_some()
    }

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

    // optional bool allow_minimap = 10;


    pub fn get_allow_minimap(&self) -> bool {
        self.allow_minimap.unwrap_or(false)
    }
    pub fn clear_allow_minimap(&mut self) {
        self.allow_minimap = ::std::option::Option::None;
    }

    pub fn has_allow_minimap(&self) -> bool {
        self.allow_minimap.is_some()
    }

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

    // optional bool allow_autocast = 11;


    pub fn get_allow_autocast(&self) -> bool {
        self.allow_autocast.unwrap_or(false)
    }
    pub fn clear_allow_autocast(&mut self) {
        self.allow_autocast = ::std::option::Option::None;
    }

    pub fn has_allow_autocast(&self) -> bool {
        self.allow_autocast.is_some()
    }

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

    // optional bool is_building = 12;


    pub fn get_is_building(&self) -> bool {
        self.is_building.unwrap_or(false)
    }
    pub fn clear_is_building(&mut self) {
        self.is_building = ::std::option::Option::None;
    }

    pub fn has_is_building(&self) -> bool {
        self.is_building.is_some()
    }

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

    // optional float footprint_radius = 13;


    pub fn get_footprint_radius(&self) -> f32 {
        self.footprint_radius.unwrap_or(0.)
    }
    pub fn clear_footprint_radius(&mut self) {
        self.footprint_radius = ::std::option::Option::None;
    }

    pub fn has_footprint_radius(&self) -> bool {
        self.footprint_radius.is_some()
    }

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

    // optional bool is_instant_placement = 14;


    pub fn get_is_instant_placement(&self) -> bool {
        self.is_instant_placement.unwrap_or(false)
    }
    pub fn clear_is_instant_placement(&mut self) {
        self.is_instant_placement = ::std::option::Option::None;
    }

    pub fn has_is_instant_placement(&self) -> bool {
        self.is_instant_placement.is_some()
    }

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

    // optional float cast_range = 15;


    pub fn get_cast_range(&self) -> f32 {
        self.cast_range.unwrap_or(0.)
    }
    pub fn clear_cast_range(&mut self) {
        self.cast_range = ::std::option::Option::None;
    }

    pub fn has_cast_range(&self) -> bool {
        self.cast_range.is_some()
    }

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

impl ::protobuf::Message for AbilityData {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.ability_id = ::std::option::Option::Some(tmp);
                },
                2 => {
                    ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.link_name)?;
                },
                3 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.link_index = ::std::option::Option::Some(tmp);
                },
                4 => {
                    ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.button_name)?;
                },
                5 => {
                    ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.friendly_name)?;
                },
                6 => {
                    ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.hotkey)?;
                },
                7 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.remaps_to_ability_id = ::std::option::Option::Some(tmp);
                },
                8 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_bool()?;
                    self.available = ::std::option::Option::Some(tmp);
                },
                9 => {
                    ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.target, 9, &mut self.unknown_fields)?
                },
                10 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_bool()?;
                    self.allow_minimap = ::std::option::Option::Some(tmp);
                },
                11 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_bool()?;
                    self.allow_autocast = ::std::option::Option::Some(tmp);
                },
                12 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_bool()?;
                    self.is_building = ::std::option::Option::Some(tmp);
                },
                13 => {
                    if wire_type != ::protobuf::wire_format::WireTypeFixed32 {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_float()?;
                    self.footprint_radius = ::std::option::Option::Some(tmp);
                },
                14 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_bool()?;
                    self.is_instant_placement = ::std::option::Option::Some(tmp);
                },
                15 => {
                    if wire_type != ::protobuf::wire_format::WireTypeFixed32 {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_float()?;
                    self.cast_range = ::std::option::Option::Some(tmp);
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if let Some(v) = self.ability_id {
            my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
        }
        if let Some(ref v) = self.link_name.as_ref() {
            my_size += ::protobuf::rt::string_size(2, &v);
        }
        if let Some(v) = self.link_index {
            my_size += ::protobuf::rt::value_size(3, v, ::protobuf::wire_format::WireTypeVarint);
        }
        if let Some(ref v) = self.button_name.as_ref() {
            my_size += ::protobuf::rt::string_size(4, &v);
        }
        if let Some(ref v) = self.friendly_name.as_ref() {
            my_size += ::protobuf::rt::string_size(5, &v);
        }
        if let Some(ref v) = self.hotkey.as_ref() {
            my_size += ::protobuf::rt::string_size(6, &v);
        }
        if let Some(v) = self.remaps_to_ability_id {
            my_size += ::protobuf::rt::value_size(7, v, ::protobuf::wire_format::WireTypeVarint);
        }
        if let Some(v) = self.available {
            my_size += 2;
        }
        if let Some(v) = self.target {
            my_size += ::protobuf::rt::enum_size(9, v);
        }
        if let Some(v) = self.allow_minimap {
            my_size += 2;
        }
        if let Some(v) = self.allow_autocast {
            my_size += 2;
        }
        if let Some(v) = self.is_building {
            my_size += 2;
        }
        if let Some(v) = self.footprint_radius {
            my_size += 5;
        }
        if let Some(v) = self.is_instant_placement {
            my_size += 2;
        }
        if let Some(v) = self.cast_range {
            my_size += 5;
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        if let Some(v) = self.ability_id {
            os.write_uint32(1, v)?;
        }
        if let Some(ref v) = self.link_name.as_ref() {
            os.write_string(2, &v)?;
        }
        if let Some(v) = self.link_index {
            os.write_uint32(3, v)?;
        }
        if let Some(ref v) = self.button_name.as_ref() {
            os.write_string(4, &v)?;
        }
        if let Some(ref v) = self.friendly_name.as_ref() {
            os.write_string(5, &v)?;
        }
        if let Some(ref v) = self.hotkey.as_ref() {
            os.write_string(6, &v)?;
        }
        if let Some(v) = self.remaps_to_ability_id {
            os.write_uint32(7, v)?;
        }
        if let Some(v) = self.available {
            os.write_bool(8, v)?;
        }
        if let Some(v) = self.target {
            os.write_enum(9, ::protobuf::ProtobufEnum::value(&v))?;
        }
        if let Some(v) = self.allow_minimap {
            os.write_bool(10, v)?;
        }
        if let Some(v) = self.allow_autocast {
            os.write_bool(11, v)?;
        }
        if let Some(v) = self.is_building {
            os.write_bool(12, v)?;
        }
        if let Some(v) = self.footprint_radius {
            os.write_float(13, v)?;
        }
        if let Some(v) = self.is_instant_placement {
            os.write_bool(14, v)?;
        }
        if let Some(v) = self.cast_range {
            os.write_float(15, v)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> AbilityData {
        AbilityData::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            let mut fields = ::std::vec::Vec::new();
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "ability_id",
                |m: &AbilityData| { &m.ability_id },
                |m: &mut AbilityData| { &mut m.ability_id },
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "link_name",
                |m: &AbilityData| { &m.link_name },
                |m: &mut AbilityData| { &mut m.link_name },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "link_index",
                |m: &AbilityData| { &m.link_index },
                |m: &mut AbilityData| { &mut m.link_index },
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "button_name",
                |m: &AbilityData| { &m.button_name },
                |m: &mut AbilityData| { &mut m.button_name },
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "friendly_name",
                |m: &AbilityData| { &m.friendly_name },
                |m: &mut AbilityData| { &mut m.friendly_name },
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "hotkey",
                |m: &AbilityData| { &m.hotkey },
                |m: &mut AbilityData| { &mut m.hotkey },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "remaps_to_ability_id",
                |m: &AbilityData| { &m.remaps_to_ability_id },
                |m: &mut AbilityData| { &mut m.remaps_to_ability_id },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
                "available",
                |m: &AbilityData| { &m.available },
                |m: &mut AbilityData| { &mut m.available },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<AbilityData_Target>>(
                "target",
                |m: &AbilityData| { &m.target },
                |m: &mut AbilityData| { &mut m.target },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
                "allow_minimap",
                |m: &AbilityData| { &m.allow_minimap },
                |m: &mut AbilityData| { &mut m.allow_minimap },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
                "allow_autocast",
                |m: &AbilityData| { &m.allow_autocast },
                |m: &mut AbilityData| { &mut m.allow_autocast },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
                "is_building",
                |m: &AbilityData| { &m.is_building },
                |m: &mut AbilityData| { &mut m.is_building },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeFloat>(
                "footprint_radius",
                |m: &AbilityData| { &m.footprint_radius },
                |m: &mut AbilityData| { &mut m.footprint_radius },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
                "is_instant_placement",
                |m: &AbilityData| { &m.is_instant_placement },
                |m: &mut AbilityData| { &mut m.is_instant_placement },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeFloat>(
                "cast_range",
                |m: &AbilityData| { &m.cast_range },
                |m: &mut AbilityData| { &mut m.cast_range },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<AbilityData>(
                "AbilityData",
                fields,
                file_descriptor_proto()
            )
        })
    }

    fn default_instance() -> &'static AbilityData {
        static instance: ::protobuf::rt::LazyV2<AbilityData> = ::protobuf::rt::LazyV2::INIT;
        instance.get(AbilityData::new)
    }
}

impl ::protobuf::Clear for AbilityData {
    fn clear(&mut self) {
        self.ability_id = ::std::option::Option::None;
        self.link_name.clear();
        self.link_index = ::std::option::Option::None;
        self.button_name.clear();
        self.friendly_name.clear();
        self.hotkey.clear();
        self.remaps_to_ability_id = ::std::option::Option::None;
        self.available = ::std::option::Option::None;
        self.target = ::std::option::Option::None;
        self.allow_minimap = ::std::option::Option::None;
        self.allow_autocast = ::std::option::Option::None;
        self.is_building = ::std::option::Option::None;
        self.footprint_radius = ::std::option::Option::None;
        self.is_instant_placement = ::std::option::Option::None;
        self.cast_range = ::std::option::Option::None;
        self.unknown_fields.clear();
    }
}

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

impl ::protobuf::reflect::ProtobufValue for AbilityData {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum AbilityData_Target {
    None = 1,
    Point = 2,
    Unit = 3,
    PointOrUnit = 4,
    PointOrNone = 5,
}

impl ::protobuf::ProtobufEnum for AbilityData_Target {
    fn value(&self) -> i32 {
        *self as i32
    }

    fn from_i32(value: i32) -> ::std::option::Option<AbilityData_Target> {
        match value {
            1 => ::std::option::Option::Some(AbilityData_Target::None),
            2 => ::std::option::Option::Some(AbilityData_Target::Point),
            3 => ::std::option::Option::Some(AbilityData_Target::Unit),
            4 => ::std::option::Option::Some(AbilityData_Target::PointOrUnit),
            5 => ::std::option::Option::Some(AbilityData_Target::PointOrNone),
            _ => ::std::option::Option::None
        }
    }

    fn values() -> &'static [Self] {
        static values: &'static [AbilityData_Target] = &[
            AbilityData_Target::None,
            AbilityData_Target::Point,
            AbilityData_Target::Unit,
            AbilityData_Target::PointOrUnit,
            AbilityData_Target::PointOrNone,
        ];
        values
    }

    fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            ::protobuf::reflect::EnumDescriptor::new_pb_name::<AbilityData_Target>("AbilityData.Target", file_descriptor_proto())
        })
    }
}

impl ::std::marker::Copy for AbilityData_Target {
}

// Note, `Default` is implemented although default value is not 0
impl ::std::default::Default for AbilityData_Target {
    fn default() -> Self {
        AbilityData_Target::None
    }
}

impl ::protobuf::reflect::ProtobufValue for AbilityData_Target {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct DamageBonus {
    // message fields
    pub attribute: ::std::option::Option<Attribute>,
    pub bonus: ::std::option::Option<f32>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

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

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

    // optional .SC2APIProtocol.Attribute attribute = 1;


    pub fn get_attribute(&self) -> Attribute {
        self.attribute.unwrap_or(Attribute::Light)
    }
    pub fn clear_attribute(&mut self) {
        self.attribute = ::std::option::Option::None;
    }

    pub fn has_attribute(&self) -> bool {
        self.attribute.is_some()
    }

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

    // optional float bonus = 2;


    pub fn get_bonus(&self) -> f32 {
        self.bonus.unwrap_or(0.)
    }
    pub fn clear_bonus(&mut self) {
        self.bonus = ::std::option::Option::None;
    }

    pub fn has_bonus(&self) -> bool {
        self.bonus.is_some()
    }

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

impl ::protobuf::Message for DamageBonus {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.attribute, 1, &mut self.unknown_fields)?
                },
                2 => {
                    if wire_type != ::protobuf::wire_format::WireTypeFixed32 {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_float()?;
                    self.bonus = ::std::option::Option::Some(tmp);
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if let Some(v) = self.attribute {
            my_size += ::protobuf::rt::enum_size(1, v);
        }
        if let Some(v) = self.bonus {
            my_size += 5;
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        if let Some(v) = self.attribute {
            os.write_enum(1, ::protobuf::ProtobufEnum::value(&v))?;
        }
        if let Some(v) = self.bonus {
            os.write_float(2, v)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> DamageBonus {
        DamageBonus::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            let mut fields = ::std::vec::Vec::new();
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<Attribute>>(
                "attribute",
                |m: &DamageBonus| { &m.attribute },
                |m: &mut DamageBonus| { &mut m.attribute },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeFloat>(
                "bonus",
                |m: &DamageBonus| { &m.bonus },
                |m: &mut DamageBonus| { &mut m.bonus },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<DamageBonus>(
                "DamageBonus",
                fields,
                file_descriptor_proto()
            )
        })
    }

    fn default_instance() -> &'static DamageBonus {
        static instance: ::protobuf::rt::LazyV2<DamageBonus> = ::protobuf::rt::LazyV2::INIT;
        instance.get(DamageBonus::new)
    }
}

impl ::protobuf::Clear for DamageBonus {
    fn clear(&mut self) {
        self.attribute = ::std::option::Option::None;
        self.bonus = ::std::option::Option::None;
        self.unknown_fields.clear();
    }
}

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

impl ::protobuf::reflect::ProtobufValue for DamageBonus {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct Weapon {
    // message fields
    pub field_type: ::std::option::Option<Weapon_TargetType>,
    pub damage: ::std::option::Option<f32>,
    pub damage_bonus: ::protobuf::RepeatedField<DamageBonus>,
    pub attacks: ::std::option::Option<u32>,
    pub range: ::std::option::Option<f32>,
    pub speed: ::std::option::Option<f32>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

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

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

    // optional .SC2APIProtocol.Weapon.TargetType type = 1;


    pub fn get_field_type(&self) -> Weapon_TargetType {
        self.field_type.unwrap_or(Weapon_TargetType::Ground)
    }
    pub fn clear_field_type(&mut self) {
        self.field_type = ::std::option::Option::None;
    }

    pub fn has_field_type(&self) -> bool {
        self.field_type.is_some()
    }

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

    // optional float damage = 2;


    pub fn get_damage(&self) -> f32 {
        self.damage.unwrap_or(0.)
    }
    pub fn clear_damage(&mut self) {
        self.damage = ::std::option::Option::None;
    }

    pub fn has_damage(&self) -> bool {
        self.damage.is_some()
    }

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

    // repeated .SC2APIProtocol.DamageBonus damage_bonus = 3;


    pub fn get_damage_bonus(&self) -> &[DamageBonus] {
        &self.damage_bonus
    }
    pub fn clear_damage_bonus(&mut self) {
        self.damage_bonus.clear();
    }

    // Param is passed by value, moved
    pub fn set_damage_bonus(&mut self, v: ::protobuf::RepeatedField<DamageBonus>) {
        self.damage_bonus = v;
    }

    // Mutable pointer to the field.
    pub fn mut_damage_bonus(&mut self) -> &mut ::protobuf::RepeatedField<DamageBonus> {
        &mut self.damage_bonus
    }

    // Take field
    pub fn take_damage_bonus(&mut self) -> ::protobuf::RepeatedField<DamageBonus> {
        ::std::mem::replace(&mut self.damage_bonus, ::protobuf::RepeatedField::new())
    }

    // optional uint32 attacks = 4;


    pub fn get_attacks(&self) -> u32 {
        self.attacks.unwrap_or(0)
    }
    pub fn clear_attacks(&mut self) {
        self.attacks = ::std::option::Option::None;
    }

    pub fn has_attacks(&self) -> bool {
        self.attacks.is_some()
    }

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

    // optional float range = 5;


    pub fn get_range(&self) -> f32 {
        self.range.unwrap_or(0.)
    }
    pub fn clear_range(&mut self) {
        self.range = ::std::option::Option::None;
    }

    pub fn has_range(&self) -> bool {
        self.range.is_some()
    }

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

    // optional float speed = 6;


    pub fn get_speed(&self) -> f32 {
        self.speed.unwrap_or(0.)
    }
    pub fn clear_speed(&mut self) {
        self.speed = ::std::option::Option::None;
    }

    pub fn has_speed(&self) -> bool {
        self.speed.is_some()
    }

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

impl ::protobuf::Message for Weapon {
    fn is_initialized(&self) -> bool {
        for v in &self.damage_bonus {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.field_type, 1, &mut self.unknown_fields)?
                },
                2 => {
                    if wire_type != ::protobuf::wire_format::WireTypeFixed32 {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_float()?;
                    self.damage = ::std::option::Option::Some(tmp);
                },
                3 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.damage_bonus)?;
                },
                4 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.attacks = ::std::option::Option::Some(tmp);
                },
                5 => {
                    if wire_type != ::protobuf::wire_format::WireTypeFixed32 {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_float()?;
                    self.range = ::std::option::Option::Some(tmp);
                },
                6 => {
                    if wire_type != ::protobuf::wire_format::WireTypeFixed32 {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_float()?;
                    self.speed = ::std::option::Option::Some(tmp);
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if let Some(v) = self.field_type {
            my_size += ::protobuf::rt::enum_size(1, v);
        }
        if let Some(v) = self.damage {
            my_size += 5;
        }
        for value in &self.damage_bonus {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        if let Some(v) = self.attacks {
            my_size += ::protobuf::rt::value_size(4, v, ::protobuf::wire_format::WireTypeVarint);
        }
        if let Some(v) = self.range {
            my_size += 5;
        }
        if let Some(v) = self.speed {
            my_size += 5;
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        if let Some(v) = self.field_type {
            os.write_enum(1, ::protobuf::ProtobufEnum::value(&v))?;
        }
        if let Some(v) = self.damage {
            os.write_float(2, v)?;
        }
        for v in &self.damage_bonus {
            os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        if let Some(v) = self.attacks {
            os.write_uint32(4, v)?;
        }
        if let Some(v) = self.range {
            os.write_float(5, v)?;
        }
        if let Some(v) = self.speed {
            os.write_float(6, v)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> Weapon {
        Weapon::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            let mut fields = ::std::vec::Vec::new();
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<Weapon_TargetType>>(
                "type",
                |m: &Weapon| { &m.field_type },
                |m: &mut Weapon| { &mut m.field_type },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeFloat>(
                "damage",
                |m: &Weapon| { &m.damage },
                |m: &mut Weapon| { &mut m.damage },
            ));
            fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<DamageBonus>>(
                "damage_bonus",
                |m: &Weapon| { &m.damage_bonus },
                |m: &mut Weapon| { &mut m.damage_bonus },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "attacks",
                |m: &Weapon| { &m.attacks },
                |m: &mut Weapon| { &mut m.attacks },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeFloat>(
                "range",
                |m: &Weapon| { &m.range },
                |m: &mut Weapon| { &mut m.range },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeFloat>(
                "speed",
                |m: &Weapon| { &m.speed },
                |m: &mut Weapon| { &mut m.speed },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<Weapon>(
                "Weapon",
                fields,
                file_descriptor_proto()
            )
        })
    }

    fn default_instance() -> &'static Weapon {
        static instance: ::protobuf::rt::LazyV2<Weapon> = ::protobuf::rt::LazyV2::INIT;
        instance.get(Weapon::new)
    }
}

impl ::protobuf::Clear for Weapon {
    fn clear(&mut self) {
        self.field_type = ::std::option::Option::None;
        self.damage = ::std::option::Option::None;
        self.damage_bonus.clear();
        self.attacks = ::std::option::Option::None;
        self.range = ::std::option::Option::None;
        self.speed = ::std::option::Option::None;
        self.unknown_fields.clear();
    }
}

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

impl ::protobuf::reflect::ProtobufValue for Weapon {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum Weapon_TargetType {
    Ground = 1,
    Air = 2,
    Any = 3,
}

impl ::protobuf::ProtobufEnum for Weapon_TargetType {
    fn value(&self) -> i32 {
        *self as i32
    }

    fn from_i32(value: i32) -> ::std::option::Option<Weapon_TargetType> {
        match value {
            1 => ::std::option::Option::Some(Weapon_TargetType::Ground),
            2 => ::std::option::Option::Some(Weapon_TargetType::Air),
            3 => ::std::option::Option::Some(Weapon_TargetType::Any),
            _ => ::std::option::Option::None
        }
    }

    fn values() -> &'static [Self] {
        static values: &'static [Weapon_TargetType] = &[
            Weapon_TargetType::Ground,
            Weapon_TargetType::Air,
            Weapon_TargetType::Any,
        ];
        values
    }

    fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            ::protobuf::reflect::EnumDescriptor::new_pb_name::<Weapon_TargetType>("Weapon.TargetType", file_descriptor_proto())
        })
    }
}

impl ::std::marker::Copy for Weapon_TargetType {
}

// Note, `Default` is implemented although default value is not 0
impl ::std::default::Default for Weapon_TargetType {
    fn default() -> Self {
        Weapon_TargetType::Ground
    }
}

impl ::protobuf::reflect::ProtobufValue for Weapon_TargetType {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct UnitTypeData {
    // message fields
    pub unit_id: ::std::option::Option<u32>,
    pub name: ::protobuf::SingularField<::std::string::String>,
    pub available: ::std::option::Option<bool>,
    pub cargo_size: ::std::option::Option<u32>,
    pub mineral_cost: ::std::option::Option<u32>,
    pub vespene_cost: ::std::option::Option<u32>,
    pub food_required: ::std::option::Option<f32>,
    pub food_provided: ::std::option::Option<f32>,
    pub ability_id: ::std::option::Option<u32>,
    pub race: ::std::option::Option<super::common::Race>,
    pub build_time: ::std::option::Option<f32>,
    pub has_vespene: ::std::option::Option<bool>,
    pub has_minerals: ::std::option::Option<bool>,
    pub sight_range: ::std::option::Option<f32>,
    pub tech_alias: ::std::vec::Vec<u32>,
    pub unit_alias: ::std::option::Option<u32>,
    pub tech_requirement: ::std::option::Option<u32>,
    pub require_attached: ::std::option::Option<bool>,
    pub attributes: ::std::vec::Vec<Attribute>,
    pub movement_speed: ::std::option::Option<f32>,
    pub armor: ::std::option::Option<f32>,
    pub weapons: ::protobuf::RepeatedField<Weapon>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

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

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

    // optional uint32 unit_id = 1;


    pub fn get_unit_id(&self) -> u32 {
        self.unit_id.unwrap_or(0)
    }
    pub fn clear_unit_id(&mut self) {
        self.unit_id = ::std::option::Option::None;
    }

    pub fn has_unit_id(&self) -> bool {
        self.unit_id.is_some()
    }

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

    // optional string name = 2;


    pub fn get_name(&self) -> &str {
        match self.name.as_ref() {
            Some(v) => &v,
            None => "",
        }
    }
    pub fn clear_name(&mut self) {
        self.name.clear();
    }

    pub fn has_name(&self) -> bool {
        self.name.is_some()
    }

    // Param is passed by value, moved
    pub fn set_name(&mut self, v: ::std::string::String) {
        self.name = ::protobuf::SingularField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_name(&mut self) -> &mut ::std::string::String {
        if self.name.is_none() {
            self.name.set_default();
        }
        self.name.as_mut().unwrap()
    }

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

    // optional bool available = 3;


    pub fn get_available(&self) -> bool {
        self.available.unwrap_or(false)
    }
    pub fn clear_available(&mut self) {
        self.available = ::std::option::Option::None;
    }

    pub fn has_available(&self) -> bool {
        self.available.is_some()
    }

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

    // optional uint32 cargo_size = 4;


    pub fn get_cargo_size(&self) -> u32 {
        self.cargo_size.unwrap_or(0)
    }
    pub fn clear_cargo_size(&mut self) {
        self.cargo_size = ::std::option::Option::None;
    }

    pub fn has_cargo_size(&self) -> bool {
        self.cargo_size.is_some()
    }

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

    // optional uint32 mineral_cost = 12;


    pub fn get_mineral_cost(&self) -> u32 {
        self.mineral_cost.unwrap_or(0)
    }
    pub fn clear_mineral_cost(&mut self) {
        self.mineral_cost = ::std::option::Option::None;
    }

    pub fn has_mineral_cost(&self) -> bool {
        self.mineral_cost.is_some()
    }

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

    // optional uint32 vespene_cost = 13;


    pub fn get_vespene_cost(&self) -> u32 {
        self.vespene_cost.unwrap_or(0)
    }
    pub fn clear_vespene_cost(&mut self) {
        self.vespene_cost = ::std::option::Option::None;
    }

    pub fn has_vespene_cost(&self) -> bool {
        self.vespene_cost.is_some()
    }

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

    // optional float food_required = 14;


    pub fn get_food_required(&self) -> f32 {
        self.food_required.unwrap_or(0.)
    }
    pub fn clear_food_required(&mut self) {
        self.food_required = ::std::option::Option::None;
    }

    pub fn has_food_required(&self) -> bool {
        self.food_required.is_some()
    }

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

    // optional float food_provided = 18;


    pub fn get_food_provided(&self) -> f32 {
        self.food_provided.unwrap_or(0.)
    }
    pub fn clear_food_provided(&mut self) {
        self.food_provided = ::std::option::Option::None;
    }

    pub fn has_food_provided(&self) -> bool {
        self.food_provided.is_some()
    }

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

    // optional uint32 ability_id = 15;


    pub fn get_ability_id(&self) -> u32 {
        self.ability_id.unwrap_or(0)
    }
    pub fn clear_ability_id(&mut self) {
        self.ability_id = ::std::option::Option::None;
    }

    pub fn has_ability_id(&self) -> bool {
        self.ability_id.is_some()
    }

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

    // optional .SC2APIProtocol.Race race = 16;


    pub fn get_race(&self) -> super::common::Race {
        self.race.unwrap_or(super::common::Race::NoRace)
    }
    pub fn clear_race(&mut self) {
        self.race = ::std::option::Option::None;
    }

    pub fn has_race(&self) -> bool {
        self.race.is_some()
    }

    // Param is passed by value, moved
    pub fn set_race(&mut self, v: super::common::Race) {
        self.race = ::std::option::Option::Some(v);
    }

    // optional float build_time = 17;


    pub fn get_build_time(&self) -> f32 {
        self.build_time.unwrap_or(0.)
    }
    pub fn clear_build_time(&mut self) {
        self.build_time = ::std::option::Option::None;
    }

    pub fn has_build_time(&self) -> bool {
        self.build_time.is_some()
    }

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

    // optional bool has_vespene = 19;


    pub fn get_has_vespene(&self) -> bool {
        self.has_vespene.unwrap_or(false)
    }
    pub fn clear_has_vespene(&mut self) {
        self.has_vespene = ::std::option::Option::None;
    }

    pub fn has_has_vespene(&self) -> bool {
        self.has_vespene.is_some()
    }

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

    // optional bool has_minerals = 20;


    pub fn get_has_minerals(&self) -> bool {
        self.has_minerals.unwrap_or(false)
    }
    pub fn clear_has_minerals(&mut self) {
        self.has_minerals = ::std::option::Option::None;
    }

    pub fn has_has_minerals(&self) -> bool {
        self.has_minerals.is_some()
    }

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

    // optional float sight_range = 25;


    pub fn get_sight_range(&self) -> f32 {
        self.sight_range.unwrap_or(0.)
    }
    pub fn clear_sight_range(&mut self) {
        self.sight_range = ::std::option::Option::None;
    }

    pub fn has_sight_range(&self) -> bool {
        self.sight_range.is_some()
    }

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

    // repeated uint32 tech_alias = 21;


    pub fn get_tech_alias(&self) -> &[u32] {
        &self.tech_alias
    }
    pub fn clear_tech_alias(&mut self) {
        self.tech_alias.clear();
    }

    // Param is passed by value, moved
    pub fn set_tech_alias(&mut self, v: ::std::vec::Vec<u32>) {
        self.tech_alias = v;
    }

    // Mutable pointer to the field.
    pub fn mut_tech_alias(&mut self) -> &mut ::std::vec::Vec<u32> {
        &mut self.tech_alias
    }

    // Take field
    pub fn take_tech_alias(&mut self) -> ::std::vec::Vec<u32> {
        ::std::mem::replace(&mut self.tech_alias, ::std::vec::Vec::new())
    }

    // optional uint32 unit_alias = 22;


    pub fn get_unit_alias(&self) -> u32 {
        self.unit_alias.unwrap_or(0)
    }
    pub fn clear_unit_alias(&mut self) {
        self.unit_alias = ::std::option::Option::None;
    }

    pub fn has_unit_alias(&self) -> bool {
        self.unit_alias.is_some()
    }

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

    // optional uint32 tech_requirement = 23;


    pub fn get_tech_requirement(&self) -> u32 {
        self.tech_requirement.unwrap_or(0)
    }
    pub fn clear_tech_requirement(&mut self) {
        self.tech_requirement = ::std::option::Option::None;
    }

    pub fn has_tech_requirement(&self) -> bool {
        self.tech_requirement.is_some()
    }

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

    // optional bool require_attached = 24;


    pub fn get_require_attached(&self) -> bool {
        self.require_attached.unwrap_or(false)
    }
    pub fn clear_require_attached(&mut self) {
        self.require_attached = ::std::option::Option::None;
    }

    pub fn has_require_attached(&self) -> bool {
        self.require_attached.is_some()
    }

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

    // repeated .SC2APIProtocol.Attribute attributes = 8;


    pub fn get_attributes(&self) -> &[Attribute] {
        &self.attributes
    }
    pub fn clear_attributes(&mut self) {
        self.attributes.clear();
    }

    // Param is passed by value, moved
    pub fn set_attributes(&mut self, v: ::std::vec::Vec<Attribute>) {
        self.attributes = v;
    }

    // Mutable pointer to the field.
    pub fn mut_attributes(&mut self) -> &mut ::std::vec::Vec<Attribute> {
        &mut self.attributes
    }

    // Take field
    pub fn take_attributes(&mut self) -> ::std::vec::Vec<Attribute> {
        ::std::mem::replace(&mut self.attributes, ::std::vec::Vec::new())
    }

    // optional float movement_speed = 9;


    pub fn get_movement_speed(&self) -> f32 {
        self.movement_speed.unwrap_or(0.)
    }
    pub fn clear_movement_speed(&mut self) {
        self.movement_speed = ::std::option::Option::None;
    }

    pub fn has_movement_speed(&self) -> bool {
        self.movement_speed.is_some()
    }

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

    // optional float armor = 10;


    pub fn get_armor(&self) -> f32 {
        self.armor.unwrap_or(0.)
    }
    pub fn clear_armor(&mut self) {
        self.armor = ::std::option::Option::None;
    }

    pub fn has_armor(&self) -> bool {
        self.armor.is_some()
    }

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

    // repeated .SC2APIProtocol.Weapon weapons = 11;


    pub fn get_weapons(&self) -> &[Weapon] {
        &self.weapons
    }
    pub fn clear_weapons(&mut self) {
        self.weapons.clear();
    }

    // Param is passed by value, moved
    pub fn set_weapons(&mut self, v: ::protobuf::RepeatedField<Weapon>) {
        self.weapons = v;
    }

    // Mutable pointer to the field.
    pub fn mut_weapons(&mut self) -> &mut ::protobuf::RepeatedField<Weapon> {
        &mut self.weapons
    }

    // Take field
    pub fn take_weapons(&mut self) -> ::protobuf::RepeatedField<Weapon> {
        ::std::mem::replace(&mut self.weapons, ::protobuf::RepeatedField::new())
    }
}

impl ::protobuf::Message for UnitTypeData {
    fn is_initialized(&self) -> bool {
        for v in &self.weapons {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.unit_id = ::std::option::Option::Some(tmp);
                },
                2 => {
                    ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
                },
                3 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_bool()?;
                    self.available = ::std::option::Option::Some(tmp);
                },
                4 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.cargo_size = ::std::option::Option::Some(tmp);
                },
                12 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.mineral_cost = ::std::option::Option::Some(tmp);
                },
                13 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.vespene_cost = ::std::option::Option::Some(tmp);
                },
                14 => {
                    if wire_type != ::protobuf::wire_format::WireTypeFixed32 {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_float()?;
                    self.food_required = ::std::option::Option::Some(tmp);
                },
                18 => {
                    if wire_type != ::protobuf::wire_format::WireTypeFixed32 {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_float()?;
                    self.food_provided = ::std::option::Option::Some(tmp);
                },
                15 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.ability_id = ::std::option::Option::Some(tmp);
                },
                16 => {
                    ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.race, 16, &mut self.unknown_fields)?
                },
                17 => {
                    if wire_type != ::protobuf::wire_format::WireTypeFixed32 {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_float()?;
                    self.build_time = ::std::option::Option::Some(tmp);
                },
                19 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_bool()?;
                    self.has_vespene = ::std::option::Option::Some(tmp);
                },
                20 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_bool()?;
                    self.has_minerals = ::std::option::Option::Some(tmp);
                },
                25 => {
                    if wire_type != ::protobuf::wire_format::WireTypeFixed32 {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_float()?;
                    self.sight_range = ::std::option::Option::Some(tmp);
                },
                21 => {
                    ::protobuf::rt::read_repeated_uint32_into(wire_type, is, &mut self.tech_alias)?;
                },
                22 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.unit_alias = ::std::option::Option::Some(tmp);
                },
                23 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.tech_requirement = ::std::option::Option::Some(tmp);
                },
                24 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_bool()?;
                    self.require_attached = ::std::option::Option::Some(tmp);
                },
                8 => {
                    ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(wire_type, is, &mut self.attributes, 8, &mut self.unknown_fields)?
                },
                9 => {
                    if wire_type != ::protobuf::wire_format::WireTypeFixed32 {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_float()?;
                    self.movement_speed = ::std::option::Option::Some(tmp);
                },
                10 => {
                    if wire_type != ::protobuf::wire_format::WireTypeFixed32 {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_float()?;
                    self.armor = ::std::option::Option::Some(tmp);
                },
                11 => {
                    ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.weapons)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if let Some(v) = self.unit_id {
            my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
        }
        if let Some(ref v) = self.name.as_ref() {
            my_size += ::protobuf::rt::string_size(2, &v);
        }
        if let Some(v) = self.available {
            my_size += 2;
        }
        if let Some(v) = self.cargo_size {
            my_size += ::protobuf::rt::value_size(4, v, ::protobuf::wire_format::WireTypeVarint);
        }
        if let Some(v) = self.mineral_cost {
            my_size += ::protobuf::rt::value_size(12, v, ::protobuf::wire_format::WireTypeVarint);
        }
        if let Some(v) = self.vespene_cost {
            my_size += ::protobuf::rt::value_size(13, v, ::protobuf::wire_format::WireTypeVarint);
        }
        if let Some(v) = self.food_required {
            my_size += 5;
        }
        if let Some(v) = self.food_provided {
            my_size += 6;
        }
        if let Some(v) = self.ability_id {
            my_size += ::protobuf::rt::value_size(15, v, ::protobuf::wire_format::WireTypeVarint);
        }
        if let Some(v) = self.race {
            my_size += ::protobuf::rt::enum_size(16, v);
        }
        if let Some(v) = self.build_time {
            my_size += 6;
        }
        if let Some(v) = self.has_vespene {
            my_size += 3;
        }
        if let Some(v) = self.has_minerals {
            my_size += 3;
        }
        if let Some(v) = self.sight_range {
            my_size += 6;
        }
        for value in &self.tech_alias {
            my_size += ::protobuf::rt::value_size(21, *value, ::protobuf::wire_format::WireTypeVarint);
        };
        if let Some(v) = self.unit_alias {
            my_size += ::protobuf::rt::value_size(22, v, ::protobuf::wire_format::WireTypeVarint);
        }
        if let Some(v) = self.tech_requirement {
            my_size += ::protobuf::rt::value_size(23, v, ::protobuf::wire_format::WireTypeVarint);
        }
        if let Some(v) = self.require_attached {
            my_size += 3;
        }
        for value in &self.attributes {
            my_size += ::protobuf::rt::enum_size(8, *value);
        };
        if let Some(v) = self.movement_speed {
            my_size += 5;
        }
        if let Some(v) = self.armor {
            my_size += 5;
        }
        for value in &self.weapons {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
        };
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        if let Some(v) = self.unit_id {
            os.write_uint32(1, v)?;
        }
        if let Some(ref v) = self.name.as_ref() {
            os.write_string(2, &v)?;
        }
        if let Some(v) = self.available {
            os.write_bool(3, v)?;
        }
        if let Some(v) = self.cargo_size {
            os.write_uint32(4, v)?;
        }
        if let Some(v) = self.mineral_cost {
            os.write_uint32(12, v)?;
        }
        if let Some(v) = self.vespene_cost {
            os.write_uint32(13, v)?;
        }
        if let Some(v) = self.food_required {
            os.write_float(14, v)?;
        }
        if let Some(v) = self.food_provided {
            os.write_float(18, v)?;
        }
        if let Some(v) = self.ability_id {
            os.write_uint32(15, v)?;
        }
        if let Some(v) = self.race {
            os.write_enum(16, ::protobuf::ProtobufEnum::value(&v))?;
        }
        if let Some(v) = self.build_time {
            os.write_float(17, v)?;
        }
        if let Some(v) = self.has_vespene {
            os.write_bool(19, v)?;
        }
        if let Some(v) = self.has_minerals {
            os.write_bool(20, v)?;
        }
        if let Some(v) = self.sight_range {
            os.write_float(25, v)?;
        }
        for v in &self.tech_alias {
            os.write_uint32(21, *v)?;
        };
        if let Some(v) = self.unit_alias {
            os.write_uint32(22, v)?;
        }
        if let Some(v) = self.tech_requirement {
            os.write_uint32(23, v)?;
        }
        if let Some(v) = self.require_attached {
            os.write_bool(24, v)?;
        }
        for v in &self.attributes {
            os.write_enum(8, ::protobuf::ProtobufEnum::value(v))?;
        };
        if let Some(v) = self.movement_speed {
            os.write_float(9, v)?;
        }
        if let Some(v) = self.armor {
            os.write_float(10, v)?;
        }
        for v in &self.weapons {
            os.write_tag(11, ::protobuf::wire_format::WireTypeLengthDelimited)?;
            os.write_raw_varint32(v.get_cached_size())?;
            v.write_to_with_cached_sizes(os)?;
        };
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> UnitTypeData {
        UnitTypeData::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            let mut fields = ::std::vec::Vec::new();
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "unit_id",
                |m: &UnitTypeData| { &m.unit_id },
                |m: &mut UnitTypeData| { &mut m.unit_id },
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "name",
                |m: &UnitTypeData| { &m.name },
                |m: &mut UnitTypeData| { &mut m.name },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
                "available",
                |m: &UnitTypeData| { &m.available },
                |m: &mut UnitTypeData| { &mut m.available },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "cargo_size",
                |m: &UnitTypeData| { &m.cargo_size },
                |m: &mut UnitTypeData| { &mut m.cargo_size },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "mineral_cost",
                |m: &UnitTypeData| { &m.mineral_cost },
                |m: &mut UnitTypeData| { &mut m.mineral_cost },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "vespene_cost",
                |m: &UnitTypeData| { &m.vespene_cost },
                |m: &mut UnitTypeData| { &mut m.vespene_cost },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeFloat>(
                "food_required",
                |m: &UnitTypeData| { &m.food_required },
                |m: &mut UnitTypeData| { &mut m.food_required },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeFloat>(
                "food_provided",
                |m: &UnitTypeData| { &m.food_provided },
                |m: &mut UnitTypeData| { &mut m.food_provided },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "ability_id",
                |m: &UnitTypeData| { &m.ability_id },
                |m: &mut UnitTypeData| { &mut m.ability_id },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeEnum<super::common::Race>>(
                "race",
                |m: &UnitTypeData| { &m.race },
                |m: &mut UnitTypeData| { &mut m.race },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeFloat>(
                "build_time",
                |m: &UnitTypeData| { &m.build_time },
                |m: &mut UnitTypeData| { &mut m.build_time },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
                "has_vespene",
                |m: &UnitTypeData| { &m.has_vespene },
                |m: &mut UnitTypeData| { &mut m.has_vespene },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
                "has_minerals",
                |m: &UnitTypeData| { &m.has_minerals },
                |m: &mut UnitTypeData| { &mut m.has_minerals },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeFloat>(
                "sight_range",
                |m: &UnitTypeData| { &m.sight_range },
                |m: &mut UnitTypeData| { &mut m.sight_range },
            ));
            fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "tech_alias",
                |m: &UnitTypeData| { &m.tech_alias },
                |m: &mut UnitTypeData| { &mut m.tech_alias },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "unit_alias",
                |m: &UnitTypeData| { &m.unit_alias },
                |m: &mut UnitTypeData| { &mut m.unit_alias },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "tech_requirement",
                |m: &UnitTypeData| { &m.tech_requirement },
                |m: &mut UnitTypeData| { &mut m.tech_requirement },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
                "require_attached",
                |m: &UnitTypeData| { &m.require_attached },
                |m: &mut UnitTypeData| { &mut m.require_attached },
            ));
            fields.push(::protobuf::reflect::accessor::make_vec_accessor::<_, ::protobuf::types::ProtobufTypeEnum<Attribute>>(
                "attributes",
                |m: &UnitTypeData| { &m.attributes },
                |m: &mut UnitTypeData| { &mut m.attributes },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeFloat>(
                "movement_speed",
                |m: &UnitTypeData| { &m.movement_speed },
                |m: &mut UnitTypeData| { &mut m.movement_speed },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeFloat>(
                "armor",
                |m: &UnitTypeData| { &m.armor },
                |m: &mut UnitTypeData| { &mut m.armor },
            ));
            fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeMessage<Weapon>>(
                "weapons",
                |m: &UnitTypeData| { &m.weapons },
                |m: &mut UnitTypeData| { &mut m.weapons },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<UnitTypeData>(
                "UnitTypeData",
                fields,
                file_descriptor_proto()
            )
        })
    }

    fn default_instance() -> &'static UnitTypeData {
        static instance: ::protobuf::rt::LazyV2<UnitTypeData> = ::protobuf::rt::LazyV2::INIT;
        instance.get(UnitTypeData::new)
    }
}

impl ::protobuf::Clear for UnitTypeData {
    fn clear(&mut self) {
        self.unit_id = ::std::option::Option::None;
        self.name.clear();
        self.available = ::std::option::Option::None;
        self.cargo_size = ::std::option::Option::None;
        self.mineral_cost = ::std::option::Option::None;
        self.vespene_cost = ::std::option::Option::None;
        self.food_required = ::std::option::Option::None;
        self.food_provided = ::std::option::Option::None;
        self.ability_id = ::std::option::Option::None;
        self.race = ::std::option::Option::None;
        self.build_time = ::std::option::Option::None;
        self.has_vespene = ::std::option::Option::None;
        self.has_minerals = ::std::option::Option::None;
        self.sight_range = ::std::option::Option::None;
        self.tech_alias.clear();
        self.unit_alias = ::std::option::Option::None;
        self.tech_requirement = ::std::option::Option::None;
        self.require_attached = ::std::option::Option::None;
        self.attributes.clear();
        self.movement_speed = ::std::option::Option::None;
        self.armor = ::std::option::Option::None;
        self.weapons.clear();
        self.unknown_fields.clear();
    }
}

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

impl ::protobuf::reflect::ProtobufValue for UnitTypeData {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct UpgradeData {
    // message fields
    pub upgrade_id: ::std::option::Option<u32>,
    pub name: ::protobuf::SingularField<::std::string::String>,
    pub mineral_cost: ::std::option::Option<u32>,
    pub vespene_cost: ::std::option::Option<u32>,
    pub research_time: ::std::option::Option<f32>,
    pub ability_id: ::std::option::Option<u32>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

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

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

    // optional uint32 upgrade_id = 1;


    pub fn get_upgrade_id(&self) -> u32 {
        self.upgrade_id.unwrap_or(0)
    }
    pub fn clear_upgrade_id(&mut self) {
        self.upgrade_id = ::std::option::Option::None;
    }

    pub fn has_upgrade_id(&self) -> bool {
        self.upgrade_id.is_some()
    }

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

    // optional string name = 2;


    pub fn get_name(&self) -> &str {
        match self.name.as_ref() {
            Some(v) => &v,
            None => "",
        }
    }
    pub fn clear_name(&mut self) {
        self.name.clear();
    }

    pub fn has_name(&self) -> bool {
        self.name.is_some()
    }

    // Param is passed by value, moved
    pub fn set_name(&mut self, v: ::std::string::String) {
        self.name = ::protobuf::SingularField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_name(&mut self) -> &mut ::std::string::String {
        if self.name.is_none() {
            self.name.set_default();
        }
        self.name.as_mut().unwrap()
    }

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

    // optional uint32 mineral_cost = 3;


    pub fn get_mineral_cost(&self) -> u32 {
        self.mineral_cost.unwrap_or(0)
    }
    pub fn clear_mineral_cost(&mut self) {
        self.mineral_cost = ::std::option::Option::None;
    }

    pub fn has_mineral_cost(&self) -> bool {
        self.mineral_cost.is_some()
    }

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

    // optional uint32 vespene_cost = 4;


    pub fn get_vespene_cost(&self) -> u32 {
        self.vespene_cost.unwrap_or(0)
    }
    pub fn clear_vespene_cost(&mut self) {
        self.vespene_cost = ::std::option::Option::None;
    }

    pub fn has_vespene_cost(&self) -> bool {
        self.vespene_cost.is_some()
    }

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

    // optional float research_time = 5;


    pub fn get_research_time(&self) -> f32 {
        self.research_time.unwrap_or(0.)
    }
    pub fn clear_research_time(&mut self) {
        self.research_time = ::std::option::Option::None;
    }

    pub fn has_research_time(&self) -> bool {
        self.research_time.is_some()
    }

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

    // optional uint32 ability_id = 6;


    pub fn get_ability_id(&self) -> u32 {
        self.ability_id.unwrap_or(0)
    }
    pub fn clear_ability_id(&mut self) {
        self.ability_id = ::std::option::Option::None;
    }

    pub fn has_ability_id(&self) -> bool {
        self.ability_id.is_some()
    }

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

impl ::protobuf::Message for UpgradeData {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.upgrade_id = ::std::option::Option::Some(tmp);
                },
                2 => {
                    ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
                },
                3 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.mineral_cost = ::std::option::Option::Some(tmp);
                },
                4 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.vespene_cost = ::std::option::Option::Some(tmp);
                },
                5 => {
                    if wire_type != ::protobuf::wire_format::WireTypeFixed32 {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_float()?;
                    self.research_time = ::std::option::Option::Some(tmp);
                },
                6 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.ability_id = ::std::option::Option::Some(tmp);
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if let Some(v) = self.upgrade_id {
            my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
        }
        if let Some(ref v) = self.name.as_ref() {
            my_size += ::protobuf::rt::string_size(2, &v);
        }
        if let Some(v) = self.mineral_cost {
            my_size += ::protobuf::rt::value_size(3, v, ::protobuf::wire_format::WireTypeVarint);
        }
        if let Some(v) = self.vespene_cost {
            my_size += ::protobuf::rt::value_size(4, v, ::protobuf::wire_format::WireTypeVarint);
        }
        if let Some(v) = self.research_time {
            my_size += 5;
        }
        if let Some(v) = self.ability_id {
            my_size += ::protobuf::rt::value_size(6, v, ::protobuf::wire_format::WireTypeVarint);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        if let Some(v) = self.upgrade_id {
            os.write_uint32(1, v)?;
        }
        if let Some(ref v) = self.name.as_ref() {
            os.write_string(2, &v)?;
        }
        if let Some(v) = self.mineral_cost {
            os.write_uint32(3, v)?;
        }
        if let Some(v) = self.vespene_cost {
            os.write_uint32(4, v)?;
        }
        if let Some(v) = self.research_time {
            os.write_float(5, v)?;
        }
        if let Some(v) = self.ability_id {
            os.write_uint32(6, v)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> UpgradeData {
        UpgradeData::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            let mut fields = ::std::vec::Vec::new();
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "upgrade_id",
                |m: &UpgradeData| { &m.upgrade_id },
                |m: &mut UpgradeData| { &mut m.upgrade_id },
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "name",
                |m: &UpgradeData| { &m.name },
                |m: &mut UpgradeData| { &mut m.name },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "mineral_cost",
                |m: &UpgradeData| { &m.mineral_cost },
                |m: &mut UpgradeData| { &mut m.mineral_cost },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "vespene_cost",
                |m: &UpgradeData| { &m.vespene_cost },
                |m: &mut UpgradeData| { &mut m.vespene_cost },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeFloat>(
                "research_time",
                |m: &UpgradeData| { &m.research_time },
                |m: &mut UpgradeData| { &mut m.research_time },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "ability_id",
                |m: &UpgradeData| { &m.ability_id },
                |m: &mut UpgradeData| { &mut m.ability_id },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<UpgradeData>(
                "UpgradeData",
                fields,
                file_descriptor_proto()
            )
        })
    }

    fn default_instance() -> &'static UpgradeData {
        static instance: ::protobuf::rt::LazyV2<UpgradeData> = ::protobuf::rt::LazyV2::INIT;
        instance.get(UpgradeData::new)
    }
}

impl ::protobuf::Clear for UpgradeData {
    fn clear(&mut self) {
        self.upgrade_id = ::std::option::Option::None;
        self.name.clear();
        self.mineral_cost = ::std::option::Option::None;
        self.vespene_cost = ::std::option::Option::None;
        self.research_time = ::std::option::Option::None;
        self.ability_id = ::std::option::Option::None;
        self.unknown_fields.clear();
    }
}

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

impl ::protobuf::reflect::ProtobufValue for UpgradeData {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct BuffData {
    // message fields
    pub buff_id: ::std::option::Option<u32>,
    pub name: ::protobuf::SingularField<::std::string::String>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

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

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

    // optional uint32 buff_id = 1;


    pub fn get_buff_id(&self) -> u32 {
        self.buff_id.unwrap_or(0)
    }
    pub fn clear_buff_id(&mut self) {
        self.buff_id = ::std::option::Option::None;
    }

    pub fn has_buff_id(&self) -> bool {
        self.buff_id.is_some()
    }

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

    // optional string name = 2;


    pub fn get_name(&self) -> &str {
        match self.name.as_ref() {
            Some(v) => &v,
            None => "",
        }
    }
    pub fn clear_name(&mut self) {
        self.name.clear();
    }

    pub fn has_name(&self) -> bool {
        self.name.is_some()
    }

    // Param is passed by value, moved
    pub fn set_name(&mut self, v: ::std::string::String) {
        self.name = ::protobuf::SingularField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_name(&mut self) -> &mut ::std::string::String {
        if self.name.is_none() {
            self.name.set_default();
        }
        self.name.as_mut().unwrap()
    }

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

impl ::protobuf::Message for BuffData {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.buff_id = ::std::option::Option::Some(tmp);
                },
                2 => {
                    ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if let Some(v) = self.buff_id {
            my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
        }
        if let Some(ref v) = self.name.as_ref() {
            my_size += ::protobuf::rt::string_size(2, &v);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        if let Some(v) = self.buff_id {
            os.write_uint32(1, v)?;
        }
        if let Some(ref v) = self.name.as_ref() {
            os.write_string(2, &v)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> BuffData {
        BuffData::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            let mut fields = ::std::vec::Vec::new();
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "buff_id",
                |m: &BuffData| { &m.buff_id },
                |m: &mut BuffData| { &mut m.buff_id },
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "name",
                |m: &BuffData| { &m.name },
                |m: &mut BuffData| { &mut m.name },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<BuffData>(
                "BuffData",
                fields,
                file_descriptor_proto()
            )
        })
    }

    fn default_instance() -> &'static BuffData {
        static instance: ::protobuf::rt::LazyV2<BuffData> = ::protobuf::rt::LazyV2::INIT;
        instance.get(BuffData::new)
    }
}

impl ::protobuf::Clear for BuffData {
    fn clear(&mut self) {
        self.buff_id = ::std::option::Option::None;
        self.name.clear();
        self.unknown_fields.clear();
    }
}

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

impl ::protobuf::reflect::ProtobufValue for BuffData {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

#[derive(PartialEq,Clone,Default)]
pub struct EffectData {
    // message fields
    pub effect_id: ::std::option::Option<u32>,
    pub name: ::protobuf::SingularField<::std::string::String>,
    pub friendly_name: ::protobuf::SingularField<::std::string::String>,
    pub radius: ::std::option::Option<f32>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

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

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

    // optional uint32 effect_id = 1;


    pub fn get_effect_id(&self) -> u32 {
        self.effect_id.unwrap_or(0)
    }
    pub fn clear_effect_id(&mut self) {
        self.effect_id = ::std::option::Option::None;
    }

    pub fn has_effect_id(&self) -> bool {
        self.effect_id.is_some()
    }

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

    // optional string name = 2;


    pub fn get_name(&self) -> &str {
        match self.name.as_ref() {
            Some(v) => &v,
            None => "",
        }
    }
    pub fn clear_name(&mut self) {
        self.name.clear();
    }

    pub fn has_name(&self) -> bool {
        self.name.is_some()
    }

    // Param is passed by value, moved
    pub fn set_name(&mut self, v: ::std::string::String) {
        self.name = ::protobuf::SingularField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_name(&mut self) -> &mut ::std::string::String {
        if self.name.is_none() {
            self.name.set_default();
        }
        self.name.as_mut().unwrap()
    }

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

    // optional string friendly_name = 3;


    pub fn get_friendly_name(&self) -> &str {
        match self.friendly_name.as_ref() {
            Some(v) => &v,
            None => "",
        }
    }
    pub fn clear_friendly_name(&mut self) {
        self.friendly_name.clear();
    }

    pub fn has_friendly_name(&self) -> bool {
        self.friendly_name.is_some()
    }

    // Param is passed by value, moved
    pub fn set_friendly_name(&mut self, v: ::std::string::String) {
        self.friendly_name = ::protobuf::SingularField::some(v);
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_friendly_name(&mut self) -> &mut ::std::string::String {
        if self.friendly_name.is_none() {
            self.friendly_name.set_default();
        }
        self.friendly_name.as_mut().unwrap()
    }

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

    // optional float radius = 4;


    pub fn get_radius(&self) -> f32 {
        self.radius.unwrap_or(0.)
    }
    pub fn clear_radius(&mut self) {
        self.radius = ::std::option::Option::None;
    }

    pub fn has_radius(&self) -> bool {
        self.radius.is_some()
    }

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

impl ::protobuf::Message for EffectData {
    fn is_initialized(&self) -> bool {
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        while !is.eof()? {
            let (field_number, wire_type) = is.read_tag_unpack()?;
            match field_number {
                1 => {
                    if wire_type != ::protobuf::wire_format::WireTypeVarint {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_uint32()?;
                    self.effect_id = ::std::option::Option::Some(tmp);
                },
                2 => {
                    ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?;
                },
                3 => {
                    ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.friendly_name)?;
                },
                4 => {
                    if wire_type != ::protobuf::wire_format::WireTypeFixed32 {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    let tmp = is.read_float()?;
                    self.radius = ::std::option::Option::Some(tmp);
                },
                _ => {
                    ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u32 {
        let mut my_size = 0;
        if let Some(v) = self.effect_id {
            my_size += ::protobuf::rt::value_size(1, v, ::protobuf::wire_format::WireTypeVarint);
        }
        if let Some(ref v) = self.name.as_ref() {
            my_size += ::protobuf::rt::string_size(2, &v);
        }
        if let Some(ref v) = self.friendly_name.as_ref() {
            my_size += ::protobuf::rt::string_size(3, &v);
        }
        if let Some(v) = self.radius {
            my_size += 5;
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields());
        self.cached_size.set(my_size);
        my_size
    }

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> {
        if let Some(v) = self.effect_id {
            os.write_uint32(1, v)?;
        }
        if let Some(ref v) = self.name.as_ref() {
            os.write_string(2, &v)?;
        }
        if let Some(ref v) = self.friendly_name.as_ref() {
            os.write_string(3, &v)?;
        }
        if let Some(v) = self.radius {
            os.write_float(4, v)?;
        }
        os.write_unknown_fields(self.get_unknown_fields())?;
        ::std::result::Result::Ok(())
    }

    fn get_cached_size(&self) -> u32 {
        self.cached_size.get()
    }

    fn get_unknown_fields(&self) -> &::protobuf::UnknownFields {
        &self.unknown_fields
    }

    fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields {
        &mut self.unknown_fields
    }

    fn as_any(&self) -> &dyn (::std::any::Any) {
        self as &dyn (::std::any::Any)
    }
    fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) {
        self as &mut dyn (::std::any::Any)
    }
    fn into_any(self: ::std::boxed::Box<Self>) -> ::std::boxed::Box<dyn (::std::any::Any)> {
        self
    }

    fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor {
        Self::descriptor_static()
    }

    fn new() -> EffectData {
        EffectData::new()
    }

    fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            let mut fields = ::std::vec::Vec::new();
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeUint32>(
                "effect_id",
                |m: &EffectData| { &m.effect_id },
                |m: &mut EffectData| { &mut m.effect_id },
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "name",
                |m: &EffectData| { &m.name },
                |m: &mut EffectData| { &mut m.name },
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "friendly_name",
                |m: &EffectData| { &m.friendly_name },
                |m: &mut EffectData| { &mut m.friendly_name },
            ));
            fields.push(::protobuf::reflect::accessor::make_option_accessor::<_, ::protobuf::types::ProtobufTypeFloat>(
                "radius",
                |m: &EffectData| { &m.radius },
                |m: &mut EffectData| { &mut m.radius },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<EffectData>(
                "EffectData",
                fields,
                file_descriptor_proto()
            )
        })
    }

    fn default_instance() -> &'static EffectData {
        static instance: ::protobuf::rt::LazyV2<EffectData> = ::protobuf::rt::LazyV2::INIT;
        instance.get(EffectData::new)
    }
}

impl ::protobuf::Clear for EffectData {
    fn clear(&mut self) {
        self.effect_id = ::std::option::Option::None;
        self.name.clear();
        self.friendly_name.clear();
        self.radius = ::std::option::Option::None;
        self.unknown_fields.clear();
    }
}

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

impl ::protobuf::reflect::ProtobufValue for EffectData {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Message(self)
    }
}

#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum Attribute {
    Light = 1,
    Armored = 2,
    Biological = 3,
    Mechanical = 4,
    Robotic = 5,
    Psionic = 6,
    Massive = 7,
    Structure = 8,
    Hover = 9,
    Heroic = 10,
    Summoned = 11,
}

impl ::protobuf::ProtobufEnum for Attribute {
    fn value(&self) -> i32 {
        *self as i32
    }

    fn from_i32(value: i32) -> ::std::option::Option<Attribute> {
        match value {
            1 => ::std::option::Option::Some(Attribute::Light),
            2 => ::std::option::Option::Some(Attribute::Armored),
            3 => ::std::option::Option::Some(Attribute::Biological),
            4 => ::std::option::Option::Some(Attribute::Mechanical),
            5 => ::std::option::Option::Some(Attribute::Robotic),
            6 => ::std::option::Option::Some(Attribute::Psionic),
            7 => ::std::option::Option::Some(Attribute::Massive),
            8 => ::std::option::Option::Some(Attribute::Structure),
            9 => ::std::option::Option::Some(Attribute::Hover),
            10 => ::std::option::Option::Some(Attribute::Heroic),
            11 => ::std::option::Option::Some(Attribute::Summoned),
            _ => ::std::option::Option::None
        }
    }

    fn values() -> &'static [Self] {
        static values: &'static [Attribute] = &[
            Attribute::Light,
            Attribute::Armored,
            Attribute::Biological,
            Attribute::Mechanical,
            Attribute::Robotic,
            Attribute::Psionic,
            Attribute::Massive,
            Attribute::Structure,
            Attribute::Hover,
            Attribute::Heroic,
            Attribute::Summoned,
        ];
        values
    }

    fn enum_descriptor_static() -> &'static ::protobuf::reflect::EnumDescriptor {
        static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::LazyV2::INIT;
        descriptor.get(|| {
            ::protobuf::reflect::EnumDescriptor::new_pb_name::<Attribute>("Attribute", file_descriptor_proto())
        })
    }
}

impl ::std::marker::Copy for Attribute {
}

// Note, `Default` is implemented although default value is not 0
impl ::std::default::Default for Attribute {
    fn default() -> Self {
        Attribute::Light
    }
}

impl ::protobuf::reflect::ProtobufValue for Attribute {
    fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
        ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
    }
}

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\x1bs2clientprotocol/data.proto\x12\x0eSC2APIProtocol\x1a\x1ds2clientp\
    rotocol/common.proto\"\x85\x05\n\x0bAbilityData\x12\x1d\n\nability_id\
    \x18\x01\x20\x01(\rR\tabilityId\x12\x1b\n\tlink_name\x18\x02\x20\x01(\tR\
    \x08linkName\x12\x1d\n\nlink_index\x18\x03\x20\x01(\rR\tlinkIndex\x12\
    \x1f\n\x0bbutton_name\x18\x04\x20\x01(\tR\nbuttonName\x12#\n\rfriendly_n\
    ame\x18\x05\x20\x01(\tR\x0cfriendlyName\x12\x16\n\x06hotkey\x18\x06\x20\
    \x01(\tR\x06hotkey\x12/\n\x14remaps_to_ability_id\x18\x07\x20\x01(\rR\
    \x11remapsToAbilityId\x12\x1c\n\tavailable\x18\x08\x20\x01(\x08R\tavaila\
    ble\x12:\n\x06target\x18\t\x20\x01(\x0e2\".SC2APIProtocol.AbilityData.Ta\
    rgetR\x06target\x12#\n\rallow_minimap\x18\n\x20\x01(\x08R\x0callowMinima\
    p\x12%\n\x0eallow_autocast\x18\x0b\x20\x01(\x08R\rallowAutocast\x12\x1f\
    \n\x0bis_building\x18\x0c\x20\x01(\x08R\nisBuilding\x12)\n\x10footprint_\
    radius\x18\r\x20\x01(\x02R\x0ffootprintRadius\x120\n\x14is_instant_place\
    ment\x18\x0e\x20\x01(\x08R\x12isInstantPlacement\x12\x1d\n\ncast_range\
    \x18\x0f\x20\x01(\x02R\tcastRange\"I\n\x06Target\x12\x08\n\x04None\x10\
    \x01\x12\t\n\x05Point\x10\x02\x12\x08\n\x04Unit\x10\x03\x12\x0f\n\x0bPoi\
    ntOrUnit\x10\x04\x12\x0f\n\x0bPointOrNone\x10\x05\"\\\n\x0bDamageBonus\
    \x127\n\tattribute\x18\x01\x20\x01(\x0e2\x19.SC2APIProtocol.AttributeR\t\
    attribute\x12\x14\n\x05bonus\x18\x02\x20\x01(\x02R\x05bonus\"\x89\x02\n\
    \x06Weapon\x125\n\x04type\x18\x01\x20\x01(\x0e2!.SC2APIProtocol.Weapon.T\
    argetTypeR\x04type\x12\x16\n\x06damage\x18\x02\x20\x01(\x02R\x06damage\
    \x12>\n\x0cdamage_bonus\x18\x03\x20\x03(\x0b2\x1b.SC2APIProtocol.DamageB\
    onusR\x0bdamageBonus\x12\x18\n\x07attacks\x18\x04\x20\x01(\rR\x07attacks\
    \x12\x14\n\x05range\x18\x05\x20\x01(\x02R\x05range\x12\x14\n\x05speed\
    \x18\x06\x20\x01(\x02R\x05speed\"*\n\nTargetType\x12\n\n\x06Ground\x10\
    \x01\x12\x07\n\x03Air\x10\x02\x12\x07\n\x03Any\x10\x03\"\x93\x06\n\x0cUn\
    itTypeData\x12\x17\n\x07unit_id\x18\x01\x20\x01(\rR\x06unitId\x12\x12\n\
    \x04name\x18\x02\x20\x01(\tR\x04name\x12\x1c\n\tavailable\x18\x03\x20\
    \x01(\x08R\tavailable\x12\x1d\n\ncargo_size\x18\x04\x20\x01(\rR\tcargoSi\
    ze\x12!\n\x0cmineral_cost\x18\x0c\x20\x01(\rR\x0bmineralCost\x12!\n\x0cv\
    espene_cost\x18\r\x20\x01(\rR\x0bvespeneCost\x12#\n\rfood_required\x18\
    \x0e\x20\x01(\x02R\x0cfoodRequired\x12#\n\rfood_provided\x18\x12\x20\x01\
    (\x02R\x0cfoodProvided\x12\x1d\n\nability_id\x18\x0f\x20\x01(\rR\tabilit\
    yId\x12(\n\x04race\x18\x10\x20\x01(\x0e2\x14.SC2APIProtocol.RaceR\x04rac\
    e\x12\x1d\n\nbuild_time\x18\x11\x20\x01(\x02R\tbuildTime\x12\x1f\n\x0bha\
    s_vespene\x18\x13\x20\x01(\x08R\nhasVespene\x12!\n\x0chas_minerals\x18\
    \x14\x20\x01(\x08R\x0bhasMinerals\x12\x1f\n\x0bsight_range\x18\x19\x20\
    \x01(\x02R\nsightRange\x12\x1d\n\ntech_alias\x18\x15\x20\x03(\rR\ttechAl\
    ias\x12\x1d\n\nunit_alias\x18\x16\x20\x01(\rR\tunitAlias\x12)\n\x10tech_\
    requirement\x18\x17\x20\x01(\rR\x0ftechRequirement\x12)\n\x10require_att\
    ached\x18\x18\x20\x01(\x08R\x0frequireAttached\x129\n\nattributes\x18\
    \x08\x20\x03(\x0e2\x19.SC2APIProtocol.AttributeR\nattributes\x12%\n\x0em\
    ovement_speed\x18\t\x20\x01(\x02R\rmovementSpeed\x12\x14\n\x05armor\x18\
    \n\x20\x01(\x02R\x05armor\x120\n\x07weapons\x18\x0b\x20\x03(\x0b2\x16.SC\
    2APIProtocol.WeaponR\x07weapons\"\xca\x01\n\x0bUpgradeData\x12\x1d\n\nup\
    grade_id\x18\x01\x20\x01(\rR\tupgradeId\x12\x12\n\x04name\x18\x02\x20\
    \x01(\tR\x04name\x12!\n\x0cmineral_cost\x18\x03\x20\x01(\rR\x0bmineralCo\
    st\x12!\n\x0cvespene_cost\x18\x04\x20\x01(\rR\x0bvespeneCost\x12#\n\rres\
    earch_time\x18\x05\x20\x01(\x02R\x0cresearchTime\x12\x1d\n\nability_id\
    \x18\x06\x20\x01(\rR\tabilityId\"7\n\x08BuffData\x12\x17\n\x07buff_id\
    \x18\x01\x20\x01(\rR\x06buffId\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04\
    name\"z\n\nEffectData\x12\x1b\n\teffect_id\x18\x01\x20\x01(\rR\x08effect\
    Id\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04name\x12#\n\rfriendly_name\
    \x18\x03\x20\x01(\tR\x0cfriendlyName\x12\x16\n\x06radius\x18\x04\x20\x01\
    (\x02R\x06radius*\x9e\x01\n\tAttribute\x12\t\n\x05Light\x10\x01\x12\x0b\
    \n\x07Armored\x10\x02\x12\x0e\n\nBiological\x10\x03\x12\x0e\n\nMechanica\
    l\x10\x04\x12\x0b\n\x07Robotic\x10\x05\x12\x0b\n\x07Psionic\x10\x06\x12\
    \x0b\n\x07Massive\x10\x07\x12\r\n\tStructure\x10\x08\x12\t\n\x05Hover\
    \x10\t\x12\n\n\x06Heroic\x10\n\x12\x0c\n\x08Summoned\x10\x0b\
";

static file_descriptor_proto_lazy: ::protobuf::rt::LazyV2<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::LazyV2::INIT;

fn parse_descriptor_proto() -> ::protobuf::descriptor::FileDescriptorProto {
    ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
}

pub fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
    file_descriptor_proto_lazy.get(|| {
        parse_descriptor_proto()
    })
}
