Class AuthorizationPolicy.Builder (0.67.0)

publicstaticfinalclass AuthorizationPolicy.BuilderextendsGeneratedMessageV3.Builder<AuthorizationPolicy.Builder>implementsAuthorizationPolicyOrBuilder

AuthorizationPolicy is a resource that specifies how a server should authorize incoming connections. This resource in itself does not change the configuration unless it's attached to a target https proxy or endpoint config selector resource.

Protobuf type google.cloud.networksecurity.v1.AuthorizationPolicy

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

Methods

addAllRules(Iterable<? extends AuthorizationPolicy.Rule> values)

publicAuthorizationPolicy.BuilderaddAllRules(Iterable<?extendsAuthorizationPolicy.Rule>values)

Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the action field will be applied on every request.

repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<? extends com.google.cloud.networksecurity.v1.AuthorizationPolicy.Rule>
Returns
Type Description
AuthorizationPolicy.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicAuthorizationPolicy.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AuthorizationPolicy.Builder
Overrides

addRules(AuthorizationPolicy.Rule value)

publicAuthorizationPolicy.BuilderaddRules(AuthorizationPolicy.Rulevalue)

Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the action field will be applied on every request.

repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value AuthorizationPolicy.Rule
Returns
Type Description
AuthorizationPolicy.Builder

addRules(AuthorizationPolicy.Rule.Builder builderForValue)

publicAuthorizationPolicy.BuilderaddRules(AuthorizationPolicy.Rule.BuilderbuilderForValue)

Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the action field will be applied on every request.

repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue AuthorizationPolicy.Rule.Builder
Returns
Type Description
AuthorizationPolicy.Builder

addRules(int index, AuthorizationPolicy.Rule value)

publicAuthorizationPolicy.BuilderaddRules(intindex,AuthorizationPolicy.Rulevalue)

Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the action field will be applied on every request.

repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value AuthorizationPolicy.Rule
Returns
Type Description
AuthorizationPolicy.Builder

addRules(int index, AuthorizationPolicy.Rule.Builder builderForValue)

publicAuthorizationPolicy.BuilderaddRules(intindex,AuthorizationPolicy.Rule.BuilderbuilderForValue)

Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the action field will be applied on every request.

repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue AuthorizationPolicy.Rule.Builder
Returns
Type Description
AuthorizationPolicy.Builder

addRulesBuilder()

publicAuthorizationPolicy.Rule.BuilderaddRulesBuilder()

Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the action field will be applied on every request.

repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AuthorizationPolicy.Rule.Builder

addRulesBuilder(int index)

publicAuthorizationPolicy.Rule.BuilderaddRulesBuilder(intindex)

Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the action field will be applied on every request.

repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AuthorizationPolicy.Rule.Builder

build()

publicAuthorizationPolicybuild()
Returns
Type Description
AuthorizationPolicy

buildPartial()

publicAuthorizationPolicybuildPartial()
Returns
Type Description
AuthorizationPolicy

clear()

publicAuthorizationPolicy.Builderclear()
Returns
Type Description
AuthorizationPolicy.Builder
Overrides

clearAction()

publicAuthorizationPolicy.BuilderclearAction()

Required. The action to take when a rule match is found. Possible values are "ALLOW" or "DENY".

.google.cloud.networksecurity.v1.AuthorizationPolicy.Action action = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
AuthorizationPolicy.Builder

This builder for chaining.

clearCreateTime()

publicAuthorizationPolicy.BuilderclearCreateTime()

Output only. The timestamp when the resource was created.

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

Returns
Type Description
AuthorizationPolicy.Builder

clearDescription()

publicAuthorizationPolicy.BuilderclearDescription()

Optional. Free-text description of the resource.

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

Returns
Type Description
AuthorizationPolicy.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

publicAuthorizationPolicy.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
AuthorizationPolicy.Builder
Overrides

clearLabels()

