Class FirewallPolicy.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<FirewallPolicy.Builder>
com.google.recaptchaenterprise.v1.FirewallPolicy.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, FirewallPolicyOrBuilder, Cloneable
Enclosing class:
FirewallPolicy

public static final class FirewallPolicy.Builder extends com.google.protobuf.GeneratedMessage.Builder<FirewallPolicy.Builder> implements FirewallPolicyOrBuilder
 A FirewallPolicy represents a single matching pattern and resulting actions
 to take.
 
Protobuf type google.cloud.recaptchaenterprise.v1.FirewallPolicy
  • 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<FirewallPolicy.Builder>
    • clear

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

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

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

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

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

      public FirewallPolicy.Builder mergeFrom(FirewallPolicy other)
    • isInitialized

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

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

      public String getName()
       Identifier. The resource name for the FirewallPolicy in the format
       `projects/{project}/firewallpolicies/{firewallpolicy}`.
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getName in interface FirewallPolicyOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Identifier. The resource name for the FirewallPolicy in the format
       `projects/{project}/firewallpolicies/{firewallpolicy}`.
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getNameBytes in interface FirewallPolicyOrBuilder
      Returns:
      The bytes for name.
    • setName

      public FirewallPolicy.Builder setName(String value)
       Identifier. The resource name for the FirewallPolicy in the format
       `projects/{project}/firewallpolicies/{firewallpolicy}`.
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public FirewallPolicy.Builder clearName()
       Identifier. The resource name for the FirewallPolicy in the format
       `projects/{project}/firewallpolicies/{firewallpolicy}`.
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Returns:
      This builder for chaining.
    • setNameBytes

      public FirewallPolicy.Builder setNameBytes(com.google.protobuf.ByteString value)
       Identifier. The resource name for the FirewallPolicy in the format
       `projects/{project}/firewallpolicies/{firewallpolicy}`.
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getDescription

      public String getDescription()
       Optional. A description of what this policy aims to achieve, for
       convenience purposes. The description can at most include 256 UTF-8
       characters.
       
      string description = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDescription in interface FirewallPolicyOrBuilder
      Returns:
      The description.
    • getDescriptionBytes

      public com.google.protobuf.ByteString getDescriptionBytes()
       Optional. A description of what this policy aims to achieve, for
       convenience purposes. The description can at most include 256 UTF-8
       characters.
       
      string description = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDescriptionBytes in interface FirewallPolicyOrBuilder
      Returns:
      The bytes for description.
    • setDescription

      public FirewallPolicy.Builder setDescription(String value)
       Optional. A description of what this policy aims to achieve, for
       convenience purposes. The description can at most include 256 UTF-8
       characters.
       
      string description = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The description to set.
      Returns:
      This builder for chaining.
    • clearDescription

      public FirewallPolicy.Builder clearDescription()
       Optional. A description of what this policy aims to achieve, for
       convenience purposes. The description can at most include 256 UTF-8
       characters.
       
      string description = 2 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setDescriptionBytes

      public FirewallPolicy.Builder setDescriptionBytes(com.google.protobuf.ByteString value)
       Optional. A description of what this policy aims to achieve, for
       convenience purposes. The description can at most include 256 UTF-8
       characters.
       
      string description = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for description to set.
      Returns:
      This builder for chaining.
    • getPath

      public String getPath()
       Optional. The path for which this policy applies, specified as a glob
       pattern. For more information on glob, see the [manual
       page](https://man7.org/linux/man-pages/man7/glob.7.html).
       A path has a max length of 200 characters.
       
      string path = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPath in interface FirewallPolicyOrBuilder
      Returns:
      The path.
    • getPathBytes

      public com.google.protobuf.ByteString getPathBytes()
       Optional. The path for which this policy applies, specified as a glob
       pattern. For more information on glob, see the [manual
       page](https://man7.org/linux/man-pages/man7/glob.7.html).
       A path has a max length of 200 characters.
       
      string path = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getPathBytes in interface FirewallPolicyOrBuilder
      Returns:
      The bytes for path.
    • setPath

      public FirewallPolicy.Builder setPath(String value)
       Optional. The path for which this policy applies, specified as a glob
       pattern. For more information on glob, see the [manual
       page](https://man7.org/linux/man-pages/man7/glob.7.html).
       A path has a max length of 200 characters.
       
      string path = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The path to set.
      Returns:
      This builder for chaining.
    • clearPath

      public FirewallPolicy.Builder clearPath()
       Optional. The path for which this policy applies, specified as a glob
       pattern. For more information on glob, see the [manual
       page](https://man7.org/linux/man-pages/man7/glob.7.html).
       A path has a max length of 200 characters.
       
      string path = 4 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setPathBytes

      public FirewallPolicy.Builder setPathBytes(com.google.protobuf.ByteString value)
       Optional. The path for which this policy applies, specified as a glob
       pattern. For more information on glob, see the [manual
       page](https://man7.org/linux/man-pages/man7/glob.7.html).
       A path has a max length of 200 characters.
       
      string path = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for path to set.
      Returns:
      This builder for chaining.
    • getCondition

      public String getCondition()
       Optional. A CEL (Common Expression Language) conditional expression that
       specifies if this policy applies to an incoming user request. If this
       condition evaluates to true and the requested path matched the path
       pattern, the associated actions should be executed by the caller. The
       condition string is checked for CEL syntax correctness on creation. For
       more information, see the [CEL spec](https://github.com/google/cel-spec)
       and its [language
       definition](https://github.com/google/cel-spec/blob/master/doc/langdef.md).
       A condition has a max length of 500 characters.
       
      string condition = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getCondition in interface FirewallPolicyOrBuilder
      Returns:
      The condition.
    • getConditionBytes

      public com.google.protobuf.ByteString getConditionBytes()
       Optional. A CEL (Common Expression Language) conditional expression that
       specifies if this policy applies to an incoming user request. If this
       condition evaluates to true and the requested path matched the path
       pattern, the associated actions should be executed by the caller. The
       condition string is checked for CEL syntax correctness on creation. For
       more information, see the [CEL spec](https://github.com/google/cel-spec)
       and its [language
       definition](https://github.com/google/cel-spec/blob/master/doc/langdef.md).
       A condition has a max length of 500 characters.
       
      string condition = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getConditionBytes in interface FirewallPolicyOrBuilder
      Returns:
      The bytes for condition.
    • setCondition

      public FirewallPolicy.Builder setCondition(String value)
       Optional. A CEL (Common Expression Language) conditional expression that
       specifies if this policy applies to an incoming user request. If this
       condition evaluates to true and the requested path matched the path
       pattern, the associated actions should be executed by the caller. The
       condition string is checked for CEL syntax correctness on creation. For
       more information, see the [CEL spec](https://github.com/google/cel-spec)
       and its [language
       definition](https://github.com/google/cel-spec/blob/master/doc/langdef.md).
       A condition has a max length of 500 characters.
       
      string condition = 5 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The condition to set.
      Returns:
      This builder for chaining.
    • clearCondition

      public FirewallPolicy.Builder clearCondition()
       Optional. A CEL (Common Expression Language) conditional expression that
       specifies if this policy applies to an incoming user request. If this
       condition evaluates to true and the requested path matched the path
       pattern, the associated actions should be executed by the caller. The
       condition string is checked for CEL syntax correctness on creation. For
       more information, see the [CEL spec](https://github.com/google/cel-spec)
       and its [language
       definition](https://github.com/google/cel-spec/blob/master/doc/langdef.md).
       A condition has a max length of 500 characters.
       
      string condition = 5 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setConditionBytes

      public FirewallPolicy.Builder setConditionBytes(com.google.protobuf.ByteString value)
       Optional. A CEL (Common Expression Language) conditional expression that
       specifies if this policy applies to an incoming user request. If this
       condition evaluates to true and the requested path matched the path
       pattern, the associated actions should be executed by the caller. The
       condition string is checked for CEL syntax correctness on creation. For
       more information, see the [CEL spec](https://github.com/google/cel-spec)
       and its [language
       definition](https://github.com/google/cel-spec/blob/master/doc/langdef.md).
       A condition has a max length of 500 characters.
       
      string condition = 5 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for condition to set.
      Returns:
      This builder for chaining.
    • getActionsList

      public List<FirewallAction> getActionsList()
       Optional. The actions that the caller should take regarding user access.
       There should be at most one terminal action. A terminal action is any
       action that forces a response, such as `AllowAction`,
       `BlockAction` or `SubstituteAction`.
       Zero or more non-terminal actions such as `SetHeader` might be
       specified. A single policy can contain up to 16 actions.
       
      repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getActionsList in interface FirewallPolicyOrBuilder
    • getActionsCount

      public int getActionsCount()
       Optional. The actions that the caller should take regarding user access.
       There should be at most one terminal action. A terminal action is any
       action that forces a response, such as `AllowAction`,
       `BlockAction` or `SubstituteAction`.
       Zero or more non-terminal actions such as `SetHeader` might be
       specified. A single policy can contain up to 16 actions.
       
      repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getActionsCount in interface FirewallPolicyOrBuilder
    • getActions

      public FirewallAction getActions(int index)
       Optional. The actions that the caller should take regarding user access.
       There should be at most one terminal action. A terminal action is any
       action that forces a response, such as `AllowAction`,
       `BlockAction` or `SubstituteAction`.
       Zero or more non-terminal actions such as `SetHeader` might be
       specified. A single policy can contain up to 16 actions.
       
      repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getActions in interface FirewallPolicyOrBuilder
    • setActions

      public FirewallPolicy.Builder setActions(int index, FirewallAction value)
       Optional. The actions that the caller should take regarding user access.
       There should be at most one terminal action. A terminal action is any
       action that forces a response, such as `AllowAction`,
       `BlockAction` or `SubstituteAction`.
       Zero or more non-terminal actions such as `SetHeader` might be
       specified. A single policy can contain up to 16 actions.
       
      repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6 [(.google.api.field_behavior) = OPTIONAL];
    • setActions

      public FirewallPolicy.Builder setActions(int index, FirewallAction.Builder builderForValue)
       Optional. The actions that the caller should take regarding user access.
       There should be at most one terminal action. A terminal action is any
       action that forces a response, such as `AllowAction`,
       `BlockAction` or `SubstituteAction`.
       Zero or more non-terminal actions such as `SetHeader` might be
       specified. A single policy can contain up to 16 actions.
       
      repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6 [(.google.api.field_behavior) = OPTIONAL];
    • addActions

      public FirewallPolicy.Builder addActions(FirewallAction value)
       Optional. The actions that the caller should take regarding user access.
       There should be at most one terminal action. A terminal action is any
       action that forces a response, such as `AllowAction`,
       `BlockAction` or `SubstituteAction`.
       Zero or more non-terminal actions such as `SetHeader` might be
       specified. A single policy can contain up to 16 actions.
       
      repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6 [(.google.api.field_behavior) = OPTIONAL];
    • addActions

      public FirewallPolicy.Builder addActions(int index, FirewallAction value)
       Optional. The actions that the caller should take regarding user access.
       There should be at most one terminal action. A terminal action is any
       action that forces a response, such as `AllowAction`,
       `BlockAction` or `SubstituteAction`.
       Zero or more non-terminal actions such as `SetHeader` might be
       specified. A single policy can contain up to 16 actions.
       
      repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6 [(.google.api.field_behavior) = OPTIONAL];
    • addActions

      public FirewallPolicy.Builder addActions(FirewallAction.Builder builderForValue)
       Optional. The actions that the caller should take regarding user access.
       There should be at most one terminal action. A terminal action is any
       action that forces a response, such as `AllowAction`,
       `BlockAction` or `SubstituteAction`.
       Zero or more non-terminal actions such as `SetHeader` might be
       specified. A single policy can contain up to 16 actions.
       
      repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6 [(.google.api.field_behavior) = OPTIONAL];
    • addActions

      public FirewallPolicy.Builder addActions(int index, FirewallAction.Builder builderForValue)
       Optional. The actions that the caller should take regarding user access.
       There should be at most one terminal action. A terminal action is any
       action that forces a response, such as `AllowAction`,
       `BlockAction` or `SubstituteAction`.
       Zero or more non-terminal actions such as `SetHeader` might be
       specified. A single policy can contain up to 16 actions.
       
      repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6 [(.google.api.field_behavior) = OPTIONAL];
    • addAllActions

      public FirewallPolicy.Builder addAllActions(Iterable<? extends FirewallAction> values)
       Optional. The actions that the caller should take regarding user access.
       There should be at most one terminal action. A terminal action is any
       action that forces a response, such as `AllowAction`,
       `BlockAction` or `SubstituteAction`.
       Zero or more non-terminal actions such as `SetHeader` might be
       specified. A single policy can contain up to 16 actions.
       
      repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6 [(.google.api.field_behavior) = OPTIONAL];
    • clearActions

      public FirewallPolicy.Builder clearActions()
       Optional. The actions that the caller should take regarding user access.
       There should be at most one terminal action. A terminal action is any
       action that forces a response, such as `AllowAction`,
       `BlockAction` or `SubstituteAction`.
       Zero or more non-terminal actions such as `SetHeader` might be
       specified. A single policy can contain up to 16 actions.
       
      repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6 [(.google.api.field_behavior) = OPTIONAL];
    • removeActions

      public FirewallPolicy.Builder removeActions(int index)
       Optional. The actions that the caller should take regarding user access.
       There should be at most one terminal action. A terminal action is any
       action that forces a response, such as `AllowAction`,
       `BlockAction` or `SubstituteAction`.
       Zero or more non-terminal actions such as `SetHeader` might be
       specified. A single policy can contain up to 16 actions.
       
      repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6 [(.google.api.field_behavior) = OPTIONAL];
    • getActionsBuilder

      public FirewallAction.Builder getActionsBuilder(int index)
       Optional. The actions that the caller should take regarding user access.
       There should be at most one terminal action. A terminal action is any
       action that forces a response, such as `AllowAction`,
       `BlockAction` or `SubstituteAction`.
       Zero or more non-terminal actions such as `SetHeader` might be
       specified. A single policy can contain up to 16 actions.
       
      repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6 [(.google.api.field_behavior) = OPTIONAL];
    • getActionsOrBuilder

      public FirewallActionOrBuilder getActionsOrBuilder(int index)
       Optional. The actions that the caller should take regarding user access.
       There should be at most one terminal action. A terminal action is any
       action that forces a response, such as `AllowAction`,
       `BlockAction` or `SubstituteAction`.
       Zero or more non-terminal actions such as `SetHeader` might be
       specified. A single policy can contain up to 16 actions.
       
      repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getActionsOrBuilder in interface FirewallPolicyOrBuilder
    • getActionsOrBuilderList

      public List<? extends FirewallActionOrBuilder> getActionsOrBuilderList()
       Optional. The actions that the caller should take regarding user access.
       There should be at most one terminal action. A terminal action is any
       action that forces a response, such as `AllowAction`,
       `BlockAction` or `SubstituteAction`.
       Zero or more non-terminal actions such as `SetHeader` might be
       specified. A single policy can contain up to 16 actions.
       
      repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getActionsOrBuilderList in interface FirewallPolicyOrBuilder
    • addActionsBuilder

      public FirewallAction.Builder addActionsBuilder()
       Optional. The actions that the caller should take regarding user access.
       There should be at most one terminal action. A terminal action is any
       action that forces a response, such as `AllowAction`,
       `BlockAction` or `SubstituteAction`.
       Zero or more non-terminal actions such as `SetHeader` might be
       specified. A single policy can contain up to 16 actions.
       
      repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6 [(.google.api.field_behavior) = OPTIONAL];
    • addActionsBuilder

      public FirewallAction.Builder addActionsBuilder(int index)
       Optional. The actions that the caller should take regarding user access.
       There should be at most one terminal action. A terminal action is any
       action that forces a response, such as `AllowAction`,
       `BlockAction` or `SubstituteAction`.
       Zero or more non-terminal actions such as `SetHeader` might be
       specified. A single policy can contain up to 16 actions.
       
      repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6 [(.google.api.field_behavior) = OPTIONAL];
    • getActionsBuilderList

      public List<FirewallAction.Builder> getActionsBuilderList()
       Optional. The actions that the caller should take regarding user access.
       There should be at most one terminal action. A terminal action is any
       action that forces a response, such as `AllowAction`,
       `BlockAction` or `SubstituteAction`.
       Zero or more non-terminal actions such as `SetHeader` might be
       specified. A single policy can contain up to 16 actions.
       
      repeated .google.cloud.recaptchaenterprise.v1.FirewallAction actions = 6 [(.google.api.field_behavior) = OPTIONAL];