#![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)]
#[derive(PartialEq,Clone,Default)]
pub struct Constraint {
pub name: ::std::string::String,
pub display_name: ::std::string::String,
pub description: ::std::string::String,
pub constraint_default: Constraint_ConstraintDefault,
pub constraint_type: ::std::option::Option<Constraint_oneof_constraint_type>,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a Constraint {
fn default() -> &'a Constraint {
<Constraint as ::protobuf::Message>::default_instance()
}
}
#[derive(Clone,PartialEq,Debug)]
pub enum Constraint_oneof_constraint_type {
list_constraint(Constraint_ListConstraint),
boolean_constraint(Constraint_BooleanConstraint),
}
impl Constraint {
pub fn new() -> Constraint {
::std::default::Default::default()
}
pub fn get_name(&self) -> &str {
&self.name
}
pub fn clear_name(&mut self) {
self.name.clear();
}
pub fn set_name(&mut self, v: ::std::string::String) {
self.name = v;
}
pub fn mut_name(&mut self) -> &mut ::std::string::String {
&mut self.name
}
pub fn take_name(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.name, ::std::string::String::new())
}
pub fn get_display_name(&self) -> &str {
&self.display_name
}
pub fn clear_display_name(&mut self) {
self.display_name.clear();
}
pub fn set_display_name(&mut self, v: ::std::string::String) {
self.display_name = v;
}
pub fn mut_display_name(&mut self) -> &mut ::std::string::String {
&mut self.display_name
}
pub fn take_display_name(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.display_name, ::std::string::String::new())
}
pub fn get_description(&self) -> &str {
&self.description
}
pub fn clear_description(&mut self) {
self.description.clear();
}
pub fn set_description(&mut self, v: ::std::string::String) {
self.description = v;
}
pub fn mut_description(&mut self) -> &mut ::std::string::String {
&mut self.description
}
pub fn take_description(&mut self) -> ::std::string::String {
::std::mem::replace(&mut self.description, ::std::string::String::new())
}
pub fn get_constraint_default(&self) -> Constraint_ConstraintDefault {
self.constraint_default
}
pub fn clear_constraint_default(&mut self) {
self.constraint_default = Constraint_ConstraintDefault::CONSTRAINT_DEFAULT_UNSPECIFIED;
}
pub fn set_constraint_default(&mut self, v: Constraint_ConstraintDefault) {
self.constraint_default = v;
}
pub fn get_list_constraint(&self) -> &Constraint_ListConstraint {
match self.constraint_type {
::std::option::Option::Some(Constraint_oneof_constraint_type::list_constraint(ref v)) => v,
_ => <Constraint_ListConstraint as ::protobuf::Message>::default_instance(),
}
}
pub fn clear_list_constraint(&mut self) {
self.constraint_type = ::std::option::Option::None;
}
pub fn has_list_constraint(&self) -> bool {
match self.constraint_type {
::std::option::Option::Some(Constraint_oneof_constraint_type::list_constraint(..)) => true,
_ => false,
}
}
pub fn set_list_constraint(&mut self, v: Constraint_ListConstraint) {
self.constraint_type = ::std::option::Option::Some(Constraint_oneof_constraint_type::list_constraint(v))
}
pub fn mut_list_constraint(&mut self) -> &mut Constraint_ListConstraint {
if let ::std::option::Option::Some(Constraint_oneof_constraint_type::list_constraint(_)) = self.constraint_type {
} else {
self.constraint_type = ::std::option::Option::Some(Constraint_oneof_constraint_type::list_constraint(Constraint_ListConstraint::new()));
}
match self.constraint_type {
::std::option::Option::Some(Constraint_oneof_constraint_type::list_constraint(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_list_constraint(&mut self) -> Constraint_ListConstraint {
if self.has_list_constraint() {
match self.constraint_type.take() {
::std::option::Option::Some(Constraint_oneof_constraint_type::list_constraint(v)) => v,
_ => panic!(),
}
} else {
Constraint_ListConstraint::new()
}
}
pub fn get_boolean_constraint(&self) -> &Constraint_BooleanConstraint {
match self.constraint_type {
::std::option::Option::Some(Constraint_oneof_constraint_type::boolean_constraint(ref v)) => v,
_ => <Constraint_BooleanConstraint as ::protobuf::Message>::default_instance(),
}
}
pub fn clear_boolean_constraint(&mut self) {
self.constraint_type = ::std::option::Option::None;
}
pub fn has_boolean_constraint(&self) -> bool {
match self.constraint_type {
::std::option::Option::Some(Constraint_oneof_constraint_type::boolean_constraint(..)) => true,
_ => false,
}
}
pub fn set_boolean_constraint(&mut self, v: Constraint_BooleanConstraint) {
self.constraint_type = ::std::option::Option::Some(Constraint_oneof_constraint_type::boolean_constraint(v))
}
pub fn mut_boolean_constraint(&mut self) -> &mut Constraint_BooleanConstraint {
if let ::std::option::Option::Some(Constraint_oneof_constraint_type::boolean_constraint(_)) = self.constraint_type {
} else {
self.constraint_type = ::std::option::Option::Some(Constraint_oneof_constraint_type::boolean_constraint(Constraint_BooleanConstraint::new()));
}
match self.constraint_type {
::std::option::Option::Some(Constraint_oneof_constraint_type::boolean_constraint(ref mut v)) => v,
_ => panic!(),
}
}
pub fn take_boolean_constraint(&mut self) -> Constraint_BooleanConstraint {
if self.has_boolean_constraint() {
match self.constraint_type.take() {
::std::option::Option::Some(Constraint_oneof_constraint_type::boolean_constraint(v)) => v,
_ => panic!(),
}
} else {
Constraint_BooleanConstraint::new()
}
}
}
impl ::protobuf::Message for Constraint {
fn is_initialized(&self) -> bool {
if let Some(Constraint_oneof_constraint_type::list_constraint(ref v)) = self.constraint_type {
if !v.is_initialized() {
return false;
}
}
if let Some(Constraint_oneof_constraint_type::boolean_constraint(ref v)) = self.constraint_type {
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_singular_proto3_string_into(wire_type, is, &mut self.name)?;
},
2 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.display_name)?;
},
3 => {
::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.description)?;
},
4 => {
::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.constraint_default, 4, &mut self.unknown_fields)?
},
5 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.constraint_type = ::std::option::Option::Some(Constraint_oneof_constraint_type::list_constraint(is.read_message()?));
},
6 => {
if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited {
return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type));
}
self.constraint_type = ::std::option::Option::Some(Constraint_oneof_constraint_type::boolean_constraint(is.read_message()?));
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[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.display_name.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.display_name);
}
if !self.description.is_empty() {
my_size += ::protobuf::rt::string_size(3, &self.description);
}
if self.constraint_default != Constraint_ConstraintDefault::CONSTRAINT_DEFAULT_UNSPECIFIED {
my_size += ::protobuf::rt::enum_size(4, self.constraint_default);
}
if let ::std::option::Option::Some(ref v) = self.constraint_type {
match v {
&Constraint_oneof_constraint_type::list_constraint(ref v) => {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len;
},
&Constraint_oneof_constraint_type::boolean_constraint(ref v) => {
let len = v.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 !self.name.is_empty() {
os.write_string(1, &self.name)?;
}
if !self.display_name.is_empty() {
os.write_string(2, &self.display_name)?;
}
if !self.description.is_empty() {
os.write_string(3, &self.description)?;
}
if self.constraint_default != Constraint_ConstraintDefault::CONSTRAINT_DEFAULT_UNSPECIFIED {
os.write_enum(4, ::protobuf::ProtobufEnum::value(&self.constraint_default))?;
}
if let ::std::option::Option::Some(ref v) = self.constraint_type {
match v {
&Constraint_oneof_constraint_type::list_constraint(ref v) => {
os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?;
os.write_raw_varint32(v.get_cached_size())?;
v.write_to_with_cached_sizes(os)?;
},
&Constraint_oneof_constraint_type::boolean_constraint(ref v) => {
os.write_tag(6, ::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() -> Constraint {
Constraint::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: &Constraint| { &m.name },
|m: &mut Constraint| { &mut m.name },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"display_name",
|m: &Constraint| { &m.display_name },
|m: &mut Constraint| { &mut m.display_name },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeString>(
"description",
|m: &Constraint| { &m.description },
|m: &mut Constraint| { &mut m.description },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeEnum<Constraint_ConstraintDefault>>(
"constraint_default",
|m: &Constraint| { &m.constraint_default },
|m: &mut Constraint| { &mut m.constraint_default },
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, Constraint_ListConstraint>(
"list_constraint",
Constraint::has_list_constraint,
Constraint::get_list_constraint,
));
fields.push(::protobuf::reflect::accessor::make_singular_message_accessor::<_, Constraint_BooleanConstraint>(
"boolean_constraint",
Constraint::has_boolean_constraint,
Constraint::get_boolean_constraint,
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<Constraint>(
"Constraint",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static Constraint {
static instance: ::protobuf::rt::LazyV2<Constraint> = ::protobuf::rt::LazyV2::INIT;
instance.get(Constraint::new)
}
}
impl ::protobuf::Clear for Constraint {
fn clear(&mut self) {
self.name.clear();
self.display_name.clear();
self.description.clear();
self.constraint_default = Constraint_ConstraintDefault::CONSTRAINT_DEFAULT_UNSPECIFIED;
self.constraint_type = ::std::option::Option::None;
self.constraint_type = ::std::option::Option::None;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Constraint {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Constraint {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct Constraint_ListConstraint {
pub supports_in: bool,
pub supports_under: bool,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a Constraint_ListConstraint {
fn default() -> &'a Constraint_ListConstraint {
<Constraint_ListConstraint as ::protobuf::Message>::default_instance()
}
}
impl Constraint_ListConstraint {
pub fn new() -> Constraint_ListConstraint {
::std::default::Default::default()
}
pub fn get_supports_in(&self) -> bool {
self.supports_in
}
pub fn clear_supports_in(&mut self) {
self.supports_in = false;
}
pub fn set_supports_in(&mut self, v: bool) {
self.supports_in = v;
}
pub fn get_supports_under(&self) -> bool {
self.supports_under
}
pub fn clear_supports_under(&mut self) {
self.supports_under = false;
}
pub fn set_supports_under(&mut self, v: bool) {
self.supports_under = v;
}
}
impl ::protobuf::Message for Constraint_ListConstraint {
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_bool()?;
self.supports_in = tmp;
},
2 => {
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.supports_under = tmp;
},
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
if self.supports_in != false {
my_size += 2;
}
if self.supports_under != false {
my_size += 2;
}
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.supports_in != false {
os.write_bool(1, self.supports_in)?;
}
if self.supports_under != false {
os.write_bool(2, self.supports_under)?;
}
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() -> Constraint_ListConstraint {
Constraint_ListConstraint::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::ProtobufTypeBool>(
"supports_in",
|m: &Constraint_ListConstraint| { &m.supports_in },
|m: &mut Constraint_ListConstraint| { &mut m.supports_in },
));
fields.push(::protobuf::reflect::accessor::make_simple_field_accessor::<_, ::protobuf::types::ProtobufTypeBool>(
"supports_under",
|m: &Constraint_ListConstraint| { &m.supports_under },
|m: &mut Constraint_ListConstraint| { &mut m.supports_under },
));
::protobuf::reflect::MessageDescriptor::new_pb_name::<Constraint_ListConstraint>(
"Constraint.ListConstraint",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static Constraint_ListConstraint {
static instance: ::protobuf::rt::LazyV2<Constraint_ListConstraint> = ::protobuf::rt::LazyV2::INIT;
instance.get(Constraint_ListConstraint::new)
}
}
impl ::protobuf::Clear for Constraint_ListConstraint {
fn clear(&mut self) {
self.supports_in = false;
self.supports_under = false;
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Constraint_ListConstraint {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Constraint_ListConstraint {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(PartialEq,Clone,Default)]
pub struct Constraint_BooleanConstraint {
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a Constraint_BooleanConstraint {
fn default() -> &'a Constraint_BooleanConstraint {
<Constraint_BooleanConstraint as ::protobuf::Message>::default_instance()
}
}
impl Constraint_BooleanConstraint {
pub fn new() -> Constraint_BooleanConstraint {
::std::default::Default::default()
}
}
impl ::protobuf::Message for Constraint_BooleanConstraint {
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 {
_ => {
::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u32 {
let mut my_size = 0;
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<()> {
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() -> Constraint_BooleanConstraint {
Constraint_BooleanConstraint::new()
}
fn descriptor_static() -> &'static ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::LazyV2<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::LazyV2::INIT;
descriptor.get(|| {
let fields = ::std::vec::Vec::new();
::protobuf::reflect::MessageDescriptor::new_pb_name::<Constraint_BooleanConstraint>(
"Constraint.BooleanConstraint",
fields,
file_descriptor_proto()
)
})
}
fn default_instance() -> &'static Constraint_BooleanConstraint {
static instance: ::protobuf::rt::LazyV2<Constraint_BooleanConstraint> = ::protobuf::rt::LazyV2::INIT;
instance.get(Constraint_BooleanConstraint::new)
}
}
impl ::protobuf::Clear for Constraint_BooleanConstraint {
fn clear(&mut self) {
self.unknown_fields.clear();
}
}
impl ::std::fmt::Debug for Constraint_BooleanConstraint {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Constraint_BooleanConstraint {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Message(self)
}
}
#[derive(Clone,PartialEq,Eq,Debug,Hash)]
pub enum Constraint_ConstraintDefault {
CONSTRAINT_DEFAULT_UNSPECIFIED = 0,
ALLOW = 1,
DENY = 2,
}
impl ::protobuf::ProtobufEnum for Constraint_ConstraintDefault {
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<Constraint_ConstraintDefault> {
match value {
0 => ::std::option::Option::Some(Constraint_ConstraintDefault::CONSTRAINT_DEFAULT_UNSPECIFIED),
1 => ::std::option::Option::Some(Constraint_ConstraintDefault::ALLOW),
2 => ::std::option::Option::Some(Constraint_ConstraintDefault::DENY),
_ => ::std::option::Option::None
}
}
fn values() -> &'static [Self] {
static values: &'static [Constraint_ConstraintDefault] = &[
Constraint_ConstraintDefault::CONSTRAINT_DEFAULT_UNSPECIFIED,
Constraint_ConstraintDefault::ALLOW,
Constraint_ConstraintDefault::DENY,
];
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::<Constraint_ConstraintDefault>("Constraint.ConstraintDefault", file_descriptor_proto())
})
}
}
impl ::std::marker::Copy for Constraint_ConstraintDefault {
}
impl ::std::default::Default for Constraint_ConstraintDefault {
fn default() -> Self {
Constraint_ConstraintDefault::CONSTRAINT_DEFAULT_UNSPECIFIED
}
}
impl ::protobuf::reflect::ProtobufValue for Constraint_ConstraintDefault {
fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef {
::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self))
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n*google/cloud/orgpolicy/v2/constraint.proto\x12\x19google.cloud.orgpol\
icy.v2\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource\
.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa8\x06\n\nConstraint\
\x12\x17\n\x04name\x18\x01\x20\x01(\tR\x04nameB\x03\xe0A\x05\x12!\n\x0cd\
isplay_name\x18\x02\x20\x01(\tR\x0bdisplayName\x12\x20\n\x0bdescription\
\x18\x03\x20\x01(\tR\x0bdescription\x12f\n\x12constraint_default\x18\x04\
\x20\x01(\x0e27.google.cloud.orgpolicy.v2.Constraint.ConstraintDefaultR\
\x11constraintDefault\x12_\n\x0flist_constraint\x18\x05\x20\x01(\x0b24.g\
oogle.cloud.orgpolicy.v2.Constraint.ListConstraintH\0R\x0elistConstraint\
\x12h\n\x12boolean_constraint\x18\x06\x20\x01(\x0b27.google.cloud.orgpol\
icy.v2.Constraint.BooleanConstraintH\0R\x11booleanConstraint\x1aX\n\x0eL\
istConstraint\x12\x1f\n\x0bsupports_in\x18\x01\x20\x01(\x08R\nsupportsIn\
\x12%\n\x0esupports_under\x18\x02\x20\x01(\x08R\rsupportsUnder\x1a\x13\n\
\x11BooleanConstraint\"L\n\x11ConstraintDefault\x12\"\n\x1eCONSTRAINT_DE\
FAULT_UNSPECIFIED\x10\0\x12\t\n\x05ALLOW\x10\x01\x12\x08\n\x04DENY\x10\
\x02B\x11\n\x0fconstraint_type:\xb8\x01\xeaA\xb4\x01\n#orgpolicy.googlea\
pis.com/Constraint\x12+projects/{project}/constraints/{constraint}\x12)f\
olders/{folder}/constraints/{constraint}\x125organizations/{organization\
}/constraints/{constraint}B\xc6\x01\n\x1dcom.google.cloud.orgpolicy.v2B\
\x0fConstraintProtoP\x01Z;cloud.google.com/go/orgpolicy/apiv2/orgpolicyp\
b;orgpolicypb\xaa\x02\x19Google.Cloud.OrgPolicy.V2\xca\x02\x19Google\\Cl\
oud\\OrgPolicy\\V2\xea\x02\x1cGoogle::Cloud::OrgPolicy::V2J\xdb#\n\x06\
\x12\x04\x0e\0}\x01\n\xbc\x04\n\x01\x0c\x12\x03\x0e\0\x122\xb1\x04\x20Co\
pyright\x202022\x20Google\x20LLC\n\n\x20Licensed\x20under\x20the\x20Apac\
he\x20License,\x20Version\x202.0\x20(the\x20\"License\");\n\x20you\x20ma\
y\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/licenses/\
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\x20IS\"\x20B\
ASIS,\n\x20WITHOUT\x20WARRANTIES\x20OR\x20CONDITIONS\x20OF\x20ANY\x20KIN\
D,\x20either\x20express\x20or\x20implied.\n\x20See\x20the\x20License\x20\
for\x20the\x20specific\x20language\x20governing\x20permissions\x20and\n\
\x20limitations\x20under\x20the\x20License.\n\n\x08\n\x01\x02\x12\x03\
\x10\0\"\n\t\n\x02\x03\0\x12\x03\x12\0)\n\t\n\x02\x03\x01\x12\x03\x13\0#\
\n\t\n\x02\x03\x02\x12\x03\x14\0)\n\x08\n\x01\x08\x12\x03\x16\06\n\t\n\
\x02\x08%\x12\x03\x16\06\n\x08\n\x01\x08\x12\x03\x17\0R\n\t\n\x02\x08\
\x0b\x12\x03\x17\0R\n\x08\n\x01\x08\x12\x03\x18\0\"\n\t\n\x02\x08\n\x12\
\x03\x18\0\"\n\x08\n\x01\x08\x12\x03\x19\00\n\t\n\x02\x08\x08\x12\x03\
\x19\00\n\x08\n\x01\x08\x12\x03\x1a\06\n\t\n\x02\x08\x01\x12\x03\x1a\06\
\n\x08\n\x01\x08\x12\x03\x1b\06\n\t\n\x02\x08)\x12\x03\x1b\06\n\x08\n\
\x01\x08\x12\x03\x1c\05\n\t\n\x02\x08-\x12\x03\x1c\05\n\xb4\x07\n\x02\
\x04\0\x12\x04,\0}\x01\x1a\xa7\x07\x20A\x20`constraint`\x20describes\x20\
a\x20way\x20to\x20restrict\x20resource's\x20configuration.\x20For\n\x20e\
xample,\x20you\x20could\x20enforce\x20a\x20constraint\x20that\x20control\
s\x20which\x20cloud\x20services\n\x20can\x20be\x20activated\x20across\
\x20an\x20organization,\x20or\x20whether\x20a\x20Compute\x20Engine\x20in\
stance\n\x20can\x20have\x20serial\x20port\x20connections\x20established.\
\x20`Constraints`\x20can\x20be\x20configured\n\x20by\x20the\x20organizat\
ion's\x20policy\x20administrator\x20to\x20fit\x20the\x20needs\x20of\x20t\
he\n\x20organization\x20by\x20setting\x20a\x20`policy`\x20that\x20includ\
es\x20`constraints`\x20at\x20different\n\x20locations\x20in\x20the\x20or\
ganization's\x20resource\x20hierarchy.\x20Policies\x20are\x20inherited\n\
\x20down\x20the\x20resource\x20hierarchy\x20from\x20higher\x20levels,\
\x20but\x20can\x20also\x20be\x20overridden.\n\x20For\x20details\x20about\
\x20the\x20inheritance\x20rules\x20please\x20read\x20about\n\x20[`polici\
es`][google.cloud.OrgPolicy.v2.Policy].\n\n\x20`Constraints`\x20have\x20\
a\x20default\x20behavior\x20determined\x20by\x20the\x20`constraint_defau\
lt`\n\x20field,\x20which\x20is\x20the\x20enforcement\x20behavior\x20that\
\x20is\x20used\x20in\x20the\x20absence\x20of\x20a\n\x20`policy`\x20being\
\x20defined\x20or\x20inherited\x20for\x20the\x20resource\x20in\x20questi\
on.\n\n\n\n\x03\x04\0\x01\x12\x03,\x08\x12\n\x0b\n\x03\x04\0\x07\x12\x04\
-\x022\x04\n\r\n\x05\x04\0\x07\x9d\x08\x12\x04-\x022\x04\n\xb4\x01\n\x04\
\x04\0\x04\0\x12\x048\x02D\x03\x1a\xa5\x01\x20Specifies\x20the\x20defaul\
t\x20behavior\x20in\x20the\x20absence\x20of\x20any\x20`Policy`\x20for\
\x20the\n\x20`Constraint`.\x20This\x20must\x20not\x20be\x20`CONSTRAINT_D\
EFAULT_UNSPECIFIED`.\n\n\x20Immutable\x20after\x20creation.\n\n\x0c\n\
\x05\x04\0\x04\0\x01\x12\x038\x07\x18\n]\n\x06\x04\0\x04\0\x02\0\x12\x03\
;\x04'\x1aN\x20This\x20is\x20only\x20used\x20for\x20distinguishing\x20un\
set\x20values\x20and\x20should\x20never\x20be\n\x20used.\n\n\x0e\n\x07\
\x04\0\x04\0\x02\0\x01\x12\x03;\x04\"\n\x0e\n\x07\x04\0\x04\0\x02\0\x02\
\x12\x03;%&\n\x86\x01\n\x06\x04\0\x04\0\x02\x01\x12\x03?\x04\x0e\x1aw\
\x20Indicate\x20that\x20all\x20values\x20are\x20allowed\x20for\x20list\
\x20constraints.\n\x20Indicate\x20that\x20enforcement\x20is\x20off\x20fo\
r\x20boolean\x20constraints.\n\n\x0e\n\x07\x04\0\x04\0\x02\x01\x01\x12\
\x03?\x04\t\n\x0e\n\x07\x04\0\x04\0\x02\x01\x02\x12\x03?\x0c\r\n\x84\x01\
\n\x06\x04\0\x04\0\x02\x02\x12\x03C\x04\r\x1au\x20Indicate\x20that\x20al\
l\x20values\x20are\x20denied\x20for\x20list\x20constraints.\n\x20Indicat\
e\x20that\x20enforcement\x20is\x20on\x20for\x20boolean\x20constraints.\n\
\n\x0e\n\x07\x04\0\x04\0\x02\x02\x01\x12\x03C\x04\x08\n\x0e\n\x07\x04\0\
\x04\0\x02\x02\x02\x12\x03C\x0b\x0c\n\xa2\x01\n\x04\x04\0\x03\0\x12\x04H\
\x02S\x03\x1a\x93\x01\x20A\x20`Constraint`\x20that\x20allows\x20or\x20di\
sallows\x20a\x20list\x20of\x20string\x20values,\x20which\x20are\n\x20con\
figured\x20by\x20an\x20Organization's\x20policy\x20administrator\x20with\
\x20a\x20`Policy`.\n\n\x0c\n\x05\x04\0\x03\0\x01\x12\x03H\n\x18\n\xcf\
\x01\n\x06\x04\0\x03\0\x02\0\x12\x03L\x04\x19\x1a\xbf\x01\x20Indicates\
\x20whether\x20values\x20grouped\x20into\x20categories\x20can\x20be\x20u\
sed\x20in\n\x20`Policy.allowed_values`\x20and\x20`Policy.denied_values`.\
\x20For\x20example,\n\x20`\"in:Python\"`\x20would\x20match\x20any\x20val\
ue\x20in\x20the\x20'Python'\x20group.\n\n\x0e\n\x07\x04\0\x03\0\x02\0\
\x05\x12\x03L\x04\x08\n\x0e\n\x07\x04\0\x03\0\x02\0\x01\x12\x03L\t\x14\n\
\x0e\n\x07\x04\0\x03\0\x02\0\x03\x12\x03L\x17\x18\n\xfb\x01\n\x06\x04\0\
\x03\0\x02\x01\x12\x03R\x04\x1c\x1a\xeb\x01\x20Indicates\x20whether\x20s\
ubtrees\x20of\x20Cloud\x20Resource\x20Manager\x20resource\x20hierarchy\n\
\x20can\x20be\x20used\x20in\x20`Policy.allowed_values`\x20and\x20`Policy\
.denied_values`.\x20For\n\x20example,\x20`\"under:folders/123\"`\x20woul\
d\x20match\x20any\x20resource\x20under\x20the\n\x20'folders/123'\x20fold\
er.\n\n\x0e\n\x07\x04\0\x03\0\x02\x01\x05\x12\x03R\x04\x08\n\x0e\n\x07\
\x04\0\x03\0\x02\x01\x01\x12\x03R\t\x17\n\x0e\n\x07\x04\0\x03\0\x02\x01\
\x03\x12\x03R\x1a\x1b\n\xeb\x01\n\x04\x04\0\x03\x01\x12\x03Z\x02\x1e\x1a\
\xdd\x01\x20A\x20`Constraint`\x20that\x20is\x20either\x20enforced\x20or\
\x20not.\n\n\x20For\x20example\x20a\x20constraint\x20`constraints/comput\
e.disableSerialPortAccess`.\n\x20If\x20it\x20is\x20enforced\x20on\x20a\
\x20VM\x20instance,\x20serial\x20port\x20connections\x20will\x20not\x20b\
e\n\x20opened\x20to\x20that\x20instance.\n\n\x0c\n\x05\x04\0\x03\x01\x01\
\x12\x03Z\n\x1b\n\xea\x02\n\x04\x04\0\x02\0\x12\x03c\x02<\x1a\xdc\x02\
\x20Immutable.\x20The\x20resource\x20name\x20of\x20the\x20Constraint.\
\x20Must\x20be\x20in\x20one\x20of\n\x20the\x20following\x20forms:\n\x20*\
\x20`projects/{project_number}/constraints/{constraint_name}`\n\x20*\x20\
`folders/{folder_id}/constraints/{constraint_name}`\n\x20*\x20`organizat\
ions/{organization_id}/constraints/{constraint_name}`\n\n\x20For\x20exam\
ple,\x20\"/projects/123/constraints/compute.disableSerialPortAccess\".\n\
\n\x0c\n\x05\x04\0\x02\0\x05\x12\x03c\x02\x08\n\x0c\n\x05\x04\0\x02\0\
\x01\x12\x03c\t\r\n\x0c\n\x05\x04\0\x02\0\x03\x12\x03c\x10\x11\n\x0c\n\
\x05\x04\0\x02\0\x08\x12\x03c\x12;\n\x0f\n\x08\x04\0\x02\0\x08\x9c\x08\0\
\x12\x03c\x13:\n2\n\x04\x04\0\x02\x01\x12\x03h\x02\x1a\x1a%\x20The\x20hu\
man\x20readable\x20name.\n\n\x20Mutable.\n\n\x0c\n\x05\x04\0\x02\x01\x05\
\x12\x03h\x02\x08\n\x0c\n\x05\x04\0\x02\x01\x01\x12\x03h\t\x15\n\x0c\n\
\x05\x04\0\x02\x01\x03\x12\x03h\x18\x19\n{\n\x04\x04\0\x02\x02\x12\x03n\
\x02\x19\x1an\x20Detailed\x20description\x20of\x20what\x20this\x20`Const\
raint`\x20controls\x20as\x20well\x20as\x20how\x20and\n\x20where\x20it\
\x20is\x20enforced.\n\n\x20Mutable.\n\n\x0c\n\x05\x04\0\x02\x02\x05\x12\
\x03n\x02\x08\n\x0c\n\x05\x04\0\x02\x02\x01\x12\x03n\t\x14\n\x0c\n\x05\
\x04\0\x02\x02\x03\x12\x03n\x17\x18\nU\n\x04\x04\0\x02\x03\x12\x03q\x02+\
\x1aH\x20The\x20evaluation\x20behavior\x20of\x20this\x20constraint\x20in\
\x20the\x20absence\x20of\x20'Policy'.\n\n\x0c\n\x05\x04\0\x02\x03\x06\
\x12\x03q\x02\x13\n\x0c\n\x05\x04\0\x02\x03\x01\x12\x03q\x14&\n\x0c\n\
\x05\x04\0\x02\x03\x03\x12\x03q)*\n[\n\x04\x04\0\x08\0\x12\x04v\x02|\x03\
\x1aM\x20The\x20type\x20of\x20restrictions\x20for\x20this\x20`Constraint\
`.\n\n\x20Immutable\x20after\x20creation.\n\n\x0c\n\x05\x04\0\x08\0\x01\
\x12\x03v\x08\x17\nA\n\x04\x04\0\x02\x04\x12\x03x\x04'\x1a4\x20Defines\
\x20this\x20constraint\x20as\x20being\x20a\x20ListConstraint.\n\n\x0c\n\
\x05\x04\0\x02\x04\x06\x12\x03x\x04\x12\n\x0c\n\x05\x04\0\x02\x04\x01\
\x12\x03x\x13\"\n\x0c\n\x05\x04\0\x02\x04\x03\x12\x03x%&\nD\n\x04\x04\0\
\x02\x05\x12\x03{\x04-\x1a7\x20Defines\x20this\x20constraint\x20as\x20be\
ing\x20a\x20BooleanConstraint.\n\n\x0c\n\x05\x04\0\x02\x05\x06\x12\x03{\
\x04\x15\n\x0c\n\x05\x04\0\x02\x05\x01\x12\x03{\x16(\n\x0c\n\x05\x04\0\
\x02\x05\x03\x12\x03{+,b\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()
})
}