publicAuthorizationPolicy.BuilderclearLabels()
Returns
Type Description
AuthorizationPolicy.Builder

clearName()

publicAuthorizationPolicy.BuilderclearName()

Required. Name of the AuthorizationPolicy resource. It matches pattern projects/{project}/locations/{location}/authorizationPolicies/<authorization_policy>.

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

Returns
Type Description
AuthorizationPolicy.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

publicAuthorizationPolicy.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
AuthorizationPolicy.Builder
Overrides

clearRules()

publicAuthorizationPolicy.BuilderclearRules()

Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the action field will be applied on every request.

repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AuthorizationPolicy.Builder

clearUpdateTime()

publicAuthorizationPolicy.BuilderclearUpdateTime()

Output only. The timestamp when the resource was updated.

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

Returns
Type Description
AuthorizationPolicy.Builder

clone()

publicAuthorizationPolicy.Builderclone()
Returns
Type Description
AuthorizationPolicy.Builder
Overrides

containsLabels(String key)

publicbooleancontainsLabels(Stringkey)

Optional. Set of label tags associated with the AuthorizationPolicy resource.

map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

getAction()

publicAuthorizationPolicy.ActiongetAction()

Required. The action to take when a rule match is found. Possible values are "ALLOW" or "DENY".

.google.cloud.networksecurity.v1.AuthorizationPolicy.Action action = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
AuthorizationPolicy.Action

The action.

getActionValue()

publicintgetActionValue()

Required. The action to take when a rule match is found. Possible values are "ALLOW" or "DENY".

.google.cloud.networksecurity.v1.AuthorizationPolicy.Action action = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for action.

getCreateTime()

publicTimestampgetCreateTime()

Output only. The timestamp when the resource was created.

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

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

publicTimestamp.BuildergetCreateTimeBuilder()

Output only. The timestamp when the resource was created.

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

Returns
Type Description
Builder

getCreateTimeOrBuilder()

publicTimestampOrBuildergetCreateTimeOrBuilder()

Output only. The timestamp when the resource was created.

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

Returns
Type Description
TimestampOrBuilder

getDefaultInstanceForType()

publicAuthorizationPolicygetDefaultInstanceForType()
Returns
Type Description
AuthorizationPolicy

getDescription()

publicStringgetDescription()

Optional. Free-text description of the resource.

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

Returns
Type Description
String

The description.

getDescriptionBytes()

publicByteStringgetDescriptionBytes()

Optional. Free-text description of the resource.

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

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getLabels() (deprecated)

publicMap<String,String>getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

publicintgetLabelsCount()

Optional. Set of label tags associated with the AuthorizationPolicy resource.

map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getLabelsMap()

publicMap<String,String>getLabelsMap()

Optional. Set of label tags associated with the AuthorizationPolicy resource.

map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

publicStringgetLabelsOrDefault(Stringkey,StringdefaultValue)

Optional. Set of label tags associated with the AuthorizationPolicy resource.

map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

publicStringgetLabelsOrThrow(Stringkey)

Optional. Set of label tags associated with the AuthorizationPolicy resource.

map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
String

getMutableLabels() (deprecated)

publicMap<String,String>getMutableLabels()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getName()

publicStringgetName()

Required. Name of the AuthorizationPolicy resource. It matches pattern projects/{project}/locations/{location}/authorizationPolicies/<authorization_policy>.

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

Returns
Type Description
String

The name.

getNameBytes()

publicByteStringgetNameBytes()

Required. Name of the AuthorizationPolicy resource. It matches pattern projects/{project}/locations/{location}/authorizationPolicies/<authorization_policy>.

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

Returns
Type Description
ByteString

The bytes for name.

getRules(int index)

publicAuthorizationPolicy.RulegetRules(intindex)

Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the action field will be applied on every request.

repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AuthorizationPolicy.Rule

getRulesBuilder(int index)

publicAuthorizationPolicy.Rule.BuildergetRulesBuilder(intindex)

Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the action field will be applied on every request.

repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AuthorizationPolicy.Rule.Builder

getRulesBuilderList()

publicList<AuthorizationPolicy.Rule.Builder>getRulesBuilderList()

Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the action field will be applied on every request.

repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Builder>

getRulesCount()

publicintgetRulesCount()

Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the action field will be applied on every request.

repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getRulesList()

publicList<AuthorizationPolicy.Rule>getRulesList()

Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the action field will be applied on every request.

repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Rule>

getRulesOrBuilder(int index)

publicAuthorizationPolicy.RuleOrBuildergetRulesOrBuilder(intindex)

Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the action field will be applied on every request.

repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AuthorizationPolicy.RuleOrBuilder

getRulesOrBuilderList()

publicList<?extendsAuthorizationPolicy.RuleOrBuilder>getRulesOrBuilderList()

Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the action field will be applied on every request.

repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.cloud.networksecurity.v1.AuthorizationPolicy.RuleOrBuilder>

getUpdateTime()

publicTimestampgetUpdateTime()

Output only. The timestamp when the resource was updated.

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

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

publicTimestamp.BuildergetUpdateTimeBuilder()

Output only. The timestamp when the resource was updated.

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

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

publicTimestampOrBuildergetUpdateTimeOrBuilder()

Output only. The timestamp when the resource was updated.

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

Returns
Type Description
TimestampOrBuilder

hasCreateTime()

publicbooleanhasCreateTime()

Output only. The timestamp when the resource was created.

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

Returns
Type Description
boolean

Whether the createTime field is set.

hasUpdateTime()

publicbooleanhasUpdateTime()

Output only. The timestamp when the resource was updated.

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

Returns
Type Description
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protectedMapFieldReflectionAccessorinternalGetMapFieldReflection(intnumber)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protectedMapFieldReflectionAccessorinternalGetMutableMapFieldReflection(intnumber)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeCreateTime(Timestamp value)

publicAuthorizationPolicy.BuildermergeCreateTime(Timestampvalue)

Output only. The timestamp when the resource was created.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
AuthorizationPolicy.Builder

mergeFrom(AuthorizationPolicy other)

publicAuthorizationPolicy.BuildermergeFrom(AuthorizationPolicyother)
Parameter
Name Description
other AuthorizationPolicy
Returns
Type Description
AuthorizationPolicy.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicAuthorizationPolicy.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AuthorizationPolicy.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicAuthorizationPolicy.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
AuthorizationPolicy.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalAuthorizationPolicy.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AuthorizationPolicy.Builder
Overrides

mergeUpdateTime(Timestamp value)

publicAuthorizationPolicy.BuildermergeUpdateTime(Timestampvalue)

Output only. The timestamp when the resource was updated.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
AuthorizationPolicy.Builder

putAllLabels(Map<String,String> values)

publicAuthorizationPolicy.BuilderputAllLabels(Map<String,String>values)

Optional. Set of label tags associated with the AuthorizationPolicy resource.

map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Map<String,String>
Returns
Type Description
AuthorizationPolicy.Builder

putLabels(String key, String value)

publicAuthorizationPolicy.BuilderputLabels(Stringkey,Stringvalue)

Optional. Set of label tags associated with the AuthorizationPolicy resource.

map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
value String
Returns
Type Description
AuthorizationPolicy.Builder

removeLabels(String key)

publicAuthorizationPolicy.BuilderremoveLabels(Stringkey)

Optional. Set of label tags associated with the AuthorizationPolicy resource.

map<string, string> labels = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
AuthorizationPolicy.Builder

removeRules(int index)

publicAuthorizationPolicy.BuilderremoveRules(intindex)

Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the action field will be applied on every request.

repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AuthorizationPolicy.Builder

setAction(AuthorizationPolicy.Action value)

publicAuthorizationPolicy.BuildersetAction(AuthorizationPolicy.Actionvalue)

