#[non_exhaustive]pub struct FirewallPolicy {Show 17 fields
pub associations: Vec<FirewallPolicyAssociation>,
pub creation_timestamp: Option<String>,
pub description: Option<String>,
pub display_name: Option<String>,
pub fingerprint: Option<Bytes>,
pub id: Option<u64>,
pub kind: Option<String>,
pub name: Option<String>,
pub packet_mirroring_rules: Vec<FirewallPolicyRule>,
pub parent: Option<String>,
pub policy_type: Option<PolicyType>,
pub region: Option<String>,
pub rule_tuple_count: Option<i32>,
pub rules: Vec<FirewallPolicyRule>,
pub self_link: Option<String>,
pub self_link_with_id: Option<String>,
pub short_name: Option<String>,
/* private fields */
}firewall-policies or network-firewall-policies or region-network-firewall-policies only.Expand description
Represents a Firewall Policy resource.
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.associations: Vec<FirewallPolicyAssociation>A list of associations that belong to this firewall policy.
creation_timestamp: Option<String>Output only. [Output Only] Creation timestamp inRFC3339 text format.
description: Option<String>An optional description of this resource. Provide this property when you create the resource.
display_name: Option<String>Deprecated, please use short name instead. User-provided name of the
Organization firewall policy. The name should be unique in the organization
in which the firewall policy is created.
This field is not applicable to network firewall policies.
This name must be set on creation and cannot be changed.
The name must be 1-63 characters long, and comply
with RFC1035. Specifically, the name must be 1-63 characters
long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which
means the first character must be a lowercase letter, and all following
characters must be a dash, lowercase letter, or digit, except the last
character, which cannot be a dash.
fingerprint: Option<Bytes>Specifies a fingerprint for this resource, which is essentially a hash of the metadata’s contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error412 conditionNotMet.
To see the latest fingerprint, make get() request to the firewall policy.
id: Option<u64>[Output Only] The unique identifier for the resource. This identifier is defined by the server.
kind: Option<String>Output only. [Output only] Type of the resource. Alwayscompute#firewallPolicyfor firewall policies
name: Option<String>Name of the resource. For Organization Firewall Policies it’s a [Output Only] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy.
packet_mirroring_rules: Vec<FirewallPolicyRule>A list of packet mirroring rules that belong to this policy.
parent: Option<String>Output only. [Output Only] The parent of the firewall policy. This field is not applicable to network firewall policies.
policy_type: Option<PolicyType>The type of the firewall policy. This field can be eitherVPC_POLICY or RDMA_ROCE_POLICY.
Note: if not specified then VPC_POLICY will be used.
region: Option<String>Output only. [Output Only] URL of the region where the regional firewall policy resides. This field is not applicable to global firewall policies. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
rule_tuple_count: Option<i32>Output only. [Output Only] Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
rules: Vec<FirewallPolicyRule>A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match “*”). If no rules are provided when creating a firewall policy, a default rule with action “allow” will be added.
self_link: Option<String>[Output Only] Server-defined URL for the resource.
self_link_with_id: Option<String>Output only. [Output Only] Server-defined URL for this resource with the resource id.
short_name: Option<String>User-provided name of the Organization firewall policy. The name should be
unique in the organization in which the firewall policy is created.
This field is not applicable to network firewall policies.
This name must be set on creation and cannot be changed. The name must be
1-63 characters long, and comply with RFC1035.
Specifically, the name must be 1-63 characters long and match the regular
expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first
character must be a lowercase letter, and all following characters must
be a dash, lowercase letter, or digit, except the last character, which
cannot be a dash.
Implementations§
Source§impl FirewallPolicy
impl FirewallPolicy
pub fn new() -> Self
Sourcepub fn set_associations<T, V>(self, v: T) -> Self
pub fn set_associations<T, V>(self, v: T) -> Self
Sets the value of associations.
§Example
use google_cloud_compute_v1::model::FirewallPolicyAssociation;
let x = FirewallPolicy::new()
.set_associations([
FirewallPolicyAssociation::default()/* use setters */,
FirewallPolicyAssociation::default()/* use (different) setters */,
]);Sourcepub fn set_creation_timestamp<T>(self, v: T) -> Self
pub fn set_creation_timestamp<T>(self, v: T) -> Self
Sets the value of creation_timestamp.
§Example
let x = FirewallPolicy::new().set_creation_timestamp("example");Sourcepub fn set_or_clear_creation_timestamp<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_creation_timestamp<T>(self, v: Option<T>) -> Self
Sets or clears the value of creation_timestamp.
§Example
let x = FirewallPolicy::new().set_or_clear_creation_timestamp(Some("example"));
let x = FirewallPolicy::new().set_or_clear_creation_timestamp(None::<String>);Sourcepub fn set_description<T>(self, v: T) -> Self
pub fn set_description<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
Sets or clears the value of description.
§Example
let x = FirewallPolicy::new().set_or_clear_description(Some("example"));
let x = FirewallPolicy::new().set_or_clear_description(None::<String>);Sourcepub fn set_display_name<T>(self, v: T) -> Self
👎Deprecated
pub fn set_display_name<T>(self, v: T) -> Self
Sets the value of display_name.
§Example
let x = FirewallPolicy::new().set_display_name("example");Sourcepub fn set_or_clear_display_name<T>(self, v: Option<T>) -> Self
👎Deprecated
pub fn set_or_clear_display_name<T>(self, v: Option<T>) -> Self
Sets or clears the value of display_name.
§Example
let x = FirewallPolicy::new().set_or_clear_display_name(Some("example"));
let x = FirewallPolicy::new().set_or_clear_display_name(None::<String>);Sourcepub fn set_fingerprint<T>(self, v: T) -> Self
pub fn set_fingerprint<T>(self, v: T) -> Self
Sets the value of fingerprint.
§Example
let x = FirewallPolicy::new().set_fingerprint(bytes::Bytes::from_static(b"example"));Sourcepub fn set_or_clear_fingerprint<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_fingerprint<T>(self, v: Option<T>) -> Self
Sets or clears the value of fingerprint.
§Example
let x = FirewallPolicy::new().set_or_clear_fingerprint(Some(bytes::Bytes::from_static(b"example")));
let x = FirewallPolicy::new().set_or_clear_fingerprint(None::<bytes::Bytes>);Sourcepub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
Sourcepub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
Sourcepub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
Sourcepub fn set_packet_mirroring_rules<T, V>(self, v: T) -> Self
pub fn set_packet_mirroring_rules<T, V>(self, v: T) -> Self
Sets the value of packet_mirroring_rules.
§Example
use google_cloud_compute_v1::model::FirewallPolicyRule;
let x = FirewallPolicy::new()
.set_packet_mirroring_rules([
FirewallPolicyRule::default()/* use setters */,
FirewallPolicyRule::default()/* use (different) setters */,
]);Sourcepub fn set_parent<T>(self, v: T) -> Self
pub fn set_parent<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_parent<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_parent<T>(self, v: Option<T>) -> Self
Sourcepub fn set_policy_type<T>(self, v: T) -> Selfwhere
T: Into<PolicyType>,
pub fn set_policy_type<T>(self, v: T) -> Selfwhere
T: Into<PolicyType>,
Sets the value of policy_type.
§Example
use google_cloud_compute_v1::model::firewall_policy::PolicyType;
let x0 = FirewallPolicy::new().set_policy_type(PolicyType::VpcPolicy);Sourcepub fn set_or_clear_policy_type<T>(self, v: Option<T>) -> Selfwhere
T: Into<PolicyType>,
pub fn set_or_clear_policy_type<T>(self, v: Option<T>) -> Selfwhere
T: Into<PolicyType>,
Sets or clears the value of policy_type.
§Example
use google_cloud_compute_v1::model::firewall_policy::PolicyType;
let x0 = FirewallPolicy::new().set_or_clear_policy_type(Some(PolicyType::VpcPolicy));
let x_none = FirewallPolicy::new().set_or_clear_policy_type(None::<PolicyType>);Sourcepub fn set_region<T>(self, v: T) -> Self
pub fn set_region<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_region<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_region<T>(self, v: Option<T>) -> Self
Sourcepub fn set_rule_tuple_count<T>(self, v: T) -> Self
pub fn set_rule_tuple_count<T>(self, v: T) -> Self
Sets the value of rule_tuple_count.
§Example
let x = FirewallPolicy::new().set_rule_tuple_count(42);Sourcepub fn set_or_clear_rule_tuple_count<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_rule_tuple_count<T>(self, v: Option<T>) -> Self
Sets or clears the value of rule_tuple_count.
§Example
let x = FirewallPolicy::new().set_or_clear_rule_tuple_count(Some(42));
let x = FirewallPolicy::new().set_or_clear_rule_tuple_count(None::<i32>);Sourcepub fn set_self_link<T>(self, v: T) -> Self
pub fn set_self_link<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_self_link<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_self_link<T>(self, v: Option<T>) -> Self
Sourcepub fn set_self_link_with_id<T>(self, v: T) -> Self
pub fn set_self_link_with_id<T>(self, v: T) -> Self
Sets the value of self_link_with_id.
§Example
let x = FirewallPolicy::new().set_self_link_with_id("example");Sourcepub fn set_or_clear_self_link_with_id<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_self_link_with_id<T>(self, v: Option<T>) -> Self
Sets or clears the value of self_link_with_id.
§Example
let x = FirewallPolicy::new().set_or_clear_self_link_with_id(Some("example"));
let x = FirewallPolicy::new().set_or_clear_self_link_with_id(None::<String>);Sourcepub fn set_short_name<T>(self, v: T) -> Self
pub fn set_short_name<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_short_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_short_name<T>(self, v: Option<T>) -> Self
Sets or clears the value of short_name.
§Example
let x = FirewallPolicy::new().set_or_clear_short_name(Some("example"));
let x = FirewallPolicy::new().set_or_clear_short_name(None::<String>);Trait Implementations§
Source§impl Clone for FirewallPolicy
impl Clone for FirewallPolicy
Source§fn clone(&self) -> FirewallPolicy
fn clone(&self) -> FirewallPolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more