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/identity/accesscontextmanager/v1/gcp_user_access_binding.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 GcpUserAccessBinding {
    // message fields
    pub name: ::std::string::String,
    pub group_key: ::std::string::String,
    pub access_levels: ::protobuf::RepeatedField<::std::string::String>,
    // special fields
    pub unknown_fields: ::protobuf::UnknownFields,
    pub cached_size: ::protobuf::CachedSize,
}

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

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

    // string name = 1;


    pub fn get_name(&self) -> &str {
        &self.name
    }
    pub fn clear_name(&mut self) {
        self.name.clear();
    }

    // Param is passed by value, moved
    pub fn set_name(&mut self, v: ::std::string::String) {
        self.name = 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 {
        &mut self.name
    }

    // Take field
    pub fn take_name(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.name, ::std::string::String::new())
    }

    // string group_key = 2;


    pub fn get_group_key(&self) -> &str {
        &self.group_key
    }
    pub fn clear_group_key(&mut self) {
        self.group_key.clear();
    }

    // Param is passed by value, moved
    pub fn set_group_key(&mut self, v: ::std::string::String) {
        self.group_key = v;
    }

    // Mutable pointer to the field.
    // If field is not initialized, it is initialized with default value first.
    pub fn mut_group_key(&mut self) -> &mut ::std::string::String {
        &mut self.group_key
    }

    // Take field
    pub fn take_group_key(&mut self) -> ::std::string::String {
        ::std::mem::replace(&mut self.group_key, ::std::string::String::new())
    }

    // repeated string access_levels = 3;


    pub fn get_access_levels(&self) -> &[::std::string::String] {
        &self.access_levels
    }
    pub fn clear_access_levels(&mut self) {
        self.access_levels.clear();
    }

    // Param is passed by value, moved
    pub fn set_access_levels(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) {
        self.access_levels = v;
    }

    // Mutable pointer to the field.
    pub fn mut_access_levels(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> {
        &mut self.access_levels
    }

    // Take field
    pub fn take_access_levels(&mut self) -> ::protobuf::RepeatedField<::std::string::String> {
        ::std::mem::replace(&mut self.access_levels, ::protobuf::RepeatedField::new())
    }
}

impl ::protobuf::Message for GcpUserAccessBinding {
    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_singular_proto3_string_into(wire_type, is, &mut self.name)?;
                },
                2 => {
                    ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.group_key)?;
                },
                3 => {
                    ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.access_levels)?;
                },
                _ => {
                    ::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 !self.name.is_empty() {
            my_size += ::protobuf::rt::string_size(1, &self.name);
        }
        if !self.group_key.is_empty() {
            my_size += ::protobuf::rt::string_size(2, &self.group_key);
        }
        for value in &self.access_levels {
            my_size += ::protobuf::rt::string_size(3, &value);
        };
        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 !self.name.is_empty() {
            os.write_string(1, &self.name)?;
        }
        if !self.group_key.is_empty() {
            os.write_string(2, &self.group_key)?;
        }
        for v in &self.access_levels {
            os.write_string(3, &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() -> GcpUserAccessBinding {
        GcpUserAccessBinding::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_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "name",
                |m: &GcpUserAccessBinding| { &m.name },
                |m: &mut GcpUserAccessBinding| { &mut m.name },
            ));
            fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "group_key",
                |m: &GcpUserAccessBinding| { &m.group_key },
                |m: &mut GcpUserAccessBinding| { &mut m.group_key },
            ));
            fields.push(::protobuf::reflect::accessor::make_repeated_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
                "access_levels",
                |m: &GcpUserAccessBinding| { &m.access_levels },
                |m: &mut GcpUserAccessBinding| { &mut m.access_levels },
            ));
            ::protobuf::reflect::MessageDescriptor::new_pb_name::<GcpUserAccessBinding>(
                "GcpUserAccessBinding",
                fields,
                file_descriptor_proto()
            )
        })
    }

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

impl ::protobuf::Clear for GcpUserAccessBinding {
    fn clear(&mut self) {
        self.name.clear();
        self.group_key.clear();
        self.access_levels.clear();
        self.unknown_fields.clear();
    }
}

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

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

