Class GatewaySecurityPolicyRule.Builder (0.94.0)

public static final class GatewaySecurityPolicyRule.Builder extends 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

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

build()

public GatewaySecurityPolicyRule build()
Returns
Type Description
GatewaySecurityPolicyRule

buildPartial()

public GatewaySecurityPolicyRule buildPartial()
Returns
Type Description
GatewaySecurityPolicyRule

clear()

public GatewaySecurityPolicyRule.Builder clear()
Returns
Type Description
GatewaySecurityPolicyRule.Builder
Overrides

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
Type Description
GatewaySecurityPolicyRule.Builder

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
Type Description
GatewaySecurityPolicyRule.Builder

This builder for chaining.

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];

Returns
Type Description
GatewaySecurityPolicyRule.Builder

clearDescription()

public GatewaySecurityPolicyRule.Builder clearDescription()

Optional. Free-text description of the resource.

string description = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
GatewaySecurityPolicyRule.Builder

This builder for chaining.

clearEnabled()

public GatewaySecurityPolicyRule.Builder clearEnabled()

Required. Whether the rule is enforced.

bool enabled = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
GatewaySecurityPolicyRule.Builder

This builder for chaining.

clearName()

public GatewaySecurityPolicyRule.Builder 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?$).

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
GatewaySecurityPolicyRule.Builder

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
Type Description
GatewaySecurityPolicyRule.Builder

This builder for chaining.

clearProfile()

public GatewaySecurityPolicyRule.Builder clearProfile()
Returns
Type Description
GatewaySecurityPolicyRule.Builder

clearSessionMatcher()

public GatewaySecurityPolicyRule.Builder clearSessionMatcher()

Required. CEL expression for matching on session criteria.

string session_matcher = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
GatewaySecurityPolicyRule.Builder

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
Type Description
GatewaySecurityPolicyRule.Builder

This builder for chaining.

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];

Returns
Type Description
GatewaySecurityPolicyRule.Builder

getApplicationMatcher()

public String getApplicationMatcher()

Optional. CEL expression for matching on L7/application level criteria.

string application_matcher = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The applicationMatcher.

getApplicationMatcherBytes()

public ByteString getApplicationMatcherBytes()

Optional. CEL expression for matching on L7/application level criteria.

string application_matcher = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for applicationMatcher.

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];

Returns
Type Description
GatewaySecurityPolicyRule.BasicProfile

The basicProfile.

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];

Returns
Type Description
int

The enum numeric value on the wire for basicProfile.

getCreateTime()

public Timestamp getCreateTime()

Output only. Time when the rule was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. Time when the rule was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Time when the rule was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

public GatewaySecurityPolicyRule getDefaultInstanceForType()
Returns
Type Description
GatewaySecurityPolicyRule

getDescription()

public String getDescription()

Optional. Free-text description of the resource.

string description = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. Free-text description of the resource.

string description = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getEnabled()

public boolean getEnabled()

Required. Whether the rule is enforced.

bool enabled = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

The enabled.

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?$).

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
String

The name.

getNameBytes()

public 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?$).

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Returns
Type Description
ByteString

The bytes for name.

getPriority()

public int getPriority()

Required. Priority of the rule. Lower number corresponds to higher precedence.

int32 priority = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The priority.

getProfileCase()

public GatewaySecurityPolicyRule.ProfileCase getProfileCase()
Returns
Type Description
GatewaySecurityPolicyRule.ProfileCase

getSessionMatcher()

public String getSessionMatcher()

Required. CEL expression for matching on session criteria.

string session_matcher = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The sessionMatcher.

getSessionMatcherBytes()

public ByteString getSessionMatcherBytes()

Required. CEL expression for matching on session criteria.

string session_matcher = 7 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for sessionMatcher.

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];

Returns
Type Description
boolean

The tlsInspectionEnabled.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. Time when the rule was updated.

.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Output only. Time when the rule was updated.

.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. Time when the rule was updated.

.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

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];

Returns
Type Description
boolean

Whether the basicProfile field is set.

hasCreateTime()

public boolean hasCreateTime()

Output only. Time when the rule was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. Time when the rule was updated.

.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCreateTime(Timestamp value)

public GatewaySecurityPolicyRule.Builder mergeCreateTime(Timestamp value)

Output only. Time when the rule was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
GatewaySecurityPolicyRule.Builder

mergeFrom(GatewaySecurityPolicyRule other)

