Class SecurityPolicyRule.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<SecurityPolicyRule.Builder>
com.google.cloud.compute.v1.SecurityPolicyRule.Builder
All Implemented Interfaces:
SecurityPolicyRuleOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
SecurityPolicyRule

public static final class SecurityPolicyRule.Builder extends com.google.protobuf.GeneratedMessage.Builder<SecurityPolicyRule.Builder> implements SecurityPolicyRuleOrBuilder
 Represents a rule that describes one or more match conditions along with
 the action to be taken when traffic matches this condition (allow or deny).
 
Protobuf type google.cloud.compute.v1.SecurityPolicyRule
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<SecurityPolicyRule.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<SecurityPolicyRule.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<SecurityPolicyRule.Builder>
    • getDefaultInstanceForType

      public SecurityPolicyRule getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public SecurityPolicyRule build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public SecurityPolicyRule buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public SecurityPolicyRule.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<SecurityPolicyRule.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<SecurityPolicyRule.Builder>
    • mergeFrom

      public SecurityPolicyRule.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<SecurityPolicyRule.Builder>
      Throws:
      IOException
    • hasAction

      public boolean hasAction()
       The Action to perform when the rule is matched.
       The following are the valid actions:
      
       - allow: allow access to target.
       - deny(STATUS): deny access to target, returns the
       HTTP response code specified. Valid values for `STATUS`
       are 403, 404, and 502.
       - rate_based_ban: limit client traffic to the configured
       threshold and ban the client if the traffic exceeds the threshold.
       Configure parameters for this action in RateLimitOptions. Requires
       rate_limit_options to be set.
       - redirect: redirect to a different target. This can
       either be an internal reCAPTCHA redirect, or an external URL-based
       redirect via a 302 response. Parameters for this action can be configured
       via redirectOptions. This action is only supported in Global Security
       Policies of type CLOUD_ARMOR.
       - throttle: limit
       client traffic to the configured threshold. Configure parameters for this
       action in rateLimitOptions. Requires rate_limit_options to be set for
       this.
       - fairshare (preview only): when traffic reaches the
       threshold limit, requests from the clients matching this rule begin to be
       rate-limited using the Fair Share algorithm. This action is only allowed
       in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
       
      optional string action = 187661878;
      Specified by:
      hasAction in interface SecurityPolicyRuleOrBuilder
      Returns:
      Whether the action field is set.
    • getAction

      public String getAction()
       The Action to perform when the rule is matched.
       The following are the valid actions:
      
       - allow: allow access to target.
       - deny(STATUS): deny access to target, returns the
       HTTP response code specified. Valid values for `STATUS`
       are 403, 404, and 502.
       - rate_based_ban: limit client traffic to the configured
       threshold and ban the client if the traffic exceeds the threshold.
       Configure parameters for this action in RateLimitOptions. Requires
       rate_limit_options to be set.
       - redirect: redirect to a different target. This can
       either be an internal reCAPTCHA redirect, or an external URL-based
       redirect via a 302 response. Parameters for this action can be configured
       via redirectOptions. This action is only supported in Global Security
       Policies of type CLOUD_ARMOR.
       - throttle: limit
       client traffic to the configured threshold. Configure parameters for this
       action in rateLimitOptions. Requires rate_limit_options to be set for
       this.
       - fairshare (preview only): when traffic reaches the
       threshold limit, requests from the clients matching this rule begin to be
       rate-limited using the Fair Share algorithm. This action is only allowed
       in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
       
      optional string action = 187661878;
      Specified by:
      getAction in interface SecurityPolicyRuleOrBuilder
      Returns:
      The action.
    • getActionBytes

      public com.google.protobuf.ByteString getActionBytes()
       The Action to perform when the rule is matched.
       The following are the valid actions:
      
       - allow: allow access to target.
       - deny(STATUS): deny access to target, returns the
       HTTP response code specified. Valid values for `STATUS`
       are 403, 404, and 502.
       - rate_based_ban: limit client traffic to the configured
       threshold and ban the client if the traffic exceeds the threshold.
       Configure parameters for this action in RateLimitOptions. Requires
       rate_limit_options to be set.
       - redirect: redirect to a different target. This can
       either be an internal reCAPTCHA redirect, or an external URL-based
       redirect via a 302 response. Parameters for this action can be configured
       via redirectOptions. This action is only supported in Global Security
       Policies of type CLOUD_ARMOR.
       - throttle: limit
       client traffic to the configured threshold. Configure parameters for this
       action in rateLimitOptions. Requires rate_limit_options to be set for
       this.
       - fairshare (preview only): when traffic reaches the
       threshold limit, requests from the clients matching this rule begin to be
       rate-limited using the Fair Share algorithm. This action is only allowed
       in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
       
      optional string action = 187661878;
      Specified by:
      getActionBytes in interface SecurityPolicyRuleOrBuilder
      Returns:
      The bytes for action.
    • setAction

      public SecurityPolicyRule.Builder setAction(String value)
       The Action to perform when the rule is matched.
       The following are the valid actions:
      
       - allow: allow access to target.
       - deny(STATUS): deny access to target, returns the
       HTTP response code specified. Valid values for `STATUS`
       are 403, 404, and 502.
       - rate_based_ban: limit client traffic to the configured
       threshold and ban the client if the traffic exceeds the threshold.
       Configure parameters for this action in RateLimitOptions. Requires
       rate_limit_options to be set.
       - redirect: redirect to a different target. This can
       either be an internal reCAPTCHA redirect, or an external URL-based
       redirect via a 302 response. Parameters for this action can be configured
       via redirectOptions. This action is only supported in Global Security
       Policies of type CLOUD_ARMOR.
       - throttle: limit
       client traffic to the configured threshold. Configure parameters for this
       action in rateLimitOptions. Requires rate_limit_options to be set for
       this.
       - fairshare (preview only): when traffic reaches the
       threshold limit, requests from the clients matching this rule begin to be
       rate-limited using the Fair Share algorithm. This action is only allowed
       in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
       
      optional string action = 187661878;
      Parameters:
      value - The action to set.
      Returns:
      This builder for chaining.
    • clearAction

      public SecurityPolicyRule.Builder clearAction()
       The Action to perform when the rule is matched.
       The following are the valid actions:
      
       - allow: allow access to target.
       - deny(STATUS): deny access to target, returns the
       HTTP response code specified. Valid values for `STATUS`
       are 403, 404, and 502.
       - rate_based_ban: limit client traffic to the configured
       threshold and ban the client if the traffic exceeds the threshold.
       Configure parameters for this action in RateLimitOptions. Requires
       rate_limit_options to be set.
       - redirect: redirect to a different target. This can
       either be an internal reCAPTCHA redirect, or an external URL-based
       redirect via a 302 response. Parameters for this action can be configured
       via redirectOptions. This action is only supported in Global Security
       Policies of type CLOUD_ARMOR.
       - throttle: limit
       client traffic to the configured threshold. Configure parameters for this
       action in rateLimitOptions. Requires rate_limit_options to be set for
       this.
       - fairshare (preview only): when traffic reaches the
       threshold limit, requests from the clients matching this rule begin to be
       rate-limited using the Fair Share algorithm. This action is only allowed
       in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
       
      optional string action = 187661878;
      Returns:
      This builder for chaining.
    • setActionBytes

      public SecurityPolicyRule.Builder setActionBytes(com.google.protobuf.ByteString value)
       The Action to perform when the rule is matched.
       The following are the valid actions:
      
       - allow: allow access to target.
       - deny(STATUS): deny access to target, returns the
       HTTP response code specified. Valid values for `STATUS`
       are 403, 404, and 502.
       - rate_based_ban: limit client traffic to the configured
       threshold and ban the client if the traffic exceeds the threshold.
       Configure parameters for this action in RateLimitOptions. Requires
       rate_limit_options to be set.
       - redirect: redirect to a different target. This can
       either be an internal reCAPTCHA redirect, or an external URL-based
       redirect via a 302 response. Parameters for this action can be configured
       via redirectOptions. This action is only supported in Global Security
       Policies of type CLOUD_ARMOR.
       - throttle: limit
       client traffic to the configured threshold. Configure parameters for this
       action in rateLimitOptions. Requires rate_limit_options to be set for
       this.
       - fairshare (preview only): when traffic reaches the
       threshold limit, requests from the clients matching this rule begin to be
       rate-limited using the Fair Share algorithm. This action is only allowed
       in security policies of type `CLOUD_ARMOR_INTERNAL_SERVICE`.
       
      optional string action = 187661878;
      Parameters:
      value - The bytes for action to set.
      Returns:
      This builder for chaining.
    • hasDescription

      public boolean hasDescription()
       An optional description of this resource. Provide this property when you
       create the resource.
       
      optional string description = 422937596;
      Specified by:
      hasDescription in interface SecurityPolicyRuleOrBuilder
      Returns:
      Whether the description field is set.
    • getDescription

      public String getDescription()
       An optional description of this resource. Provide this property when you
       create the resource.
       
      optional string description = 422937596;
      Specified by:
      getDescription in interface SecurityPolicyRuleOrBuilder
      Returns:
      The description.
    • getDescriptionBytes

      public com.google.protobuf.ByteString getDescriptionBytes()
       An optional description of this resource. Provide this property when you
       create the resource.
       
      optional string description = 422937596;
      Specified by:
      getDescriptionBytes in interface SecurityPolicyRuleOrBuilder
      Returns:
      The bytes for description.
    • setDescription

      public SecurityPolicyRule.Builder setDescription(String value)
       An optional description of this resource. Provide this property when you
       create the resource.
       
      optional string description = 422937596;
      Parameters:
      value - The description to set.
      Returns:
      This builder for chaining.
    • clearDescription

      public SecurityPolicyRule.Builder clearDescription()
       An optional description of this resource. Provide this property when you
       create the resource.
       
      optional string description = 422937596;
      Returns:
      This builder for chaining.
    • setDescriptionBytes

      public SecurityPolicyRule.Builder setDescriptionBytes(com.google.protobuf.ByteString value)
       An optional description of this resource. Provide this property when you
       create the resource.
       
      optional string description = 422937596;
      Parameters:
      value - The bytes for description to set.
      Returns:
      This builder for chaining.
    • hasHeaderAction

      public boolean hasHeaderAction()
       Optional, additional actions that are performed on headers.
       This field is only supported in Global Security Policies of type
       CLOUD_ARMOR.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderAction header_action = 328077352;
      Specified by:
      hasHeaderAction in interface SecurityPolicyRuleOrBuilder
      Returns:
      Whether the headerAction field is set.
    • getHeaderAction

      public SecurityPolicyRuleHttpHeaderAction getHeaderAction()
       Optional, additional actions that are performed on headers.
       This field is only supported in Global Security Policies of type
       CLOUD_ARMOR.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderAction header_action = 328077352;
      Specified by:
      getHeaderAction in interface SecurityPolicyRuleOrBuilder
      Returns:
      The headerAction.
    • setHeaderAction

       Optional, additional actions that are performed on headers.
       This field is only supported in Global Security Policies of type
       CLOUD_ARMOR.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderAction header_action = 328077352;
    • setHeaderAction

       Optional, additional actions that are performed on headers.
       This field is only supported in Global Security Policies of type
       CLOUD_ARMOR.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderAction header_action = 328077352;
    • mergeHeaderAction

       Optional, additional actions that are performed on headers.
       This field is only supported in Global Security Policies of type
       CLOUD_ARMOR.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderAction header_action = 328077352;
    • clearHeaderAction

      public SecurityPolicyRule.Builder clearHeaderAction()
       Optional, additional actions that are performed on headers.
       This field is only supported in Global Security Policies of type
       CLOUD_ARMOR.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderAction header_action = 328077352;
    • getHeaderActionBuilder

      public SecurityPolicyRuleHttpHeaderAction.Builder getHeaderActionBuilder()
       Optional, additional actions that are performed on headers.
       This field is only supported in Global Security Policies of type
       CLOUD_ARMOR.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderAction header_action = 328077352;
    • getHeaderActionOrBuilder

      public SecurityPolicyRuleHttpHeaderActionOrBuilder getHeaderActionOrBuilder()
       Optional, additional actions that are performed on headers.
       This field is only supported in Global Security Policies of type
       CLOUD_ARMOR.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderAction header_action = 328077352;
      Specified by:
      getHeaderActionOrBuilder in interface SecurityPolicyRuleOrBuilder
    • hasKind

      public boolean hasKind()
       Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
       
      optional string kind = 3292052;
      Specified by:
      hasKind in interface SecurityPolicyRuleOrBuilder
      Returns:
      Whether the kind field is set.
    • getKind

      public String getKind()
       Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
       
      optional string kind = 3292052;
      Specified by:
      getKind in interface SecurityPolicyRuleOrBuilder
      Returns:
      The kind.
    • getKindBytes

      public com.google.protobuf.ByteString getKindBytes()
       Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
       
      optional string kind = 3292052;
      Specified by:
      getKindBytes in interface SecurityPolicyRuleOrBuilder
      Returns:
      The bytes for kind.
    • setKind

      public SecurityPolicyRule.Builder setKind(String value)
       Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
       
      optional string kind = 3292052;
      Parameters:
      value - The kind to set.
      Returns:
      This builder for chaining.
    • clearKind

      public SecurityPolicyRule.Builder clearKind()
       Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
       
      optional string kind = 3292052;
      Returns:
      This builder for chaining.
    • setKindBytes

      public SecurityPolicyRule.Builder setKindBytes(com.google.protobuf.ByteString value)
       Output only. [Output only] Type of the resource. Alwayscompute#securityPolicyRule for security policy rules
       
      optional string kind = 3292052;
      Parameters:
      value - The bytes for kind to set.
      Returns:
      This builder for chaining.
    • hasMatch

      public boolean hasMatch()
       A match condition that incoming traffic is evaluated against.
       If it evaluates to true, the corresponding 'action' is enforced.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleMatcher match = 103668165;
      Specified by:
      hasMatch in interface SecurityPolicyRuleOrBuilder
      Returns:
      Whether the match field is set.
    • getMatch

      public SecurityPolicyRuleMatcher getMatch()
       A match condition that incoming traffic is evaluated against.
       If it evaluates to true, the corresponding 'action' is enforced.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleMatcher match = 103668165;
      Specified by:
      getMatch in interface SecurityPolicyRuleOrBuilder
      Returns:
      The match.
    • setMatch

       A match condition that incoming traffic is evaluated against.
       If it evaluates to true, the corresponding 'action' is enforced.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleMatcher match = 103668165;
    • setMatch

       A match condition that incoming traffic is evaluated against.
       If it evaluates to true, the corresponding 'action' is enforced.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleMatcher match = 103668165;
    • mergeMatch

       A match condition that incoming traffic is evaluated against.
       If it evaluates to true, the corresponding 'action' is enforced.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleMatcher match = 103668165;
    • clearMatch

      public SecurityPolicyRule.Builder clearMatch()
       A match condition that incoming traffic is evaluated against.
       If it evaluates to true, the corresponding 'action' is enforced.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleMatcher match = 103668165;
    • getMatchBuilder

      public SecurityPolicyRuleMatcher.Builder getMatchBuilder()
       A match condition that incoming traffic is evaluated against.
       If it evaluates to true, the corresponding 'action' is enforced.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleMatcher match = 103668165;
    • getMatchOrBuilder

      public SecurityPolicyRuleMatcherOrBuilder getMatchOrBuilder()
       A match condition that incoming traffic is evaluated against.
       If it evaluates to true, the corresponding 'action' is enforced.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleMatcher match = 103668165;
      Specified by:
      getMatchOrBuilder in interface SecurityPolicyRuleOrBuilder
    • hasNetworkMatch

      public boolean hasNetworkMatch()
       A match condition that incoming packets are evaluated against for
       CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
       'action' is enforced.
      
       The match criteria for a rule consists of built-in match fields (like
       'srcIpRanges') and potentially multiple user-defined match fields
       ('userDefinedFields').
      
       Field values may be extracted directly from the packet or derived from it
       (e.g. 'srcRegionCodes'). Some fields may not be present in every packet
       (e.g. 'srcPorts'). A user-defined field is only present if the base
       header is found in the packet and the entire field is in bounds.
      
       Each match field may specify which values can match it, listing one or
       more ranges, prefixes, or exact values that are considered a match for
       the field. A field value must be present in order to match a specified
       match field. If no match values are specified for a match field, then any
       field value is considered to match it, and it's not required to be
       present. For strings specifying '*' is also equivalent to match all.
      
       For a packet to match a rule, all specified match fields must match the
       corresponding field values derived from the packet.
      
       Example:
      
       networkMatch:
       srcIpRanges:
       - "192.0.2.0/24"
       - "198.51.100.0/24"
       userDefinedFields:
       - name: "ipv4_fragment_offset"
       values:
       - "1-0x1fff"
      
       The above match condition matches packets with a source IP in
       192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
       "ipv4_fragment_offset" with a value between 1 and 0x1fff inclusive.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleNetworkMatcher network_match = 463387764;
      Specified by:
      hasNetworkMatch in interface SecurityPolicyRuleOrBuilder
      Returns:
      Whether the networkMatch field is set.
    • getNetworkMatch

      public SecurityPolicyRuleNetworkMatcher getNetworkMatch()
       A match condition that incoming packets are evaluated against for
       CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
       'action' is enforced.
      
       The match criteria for a rule consists of built-in match fields (like
       'srcIpRanges') and potentially multiple user-defined match fields
       ('userDefinedFields').
      
       Field values may be extracted directly from the packet or derived from it
       (e.g. 'srcRegionCodes'). Some fields may not be present in every packet
       (e.g. 'srcPorts'). A user-defined field is only present if the base
       header is found in the packet and the entire field is in bounds.
      
       Each match field may specify which values can match it, listing one or
       more ranges, prefixes, or exact values that are considered a match for
       the field. A field value must be present in order to match a specified
       match field. If no match values are specified for a match field, then any
       field value is considered to match it, and it's not required to be
       present. For strings specifying '*' is also equivalent to match all.
      
       For a packet to match a rule, all specified match fields must match the
       corresponding field values derived from the packet.
      
       Example:
      
       networkMatch:
       srcIpRanges:
       - "192.0.2.0/24"
       - "198.51.100.0/24"
       userDefinedFields:
       - name: "ipv4_fragment_offset"
       values:
       - "1-0x1fff"
      
       The above match condition matches packets with a source IP in
       192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
       "ipv4_fragment_offset" with a value between 1 and 0x1fff inclusive.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleNetworkMatcher network_match = 463387764;
      Specified by:
      getNetworkMatch in interface SecurityPolicyRuleOrBuilder
      Returns:
      The networkMatch.
    • setNetworkMatch

       A match condition that incoming packets are evaluated against for
       CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
       'action' is enforced.
      
       The match criteria for a rule consists of built-in match fields (like
       'srcIpRanges') and potentially multiple user-defined match fields
       ('userDefinedFields').
      
       Field values may be extracted directly from the packet or derived from it
       (e.g. 'srcRegionCodes'). Some fields may not be present in every packet
       (e.g. 'srcPorts'). A user-defined field is only present if the base
       header is found in the packet and the entire field is in bounds.
      
       Each match field may specify which values can match it, listing one or
       more ranges, prefixes, or exact values that are considered a match for
       the field. A field value must be present in order to match a specified
       match field. If no match values are specified for a match field, then any
       field value is considered to match it, and it's not required to be
       present. For strings specifying '*' is also equivalent to match all.
      
       For a packet to match a rule, all specified match fields must match the
       corresponding field values derived from the packet.
      
       Example:
      
       networkMatch:
       srcIpRanges:
       - "192.0.2.0/24"
       - "198.51.100.0/24"
       userDefinedFields:
       - name: "ipv4_fragment_offset"
       values:
       - "1-0x1fff"
      
       The above match condition matches packets with a source IP in
       192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
       "ipv4_fragment_offset" with a value between 1 and 0x1fff inclusive.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleNetworkMatcher network_match = 463387764;
    • setNetworkMatch

      public SecurityPolicyRule.Builder setNetworkMatch(SecurityPolicyRuleNetworkMatcher.Builder builderForValue)
       A match condition that incoming packets are evaluated against for
       CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
       'action' is enforced.
      
       The match criteria for a rule consists of built-in match fields (like
       'srcIpRanges') and potentially multiple user-defined match fields
       ('userDefinedFields').
      
       Field values may be extracted directly from the packet or derived from it
       (e.g. 'srcRegionCodes'). Some fields may not be present in every packet
       (e.g. 'srcPorts'). A user-defined field is only present if the base
       header is found in the packet and the entire field is in bounds.
      
       Each match field may specify which values can match it, listing one or
       more ranges, prefixes, or exact values that are considered a match for
       the field. A field value must be present in order to match a specified
       match field. If no match values are specified for a match field, then any
       field value is considered to match it, and it's not required to be
       present. For strings specifying '*' is also equivalent to match all.
      
       For a packet to match a rule, all specified match fields must match the
       corresponding field values derived from the packet.
      
       Example:
      
       networkMatch:
       srcIpRanges:
       - "192.0.2.0/24"
       - "198.51.100.0/24"
       userDefinedFields:
       - name: "ipv4_fragment_offset"
       values:
       - "1-0x1fff"
      
       The above match condition matches packets with a source IP in
       192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
       "ipv4_fragment_offset" with a value between 1 and 0x1fff inclusive.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleNetworkMatcher network_match = 463387764;
    • mergeNetworkMatch

       A match condition that incoming packets are evaluated against for
       CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
       'action' is enforced.
      
       The match criteria for a rule consists of built-in match fields (like
       'srcIpRanges') and potentially multiple user-defined match fields
       ('userDefinedFields').
      
       Field values may be extracted directly from the packet or derived from it
       (e.g. 'srcRegionCodes'). Some fields may not be present in every packet
       (e.g. 'srcPorts'). A user-defined field is only present if the base
       header is found in the packet and the entire field is in bounds.
      
       Each match field may specify which values can match it, listing one or
       more ranges, prefixes, or exact values that are considered a match for
       the field. A field value must be present in order to match a specified
       match field. If no match values are specified for a match field, then any
       field value is considered to match it, and it's not required to be
       present. For strings specifying '*' is also equivalent to match all.
      
       For a packet to match a rule, all specified match fields must match the
       corresponding field values derived from the packet.
      
       Example:
      
       networkMatch:
       srcIpRanges:
       - "192.0.2.0/24"
       - "198.51.100.0/24"
       userDefinedFields:
       - name: "ipv4_fragment_offset"
       values:
       - "1-0x1fff"
      
       The above match condition matches packets with a source IP in
       192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
       "ipv4_fragment_offset" with a value between 1 and 0x1fff inclusive.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleNetworkMatcher network_match = 463387764;
    • clearNetworkMatch

      public SecurityPolicyRule.Builder clearNetworkMatch()
       A match condition that incoming packets are evaluated against for
       CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
       'action' is enforced.
      
       The match criteria for a rule consists of built-in match fields (like
       'srcIpRanges') and potentially multiple user-defined match fields
       ('userDefinedFields').
      
       Field values may be extracted directly from the packet or derived from it
       (e.g. 'srcRegionCodes'). Some fields may not be present in every packet
       (e.g. 'srcPorts'). A user-defined field is only present if the base
       header is found in the packet and the entire field is in bounds.
      
       Each match field may specify which values can match it, listing one or
       more ranges, prefixes, or exact values that are considered a match for
       the field. A field value must be present in order to match a specified
       match field. If no match values are specified for a match field, then any
       field value is considered to match it, and it's not required to be
       present. For strings specifying '*' is also equivalent to match all.
      
       For a packet to match a rule, all specified match fields must match the
       corresponding field values derived from the packet.
      
       Example:
      
       networkMatch:
       srcIpRanges:
       - "192.0.2.0/24"
       - "198.51.100.0/24"
       userDefinedFields:
       - name: "ipv4_fragment_offset"
       values:
       - "1-0x1fff"
      
       The above match condition matches packets with a source IP in
       192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
       "ipv4_fragment_offset" with a value between 1 and 0x1fff inclusive.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleNetworkMatcher network_match = 463387764;
    • getNetworkMatchBuilder

      public SecurityPolicyRuleNetworkMatcher.Builder getNetworkMatchBuilder()
       A match condition that incoming packets are evaluated against for
       CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
       'action' is enforced.
      
       The match criteria for a rule consists of built-in match fields (like
       'srcIpRanges') and potentially multiple user-defined match fields
       ('userDefinedFields').
      
       Field values may be extracted directly from the packet or derived from it
       (e.g. 'srcRegionCodes'). Some fields may not be present in every packet
       (e.g. 'srcPorts'). A user-defined field is only present if the base
       header is found in the packet and the entire field is in bounds.
      
       Each match field may specify which values can match it, listing one or
       more ranges, prefixes, or exact values that are considered a match for
       the field. A field value must be present in order to match a specified
       match field. If no match values are specified for a match field, then any
       field value is considered to match it, and it's not required to be
       present. For strings specifying '*' is also equivalent to match all.
      
       For a packet to match a rule, all specified match fields must match the
       corresponding field values derived from the packet.
      
       Example:
      
       networkMatch:
       srcIpRanges:
       - "192.0.2.0/24"
       - "198.51.100.0/24"
       userDefinedFields:
       - name: "ipv4_fragment_offset"
       values:
       - "1-0x1fff"
      
       The above match condition matches packets with a source IP in
       192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
       "ipv4_fragment_offset" with a value between 1 and 0x1fff inclusive.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleNetworkMatcher network_match = 463387764;
    • getNetworkMatchOrBuilder

      public SecurityPolicyRuleNetworkMatcherOrBuilder getNetworkMatchOrBuilder()
       A match condition that incoming packets are evaluated against for
       CLOUD_ARMOR_NETWORK security policies. If it matches, the corresponding
       'action' is enforced.
      
       The match criteria for a rule consists of built-in match fields (like
       'srcIpRanges') and potentially multiple user-defined match fields
       ('userDefinedFields').
      
       Field values may be extracted directly from the packet or derived from it
       (e.g. 'srcRegionCodes'). Some fields may not be present in every packet
       (e.g. 'srcPorts'). A user-defined field is only present if the base
       header is found in the packet and the entire field is in bounds.
      
       Each match field may specify which values can match it, listing one or
       more ranges, prefixes, or exact values that are considered a match for
       the field. A field value must be present in order to match a specified
       match field. If no match values are specified for a match field, then any
       field value is considered to match it, and it's not required to be
       present. For strings specifying '*' is also equivalent to match all.
      
       For a packet to match a rule, all specified match fields must match the
       corresponding field values derived from the packet.
      
       Example:
      
       networkMatch:
       srcIpRanges:
       - "192.0.2.0/24"
       - "198.51.100.0/24"
       userDefinedFields:
       - name: "ipv4_fragment_offset"
       values:
       - "1-0x1fff"
      
       The above match condition matches packets with a source IP in
       192.0.2.0/24 or 198.51.100.0/24 and a user-defined field named
       "ipv4_fragment_offset" with a value between 1 and 0x1fff inclusive.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleNetworkMatcher network_match = 463387764;
      Specified by:
      getNetworkMatchOrBuilder in interface SecurityPolicyRuleOrBuilder
    • hasPreconfiguredWafConfig

      public boolean hasPreconfiguredWafConfig()
       Preconfigured WAF configuration to be applied for the rule. If the rule
       does not evaluate preconfigured WAF rules, i.e., if
       evaluatePreconfiguredWaf() is not used, this field will have no effect.
       
      optional .google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfig preconfigured_waf_config = 117805027;
      Specified by:
      hasPreconfiguredWafConfig in interface SecurityPolicyRuleOrBuilder
      Returns:
      Whether the preconfiguredWafConfig field is set.
    • getPreconfiguredWafConfig

      public SecurityPolicyRulePreconfiguredWafConfig getPreconfiguredWafConfig()
       Preconfigured WAF configuration to be applied for the rule. If the rule
       does not evaluate preconfigured WAF rules, i.e., if
       evaluatePreconfiguredWaf() is not used, this field will have no effect.
       
      optional .google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfig preconfigured_waf_config = 117805027;
      Specified by:
      getPreconfiguredWafConfig in interface SecurityPolicyRuleOrBuilder
      Returns:
      The preconfiguredWafConfig.
    • setPreconfiguredWafConfig

      public SecurityPolicyRule.Builder setPreconfiguredWafConfig(SecurityPolicyRulePreconfiguredWafConfig value)
       Preconfigured WAF configuration to be applied for the rule. If the rule
       does not evaluate preconfigured WAF rules, i.e., if
       evaluatePreconfiguredWaf() is not used, this field will have no effect.
       
      optional .google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfig preconfigured_waf_config = 117805027;
    • setPreconfiguredWafConfig

      public SecurityPolicyRule.Builder setPreconfiguredWafConfig(SecurityPolicyRulePreconfiguredWafConfig.Builder builderForValue)
       Preconfigured WAF configuration to be applied for the rule. If the rule
       does not evaluate preconfigured WAF rules, i.e., if
       evaluatePreconfiguredWaf() is not used, this field will have no effect.
       
      optional .google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfig preconfigured_waf_config = 117805027;
    • mergePreconfiguredWafConfig

      public SecurityPolicyRule.Builder mergePreconfiguredWafConfig(SecurityPolicyRulePreconfiguredWafConfig value)
       Preconfigured WAF configuration to be applied for the rule. If the rule
       does not evaluate preconfigured WAF rules, i.e., if
       evaluatePreconfiguredWaf() is not used, this field will have no effect.
       
      optional .google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfig preconfigured_waf_config = 117805027;
    • clearPreconfiguredWafConfig

      public SecurityPolicyRule.Builder clearPreconfiguredWafConfig()
       Preconfigured WAF configuration to be applied for the rule. If the rule
       does not evaluate preconfigured WAF rules, i.e., if
       evaluatePreconfiguredWaf() is not used, this field will have no effect.
       
      optional .google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfig preconfigured_waf_config = 117805027;
    • getPreconfiguredWafConfigBuilder

      public SecurityPolicyRulePreconfiguredWafConfig.Builder getPreconfiguredWafConfigBuilder()
       Preconfigured WAF configuration to be applied for the rule. If the rule
       does not evaluate preconfigured WAF rules, i.e., if
       evaluatePreconfiguredWaf() is not used, this field will have no effect.
       
      optional .google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfig preconfigured_waf_config = 117805027;
    • getPreconfiguredWafConfigOrBuilder

      public SecurityPolicyRulePreconfiguredWafConfigOrBuilder getPreconfiguredWafConfigOrBuilder()
       Preconfigured WAF configuration to be applied for the rule. If the rule
       does not evaluate preconfigured WAF rules, i.e., if
       evaluatePreconfiguredWaf() is not used, this field will have no effect.
       
      optional .google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfig preconfigured_waf_config = 117805027;
      Specified by:
      getPreconfiguredWafConfigOrBuilder in interface SecurityPolicyRuleOrBuilder
    • hasPreview

      public boolean hasPreview()
       If set to true, the specified action is not enforced.
       
      optional bool preview = 218686408;
      Specified by:
      hasPreview in interface SecurityPolicyRuleOrBuilder
      Returns:
      Whether the preview field is set.
    • getPreview

      public boolean getPreview()
       If set to true, the specified action is not enforced.
       
      optional bool preview = 218686408;
      Specified by:
      getPreview in interface SecurityPolicyRuleOrBuilder
      Returns:
      The preview.
    • setPreview

      public SecurityPolicyRule.Builder setPreview(boolean value)
       If set to true, the specified action is not enforced.
       
      optional bool preview = 218686408;
      Parameters:
      value - The preview to set.
      Returns:
      This builder for chaining.
    • clearPreview

      public SecurityPolicyRule.Builder clearPreview()
       If set to true, the specified action is not enforced.
       
      optional bool preview = 218686408;
      Returns:
      This builder for chaining.
    • hasPriority

      public boolean hasPriority()
       An integer indicating the priority of a rule in the list. The priority
       must be a positive value between 0 and 2147483647.
       Rules are evaluated from highest to lowest priority where 0 is the
       highest priority and 2147483647 is the lowest priority.
       
      optional int32 priority = 445151652;
      Specified by:
      hasPriority in interface SecurityPolicyRuleOrBuilder
      Returns:
      Whether the priority field is set.
    • getPriority

      public int getPriority()
       An integer indicating the priority of a rule in the list. The priority
       must be a positive value between 0 and 2147483647.
       Rules are evaluated from highest to lowest priority where 0 is the
       highest priority and 2147483647 is the lowest priority.
       
      optional int32 priority = 445151652;
      Specified by:
      getPriority in interface SecurityPolicyRuleOrBuilder
      Returns:
      The priority.
    • setPriority

      public SecurityPolicyRule.Builder setPriority(int value)
       An integer indicating the priority of a rule in the list. The priority
       must be a positive value between 0 and 2147483647.
       Rules are evaluated from highest to lowest priority where 0 is the
       highest priority and 2147483647 is the lowest priority.
       
      optional int32 priority = 445151652;
      Parameters:
      value - The priority to set.
      Returns:
      This builder for chaining.
    • clearPriority

      public SecurityPolicyRule.Builder clearPriority()
       An integer indicating the priority of a rule in the list. The priority
       must be a positive value between 0 and 2147483647.
       Rules are evaluated from highest to lowest priority where 0 is the
       highest priority and 2147483647 is the lowest priority.
       
      optional int32 priority = 445151652;
      Returns:
      This builder for chaining.
    • hasRateLimitOptions

      public boolean hasRateLimitOptions()
       Must be specified if the action is "rate_based_ban" or "throttle" or
       "fairshare". Cannot be specified for any other actions.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptions rate_limit_options = 67544315;
      Specified by:
      hasRateLimitOptions in interface SecurityPolicyRuleOrBuilder
      Returns:
      Whether the rateLimitOptions field is set.
    • getRateLimitOptions

      public SecurityPolicyRuleRateLimitOptions getRateLimitOptions()
       Must be specified if the action is "rate_based_ban" or "throttle" or
       "fairshare". Cannot be specified for any other actions.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptions rate_limit_options = 67544315;
      Specified by:
      getRateLimitOptions in interface SecurityPolicyRuleOrBuilder
      Returns:
      The rateLimitOptions.
    • setRateLimitOptions

       Must be specified if the action is "rate_based_ban" or "throttle" or
       "fairshare". Cannot be specified for any other actions.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptions rate_limit_options = 67544315;
    • setRateLimitOptions

      public SecurityPolicyRule.Builder setRateLimitOptions(SecurityPolicyRuleRateLimitOptions.Builder builderForValue)
       Must be specified if the action is "rate_based_ban" or "throttle" or
       "fairshare". Cannot be specified for any other actions.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptions rate_limit_options = 67544315;
    • mergeRateLimitOptions

      public SecurityPolicyRule.Builder mergeRateLimitOptions(SecurityPolicyRuleRateLimitOptions value)
       Must be specified if the action is "rate_based_ban" or "throttle" or
       "fairshare". Cannot be specified for any other actions.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptions rate_limit_options = 67544315;
    • clearRateLimitOptions

      public SecurityPolicyRule.Builder clearRateLimitOptions()
       Must be specified if the action is "rate_based_ban" or "throttle" or
       "fairshare". Cannot be specified for any other actions.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptions rate_limit_options = 67544315;
    • getRateLimitOptionsBuilder

      public SecurityPolicyRuleRateLimitOptions.Builder getRateLimitOptionsBuilder()
       Must be specified if the action is "rate_based_ban" or "throttle" or
       "fairshare". Cannot be specified for any other actions.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptions rate_limit_options = 67544315;
    • getRateLimitOptionsOrBuilder

      public SecurityPolicyRuleRateLimitOptionsOrBuilder getRateLimitOptionsOrBuilder()
       Must be specified if the action is "rate_based_ban" or "throttle" or
       "fairshare". Cannot be specified for any other actions.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptions rate_limit_options = 67544315;
      Specified by:
      getRateLimitOptionsOrBuilder in interface SecurityPolicyRuleOrBuilder
    • hasRedirectOptions

      public boolean hasRedirectOptions()
       Parameters defining the redirect action. Cannot be specified for any
       other actions.
       This field is only supported in Global Security Policies of type
       CLOUD_ARMOR.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions redirect_options = 163285307;
      Specified by:
      hasRedirectOptions in interface SecurityPolicyRuleOrBuilder
      Returns:
      Whether the redirectOptions field is set.
    • getRedirectOptions

      public SecurityPolicyRuleRedirectOptions getRedirectOptions()
       Parameters defining the redirect action. Cannot be specified for any
       other actions.
       This field is only supported in Global Security Policies of type
       CLOUD_ARMOR.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions redirect_options = 163285307;
      Specified by:
      getRedirectOptions in interface SecurityPolicyRuleOrBuilder
      Returns:
      The redirectOptions.
    • setRedirectOptions

       Parameters defining the redirect action. Cannot be specified for any
       other actions.
       This field is only supported in Global Security Policies of type
       CLOUD_ARMOR.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions redirect_options = 163285307;
    • setRedirectOptions

      public SecurityPolicyRule.Builder setRedirectOptions(SecurityPolicyRuleRedirectOptions.Builder builderForValue)
       Parameters defining the redirect action. Cannot be specified for any
       other actions.
       This field is only supported in Global Security Policies of type
       CLOUD_ARMOR.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions redirect_options = 163285307;
    • mergeRedirectOptions

       Parameters defining the redirect action. Cannot be specified for any
       other actions.
       This field is only supported in Global Security Policies of type
       CLOUD_ARMOR.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions redirect_options = 163285307;
    • clearRedirectOptions

      public SecurityPolicyRule.Builder clearRedirectOptions()
       Parameters defining the redirect action. Cannot be specified for any
       other actions.
       This field is only supported in Global Security Policies of type
       CLOUD_ARMOR.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions redirect_options = 163285307;
    • getRedirectOptionsBuilder

      public SecurityPolicyRuleRedirectOptions.Builder getRedirectOptionsBuilder()
       Parameters defining the redirect action. Cannot be specified for any
       other actions.
       This field is only supported in Global Security Policies of type
       CLOUD_ARMOR.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions redirect_options = 163285307;
    • getRedirectOptionsOrBuilder

      public SecurityPolicyRuleRedirectOptionsOrBuilder getRedirectOptionsOrBuilder()
       Parameters defining the redirect action. Cannot be specified for any
       other actions.
       This field is only supported in Global Security Policies of type
       CLOUD_ARMOR.
       
      optional .google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions redirect_options = 163285307;
      Specified by:
      getRedirectOptionsOrBuilder in interface SecurityPolicyRuleOrBuilder