#[non_exhaustive]pub struct CreateGatewaySecurityPolicyRequest {
pub parent: String,
pub gateway_security_policy_id: String,
pub gateway_security_policy: Option<GatewaySecurityPolicy>,
/* private fields */
}Expand description
Request used by the CreateGatewaySecurityPolicy method.
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.parent: StringRequired. The parent resource of the GatewaySecurityPolicy. Must be in the
format projects/{project}/locations/{location}.
gateway_security_policy_id: StringRequired. Short name of the GatewaySecurityPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. “gateway_security_policy1”.
gateway_security_policy: Option<GatewaySecurityPolicy>Required. GatewaySecurityPolicy resource to be created.
Implementations§
Source§impl CreateGatewaySecurityPolicyRequest
impl CreateGatewaySecurityPolicyRequest
pub fn new() -> Self
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_gateway_security_policy_id<T: Into<String>>(self, v: T) -> Self
pub fn set_gateway_security_policy_id<T: Into<String>>(self, v: T) -> Self
Sets the value of gateway_security_policy_id.
§Example
ⓘ
let x = CreateGatewaySecurityPolicyRequest::new().set_gateway_security_policy_id("example");Sourcepub fn set_gateway_security_policy<T>(self, v: T) -> Selfwhere
T: Into<GatewaySecurityPolicy>,
pub fn set_gateway_security_policy<T>(self, v: T) -> Selfwhere
T: Into<GatewaySecurityPolicy>,
Sets the value of gateway_security_policy.
§Example
ⓘ
use google_cloud_networksecurity_v1::model::GatewaySecurityPolicy;
let x = CreateGatewaySecurityPolicyRequest::new().set_gateway_security_policy(GatewaySecurityPolicy::default()/* use setters */);Sourcepub fn set_or_clear_gateway_security_policy<T>(self, v: Option<T>) -> Selfwhere
T: Into<GatewaySecurityPolicy>,
pub fn set_or_clear_gateway_security_policy<T>(self, v: Option<T>) -> Selfwhere
T: Into<GatewaySecurityPolicy>,
Sets or clears the value of gateway_security_policy.
§Example
ⓘ
use google_cloud_networksecurity_v1::model::GatewaySecurityPolicy;
let x = CreateGatewaySecurityPolicyRequest::new().set_or_clear_gateway_security_policy(Some(GatewaySecurityPolicy::default()/* use setters */));
let x = CreateGatewaySecurityPolicyRequest::new().set_or_clear_gateway_security_policy(None::<GatewaySecurityPolicy>);Trait Implementations§
Source§impl Clone for CreateGatewaySecurityPolicyRequest
impl Clone for CreateGatewaySecurityPolicyRequest
Source§fn clone(&self) -> CreateGatewaySecurityPolicyRequest
fn clone(&self) -> CreateGatewaySecurityPolicyRequest
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 CreateGatewaySecurityPolicyRequest
impl Default for CreateGatewaySecurityPolicyRequest
Source§fn default() -> CreateGatewaySecurityPolicyRequest
fn default() -> CreateGatewaySecurityPolicyRequest
Returns the “default value” for a type. Read more
Source§impl PartialEq for CreateGatewaySecurityPolicyRequest
impl PartialEq for CreateGatewaySecurityPolicyRequest
Source§fn eq(&self, other: &CreateGatewaySecurityPolicyRequest) -> bool
fn eq(&self, other: &CreateGatewaySecurityPolicyRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CreateGatewaySecurityPolicyRequest
Auto Trait Implementations§
impl Freeze for CreateGatewaySecurityPolicyRequest
impl RefUnwindSafe for CreateGatewaySecurityPolicyRequest
impl Send for CreateGatewaySecurityPolicyRequest
impl Sync for CreateGatewaySecurityPolicyRequest
impl Unpin for CreateGatewaySecurityPolicyRequest
impl UnsafeUnpin for CreateGatewaySecurityPolicyRequest
impl UnwindSafe for CreateGatewaySecurityPolicyRequest
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