google-cloud-rust-raw 0.16.1

A set of client libraries to interact with various Google Cloud Platform services
Documentation
// This file is generated by rust-protobuf 2.28.0. Do not edit
// @generated

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

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

#![allow(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 `google/bigtable/v2/response_params.proto`

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

#[derive(PartialEq,Clone,Default)]
pub struct ResponseParams {
    // message oneof groups
    pub _zone_id: ::std::option::Option<ResponseParams_oneof__zone_id>,
    pub _cluster_id: ::std::option::Option<ResponseParams_oneof__cluster_id>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

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

#[derive(Clone,PartialEq,Debug)]
pub enum ResponseParams_oneof__zone_id {
    zone_id(::std::string::String),
}

#[derive(Clone,PartialEq,Debug)]
pub enum ResponseParams_oneof__cluster_id {
    cluster_id(::std::string::String),
}

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

    // string zone_id = 1;


    pub fn get_zone_id(&self) -> &str {
        match self._zone_id {
            ::std::option::Option::Some(ResponseParams_oneof__zone_id::zone_id(ref v)) => v,
            _ => "",
        }
    }
    pub fn clear_zone_id(&mut self) {
        self._zone_id = ::std::option::Option::None;
    }

    pub fn has_zone_id(&self) -> bool {
        match self._zone_id {
            ::std::option::Option::Some(ResponseParams_oneof__zone_id::zone_id(..)) => true,
            _ => false,
        }
    }

    // Param is passed by value, moved
    pub fn set_zone_id(&mut self, v: ::std::string::String) {
        self._zone_id = ::std::option::Option::Some(ResponseParams_oneof__zone_id::zone_id(v))
    }

    // Mutable pointer to the field.
    pub fn mut_zone_id(&mut self) -> &mut ::std::string::String {
        if let ::std::option::Option::Some(ResponseParams_oneof__zone_id::zone_id(_)) = self._zone_id {
        } else {
            self._zone_id = ::std::option::Option::Some(ResponseParams_oneof__zone_id::zone_id(::std::string::String::new()));
        }
        match self._zone_id {
            ::std::option::Option::Some(ResponseParams_oneof__zone_id::zone_id(ref mut v)) => v,
            _ => panic!(),
        }
    }

    // Take field
    pub fn take_zone_id(&mut self) -> ::std::string::String {
        if self.has_zone_id() {
            match self._zone_id.take() {
                ::std::option::Option::Some(ResponseParams_oneof__zone_id::zone_id(v)) => v,
                _ => panic!(),
            }
        } else {
            ::std::string::String::new()
        }
    }

    // string cluster_id = 2;


    pub fn get_cluster_id(&self) -> &str {
        match self._cluster_id {
            ::std::option::Option::Some(ResponseParams_oneof__cluster_id::cluster_id(ref v)) => v,
            _ => "",
        }
    }
    pub fn clear_cluster_id(&mut self) {
        self._cluster_id = ::std::option::Option::None;
    }

    pub fn has_cluster_id(&self) -> bool {
        match self._cluster_id {
            ::std::option::Option::Some(ResponseParams_oneof__cluster_id::cluster_id(..)) => true,
            _ => false,
        }
    }

    // Param is passed by value, moved
    pub fn set_cluster_id(&mut self, v: ::std::string::String) {
        self._cluster_id = ::std::option::Option::Some(ResponseParams_oneof__cluster_id::cluster_id(v))
    }

    // Mutable pointer to the field.
    pub fn mut_cluster_id(&mut self) -> &mut ::std::string::String {
        if let ::std::option::Option::Some(ResponseParams_oneof__cluster_id::cluster_id(_)) = self._cluster_id {
        } else {
            self._cluster_id = ::std::option::Option::Some(ResponseParams_oneof__cluster_id::cluster_id(::std::string::String::new()));
        }
        match self._cluster_id {
            ::std::option::Option::Some(ResponseParams_oneof__cluster_id::cluster_id(ref mut v)) => v,
            _ => panic!(),
        }
    }

    // Take field
    pub fn take_cluster_id(&mut self) -> ::std::string::String {
        if self.has_cluster_id() {
            match self._cluster_id.take() {
                ::std::option::Option::Some(ResponseParams_oneof__cluster_id::cluster_id(v)) => v,
                _ => panic!(),
            }
        } else {
            ::std::string::String::new()
        }
    }
}