static file_descriptor_proto_data: &'static [u8] = b"\
    \nEgoogle/identity/accesscontextmanager/v1/gcp_user_access_binding.proto\
    \x12'google.identity.accesscontextmanager.v1\x1a\x1fgoogle/api/field_beh\
    avior.proto\x1a\x19google/api/resource.proto\"\xc1\x02\n\x14GcpUserAcces\
    sBinding\x12\x17\n\x04name\x18\x01\x20\x01(\tR\x04nameB\x03\xe0A\x05\x12\
    #\n\tgroup_key\x18\x02\x20\x01(\tR\x08groupKeyB\x06\xe0A\x02\xe0A\x05\
    \x12\\\n\raccess_levels\x18\x03\x20\x03(\tR\x0caccessLevelsB7\xfaA1\n/ac\
    cesscontextmanager.googleapis.com/AccessLevel\xe0A\x02:\x8c\x01\xeaA\x88\
    \x01\n8accesscontextmanager.googleapis.com/GcpUserAccessBinding\x12Lorga\
    nizations/{organization}/gcpUserAccessBindings/{gcp_user_access_binding}\
    B\xb0\x02\n+com.google.identity.accesscontextmanager.v1B\x19GcpUserAcces\
    sBindingProtoP\x01Z\\cloud.google.com/go/accesscontextmanager/apiv1/acce\
    sscontextmanagerpb;accesscontextmanagerpb\xa2\x02\x04GACM\xaa\x02'Google\
    .Identity.AccessContextManager.V1\xca\x02'Google\\Identity\\AccessContex\
    tManager\\V1\xea\x02*Google::Identity::AccessContextManager::V1J\xe1\x11\
    \n\x06\x12\x04\x0e\0C\x01\n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\
    \x20Copyright\x202022\x20Google\x20LLC\n\n\x20Licensed\x20under\x20the\
    \x20Apache\x20License,\x20Version\x202.0\x20(the\x20\"License\");\n\x20y\
    ou\x20may\x20not\x20use\x20this\x20file\x20except\x20in\x20compliance\
    \x20with\x20the\x20License.\n\x20You\x20may\x20obtain\x20a\x20copy\x20of\
    \x20the\x20License\x20at\n\n\x20\x20\x20\x20\x20http://www.apache.org/li\
    censes/LICENSE-2.0\n\n\x20Unless\x20required\x20by\x20applicable\x20law\
    \x20or\x20agreed\x20to\x20in\x20writing,\x20software\n\x20distributed\
    \x20under\x20the\x20License\x20is\x20distributed\x20on\x20an\x20\"AS\x20\
    IS\"\x20BASIS,\n\x20WITHOUT\x20WARRANTIES\x20OR\x20CONDITIONS\x20OF\x20A\
    NY\x20KIND,\x20either\x20express\x20or\x20implied.\n\x20See\x20the\x20Li\
    cense\x20for\x20the\x20specific\x20language\x20governing\x20permissions\
    \x20and\n\x20limitations\x20under\x20the\x20License.\n\n\x08\n\x01\x02\
    \x12\x03\x10\00\n\t\n\x02\x03\0\x12\x03\x12\0)\n\t\n\x02\x03\x01\x12\x03\
    \x13\0#\n\x08\n\x01\x08\x12\x03\x15\0D\n\t\n\x02\x08%\x12\x03\x15\0D\n\
    \x08\n\x01\x08\x12\x03\x16\0s\n\t\n\x02\x08\x0b\x12\x03\x16\0s\n\x08\n\
    \x01\x08\x12\x03\x17\0\"\n\t\n\x02\x08\n\x12\x03\x17\0\"\n\x08\n\x01\x08\
    \x12\x03\x18\0:\n\t\n\x02\x08\x08\x12\x03\x18\0:\n\x08\n\x01\x08\x12\x03\
    \x19\0D\n\t\n\x02\x08\x01\x12\x03\x19\0D\n\x08\n\x01\x08\x12\x03\x1a\0\"\
    \n\t\n\x02\x08$\x12\x03\x1a\0\"\n\x08\n\x01\x08\x12\x03\x1b\0D\n\t\n\x02\
    \x08)\x12\x03\x1b\0D\n\x08\n\x01\x08\x12\x03\x1c\0C\n\t\n\x02\x08-\x12\
    \x03\x1c\0C\nu\n\x02\x04\0\x12\x04\x20\0C\x01\x1ai\x20Restricts\x20acces\
    s\x20to\x20Cloud\x20Console\x20and\x20Google\x20Cloud\x20APIs\x20for\x20\
    a\x20set\x20of\x20users\n\x20using\x20Context-Aware\x20Access.\n\n\n\n\
    \x03\x04\0\x01\x12\x03\x20\x08\x1c\n\x0b\n\x03\x04\0\x07\x12\x04!\x02$\
    \x04\n\r\n\x05\x04\0\x07\x9d\x08\x12\x04!\x02$\x04\n\xe6\x02\n\x04\x04\0\
    \x02\0\x12\x03+\x02<\x1a\xd8\x02\x20Immutable.\x20Assigned\x20by\x20the\
    \x20server\x20during\x20creation.\x20The\x20last\x20segment\x20has\x20an\
    \x20arbitrary\n\x20length\x20and\x20has\x20only\x20URI\x20unreserved\x20\
    characters\x20(as\x20defined\x20by\n\x20[RFC\x203986\x20Section\x202.3](\
    https://tools.ietf.org/html/rfc3986#section-2.3)).\n\x20Should\x20not\
    \x20be\x20specified\x20by\x20the\x20client\x20during\x20creation.\n\x20E\
    xample:\x20\"organizations/256/gcpUserAccessBindings/b3-BhcX_Ud5N\"\n\n\
    \x0c\n\x05\x04\0\x02\0\x05\x12\x03+\x02\x08\n\x0c\n\x05\x04\0\x02\0\x01\
    \x12\x03+\t\r\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03+\x10\x11\n\x0c\n\x05\
    \x04\0\x02\0\x08\x12\x03+\x12;\n\x0f\n\x08\x04\0\x02\0\x08\x9c\x08\0\x12\
    \x03+\x13:\n\xc1\x03\n\x04\x04\0\x02\x01\x12\x044\x027\x04\x1a\xb2\x03\
    \x20Required.\x20Immutable.\x20Google\x20Group\x20id\x20whose\x20members\
    \x20are\x20subject\x20to\x20this\x20binding's\x20restrictions.\n\x20See\
    \x20\"id\"\x20in\x20the\x20[G\x20Suite\x20Directory\x20API's\x20Groups\
    \x20resource]\n\x20(https://developers.google.com/admin-sdk/directory/v1\
    /reference/groups#resource).\n\x20If\x20a\x20group's\x20email\x20address\
    /alias\x20is\x20changed,\x20this\x20resource\x20will\x20continue\n\x20to\
    \x20point\x20at\x20the\x20changed\x20group.\x20This\x20field\x20does\x20\
    not\x20accept\x20group\x20email\n\x20addresses\x20or\x20aliases.\n\x20Ex\
    ample:\x20\"01d520gv4vjcrht\"\n\n\x0c\n\x05\x04\0\x02\x01\x05\x12\x034\
    \x02\x08\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x034\t\x12\n\x0c\n\x05\x04\0\
    \x02\x01\x03\x12\x034\x15\x16\n\r\n\x05\x04\0\x02\x01\x08\x12\x044\x177\
    \x03\n\x0f\n\x08\x04\0\x02\x01\x08\x9c\x08\0\x12\x035\x04*\n\x0f\n\x08\
    \x04\0\x02\x01\x08\x9c\x08\x01\x12\x036\x04+\n\xf6\x01\n\x04\x04\0\x02\
    \x02\x12\x04=\x02B\x04\x1a\xe7\x01\x20Required.\x20Access\x20level\x20th\
    at\x20a\x20user\x20must\x20have\x20to\x20be\x20granted\x20access.\x20Onl\
    y\x20one\x20access\n\x20level\x20is\x20supported,\x20not\x20multiple.\
    \x20This\x20repeated\x20field\x20must\x20have\x20exactly\n\x20one\x20ele\
    ment.\n\x20Example:\x20\"accessPolicies/9522/accessLevels/device_trusted\
    \"\n\n\x0c\n\x05\x04\0\x02\x02\x04\x12\x03=\x02\n\n\x0c\n\x05\x04\0\x02\
    \x02\x05\x12\x03=\x0b\x11\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03=\x12\x1f\
    \n\x0c\n\x05\x04\0\x02\x02\x03\x12\x03=\"#\n\r\n\x05\x04\0\x02\x02\x08\
    \x12\x04=$B\x03\n\x0f\n\x08\x04\0\x02\x02\x08\x9c\x08\0\x12\x03>\x04*\n\
    \x0f\n\x07\x04\0\x02\x02\x08\x9f\x08\x12\x04?\x04A\x05b\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()
    })
}