Class AuthorizationPolicy.Rule.Destination.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<AuthorizationPolicy.Rule.Destination.Builder>
-
- com.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.Builder
-
- All Implemented Interfaces:
AuthorizationPolicy.Rule.DestinationOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
- AuthorizationPolicy.Rule.Destination
public static final class AuthorizationPolicy.Rule.Destination.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<AuthorizationPolicy.Rule.Destination.Builder> implements AuthorizationPolicy.Rule.DestinationOrBuilder
Specification of traffic destination attributes.
Protobuf typegoogle.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination
-
-
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.Destination.Builder>
-
clear
public AuthorizationPolicy.Rule.Destination.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.Destination.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.Destination.Builder>
-
getDefaultInstanceForType
public AuthorizationPolicy.Rule.Destination getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public AuthorizationPolicy.Rule.Destination build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public AuthorizationPolicy.Rule.Destination buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public AuthorizationPolicy.Rule.Destination.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.Destination.Builder>
-
setField
public AuthorizationPolicy.Rule.Destination.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.Destination.Builder>
-
clearField
public AuthorizationPolicy.Rule.Destination.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.Destination.Builder>
-
clearOneof
public AuthorizationPolicy.Rule.Destination.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.Destination.Builder>
-
setRepeatedField
public AuthorizationPolicy.Rule.Destination.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.Destination.Builder>
-
addRepeatedField
public AuthorizationPolicy.Rule.Destination.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.Destination.Builder>
-
mergeFrom
public AuthorizationPolicy.Rule.Destination.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.Destination.Builder>
-
mergeFrom
public AuthorizationPolicy.Rule.Destination.Builder mergeFrom(AuthorizationPolicy.Rule.Destination other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<AuthorizationPolicy.Rule.Destination.Builder>
-
mergeFrom
public AuthorizationPolicy.Rule.Destination.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.Destination.Builder>
- Throws:
IOException
-
getHostsList
public com.google.protobuf.ProtocolStringList getHostsList()
Required. List of host names to match. Matched against the ":authority" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example "mydomain.*") or a suffix match (example "*.myorg.com") or a presence (any) match "*".
repeated string hosts = 1 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getHostsList
in interfaceAuthorizationPolicy.Rule.DestinationOrBuilder
- Returns:
- A list containing the hosts.
-
getHostsCount
public int getHostsCount()
Required. List of host names to match. Matched against the ":authority" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example "mydomain.*") or a suffix match (example "*.myorg.com") or a presence (any) match "*".
repeated string hosts = 1 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getHostsCount
in interfaceAuthorizationPolicy.Rule.DestinationOrBuilder
- Returns:
- The count of hosts.
-
getHosts
public String getHosts(int index)
Required. List of host names to match. Matched against the ":authority" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example "mydomain.*") or a suffix match (example "*.myorg.com") or a presence (any) match "*".
repeated string hosts = 1 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getHosts
in interfaceAuthorizationPolicy.Rule.DestinationOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The hosts at the given index.
-
getHostsBytes
public com.google.protobuf.ByteString getHostsBytes(int index)
Required. List of host names to match. Matched against the ":authority" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example "mydomain.*") or a suffix match (example "*.myorg.com") or a presence (any) match "*".
repeated string hosts = 1 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getHostsBytes
in interfaceAuthorizationPolicy.Rule.DestinationOrBuilder
- Parameters:
index
- The index of the value to return.- Returns:
- The bytes of the hosts at the given index.
-
setHosts
public AuthorizationPolicy.Rule.Destination.Builder setHosts(int index, String value)
Required. List of host names to match. Matched against the ":authority" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example "mydomain.*") or a suffix match (example "*.myorg.com") or a presence (any) match "*".
repeated string hosts = 1 [(.google.api.field_behavior) = REQUIRED];
- Parameters:
index
- The index to set the value at.value
- The hosts to set.- Returns:
- This builder for chaining.
-
addHosts
public AuthorizationPolicy.Rule.Destination.Builder addHosts(String value)
Required. List of host names to match. Matched against the ":authority" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example "mydomain.*") or a suffix match (example "*.myorg.com") or a presence (any) match "*".
repeated string hosts = 1 [(.google.api.field_behavior) = REQUIRED];
- Parameters:
value
- The hosts to add.- Returns:
- This builder for chaining.
-
addAllHosts
public AuthorizationPolicy.Rule.Destination.Builder addAllHosts(Iterable<String> values)
Required. List of host names to match. Matched against the ":authority" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example "mydomain.*") or a suffix match (example "*.myorg.com") or a presence (any) match "*".
repeated string hosts = 1 [(.google.api.field_behavior) = REQUIRED];
- Parameters:
values
- The hosts to add.- Returns:
- This builder for chaining.
-
clearHosts
public AuthorizationPolicy.Rule.Destination.Builder clearHosts()
Required. List of host names to match. Matched against the ":authority" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example "mydomain.*") or a suffix match (example "*.myorg.com") or a presence (any) match "*".
repeated string hosts = 1 [(.google.api.field_behavior) = REQUIRED];
- Returns:
- This builder for chaining.
-
addHostsBytes
public AuthorizationPolicy.Rule.Destination.Builder addHostsBytes(com.google.protobuf.ByteString value)
Required. List of host names to match. Matched against the ":authority" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example "mydomain.*") or a suffix match (example "*.myorg.com") or a presence (any) match "*".
repeated string hosts = 1 [(.google.api.field_behavior) = REQUIRED];
- Parameters:
value
- The bytes of the hosts to add.- Returns:
- This builder for chaining.
-
getPortsList
public List<Integer> getPortsList()
Required. List of destination ports to match. At least one port should match.
repeated uint32 ports = 2 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getPortsList
in interfaceAuthorizationPolicy.Rule.DestinationOrBuilder
- Returns:
- A list containing the ports.
-
getPortsCount
public int getPortsCount()
Required. List of destination ports to match. At least one port should match.
repeated uint32 ports = 2 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getPortsCount
in interfaceAuthorizationPolicy.Rule.DestinationOrBuilder
- Returns:
- The count of ports.
-
getPorts
public int getPorts(int index)
Required. List of destination ports to match. At least one port should match.
repeated uint32 ports = 2 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getPorts
in interfaceAuthorizationPolicy.Rule.DestinationOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The ports at the given index.
-
setPorts
public AuthorizationPolicy.Rule.Destination.Builder setPorts(int index, int value)
Required. List of destination ports to match. At least one port should match.
repeated uint32 ports = 2 [(.google.api.field_behavior) = REQUIRED];
- Parameters:
index
- The index to set the value at.value
- The ports to set.- Returns:
- This builder for chaining.
-
addPorts
public AuthorizationPolicy.Rule.Destination.Builder addPorts(int value)
Required. List of destination ports to match. At least one port should match.
repeated uint32 ports = 2 [(.google.api.field_behavior) = REQUIRED];
- Parameters:
value
- The ports to add.- Returns:
- This builder for chaining.
-
addAllPorts
public AuthorizationPolicy.Rule.Destination.Builder addAllPorts(Iterable<? extends Integer> values)
Required. List of destination ports to match. At least one port should match.
repeated uint32 ports = 2 [(.google.api.field_behavior) = REQUIRED];
- Parameters:
values
- The ports to add.- Returns:
- This builder for chaining.
-
clearPorts
public AuthorizationPolicy.Rule.Destination.Builder clearPorts()
Required. List of destination ports to match. At least one port should match.
repeated uint32 ports = 2 [(.google.api.field_behavior) = REQUIRED];
- Returns:
- This builder for chaining.
-
getMethodsList
public com.google.protobuf.ProtocolStringList getMethodsList()
Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.
repeated string methods = 4 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getMethodsList
in interfaceAuthorizationPolicy.Rule.DestinationOrBuilder
- Returns:
- A list containing the methods.
-
getMethodsCount
public int getMethodsCount()
Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.
repeated string methods = 4 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getMethodsCount
in interfaceAuthorizationPolicy.Rule.DestinationOrBuilder
- Returns:
- The count of methods.
-
getMethods
public String getMethods(int index)
Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.
repeated string methods = 4 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getMethods
in interfaceAuthorizationPolicy.Rule.DestinationOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The methods at the given index.
-
getMethodsBytes
public com.google.protobuf.ByteString getMethodsBytes(int index)
Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.
repeated string methods = 4 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getMethodsBytes
in interfaceAuthorizationPolicy.Rule.DestinationOrBuilder
- Parameters:
index
- The index of the value to return.- Returns:
- The bytes of the methods at the given index.
-
setMethods
public AuthorizationPolicy.Rule.Destination.Builder setMethods(int index, String value)
Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.
repeated string methods = 4 [(.google.api.field_behavior) = OPTIONAL];
- Parameters:
index
- The index to set the value at.value
- The methods to set.- Returns:
- This builder for chaining.
-
addMethods
public AuthorizationPolicy.Rule.Destination.Builder addMethods(String value)
Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.
repeated string methods = 4 [(.google.api.field_behavior) = OPTIONAL];
- Parameters:
value
- The methods to add.- Returns:
- This builder for chaining.
-
addAllMethods
public AuthorizationPolicy.Rule.Destination.Builder addAllMethods(Iterable<String> values)
Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.
repeated string methods = 4 [(.google.api.field_behavior) = OPTIONAL];
- Parameters:
values
- The methods to add.- Returns:
- This builder for chaining.
-
clearMethods
public AuthorizationPolicy.Rule.Destination.Builder clearMethods()
Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.
repeated string methods = 4 [(.google.api.field_behavior) = OPTIONAL];
- Returns:
- This builder for chaining.
-
addMethodsBytes
public AuthorizationPolicy.Rule.Destination.Builder addMethodsBytes(com.google.protobuf.ByteString value)
Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.
repeated string methods = 4 [(.google.api.field_behavior) = OPTIONAL];
- Parameters:
value
- The bytes of the methods to add.- Returns:
- This builder for chaining.
-
hasHttpHeaderMatch
public boolean hasHttpHeaderMatch()
Optional. Match against key:value pair in http header. Provides a flexible match based on HTTP headers, for potentially advanced use cases. At least one header should match. Avoid using header matches to make authorization decisions unless there is a strong guarantee that requests arrive through a trusted client or proxy.
.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
hasHttpHeaderMatch
in interfaceAuthorizationPolicy.Rule.DestinationOrBuilder
- Returns:
- Whether the httpHeaderMatch field is set.
-
getHttpHeaderMatch
public AuthorizationPolicy.Rule.Destination.HttpHeaderMatch getHttpHeaderMatch()
Optional. Match against key:value pair in http header. Provides a flexible match based on HTTP headers, for potentially advanced use cases. At least one header should match. Avoid using header matches to make authorization decisions unless there is a strong guarantee that requests arrive through a trusted client or proxy.
.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getHttpHeaderMatch
in interfaceAuthorizationPolicy.Rule.DestinationOrBuilder
- Returns:
- The httpHeaderMatch.
-
setHttpHeaderMatch
public AuthorizationPolicy.Rule.Destination.Builder setHttpHeaderMatch(AuthorizationPolicy.Rule.Destination.HttpHeaderMatch value)
Optional. Match against key:value pair in http header. Provides a flexible match based on HTTP headers, for potentially advanced use cases. At least one header should match. Avoid using header matches to make authorization decisions unless there is a strong guarantee that requests arrive through a trusted client or proxy.
.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL];
-
setHttpHeaderMatch
public AuthorizationPolicy.Rule.Destination.Builder setHttpHeaderMatch(AuthorizationPolicy.Rule.Destination.HttpHeaderMatch.Builder builderForValue)
Optional. Match against key:value pair in http header. Provides a flexible match based on HTTP headers, for potentially advanced use cases. At least one header should match. Avoid using header matches to make authorization decisions unless there is a strong guarantee that requests arrive through a trusted client or proxy.
.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL];
-
mergeHttpHeaderMatch
public AuthorizationPolicy.Rule.Destination.Builder mergeHttpHeaderMatch(AuthorizationPolicy.Rule.Destination.HttpHeaderMatch value)
Optional. Match against key:value pair in http header. Provides a flexible match based on HTTP headers, for potentially advanced use cases. At least one header should match. Avoid using header matches to make authorization decisions unless there is a strong guarantee that requests arrive through a trusted client or proxy.
.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL];
-
clearHttpHeaderMatch
public AuthorizationPolicy.Rule.Destination.Builder clearHttpHeaderMatch()
Optional. Match against key:value pair in http header. Provides a flexible match based on HTTP headers, for potentially advanced use cases. At least one header should match. Avoid using header matches to make authorization decisions unless there is a strong guarantee that requests arrive through a trusted client or proxy.
.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL];
-
getHttpHeaderMatchBuilder
public AuthorizationPolicy.Rule.Destination.HttpHeaderMatch.Builder getHttpHeaderMatchBuilder()
Optional. Match against key:value pair in http header. Provides a flexible match based on HTTP headers, for potentially advanced use cases. At least one header should match. Avoid using header matches to make authorization decisions unless there is a strong guarantee that requests arrive through a trusted client or proxy.
.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL];
-
getHttpHeaderMatchOrBuilder
public AuthorizationPolicy.Rule.Destination.HttpHeaderMatchOrBuilder getHttpHeaderMatchOrBuilder()
Optional. Match against key:value pair in http header. Provides a flexible match based on HTTP headers, for potentially advanced use cases. At least one header should match. Avoid using header matches to make authorization decisions unless there is a strong guarantee that requests arrive through a trusted client or proxy.
.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL];
- Specified by:
getHttpHeaderMatchOrBuilder
in interfaceAuthorizationPolicy.Rule.DestinationOrBuilder
-
setUnknownFields
public final AuthorizationPolicy.Rule.Destination.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.Destination.Builder>
-
mergeUnknownFields
public final AuthorizationPolicy.Rule.Destination.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.Destination.Builder>
-
-