#[non_exhaustive]pub struct BinaryAuthorization {
pub breakglass_justification: String,
pub binauthz_method: Option<BinauthzMethod>,
/* private fields */
}Expand description
Settings for Binary Authorization feature.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.breakglass_justification: StringOptional. If present, indicates to use Breakglass using this justification. If use_default is False, then it must be empty. For more information on breakglass, see https://cloud.google.com/binary-authorization/docs/using-breakglass
binauthz_method: Option<BinauthzMethod>Implementations§
Source§impl BinaryAuthorization
impl BinaryAuthorization
pub fn new() -> Self
Sourcepub fn set_breakglass_justification<T: Into<String>>(self, v: T) -> Self
pub fn set_breakglass_justification<T: Into<String>>(self, v: T) -> Self
Sets the value of breakglass_justification.
§Example
let x = BinaryAuthorization::new().set_breakglass_justification("example");Sourcepub fn set_binauthz_method<T: Into<Option<BinauthzMethod>>>(self, v: T) -> Self
pub fn set_binauthz_method<T: Into<Option<BinauthzMethod>>>(self, v: T) -> Self
Sets the value of binauthz_method.
Note that all the setters affecting binauthz_method are mutually
exclusive.
§Example
use google_cloud_run_v2::model::binary_authorization::BinauthzMethod;
let x = BinaryAuthorization::new().set_binauthz_method(Some(BinauthzMethod::UseDefault(true)));Sourcepub fn use_default(&self) -> Option<&bool>
pub fn use_default(&self) -> Option<&bool>
The value of binauthz_method
if it holds a UseDefault, None if the field is not set or
holds a different branch.
Sourcepub fn set_use_default<T: Into<bool>>(self, v: T) -> Self
pub fn set_use_default<T: Into<bool>>(self, v: T) -> Self
Sets the value of binauthz_method
to hold a UseDefault.
Note that all the setters affecting binauthz_method are
mutually exclusive.
§Example
let x = BinaryAuthorization::new().set_use_default(true);
assert!(x.use_default().is_some());
assert!(x.policy().is_none());Sourcepub fn policy(&self) -> Option<&String>
pub fn policy(&self) -> Option<&String>
The value of binauthz_method
if it holds a Policy, None if the field is not set or
holds a different branch.
Sourcepub fn set_policy<T: Into<String>>(self, v: T) -> Self
pub fn set_policy<T: Into<String>>(self, v: T) -> Self
Sets the value of binauthz_method
to hold a Policy.
Note that all the setters affecting binauthz_method are
mutually exclusive.
§Example
let x = BinaryAuthorization::new().set_policy("example");
assert!(x.policy().is_some());
assert!(x.use_default().is_none());Trait Implementations§
Source§impl Clone for BinaryAuthorization
impl Clone for BinaryAuthorization
Source§fn clone(&self) -> BinaryAuthorization
fn clone(&self) -> BinaryAuthorization
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more