public GatewaySecurityPolicyRule.Builder mergeFrom(GatewaySecurityPolicyRule other)
Parameter
Name Description
other GatewaySecurityPolicyRule
Returns
Type Description
GatewaySecurityPolicyRule.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public GatewaySecurityPolicyRule.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GatewaySecurityPolicyRule.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public GatewaySecurityPolicyRule.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
GatewaySecurityPolicyRule.Builder
Overrides

mergeUpdateTime(Timestamp value)

public GatewaySecurityPolicyRule.Builder mergeUpdateTime(Timestamp value)

Output only. Time when the rule was updated.

.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
GatewaySecurityPolicyRule.Builder

setApplicationMatcher(String value)

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];

Parameter
Name Description
value String

The applicationMatcher to set.

Returns
Type Description
GatewaySecurityPolicyRule.Builder

This builder for chaining.

setApplicationMatcherBytes(ByteString value)

public GatewaySecurityPolicyRule.Builder setApplicationMatcherBytes(ByteString value)

Optional. CEL expression for matching on L7/application level criteria.

string application_matcher = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for applicationMatcher to set.

Returns
Type Description
GatewaySecurityPolicyRule.Builder

This builder for chaining.

setBasicProfile(GatewaySecurityPolicyRule.BasicProfile value)

public GatewaySecurityPolicyRule.Builder setBasicProfile(GatewaySecurityPolicyRule.BasicProfile 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];

Parameter
Name Description
value GatewaySecurityPolicyRule.BasicProfile

The basicProfile to set.

Returns
Type Description
GatewaySecurityPolicyRule.Builder

This builder for chaining.

setBasicProfileValue(int value)

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];

Parameter
Name Description
value int

The enum numeric value on the wire for basicProfile to set.

Returns
Type Description
GatewaySecurityPolicyRule.Builder

This builder for chaining.

setCreateTime(Timestamp value)

public GatewaySecurityPolicyRule.Builder setCreateTime(Timestamp value)

Output only. Time when the rule was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
GatewaySecurityPolicyRule.Builder

setCreateTime(Timestamp.Builder builderForValue)

public GatewaySecurityPolicyRule.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. Time when the rule was created.

.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
GatewaySecurityPolicyRule.Builder

setDescription(String value)

public GatewaySecurityPolicyRule.Builder setDescription(String value)

Optional. Free-text description of the resource.

string description = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The description to set.

Returns
Type Description
GatewaySecurityPolicyRule.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public GatewaySecurityPolicyRule.Builder setDescriptionBytes(ByteString value)

Optional. Free-text description of the resource.

string description = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
GatewaySecurityPolicyRule.Builder

This builder for chaining.

setEnabled(boolean value)

public GatewaySecurityPolicyRule.Builder setEnabled(boolean value)

Required. Whether the rule is enforced.

bool enabled = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value boolean

The enabled to set.

Returns
Type Description
GatewaySecurityPolicyRule.Builder

This builder for chaining.

setName(String value)

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?$).

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
GatewaySecurityPolicyRule.Builder

This builder for chaining.

setNameBytes(ByteString value)

public GatewaySecurityPolicyRule.Builder setNameBytes(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?$).

string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
GatewaySecurityPolicyRule.Builder

This builder for chaining.

setPriority(int value)

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];

Parameter
Name Description
value int

The priority to set.

Returns
Type Description
GatewaySecurityPolicyRule.Builder

This builder for chaining.

setSessionMatcher(String value)

public GatewaySecurityPolicyRule.Builder setSessionMatcher(String value)

Required. CEL expression for matching on session criteria.

string session_matcher = 7 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The sessionMatcher to set.

Returns
Type Description
GatewaySecurityPolicyRule.Builder

This builder for chaining.

setSessionMatcherBytes(ByteString value)

public GatewaySecurityPolicyRule.Builder setSessionMatcherBytes(ByteString value)

Required. CEL expression for matching on session criteria.

string session_matcher = 7 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for sessionMatcher to set.

Returns
Type Description
GatewaySecurityPolicyRule.Builder

This builder for chaining.

setTlsInspectionEnabled(boolean value)

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];

Parameter
Name Description
value boolean

The tlsInspectionEnabled to set.

Returns
Type Description
GatewaySecurityPolicyRule.Builder

This builder for chaining.

setUpdateTime(Timestamp value)

public GatewaySecurityPolicyRule.Builder setUpdateTime(Timestamp value)

Output only. Time when the rule was updated.

.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
GatewaySecurityPolicyRule.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public GatewaySecurityPolicyRule.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. Time when the rule was updated.

.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
GatewaySecurityPolicyRule.Builder