Class AuthorizationPolicy.Rule.Source.Builder (0.58.0)

publicstaticfinalclass AuthorizationPolicy.Rule.Source.BuilderextendsGeneratedMessageV3.Builder<AuthorizationPolicy.Rule.Source.Builder>implementsAuthorizationPolicy.Rule.SourceOrBuilder

Specification of traffic source attributes.

Protobuf type google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Source

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

addAllIpBlocks(Iterable<String> values)

publicAuthorizationPolicy.Rule.Source.BuilderaddAllIpBlocks(Iterable<String>values)

Optional. List of CIDR ranges to match based on source IP address. At least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR (e.g., "1.2.3.0/24") are supported. Authorization based on source IP alone should be avoided. The IP addresses of any load balancers or proxies should be considered untrusted.

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

Parameter
Name Description
values Iterable<String>

The ipBlocks to add.

Returns
Type Description
AuthorizationPolicy.Rule.Source.Builder

This builder for chaining.

addAllPrincipals(Iterable<String> values)

publicAuthorizationPolicy.Rule.Source.BuilderaddAllPrincipals(Iterable<String>values)

Optional. List of peer identities to match for authorization. At least one principal should match. Each peer can be an exact match, or a prefix match (example, "namespace/*") or a suffix match (example, "/service-account") or a presence match "". Authorization based on the principal name without certificate validation (configured by ServerTlsPolicy resource) is considered insecure.

repeated string principals = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The principals to add.

Returns
Type Description
AuthorizationPolicy.Rule.Source.Builder

This builder for chaining.

addIpBlocks(String value)

publicAuthorizationPolicy.Rule.Source.BuilderaddIpBlocks(Stringvalue)

Optional. List of CIDR ranges to match based on source IP address. At least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR (e.g., "1.2.3.0/24") are supported. Authorization based on source IP alone should be avoided. The IP addresses of any load balancers or proxies should be considered untrusted.

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

Parameter
Name Description
value String

The ipBlocks to add.

Returns
Type Description
AuthorizationPolicy.Rule.Source.Builder

This builder for chaining.

addIpBlocksBytes(ByteString value)

publicAuthorizationPolicy.Rule.Source.BuilderaddIpBlocksBytes(ByteStringvalue)

Optional. List of CIDR ranges to match based on source IP address. At least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR (e.g., "1.2.3.0/24") are supported. Authorization based on source IP alone should be avoided. The IP addresses of any load balancers or proxies should be considered untrusted.

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

Parameter
Name Description
value ByteString

The bytes of the ipBlocks to add.

Returns
Type Description
AuthorizationPolicy.Rule.Source.Builder

This builder for chaining.

addPrincipals(String value)

publicAuthorizationPolicy.Rule.Source.BuilderaddPrincipals(Stringvalue)

Optional. List of peer identities to match for authorization. At least one principal should match. Each peer can be an exact match, or a prefix match (example, "namespace/*") or a suffix match (example, "/service-account") or a presence match "". Authorization based on the principal name without certificate validation (configured by ServerTlsPolicy resource) is considered insecure.

repeated string principals = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The principals to add.

Returns
Type Description
AuthorizationPolicy.Rule.Source.Builder

This builder for chaining.

addPrincipalsBytes(ByteString value)

publicAuthorizationPolicy.Rule.Source.BuilderaddPrincipalsBytes(ByteStringvalue)

Optional. List of peer identities to match for authorization. At least one principal should match. Each peer can be an exact match, or a prefix match (example, "namespace/*") or a suffix match (example, "/service-account") or a presence match "". Authorization based on the principal name without certificate validation (configured by ServerTlsPolicy resource) is considered insecure.

repeated string principals = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the principals to add.

Returns
Type Description
AuthorizationPolicy.Rule.Source.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

publicAuthorizationPolicy.Rule.Sourcebuild()
Returns
Type Description
AuthorizationPolicy.Rule.Source

buildPartial()

publicAuthorizationPolicy.Rule.SourcebuildPartial()
Returns
Type Description
AuthorizationPolicy.Rule.Source

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearIpBlocks()

publicAuthorizationPolicy.Rule.Source.BuilderclearIpBlocks()

Optional. List of CIDR ranges to match based on source IP address. At least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR (e.g., "1.2.3.0/24") are supported. Authorization based on source IP alone should be avoided. The IP addresses of any load balancers or proxies should be considered untrusted.

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

Returns
Type Description
AuthorizationPolicy.Rule.Source.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPrincipals()

publicAuthorizationPolicy.Rule.Source.BuilderclearPrincipals()

Optional. List of peer identities to match for authorization. At least one principal should match. Each peer can be an exact match, or a prefix match (example, "namespace/*") or a suffix match (example, "/service-account") or a presence match "". Authorization based on the principal name without certificate validation (configured by ServerTlsPolicy resource) is considered insecure.