Required. The action to take when a rule match is found. Possible values are "ALLOW" or "DENY".

.google.cloud.networksecurity.v1.AuthorizationPolicy.Action action = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value AuthorizationPolicy.Action

The action to set.

Returns
Type Description
AuthorizationPolicy.Builder

This builder for chaining.

setActionValue(int value)

publicAuthorizationPolicy.BuildersetActionValue(intvalue)

Required. The action to take when a rule match is found. Possible values are "ALLOW" or "DENY".

.google.cloud.networksecurity.v1.AuthorizationPolicy.Action action = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

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

Returns
Type Description
AuthorizationPolicy.Builder

This builder for chaining.

setCreateTime(Timestamp value)

publicAuthorizationPolicy.BuildersetCreateTime(Timestampvalue)

Output only. The timestamp when the resource was created.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
AuthorizationPolicy.Builder

setCreateTime(Timestamp.Builder builderForValue)

publicAuthorizationPolicy.BuildersetCreateTime(Timestamp.BuilderbuilderForValue)

Output only. The timestamp when the resource was created.

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

Parameter
Name Description
builderForValue Builder
Returns
Type Description
AuthorizationPolicy.Builder

setDescription(String value)

publicAuthorizationPolicy.BuildersetDescription(Stringvalue)

Optional. Free-text description of the resource.

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

Parameter
Name Description
value String

The description to set.

Returns
Type Description
AuthorizationPolicy.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

publicAuthorizationPolicy.BuildersetDescriptionBytes(ByteStringvalue)

Optional. Free-text description of the resource.

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

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
AuthorizationPolicy.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

publicAuthorizationPolicy.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AuthorizationPolicy.Builder
Overrides

setName(String value)

publicAuthorizationPolicy.BuildersetName(Stringvalue)

Required. Name of the AuthorizationPolicy resource. It matches pattern projects/{project}/locations/{location}/authorizationPolicies/<authorization_policy>.

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

Parameter
Name Description
value String

The name to set.

Returns
Type Description
AuthorizationPolicy.Builder

This builder for chaining.

setNameBytes(ByteString value)

publicAuthorizationPolicy.BuildersetNameBytes(ByteStringvalue)

Required. Name of the AuthorizationPolicy resource. It matches pattern projects/{project}/locations/{location}/authorizationPolicies/<authorization_policy>.

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

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
AuthorizationPolicy.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

publicAuthorizationPolicy.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
AuthorizationPolicy.Builder
Overrides

setRules(int index, AuthorizationPolicy.Rule value)

publicAuthorizationPolicy.BuildersetRules(intindex,AuthorizationPolicy.Rulevalue)

Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the action field will be applied on every request.

repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value AuthorizationPolicy.Rule
Returns
Type Description
AuthorizationPolicy.Builder

setRules(int index, AuthorizationPolicy.Rule.Builder builderForValue)

publicAuthorizationPolicy.BuildersetRules(intindex,AuthorizationPolicy.Rule.BuilderbuilderForValue)

Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the action field will be applied on every request.

repeated .google.cloud.networksecurity.v1.AuthorizationPolicy.Rule rules = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue AuthorizationPolicy.Rule.Builder
Returns
Type Description
AuthorizationPolicy.Builder

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalAuthorizationPolicy.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AuthorizationPolicy.Builder
Overrides

setUpdateTime(Timestamp value)

publicAuthorizationPolicy.BuildersetUpdateTime(Timestampvalue)

Output only. The timestamp when the resource was updated.

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

Parameter
Name Description
value Timestamp
Returns
Type Description
AuthorizationPolicy.Builder

setUpdateTime(Timestamp.Builder builderForValue)

publicAuthorizationPolicy.BuildersetUpdateTime(Timestamp.BuilderbuilderForValue)

Output only. The timestamp when the resource was updated.

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

Parameter
Name Description
builderForValue Builder
Returns
Type Description
AuthorizationPolicy.Builder

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.