Class AuthzPolicy.Builder

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

public static final class AuthzPolicy.Builder extends com.google.protobuf.GeneratedMessage.Builder<AuthzPolicy.Builder> implements AuthzPolicyOrBuilder
 `AuthzPolicy` is a resource that allows to forward traffic to a
 callout backend designed to scan the traffic for security purposes.
 
Protobuf type google.cloud.networksecurity.v1.AuthzPolicy
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<AuthzPolicy.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<AuthzPolicy.Builder>
    • internalGetFieldAccessorTable

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

      public AuthzPolicy.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<AuthzPolicy.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<AuthzPolicy.Builder>
    • getDefaultInstanceForType

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

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

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

      public AuthzPolicy.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<AuthzPolicy.Builder>
    • mergeFrom

      public AuthzPolicy.Builder mergeFrom(AuthzPolicy other)
    • isInitialized

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

      public AuthzPolicy.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<AuthzPolicy.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       Required. Identifier. Name of the `AuthzPolicy` resource in the following
       format:
       `projects/{project}/locations/{location}/authzPolicies/{authz_policy}`.
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getName in interface AuthzPolicyOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Required. Identifier. Name of the `AuthzPolicy` resource in the following
       format:
       `projects/{project}/locations/{location}/authzPolicies/{authz_policy}`.
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getNameBytes in interface AuthzPolicyOrBuilder
      Returns:
      The bytes for name.
    • setName

      public AuthzPolicy.Builder setName(String value)
       Required. Identifier. Name of the `AuthzPolicy` resource in the following
       format:
       `projects/{project}/locations/{location}/authzPolicies/{authz_policy}`.
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public AuthzPolicy.Builder clearName()
       Required. Identifier. Name of the `AuthzPolicy` resource in the following
       format:
       `projects/{project}/locations/{location}/authzPolicies/{authz_policy}`.
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER];
      Returns:
      This builder for chaining.
    • setNameBytes

      public AuthzPolicy.Builder setNameBytes(com.google.protobuf.ByteString value)
       Required. Identifier. Name of the `AuthzPolicy` resource in the following
       format:
       `projects/{project}/locations/{location}/authzPolicies/{authz_policy}`.
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • hasCreateTime

      public boolean hasCreateTime()
       Output only. The timestamp when the resource was created.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasCreateTime in interface AuthzPolicyOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.Timestamp getCreateTime()
       Output only. The timestamp when the resource was created.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTime in interface AuthzPolicyOrBuilder
      Returns:
      The createTime.
    • setCreateTime

      public AuthzPolicy.Builder setCreateTime(com.google.protobuf.Timestamp value)
       Output only. The timestamp when the resource was created.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setCreateTime

      public AuthzPolicy.Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. The timestamp when the resource was created.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeCreateTime

      public AuthzPolicy.Builder mergeCreateTime(com.google.protobuf.Timestamp value)
       Output only. The timestamp when the resource was created.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearCreateTime

      public AuthzPolicy.Builder clearCreateTime()
       Output only. The timestamp when the resource was created.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeBuilder

      public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
       Output only. The timestamp when the resource was created.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
       Output only. The timestamp when the resource was created.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTimeOrBuilder in interface AuthzPolicyOrBuilder
    • hasUpdateTime

      public boolean hasUpdateTime()
       Output only. The timestamp when the resource was updated.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasUpdateTime in interface AuthzPolicyOrBuilder
      Returns:
      Whether the updateTime field is set.
    • getUpdateTime

      public com.google.protobuf.Timestamp getUpdateTime()
       Output only. The timestamp when the resource was updated.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTime in interface AuthzPolicyOrBuilder
      Returns:
      The updateTime.
    • setUpdateTime

      public AuthzPolicy.Builder setUpdateTime(com.google.protobuf.Timestamp value)
       Output only. The timestamp when the resource was updated.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setUpdateTime

      public AuthzPolicy.Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue)
       Output only. The timestamp when the resource was updated.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeUpdateTime

      public AuthzPolicy.Builder mergeUpdateTime(com.google.protobuf.Timestamp value)
       Output only. The timestamp when the resource was updated.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearUpdateTime

      public AuthzPolicy.Builder clearUpdateTime()
       Output only. The timestamp when the resource was updated.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getUpdateTimeBuilder

      public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder()
       Output only. The timestamp when the resource was updated.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getUpdateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
       Output only. The timestamp when the resource was updated.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTimeOrBuilder in interface AuthzPolicyOrBuilder
    • getDescription

      public String getDescription()
       Optional. A human-readable description of the resource.
       
      string description = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDescription in interface AuthzPolicyOrBuilder
      Returns:
      The description.
    • getDescriptionBytes

      public com.google.protobuf.ByteString getDescriptionBytes()
       Optional. A human-readable description of the resource.
       
      string description = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDescriptionBytes in interface AuthzPolicyOrBuilder
      Returns:
      The bytes for description.
    • setDescription

      public AuthzPolicy.Builder setDescription(String value)
       Optional. A human-readable description of the resource.
       
      string description = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The description to set.
      Returns:
      This builder for chaining.
    • clearDescription

      public AuthzPolicy.Builder clearDescription()
       Optional. A human-readable description of the resource.
       
      string description = 4 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setDescriptionBytes

      public AuthzPolicy.Builder setDescriptionBytes(com.google.protobuf.ByteString value)
       Optional. A human-readable description of the resource.
       
      string description = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for description to set.
      Returns:
      This builder for chaining.
    • getLabelsCount

      public int getLabelsCount()
      Description copied from interface: AuthzPolicyOrBuilder
       Optional. Set of labels associated with the `AuthzPolicy` resource.
      
       The format must comply with [the following
       requirements](/compute/docs/labeling-resources#requirements).
       
      map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsCount in interface AuthzPolicyOrBuilder
    • containsLabels

      public boolean containsLabels(String key)
       Optional. Set of labels associated with the `AuthzPolicy` resource.
      
       The format must comply with [the following
       requirements](/compute/docs/labeling-resources#requirements).
       
      map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      containsLabels in interface AuthzPolicyOrBuilder
    • getLabels

      @Deprecated public Map<String,String> getLabels()
      Deprecated.
      Use getLabelsMap() instead.
      Specified by:
      getLabels in interface AuthzPolicyOrBuilder
    • getLabelsMap

      public Map<String,String> getLabelsMap()
       Optional. Set of labels associated with the `AuthzPolicy` resource.
      
       The format must comply with [the following
       requirements](/compute/docs/labeling-resources#requirements).
       
      map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsMap in interface AuthzPolicyOrBuilder
    • getLabelsOrDefault

      public String getLabelsOrDefault(String key, String defaultValue)
       Optional. Set of labels associated with the `AuthzPolicy` resource.
      
       The format must comply with [the following
       requirements](/compute/docs/labeling-resources#requirements).
       
      map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsOrDefault in interface AuthzPolicyOrBuilder
    • getLabelsOrThrow

      public String getLabelsOrThrow(String key)
       Optional. Set of labels associated with the `AuthzPolicy` resource.
      
       The format must comply with [the following
       requirements](/compute/docs/labeling-resources#requirements).
       
      map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsOrThrow in interface AuthzPolicyOrBuilder
    • clearLabels

      public AuthzPolicy.Builder clearLabels()
    • removeLabels

      public AuthzPolicy.Builder removeLabels(String key)
       Optional. Set of labels associated with the `AuthzPolicy` resource.
      
       The format must comply with [the following
       requirements](/compute/docs/labeling-resources#requirements).
       
      map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];
    • getMutableLabels

      @Deprecated public Map<String,String> getMutableLabels()
      Deprecated.
      Use alternate mutation accessors instead.
    • putLabels

      public AuthzPolicy.Builder putLabels(String key, String value)
       Optional. Set of labels associated with the `AuthzPolicy` resource.
      
       The format must comply with [the following
       requirements](/compute/docs/labeling-resources#requirements).
       
      map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];
    • putAllLabels

      public AuthzPolicy.Builder putAllLabels(Map<String,String> values)
       Optional. Set of labels associated with the `AuthzPolicy` resource.
      
       The format must comply with [the following
       requirements](/compute/docs/labeling-resources#requirements).
       
      map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];
    • hasTarget

      public boolean hasTarget()
       Required. Specifies the set of resources to which this policy should be
       applied to.
       
      .google.cloud.networksecurity.v1.AuthzPolicy.Target target = 6 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasTarget in interface AuthzPolicyOrBuilder
      Returns:
      Whether the target field is set.
    • getTarget

      public AuthzPolicy.Target getTarget()
       Required. Specifies the set of resources to which this policy should be
       applied to.
       
      .google.cloud.networksecurity.v1.AuthzPolicy.Target target = 6 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getTarget in interface AuthzPolicyOrBuilder
      Returns:
      The target.
    • setTarget

      public AuthzPolicy.Builder setTarget(AuthzPolicy.Target value)
       Required. Specifies the set of resources to which this policy should be
       applied to.
       
      .google.cloud.networksecurity.v1.AuthzPolicy.Target target = 6 [(.google.api.field_behavior) = REQUIRED];
    • setTarget

      public AuthzPolicy.Builder setTarget(AuthzPolicy.Target.Builder builderForValue)
       Required. Specifies the set of resources to which this policy should be
       applied to.
       
      .google.cloud.networksecurity.v1.AuthzPolicy.Target target = 6 [(.google.api.field_behavior) = REQUIRED];
    • mergeTarget

      public AuthzPolicy.Builder mergeTarget(AuthzPolicy.Target value)
       Required. Specifies the set of resources to which this policy should be
       applied to.
       
      .google.cloud.networksecurity.v1.AuthzPolicy.Target target = 6 [(.google.api.field_behavior) = REQUIRED];
    • clearTarget

      public AuthzPolicy.Builder clearTarget()
       Required. Specifies the set of resources to which this policy should be
       applied to.
       
      .google.cloud.networksecurity.v1.AuthzPolicy.Target target = 6 [(.google.api.field_behavior) = REQUIRED];
    • getTargetBuilder

      public AuthzPolicy.Target.Builder getTargetBuilder()
       Required. Specifies the set of resources to which this policy should be
       applied to.
       
      .google.cloud.networksecurity.v1.AuthzPolicy.Target target = 6 [(.google.api.field_behavior) = REQUIRED];
    • getTargetOrBuilder

      public AuthzPolicy.TargetOrBuilder getTargetOrBuilder()
       Required. Specifies the set of resources to which this policy should be
       applied to.
       
      .google.cloud.networksecurity.v1.AuthzPolicy.Target target = 6 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getTargetOrBuilder in interface AuthzPolicyOrBuilder
    • getHttpRulesList

      public List<AuthzPolicy.AuthzRule> getHttpRulesList()
       Optional. A list of authorization HTTP rules to match against the incoming
       request. A policy match occurs when at least one HTTP rule matches the
       request or when no HTTP rules are specified in the policy.
       At least one HTTP Rule is required for Allow or Deny Action. Limited
       to 5 rules.
       
      repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule http_rules = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getHttpRulesList in interface AuthzPolicyOrBuilder
    • getHttpRulesCount

      public int getHttpRulesCount()
       Optional. A list of authorization HTTP rules to match against the incoming
       request. A policy match occurs when at least one HTTP rule matches the
       request or when no HTTP rules are specified in the policy.
       At least one HTTP Rule is required for Allow or Deny Action. Limited
       to 5 rules.
       
      repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule http_rules = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getHttpRulesCount in interface AuthzPolicyOrBuilder
    • getHttpRules

      public AuthzPolicy.AuthzRule getHttpRules(int index)
       Optional. A list of authorization HTTP rules to match against the incoming
       request. A policy match occurs when at least one HTTP rule matches the
       request or when no HTTP rules are specified in the policy.
       At least one HTTP Rule is required for Allow or Deny Action. Limited
       to 5 rules.
       
      repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule http_rules = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getHttpRules in interface AuthzPolicyOrBuilder
    • setHttpRules

      public AuthzPolicy.Builder setHttpRules(int index, AuthzPolicy.AuthzRule value)
       Optional. A list of authorization HTTP rules to match against the incoming
       request. A policy match occurs when at least one HTTP rule matches the
       request or when no HTTP rules are specified in the policy.
       At least one HTTP Rule is required for Allow or Deny Action. Limited
       to 5 rules.
       
      repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule http_rules = 7 [(.google.api.field_behavior) = OPTIONAL];
    • setHttpRules

      public AuthzPolicy.Builder setHttpRules(int index, AuthzPolicy.AuthzRule.Builder builderForValue)
       Optional. A list of authorization HTTP rules to match against the incoming
       request. A policy match occurs when at least one HTTP rule matches the
       request or when no HTTP rules are specified in the policy.
       At least one HTTP Rule is required for Allow or Deny Action. Limited
       to 5 rules.
       
      repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule http_rules = 7 [(.google.api.field_behavior) = OPTIONAL];
    • addHttpRules

      public AuthzPolicy.Builder addHttpRules(AuthzPolicy.AuthzRule value)
       Optional. A list of authorization HTTP rules to match against the incoming
       request. A policy match occurs when at least one HTTP rule matches the
       request or when no HTTP rules are specified in the policy.
       At least one HTTP Rule is required for Allow or Deny Action. Limited
       to 5 rules.
       
      repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule http_rules = 7 [(.google.api.field_behavior) = OPTIONAL];
    • addHttpRules

      public AuthzPolicy.Builder addHttpRules(int index, AuthzPolicy.AuthzRule value)
       Optional. A list of authorization HTTP rules to match against the incoming
       request. A policy match occurs when at least one HTTP rule matches the
       request or when no HTTP rules are specified in the policy.
       At least one HTTP Rule is required for Allow or Deny Action. Limited
       to 5 rules.
       
      repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule http_rules = 7 [(.google.api.field_behavior) = OPTIONAL];
    • addHttpRules

      public AuthzPolicy.Builder addHttpRules(AuthzPolicy.AuthzRule.Builder builderForValue)
       Optional. A list of authorization HTTP rules to match against the incoming
       request. A policy match occurs when at least one HTTP rule matches the
       request or when no HTTP rules are specified in the policy.
       At least one HTTP Rule is required for Allow or Deny Action. Limited
       to 5 rules.
       
      repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule http_rules = 7 [(.google.api.field_behavior) = OPTIONAL];
    • addHttpRules

      public AuthzPolicy.Builder addHttpRules(int index, AuthzPolicy.AuthzRule.Builder builderForValue)
       Optional. A list of authorization HTTP rules to match against the incoming
       request. A policy match occurs when at least one HTTP rule matches the
       request or when no HTTP rules are specified in the policy.
       At least one HTTP Rule is required for Allow or Deny Action. Limited
       to 5 rules.
       
      repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule http_rules = 7 [(.google.api.field_behavior) = OPTIONAL];
    • addAllHttpRules

      public AuthzPolicy.Builder addAllHttpRules(Iterable<? extends AuthzPolicy.AuthzRule> values)
       Optional. A list of authorization HTTP rules to match against the incoming
       request. A policy match occurs when at least one HTTP rule matches the
       request or when no HTTP rules are specified in the policy.
       At least one HTTP Rule is required for Allow or Deny Action. Limited
       to 5 rules.
       
      repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule http_rules = 7 [(.google.api.field_behavior) = OPTIONAL];
    • clearHttpRules

      public AuthzPolicy.Builder clearHttpRules()
       Optional. A list of authorization HTTP rules to match against the incoming
       request. A policy match occurs when at least one HTTP rule matches the
       request or when no HTTP rules are specified in the policy.
       At least one HTTP Rule is required for Allow or Deny Action. Limited
       to 5 rules.
       
      repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule http_rules = 7 [(.google.api.field_behavior) = OPTIONAL];
    • removeHttpRules

      public AuthzPolicy.Builder removeHttpRules(int index)
       Optional. A list of authorization HTTP rules to match against the incoming
       request. A policy match occurs when at least one HTTP rule matches the
       request or when no HTTP rules are specified in the policy.
       At least one HTTP Rule is required for Allow or Deny Action. Limited
       to 5 rules.
       
      repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule http_rules = 7 [(.google.api.field_behavior) = OPTIONAL];
    • getHttpRulesBuilder

      public AuthzPolicy.AuthzRule.Builder getHttpRulesBuilder(int index)
       Optional. A list of authorization HTTP rules to match against the incoming
       request. A policy match occurs when at least one HTTP rule matches the
       request or when no HTTP rules are specified in the policy.
       At least one HTTP Rule is required for Allow or Deny Action. Limited
       to 5 rules.
       
      repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule http_rules = 7 [(.google.api.field_behavior) = OPTIONAL];
    • getHttpRulesOrBuilder

      public AuthzPolicy.AuthzRuleOrBuilder getHttpRulesOrBuilder(int index)
       Optional. A list of authorization HTTP rules to match against the incoming
       request. A policy match occurs when at least one HTTP rule matches the
       request or when no HTTP rules are specified in the policy.
       At least one HTTP Rule is required for Allow or Deny Action. Limited
       to 5 rules.
       
      repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule http_rules = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getHttpRulesOrBuilder in interface AuthzPolicyOrBuilder
    • getHttpRulesOrBuilderList

      public List<? extends AuthzPolicy.AuthzRuleOrBuilder> getHttpRulesOrBuilderList()
       Optional. A list of authorization HTTP rules to match against the incoming
       request. A policy match occurs when at least one HTTP rule matches the
       request or when no HTTP rules are specified in the policy.
       At least one HTTP Rule is required for Allow or Deny Action. Limited
       to 5 rules.
       
      repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule http_rules = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getHttpRulesOrBuilderList in interface AuthzPolicyOrBuilder
    • addHttpRulesBuilder

      public AuthzPolicy.AuthzRule.Builder addHttpRulesBuilder()
       Optional. A list of authorization HTTP rules to match against the incoming
       request. A policy match occurs when at least one HTTP rule matches the
       request or when no HTTP rules are specified in the policy.
       At least one HTTP Rule is required for Allow or Deny Action. Limited
       to 5 rules.
       
      repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule http_rules = 7 [(.google.api.field_behavior) = OPTIONAL];
    • addHttpRulesBuilder

      public AuthzPolicy.AuthzRule.Builder addHttpRulesBuilder(int index)
       Optional. A list of authorization HTTP rules to match against the incoming
       request. A policy match occurs when at least one HTTP rule matches the
       request or when no HTTP rules are specified in the policy.
       At least one HTTP Rule is required for Allow or Deny Action. Limited
       to 5 rules.
       
      repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule http_rules = 7 [(.google.api.field_behavior) = OPTIONAL];
    • getHttpRulesBuilderList

      public List<AuthzPolicy.AuthzRule.Builder> getHttpRulesBuilderList()
       Optional. A list of authorization HTTP rules to match against the incoming
       request. A policy match occurs when at least one HTTP rule matches the
       request or when no HTTP rules are specified in the policy.
       At least one HTTP Rule is required for Allow or Deny Action. Limited
       to 5 rules.
       
      repeated .google.cloud.networksecurity.v1.AuthzPolicy.AuthzRule http_rules = 7 [(.google.api.field_behavior) = OPTIONAL];
    • getActionValue

      public int getActionValue()
       Required. Can be one of `ALLOW`, `DENY`, `CUSTOM`.
      
       When the action is `CUSTOM`, `customProvider` must be specified.
      
       When the action is `ALLOW`, only requests matching the policy will
       be allowed.
      
       When the action is `DENY`, only requests matching the policy will be
       denied.
      
       When a request arrives, the policies are evaluated in the following order:
      
       1. If there is a `CUSTOM` policy that matches the request, the `CUSTOM`
       policy is evaluated using the custom authorization providers and the
       request is denied if the provider rejects the request.
      
       2. If there are any `DENY` policies that match the request, the request
       is denied.
      
       3. If there are no `ALLOW` policies for the resource or if any of the
       `ALLOW` policies match the request, the request is allowed.
      
       4. Else the request is denied by default if none of the configured
       AuthzPolicies with `ALLOW` action match the request.
       
      .google.cloud.networksecurity.v1.AuthzPolicy.AuthzAction action = 8 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getActionValue in interface AuthzPolicyOrBuilder
      Returns:
      The enum numeric value on the wire for action.
    • setActionValue

      public AuthzPolicy.Builder setActionValue(int value)
       Required. Can be one of `ALLOW`, `DENY`, `CUSTOM`.
      
       When the action is `CUSTOM`, `customProvider` must be specified.
      
       When the action is `ALLOW`, only requests matching the policy will
       be allowed.
      
       When the action is `DENY`, only requests matching the policy will be
       denied.
      
       When a request arrives, the policies are evaluated in the following order:
      
       1. If there is a `CUSTOM` policy that matches the request, the `CUSTOM`
       policy is evaluated using the custom authorization providers and the
       request is denied if the provider rejects the request.
      
       2. If there are any `DENY` policies that match the request, the request
       is denied.
      
       3. If there are no `ALLOW` policies for the resource or if any of the
       `ALLOW` policies match the request, the request is allowed.
      
       4. Else the request is denied by default if none of the configured
       AuthzPolicies with `ALLOW` action match the request.
       
      .google.cloud.networksecurity.v1.AuthzPolicy.AuthzAction action = 8 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The enum numeric value on the wire for action to set.
      Returns:
      This builder for chaining.
    • getAction

      public AuthzPolicy.AuthzAction getAction()
       Required. Can be one of `ALLOW`, `DENY`, `CUSTOM`.
      
       When the action is `CUSTOM`, `customProvider` must be specified.
      
       When the action is `ALLOW`, only requests matching the policy will
       be allowed.
      
       When the action is `DENY`, only requests matching the policy will be
       denied.
      
       When a request arrives, the policies are evaluated in the following order:
      
       1. If there is a `CUSTOM` policy that matches the request, the `CUSTOM`
       policy is evaluated using the custom authorization providers and the
       request is denied if the provider rejects the request.
      
       2. If there are any `DENY` policies that match the request, the request
       is denied.
      
       3. If there are no `ALLOW` policies for the resource or if any of the
       `ALLOW` policies match the request, the request is allowed.
      
       4. Else the request is denied by default if none of the configured
       AuthzPolicies with `ALLOW` action match the request.
       
      .google.cloud.networksecurity.v1.AuthzPolicy.AuthzAction action = 8 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getAction in interface AuthzPolicyOrBuilder
      Returns:
      The action.
    • setAction

      public AuthzPolicy.Builder setAction(AuthzPolicy.AuthzAction value)
       Required. Can be one of `ALLOW`, `DENY`, `CUSTOM`.
      
       When the action is `CUSTOM`, `customProvider` must be specified.
      
       When the action is `ALLOW`, only requests matching the policy will
       be allowed.
      
       When the action is `DENY`, only requests matching the policy will be
       denied.
      
       When a request arrives, the policies are evaluated in the following order:
      
       1. If there is a `CUSTOM` policy that matches the request, the `CUSTOM`
       policy is evaluated using the custom authorization providers and the
       request is denied if the provider rejects the request.
      
       2. If there are any `DENY` policies that match the request, the request
       is denied.
      
       3. If there are no `ALLOW` policies for the resource or if any of the
       `ALLOW` policies match the request, the request is allowed.
      
       4. Else the request is denied by default if none of the configured
       AuthzPolicies with `ALLOW` action match the request.
       
      .google.cloud.networksecurity.v1.AuthzPolicy.AuthzAction action = 8 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The action to set.
      Returns:
      This builder for chaining.
    • clearAction

      public AuthzPolicy.Builder clearAction()
       Required. Can be one of `ALLOW`, `DENY`, `CUSTOM`.
      
       When the action is `CUSTOM`, `customProvider` must be specified.
      
       When the action is `ALLOW`, only requests matching the policy will
       be allowed.
      
       When the action is `DENY`, only requests matching the policy will be
       denied.
      
       When a request arrives, the policies are evaluated in the following order:
      
       1. If there is a `CUSTOM` policy that matches the request, the `CUSTOM`
       policy is evaluated using the custom authorization providers and the
       request is denied if the provider rejects the request.
      
       2. If there are any `DENY` policies that match the request, the request
       is denied.
      
       3. If there are no `ALLOW` policies for the resource or if any of the
       `ALLOW` policies match the request, the request is allowed.
      
       4. Else the request is denied by default if none of the configured
       AuthzPolicies with `ALLOW` action match the request.
       
      .google.cloud.networksecurity.v1.AuthzPolicy.AuthzAction action = 8 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • hasCustomProvider

      public boolean hasCustomProvider()
       Optional. Required if the action is `CUSTOM`. Allows delegating
       authorization decisions to Cloud IAP or to Service Extensions. One of
       `cloudIap` or `authzExtension` must be specified.
       
      .google.cloud.networksecurity.v1.AuthzPolicy.CustomProvider custom_provider = 10 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasCustomProvider in interface AuthzPolicyOrBuilder
      Returns:
      Whether the customProvider field is set.
    • getCustomProvider

      public AuthzPolicy.CustomProvider getCustomProvider()
       Optional. Required if the action is `CUSTOM`. Allows delegating
       authorization decisions to Cloud IAP or to Service Extensions. One of
       `cloudIap` or `authzExtension` must be specified.
       
      .google.cloud.networksecurity.v1.AuthzPolicy.CustomProvider custom_provider = 10 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getCustomProvider in interface AuthzPolicyOrBuilder
      Returns:
      The customProvider.
    • setCustomProvider

      public AuthzPolicy.Builder setCustomProvider(AuthzPolicy.CustomProvider value)
       Optional. Required if the action is `CUSTOM`. Allows delegating
       authorization decisions to Cloud IAP or to Service Extensions. One of
       `cloudIap` or `authzExtension` must be specified.
       
      .google.cloud.networksecurity.v1.AuthzPolicy.CustomProvider custom_provider = 10 [(.google.api.field_behavior) = OPTIONAL];
    • setCustomProvider

      public AuthzPolicy.Builder setCustomProvider(AuthzPolicy.CustomProvider.Builder builderForValue)
       Optional. Required if the action is `CUSTOM`. Allows delegating
       authorization decisions to Cloud IAP or to Service Extensions. One of
       `cloudIap` or `authzExtension` must be specified.
       
      .google.cloud.networksecurity.v1.AuthzPolicy.CustomProvider custom_provider = 10 [(.google.api.field_behavior) = OPTIONAL];
    • mergeCustomProvider

      public AuthzPolicy.Builder mergeCustomProvider(AuthzPolicy.CustomProvider value)
       Optional. Required if the action is `CUSTOM`. Allows delegating
       authorization decisions to Cloud IAP or to Service Extensions. One of
       `cloudIap` or `authzExtension` must be specified.
       
      .google.cloud.networksecurity.v1.AuthzPolicy.CustomProvider custom_provider = 10 [(.google.api.field_behavior) = OPTIONAL];
    • clearCustomProvider

      public AuthzPolicy.Builder clearCustomProvider()
       Optional. Required if the action is `CUSTOM`. Allows delegating
       authorization decisions to Cloud IAP or to Service Extensions. One of
       `cloudIap` or `authzExtension` must be specified.
       
      .google.cloud.networksecurity.v1.AuthzPolicy.CustomProvider custom_provider = 10 [(.google.api.field_behavior) = OPTIONAL];
    • getCustomProviderBuilder

      public AuthzPolicy.CustomProvider.Builder getCustomProviderBuilder()
       Optional. Required if the action is `CUSTOM`. Allows delegating
       authorization decisions to Cloud IAP or to Service Extensions. One of
       `cloudIap` or `authzExtension` must be specified.
       
      .google.cloud.networksecurity.v1.AuthzPolicy.CustomProvider custom_provider = 10 [(.google.api.field_behavior) = OPTIONAL];
    • getCustomProviderOrBuilder

      public AuthzPolicy.CustomProviderOrBuilder getCustomProviderOrBuilder()
       Optional. Required if the action is `CUSTOM`. Allows delegating
       authorization decisions to Cloud IAP or to Service Extensions. One of
       `cloudIap` or `authzExtension` must be specified.
       
      .google.cloud.networksecurity.v1.AuthzPolicy.CustomProvider custom_provider = 10 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getCustomProviderOrBuilder in interface AuthzPolicyOrBuilder
    • getPolicyProfileValue

      public int getPolicyProfileValue()
       Optional. Immutable. Defines the type of authorization being performed.
       If not specified, `REQUEST_AUTHZ` is applied. This field cannot be changed
       once AuthzPolicy is created.
       
      .google.cloud.networksecurity.v1.AuthzPolicy.PolicyProfile policy_profile = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getPolicyProfileValue in interface AuthzPolicyOrBuilder
      Returns:
      The enum numeric value on the wire for policyProfile.
    • setPolicyProfileValue

      public AuthzPolicy.Builder setPolicyProfileValue(int value)
       Optional. Immutable. Defines the type of authorization being performed.
       If not specified, `REQUEST_AUTHZ` is applied. This field cannot be changed
       once AuthzPolicy is created.
       
      .google.cloud.networksecurity.v1.AuthzPolicy.PolicyProfile policy_profile = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];
      Parameters:
      value - The enum numeric value on the wire for policyProfile to set.
      Returns:
      This builder for chaining.
    • getPolicyProfile

      public AuthzPolicy.PolicyProfile getPolicyProfile()
       Optional. Immutable. Defines the type of authorization being performed.
       If not specified, `REQUEST_AUTHZ` is applied. This field cannot be changed
       once AuthzPolicy is created.
       
      .google.cloud.networksecurity.v1.AuthzPolicy.PolicyProfile policy_profile = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getPolicyProfile in interface AuthzPolicyOrBuilder
      Returns:
      The policyProfile.
    • setPolicyProfile

      public AuthzPolicy.Builder setPolicyProfile(AuthzPolicy.PolicyProfile value)
       Optional. Immutable. Defines the type of authorization being performed.
       If not specified, `REQUEST_AUTHZ` is applied. This field cannot be changed
       once AuthzPolicy is created.
       
      .google.cloud.networksecurity.v1.AuthzPolicy.PolicyProfile policy_profile = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];
      Parameters:
      value - The policyProfile to set.
      Returns:
      This builder for chaining.
    • clearPolicyProfile

      public AuthzPolicy.Builder clearPolicyProfile()
       Optional. Immutable. Defines the type of authorization being performed.
       If not specified, `REQUEST_AUTHZ` is applied. This field cannot be changed
       once AuthzPolicy is created.
       
      .google.cloud.networksecurity.v1.AuthzPolicy.PolicyProfile policy_profile = 11 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE];
      Returns:
      This builder for chaining.