#[non_exhaustive]pub struct ForwardingRuleServiceDirectoryRegistration {
pub namespace: Option<String>,
pub service: Option<String>,
pub service_directory_region: Option<String>,
/* private fields */
}Available on crate features
forwarding-rules or global-forwarding-rules only.Expand description
Describes the auto-registration of the forwarding rule to Service Directory. The region and project of the Service Directory resource generated from this registration will be the same as this forwarding rule.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.namespace: Option<String>Service Directory namespace to register the forwarding rule under.
service: Option<String>Service Directory service to register the forwarding rule under.
service_directory_region: Option<String>[Optional] Service Directory region to register this global forwarding rule under. Default to “us-central1”. Only used for PSC for Google APIs. All PSC for Google APIs forwarding rules on the same network should use the same Service Directory region.
Implementations§
Source§impl ForwardingRuleServiceDirectoryRegistration
impl ForwardingRuleServiceDirectoryRegistration
pub fn new() -> Self
Sourcepub fn set_namespace<T>(self, v: T) -> Self
pub fn set_namespace<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_namespace<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_namespace<T>(self, v: Option<T>) -> Self
Sourcepub fn set_service<T>(self, v: T) -> Self
pub fn set_service<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_service<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_service<T>(self, v: Option<T>) -> Self
Sourcepub fn set_service_directory_region<T>(self, v: T) -> Self
pub fn set_service_directory_region<T>(self, v: T) -> Self
Sets the value of service_directory_region.
§Example
ⓘ
let x = ForwardingRuleServiceDirectoryRegistration::new().set_service_directory_region("example");Sourcepub fn set_or_clear_service_directory_region<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_service_directory_region<T>(self, v: Option<T>) -> Self
Sets or clears the value of service_directory_region.
§Example
ⓘ
let x = ForwardingRuleServiceDirectoryRegistration::new().set_or_clear_service_directory_region(Some("example"));
let x = ForwardingRuleServiceDirectoryRegistration::new().set_or_clear_service_directory_region(None::<String>);Trait Implementations§
Source§impl Clone for ForwardingRuleServiceDirectoryRegistration
impl Clone for ForwardingRuleServiceDirectoryRegistration
Source§fn clone(&self) -> ForwardingRuleServiceDirectoryRegistration
fn clone(&self) -> ForwardingRuleServiceDirectoryRegistration
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for ForwardingRuleServiceDirectoryRegistration
impl Default for ForwardingRuleServiceDirectoryRegistration
Source§fn default() -> ForwardingRuleServiceDirectoryRegistration
fn default() -> ForwardingRuleServiceDirectoryRegistration
Returns the “default value” for a type. Read more
Source§impl PartialEq for ForwardingRuleServiceDirectoryRegistration
impl PartialEq for ForwardingRuleServiceDirectoryRegistration
Source§fn eq(&self, other: &ForwardingRuleServiceDirectoryRegistration) -> bool
fn eq(&self, other: &ForwardingRuleServiceDirectoryRegistration) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ForwardingRuleServiceDirectoryRegistration
Auto Trait Implementations§
impl Freeze for ForwardingRuleServiceDirectoryRegistration
impl RefUnwindSafe for ForwardingRuleServiceDirectoryRegistration
impl Send for ForwardingRuleServiceDirectoryRegistration
impl Sync for ForwardingRuleServiceDirectoryRegistration
impl Unpin for ForwardingRuleServiceDirectoryRegistration
impl UnwindSafe for ForwardingRuleServiceDirectoryRegistration
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
Mutably borrows from an owned value. Read more