Class AuthorizationPolicy.Rule.Source.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<AuthorizationPolicy.Rule.Source.Builder>
-
- com.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source.Builder
-
- All Implemented Interfaces:
AuthorizationPolicy.Rule.SourceOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
- AuthorizationPolicy.Rule.Source
public static final class AuthorizationPolicy.Rule.Source.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<AuthorizationPolicy.Rule.Source.Builder> implements AuthorizationPolicy.Rule.SourceOrBuilder
Specification of traffic source attributes.
Protobuf typegoogle.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source
-
-
Method Summary
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<AuthorizationPolicy.Rule.Source.Builder>
-
clear
public AuthorizationPolicy.Rule.Source.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<AuthorizationPolicy.Rule.Source.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<AuthorizationPolicy.Rule.Source.Builder>
-
getDefaultInstanceForType
public AuthorizationPolicy.Rule.Source getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public AuthorizationPolicy.Rule.Source build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public AuthorizationPolicy.Rule.Source buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public AuthorizationPolicy.Rule.Source.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<AuthorizationPolicy.Rule.Source.Builder>
-
setField
public AuthorizationPolicy.Rule.Source.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<AuthorizationPolicy.Rule.Source.Builder>
-
clearField
public AuthorizationPolicy.Rule.Source.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<AuthorizationPolicy.Rule.Source.Builder>
-
clearOneof
public AuthorizationPolicy.Rule.Source.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<AuthorizationPolicy.Rule.Source.Builder>
-
setRepeatedField
public AuthorizationPolicy.Rule.Source.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<AuthorizationPolicy.Rule.Source.Builder>
-
addRepeatedField
public AuthorizationPolicy.Rule.Source.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<AuthorizationPolicy.Rule.Source.Builder>
-
mergeFrom
public AuthorizationPolicy.Rule.Source.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<AuthorizationPolicy.Rule.Source.Builder>
-
mergeFrom
public AuthorizationPolicy.Rule.Source.Builder mergeFrom(AuthorizationPolicy.Rule.Source other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<AuthorizationPolicy.Rule.Source.Builder>
-
mergeFrom
public AuthorizationPolicy.Rule.Source.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<AuthorizationPolicy.Rule.Source.Builder>
- Throws:
IOException
-
getPrincipalsList
public com.google.protobuf.ProtocolStringList getPrincipalsList()
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];
- Specified by:
getPrincipalsList
in interfaceAuthorizationPolicy.Rule.SourceOrBuilder
- Returns:
- A list containing the principals.
-
getPrincipalsCount
public int getPrincipalsCount()
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];
- Specified by:
getPrincipalsCount
in interfaceAuthorizationPolicy.Rule.SourceOrBuilder
- Returns:
- The count of principals.
-
getPrincipals
public String getPrincipals(int index)
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];
- Specified by:
getPrincipals
in interfaceAuthorizationPolicy.Rule.SourceOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The principals at the given index.
-
getPrincipalsBytes
public com.google.protobuf.ByteString getPrincipalsBytes(int index)
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];
- Specified by:
getPrincipalsBytes
in interfaceAuthorizationPolicy.Rule.SourceOrBuilder
- Parameters:
index
- The index of the value to return.- Returns:
- The bytes of the principals at the given index.
-
setPrincipals
public AuthorizationPolicy.Rule.Source.Builder setPrincipals(int index, String value)
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:
index
- The index to set the value at.value
- The principals to set.- Returns:
- This builder for chaining.
-
addPrincipals
public AuthorizationPolicy.Rule.Source.Builder addPrincipals(String value)
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:
value
- The principals to add.- Returns:
- This builder for chaining.
-
addAllPrincipals
public AuthorizationPolicy.Rule.Source.Builder addAllPrincipals(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];
- Parameters:
values
- The principals to add.- Returns:
- This builder for chaining.
-
clearPrincipals
public AuthorizationPolicy.Rule.Source.Builder clearPrincipals()
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:
- This builder for chaining.
-
addPrincipalsBytes
public AuthorizationPolicy.Rule.Source.Builder addPrincipalsBytes(com.google.protobuf.ByteString value)
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:
value
- The bytes of the principals to add.- Returns:
- This builder for chaining.
-
getIpBlocksList
public com.google.protobuf.ProtocolStringList getIpBlocksList()
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];
- Specified by:
getIpBlocksList
in interfaceAuthorizationPolicy.Rule.SourceOrBuilder
- Returns:
- A list containing the ipBlocks.
-
getIpBlocksCount
public int getIpBlocksCount()
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];
- Specified by:
getIpBlocksCount
in interfaceAuthorizationPolicy.Rule.SourceOrBuilder
- Returns:
- The count of ipBlocks.
-
getIpBlocks
public String getIpBlocks(int index)
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];
- Specified by:
getIpBlocks
in interfaceAuthorizationPolicy.Rule.SourceOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The ipBlocks at the given index.
-
getIpBlocksBytes
public com.google.protobuf.ByteString getIpBlocksBytes(int index)
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];
- Specified by:
getIpBlocksBytes
in interfaceAuthorizationPolicy.Rule.SourceOrBuilder
- Parameters:
index
- The index of the value to return.- Returns:
- The bytes of the ipBlocks at the given index.
-
setIpBlocks
public AuthorizationPolicy.Rule.Source.Builder setIpBlocks(int index, String value)
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:
index
- The index to set the value at.value
- The ipBlocks to set.- Returns:
- This builder for chaining.
-
addIpBlocks
public AuthorizationPolicy.Rule.Source.Builder addIpBlocks(String value)
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:
value
- The ipBlocks to add.- Returns:
- This builder for chaining.
-
addAllIpBlocks
public AuthorizationPolicy.Rule.Source.Builder addAllIpBlocks(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];
- Parameters:
values
- The ipBlocks to add.- Returns:
- This builder for chaining.
-
clearIpBlocks
public AuthorizationPolicy.Rule.Source.Builder clearIpBlocks()
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:
- This builder for chaining.
-
addIpBlocksBytes
public AuthorizationPolicy.Rule.Source.Builder addIpBlocksBytes(com.google.protobuf.ByteString value)
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:
value
- The bytes of the ipBlocks to add.- Returns:
- This builder for chaining.
-
setUnknownFields
public final AuthorizationPolicy.Rule.Source.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<AuthorizationPolicy.Rule.Source.Builder>
-
mergeUnknownFields
public final AuthorizationPolicy.Rule.Source.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<AuthorizationPolicy.Rule.Source.Builder>
-
-