repeated string principals = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AuthorizationPolicy.Rule.Source.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

publicAuthorizationPolicy.Rule.SourcegetDefaultInstanceForType()
Returns
Type Description
AuthorizationPolicy.Rule.Source

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getIpBlocks(int index)

publicStringgetIpBlocks(intindex)

Optional. List of CIDR ranges to match based on source IP address. At least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR (e.g., "1.2.3.0/24") are supported. Authorization based on source IP alone should be avoided. The IP addresses of any load balancers or proxies should be considered untrusted.

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

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The ipBlocks at the given index.

getIpBlocksBytes(int index)

publicByteStringgetIpBlocksBytes(intindex)

Optional. List of CIDR ranges to match based on source IP address. At least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR (e.g., "1.2.3.0/24") are supported. Authorization based on source IP alone should be avoided. The IP addresses of any load balancers or proxies should be considered untrusted.

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

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the ipBlocks at the given index.

getIpBlocksCount()

publicintgetIpBlocksCount()

Optional. List of CIDR ranges to match based on source IP address. At least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR (e.g., "1.2.3.0/24") are supported. Authorization based on source IP alone should be avoided. The IP addresses of any load balancers or proxies should be considered untrusted.

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

Returns
Type Description
int

The count of ipBlocks.

getIpBlocksList()

publicProtocolStringListgetIpBlocksList()

Optional. List of CIDR ranges to match based on source IP address. At least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR (e.g., "1.2.3.0/24") are supported. Authorization based on source IP alone should be avoided. The IP addresses of any load balancers or proxies should be considered untrusted.

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

Returns
Type Description
ProtocolStringList

A list containing the ipBlocks.

getPrincipals(int index)

publicStringgetPrincipals(intindex)

Optional. List of peer identities to match for authorization. At least one principal should match. Each peer can be an exact match, or a prefix match (example, "namespace/*") or a suffix match (example, "/service-account") or a presence match "". Authorization based on the principal name without certificate validation (configured by ServerTlsPolicy resource) is considered insecure.

repeated string principals = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The principals at the given index.

getPrincipalsBytes(int index)

publicByteStringgetPrincipalsBytes(intindex)

Optional. List of peer identities to match for authorization. At least one principal should match. Each peer can be an exact match, or a prefix match (example, "namespace/*") or a suffix match (example, "/service-account") or a presence match "". Authorization based on the principal name without certificate validation (configured by ServerTlsPolicy resource) is considered insecure.

repeated string principals = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the principals at the given index.

getPrincipalsCount()

publicintgetPrincipalsCount()

Optional. List of peer identities to match for authorization. At least one principal should match. Each peer can be an exact match, or a prefix match (example, "namespace/*") or a suffix match (example, "/service-account") or a presence match "". Authorization based on the principal name without certificate validation (configured by ServerTlsPolicy resource) is considered insecure.

repeated string principals = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of principals.

getPrincipalsList()

publicProtocolStringListgetPrincipalsList()

Optional. List of peer identities to match for authorization. At least one principal should match. Each peer can be an exact match, or a prefix match (example, "namespace/*") or a suffix match (example, "/service-account") or a presence match "". Authorization based on the principal name without certificate validation (configured by ServerTlsPolicy resource) is considered insecure.

repeated string principals = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the principals.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(AuthorizationPolicy.Rule.Source other)

publicAuthorizationPolicy.Rule.Source.BuildermergeFrom(AuthorizationPolicy.Rule.Sourceother)
Parameter
Name Description
other AuthorizationPolicy.Rule.Source
Returns
Type Description
AuthorizationPolicy.Rule.Source.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setIpBlocks(int index, String value)

publicAuthorizationPolicy.Rule.Source.BuildersetIpBlocks(intindex,Stringvalue)

Optional. List of CIDR ranges to match based on source IP address. At least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR (e.g., "1.2.3.0/24") are supported. Authorization based on source IP alone should be avoided. The IP addresses of any load balancers or proxies should be considered untrusted.

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

Parameters
Name Description
index int

The index to set the value at.

value String

The ipBlocks to set.

Returns
Type Description
AuthorizationPolicy.Rule.Source.Builder

This builder for chaining.

setPrincipals(int index, String value)

publicAuthorizationPolicy.Rule.Source.BuildersetPrincipals(intindex,Stringvalue)

Optional. List of peer identities to match for authorization. At least one principal should match. Each peer can be an exact match, or a prefix match (example, "namespace/*") or a suffix match (example, "/service-account") or a presence match "". Authorization based on the principal name without certificate validation (configured by ServerTlsPolicy resource) is considered insecure.

repeated string principals = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The principals to set.

Returns
Type Description
AuthorizationPolicy.Rule.Source.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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

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.