#[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
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BinaryAuthorization
impl Debug for BinaryAuthorization
Source§impl Default for BinaryAuthorization
impl Default for BinaryAuthorization
Source§fn default() -> BinaryAuthorization
fn default() -> BinaryAuthorization
Source§impl Message for BinaryAuthorization
impl Message for BinaryAuthorization
Source§impl PartialEq for BinaryAuthorization
impl PartialEq for BinaryAuthorization
impl StructuralPartialEq for BinaryAuthorization
Auto Trait Implementations§
impl Freeze for BinaryAuthorization
impl RefUnwindSafe for BinaryAuthorization
impl Send for BinaryAuthorization
impl Sync for BinaryAuthorization
impl Unpin for BinaryAuthorization
impl UnsafeUnpin for BinaryAuthorization
impl UnwindSafe for BinaryAuthorization
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request