impl ::protobuf::Message for ResponseParams {
    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::WireTypeLengthDelimited {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    self._zone_id = ::std::option::Option::Some(ResponseParams_oneof__zone_id::zone_id(is.read_string()?));
                },
                2 => {
                    if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
                        return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
                    }
                    self._cluster_id = ::std::option::Option::Some(ResponseParams_oneof__cluster_id::cluster_id(is.read_string()?));
                },
                _ => {
                    ::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 ::std::option::Option::Some(ref v) = self._zone_id {
            match v {
                &ResponseParams_oneof__zone_id::zone_id(ref v) => {
                    my_size += ::protobuf::rt::string_size(1, &v);
                },
            };
        }
        if let ::std::option::Option::Some(ref v) = self._cluster_id {
            match v {
                &ResponseParams_oneof__cluster_id::cluster_id(ref v) => {
                    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 ::std::option::Option::Some(ref v) = self._zone_id {
            match v {
                &ResponseParams_oneof__zone_id::zone_id(ref v) => {
                    os.write_string(1, v)?;
                },
            };
        }
        if let ::std::option::Option::Some(ref v) = self._cluster_id {
            match v {
                &ResponseParams_oneof__cluster_id::cluster_id(ref v) => {
                    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() -> ResponseParams {
        ResponseParams::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_singular_string_accessor::<_>(
                "zone_id",
                ResponseParams::has_zone_id,
                ResponseParams::get_zone_id,
            ));
            fields.push(::protobuf::reflect::accessor::make_singular_string_accessor::<_>(
                "cluster_id",
                ResponseParams::has_cluster_id,
                ResponseParams::get_cluster_id,
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<ResponseParams>(
                "ResponseParams",
                fields,
                file_descriptor_proto()
            )
        })
    }

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

impl ::protobuf::Clear for ResponseParams {
    fn clear(&mut self) {
        self._zone_id = ::std::option::Option::None;
        self._cluster_id = ::std::option::Option::None;
        self.unknown_fields.clear();
    }
}

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

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

static file_descriptor_proto_data: &'static [u8] = b"\
    \n(google/bigtable/v2/response_params.proto\x12\x12google.bigtable.v2\"m\
    \n\x0eResponseParams\x12\x1c\n\x07zone_id\x18\x01\x20\x01(\tH\0R\x06zone\
    Id\x88\x01\x01\x12\"\n\ncluster_id\x18\x02\x20\x01(\tH\x01R\tclusterId\
    \x88\x01\x01B\n\n\x08_zone_idB\r\n\x0b_cluster_idB\xbf\x01\n\x16com.goog\
    le.bigtable.v2B\x13ResponseParamsProtoP\x01Z:google.golang.org/genproto/\
    googleapis/bigtable/v2;bigtable\xaa\x02\x18Google.Cloud.Bigtable.V2\xca\
    \x02\x18Google\\Cloud\\Bigtable\\V2\xea\x02\x1bGoogle::Cloud::Bigtable::\
    V2J\xcf\t\n\x06\x12\x04\x0e\0%\x01\n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x12\
    2\xb1\x04\x20Copyright\x202022\x20Google\x20LLC\n\n\x20Licensed\x20under\
    \x20the\x20Apache\x20License,\x20Version\x202.0\x20(the\x20\"License\");\
    \n\x20you\x20may\x20not\x20use\x20this\x20file\x20except\x20in\x20compli\
    ance\x20with\x20the\x20License.\n\x20You\x20may\x20obtain\x20a\x20copy\
    \x20of\x20the\x20License\x20at\n\n\x20\x20\x20\x20\x20http://www.apache.\
    org/licenses/LICENSE-2.0\n\n\x20Unless\x20required\x20by\x20applicable\
    \x20law\x20or\x20agreed\x20to\x20in\x20writing,\x20software\n\x20distrib\
    uted\x20under\x20the\x20License\x20is\x20distributed\x20on\x20an\x20\"AS\
    \x20IS\"\x20BASIS,\n\x20WITHOUT\x20WARRANTIES\x20OR\x20CONDITIONS\x20OF\
    \x20ANY\x20KIND,\x20either\x20express\x20or\x20implied.\n\x20See\x20the\
    \x20License\x20for\x20the\x20specific\x20language\x20governing\x20permis\
    sions\x20and\n\x20limitations\x20under\x20the\x20License.\n\n\x08\n\x01\
    \x02\x12\x03\x10\0\x1b\n\x08\n\x01\x08\x12\x03\x12\05\n\t\n\x02\x08%\x12\
    \x03\x12\05\n\x08\n\x01\x08\x12\x03\x13\0Q\n\t\n\x02\x08\x0b\x12\x03\x13\
    \0Q\n\x08\n\x01\x08\x12\x03\x14\0\"\n\t\n\x02\x08\n\x12\x03\x14\0\"\n\
    \x08\n\x01\x08\x12\x03\x15\04\n\t\n\x02\x08\x08\x12\x03\x15\04\n\x08\n\
    \x01\x08\x12\x03\x16\0/\n\t\n\x02\x08\x01\x12\x03\x16\0/\n\x08\n\x01\x08\
    \x12\x03\x17\05\n\t\n\x02\x08)\x12\x03\x17\05\n\x08\n\x01\x08\x12\x03\
    \x18\04\n\t\n\x02\x08-\x12\x03\x18\04\n\xd2\x01\n\x02\x04\0\x12\x04\x1e\
    \0%\x01\x1a\xc5\x01\x20Response\x20metadata\x20proto\n\x20This\x20is\x20\
    an\x20experimental\x20feature\x20that\x20will\x20be\x20used\x20to\x20get\
    \x20zone_id\x20and\n\x20cluster_id\x20from\x20response\x20trailers\x20to\
    \x20tag\x20the\x20metrics.\x20This\x20should\x20not\x20be\n\x20used\x20b\
    y\x20customers\x20directly\n\n\n\n\x03\x04\0\x01\x12\x03\x1e\x08\x16\nC\
    \n\x04\x04\0\x02\0\x12\x03\x20\x02\x1e\x1a6\x20The\x20cloud\x20bigtable\
    \x20zone\x20associated\x20with\x20the\x20cluster.\n\n\x0c\n\x05\x04\0\
    \x02\0\x04\x12\x03\x20\x02\n\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03\x20\x0b\
    \x11\n\x0c\n\x05\x04\0\x02\0\x01\x12\x03\x20\x12\x19\n\x0c\n\x05\x04\0\
    \x02\0\x03\x12\x03\x20\x1c\x1d\nS\n\x04\x04\0\x02\x01\x12\x03$\x02!\x1aF\
    \x20Identifier\x20for\x20a\x20cluster\x20that\x20represents\x20set\x20of\
    \n\x20bigtable\x20resources.\n\n\x0c\n\x05\x04\0\x02\x01\x04\x12\x03$\
    \x02\n\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x03$\x0b\x11\n\x0c\n\x05\x04\0\
    \x02\x01\x01\x12\x03$\x12\x1c\n\x0c\n\x05\x04\0\x02\x01\x03\x12\x03$\x1f\
    \x20b\x06proto3\
";

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()
    })
}