Class GatewaySecurityPolicyRule.Builder

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

public static final class GatewaySecurityPolicyRule.Builder extends com.google.protobuf.GeneratedMessage.Builder<GatewaySecurityPolicyRule.Builder> implements GatewaySecurityPolicyRuleOrBuilder
 The GatewaySecurityPolicyRule resource is in a nested collection within a
 GatewaySecurityPolicy and represents a traffic matching condition and
 associated action to perform.
 
Protobuf type google.cloud.networksecurity.v1.GatewaySecurityPolicyRule
  • 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<GatewaySecurityPolicyRule.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<GatewaySecurityPolicyRule.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<GatewaySecurityPolicyRule.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public GatewaySecurityPolicyRule.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<GatewaySecurityPolicyRule.Builder>
      Throws:
      IOException
    • getProfileCase

      public GatewaySecurityPolicyRule.ProfileCase getProfileCase()
      Specified by:
      getProfileCase in interface GatewaySecurityPolicyRuleOrBuilder
    • clearProfile

      public GatewaySecurityPolicyRule.Builder clearProfile()
    • hasBasicProfile

      public boolean hasBasicProfile()
       Required. Profile which tells what the primitive action should be.
       
      .google.cloud.networksecurity.v1.GatewaySecurityPolicyRule.BasicProfile basic_profile = 9 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasBasicProfile in interface GatewaySecurityPolicyRuleOrBuilder
      Returns:
      Whether the basicProfile field is set.
    • getBasicProfileValue

      public int getBasicProfileValue()
       Required. Profile which tells what the primitive action should be.
       
      .google.cloud.networksecurity.v1.GatewaySecurityPolicyRule.BasicProfile basic_profile = 9 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getBasicProfileValue in interface GatewaySecurityPolicyRuleOrBuilder
      Returns:
      The enum numeric value on the wire for basicProfile.
    • setBasicProfileValue

      public GatewaySecurityPolicyRule.Builder setBasicProfileValue(int value)
       Required. Profile which tells what the primitive action should be.
       
      .google.cloud.networksecurity.v1.GatewaySecurityPolicyRule.BasicProfile basic_profile = 9 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The enum numeric value on the wire for basicProfile to set.
      Returns:
      This builder for chaining.
    • getBasicProfile

      public GatewaySecurityPolicyRule.BasicProfile getBasicProfile()
       Required. Profile which tells what the primitive action should be.
       
      .google.cloud.networksecurity.v1.GatewaySecurityPolicyRule.BasicProfile basic_profile = 9 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getBasicProfile in interface GatewaySecurityPolicyRuleOrBuilder
      Returns:
      The basicProfile.
    • setBasicProfile

       Required. Profile which tells what the primitive action should be.
       
      .google.cloud.networksecurity.v1.GatewaySecurityPolicyRule.BasicProfile basic_profile = 9 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The basicProfile to set.
      Returns:
      This builder for chaining.
    • clearBasicProfile

      public GatewaySecurityPolicyRule.Builder clearBasicProfile()
       Required. Profile which tells what the primitive action should be.
       
      .google.cloud.networksecurity.v1.GatewaySecurityPolicyRule.BasicProfile basic_profile = 9 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • getName

      public String getName()
       Required. Immutable. Name of the resource. ame is the full resource name so
       projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule}
       rule should match the
       pattern: (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getName in interface GatewaySecurityPolicyRuleOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Required. Immutable. Name of the resource. ame is the full resource name so
       projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule}
       rule should match the
       pattern: (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
      Specified by:
      getNameBytes in interface GatewaySecurityPolicyRuleOrBuilder
      Returns:
      The bytes for name.
    • setName

      public GatewaySecurityPolicyRule.Builder setName(String value)
       Required. Immutable. Name of the resource. ame is the full resource name so
       projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule}
       rule should match the
       pattern: (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

       Required. Immutable. Name of the resource. ame is the full resource name so
       projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule}
       rule should match the
       pattern: (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
      Returns:
      This builder for chaining.
    • setNameBytes

      public GatewaySecurityPolicyRule.Builder setNameBytes(com.google.protobuf.ByteString value)
       Required. Immutable. Name of the resource. ame is the full resource name so
       projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule}
       rule should match the
       pattern: (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).
       
      string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • hasCreateTime

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

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

      public GatewaySecurityPolicyRule.Builder setCreateTime(com.google.protobuf.Timestamp value)
       Output only. Time when the rule was created.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setCreateTime

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

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

      public GatewaySecurityPolicyRule.Builder clearCreateTime()
       Output only. Time when the rule was created.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getCreateTimeBuilder

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

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

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

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

      public GatewaySecurityPolicyRule.Builder setUpdateTime(com.google.protobuf.Timestamp value)
       Output only. Time when the rule was updated.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setUpdateTime

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

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

      public GatewaySecurityPolicyRule.Builder clearUpdateTime()
       Output only. Time when the rule was updated.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getUpdateTimeBuilder

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

      public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
       Output only. Time when the rule was updated.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTimeOrBuilder in interface GatewaySecurityPolicyRuleOrBuilder
    • getEnabled

      public boolean getEnabled()
       Required. Whether the rule is enforced.
       
      bool enabled = 4 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getEnabled in interface GatewaySecurityPolicyRuleOrBuilder
      Returns:
      The enabled.
    • setEnabled

      public GatewaySecurityPolicyRule.Builder setEnabled(boolean value)
       Required. Whether the rule is enforced.
       
      bool enabled = 4 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The enabled to set.
      Returns:
      This builder for chaining.
    • clearEnabled

      public GatewaySecurityPolicyRule.Builder clearEnabled()
       Required. Whether the rule is enforced.
       
      bool enabled = 4 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • getPriority

      public int getPriority()
       Required. Priority of the rule.
       Lower number corresponds to higher precedence.
       
      int32 priority = 5 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getPriority in interface GatewaySecurityPolicyRuleOrBuilder
      Returns:
      The priority.
    • setPriority

      public GatewaySecurityPolicyRule.Builder setPriority(int value)
       Required. Priority of the rule.
       Lower number corresponds to higher precedence.
       
      int32 priority = 5 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The priority to set.
      Returns:
      This builder for chaining.
    • clearPriority

      public GatewaySecurityPolicyRule.Builder clearPriority()
       Required. Priority of the rule.
       Lower number corresponds to higher precedence.
       
      int32 priority = 5 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • getDescription

      public String getDescription()
       Optional. Free-text description of the resource.
       
      string description = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDescription in interface GatewaySecurityPolicyRuleOrBuilder
      Returns:
      The description.
    • getDescriptionBytes

      public com.google.protobuf.ByteString getDescriptionBytes()
       Optional. Free-text description of the resource.
       
      string description = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDescriptionBytes in interface GatewaySecurityPolicyRuleOrBuilder
      Returns:
      The bytes for description.
    • setDescription

      public GatewaySecurityPolicyRule.Builder setDescription(String value)
       Optional. Free-text description of the resource.
       
      string description = 6 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The description to set.
      Returns:
      This builder for chaining.
    • clearDescription

      public GatewaySecurityPolicyRule.Builder clearDescription()
       Optional. Free-text description of the resource.
       
      string description = 6 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setDescriptionBytes

      public GatewaySecurityPolicyRule.Builder setDescriptionBytes(com.google.protobuf.ByteString value)
       Optional. Free-text description of the resource.
       
      string description = 6 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for description to set.
      Returns:
      This builder for chaining.
    • getSessionMatcher

      public String getSessionMatcher()
       Required. CEL expression for matching on session criteria.
       
      string session_matcher = 7 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getSessionMatcher in interface GatewaySecurityPolicyRuleOrBuilder
      Returns:
      The sessionMatcher.
    • getSessionMatcherBytes

      public com.google.protobuf.ByteString getSessionMatcherBytes()
       Required. CEL expression for matching on session criteria.
       
      string session_matcher = 7 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getSessionMatcherBytes in interface GatewaySecurityPolicyRuleOrBuilder
      Returns:
      The bytes for sessionMatcher.
    • setSessionMatcher

      public GatewaySecurityPolicyRule.Builder setSessionMatcher(String value)
       Required. CEL expression for matching on session criteria.
       
      string session_matcher = 7 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The sessionMatcher to set.
      Returns:
      This builder for chaining.
    • clearSessionMatcher

      public GatewaySecurityPolicyRule.Builder clearSessionMatcher()
       Required. CEL expression for matching on session criteria.
       
      string session_matcher = 7 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setSessionMatcherBytes

      public GatewaySecurityPolicyRule.Builder setSessionMatcherBytes(com.google.protobuf.ByteString value)
       Required. CEL expression for matching on session criteria.
       
      string session_matcher = 7 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for sessionMatcher to set.
      Returns:
      This builder for chaining.
    • getApplicationMatcher

      public String getApplicationMatcher()
       Optional. CEL expression for matching on L7/application level criteria.
       
      string application_matcher = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getApplicationMatcher in interface GatewaySecurityPolicyRuleOrBuilder
      Returns:
      The applicationMatcher.
    • getApplicationMatcherBytes

      public com.google.protobuf.ByteString getApplicationMatcherBytes()
       Optional. CEL expression for matching on L7/application level criteria.
       
      string application_matcher = 8 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getApplicationMatcherBytes in interface GatewaySecurityPolicyRuleOrBuilder
      Returns:
      The bytes for applicationMatcher.
    • setApplicationMatcher

      public GatewaySecurityPolicyRule.Builder setApplicationMatcher(String value)
       Optional. CEL expression for matching on L7/application level criteria.
       
      string application_matcher = 8 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The applicationMatcher to set.
      Returns:
      This builder for chaining.
    • clearApplicationMatcher

      public GatewaySecurityPolicyRule.Builder clearApplicationMatcher()
       Optional. CEL expression for matching on L7/application level criteria.
       
      string application_matcher = 8 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setApplicationMatcherBytes

      public GatewaySecurityPolicyRule.Builder setApplicationMatcherBytes(com.google.protobuf.ByteString value)
       Optional. CEL expression for matching on L7/application level criteria.
       
      string application_matcher = 8 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for applicationMatcher to set.
      Returns:
      This builder for chaining.
    • getTlsInspectionEnabled

      public boolean getTlsInspectionEnabled()
       Optional. Flag to enable TLS inspection of traffic matching on
       <session_matcher>, can only be true if the parent GatewaySecurityPolicy
       references a TLSInspectionConfig.
       
      bool tls_inspection_enabled = 10 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getTlsInspectionEnabled in interface GatewaySecurityPolicyRuleOrBuilder
      Returns:
      The tlsInspectionEnabled.
    • setTlsInspectionEnabled

      public GatewaySecurityPolicyRule.Builder setTlsInspectionEnabled(boolean value)
       Optional. Flag to enable TLS inspection of traffic matching on
       <session_matcher>, can only be true if the parent GatewaySecurityPolicy
       references a TLSInspectionConfig.
       
      bool tls_inspection_enabled = 10 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The tlsInspectionEnabled to set.
      Returns:
      This builder for chaining.
    • clearTlsInspectionEnabled

      public GatewaySecurityPolicyRule.Builder clearTlsInspectionEnabled()
       Optional. Flag to enable TLS inspection of traffic matching on
       <session_matcher>, can only be true if the parent GatewaySecurityPolicy
       references a TLSInspectionConfig.
       
      bool tls_inspection_enabled = 10 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.