Class AuthorizationPolicy.Rule.Destination.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.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.GeneratedMessage.Builder<AuthorizationPolicy.Rule.Destination.Builder>
implements AuthorizationPolicy.Rule.DestinationOrBuilder
Specification of traffic destination attributes.Protobuf type
google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination-
Method Summary
Modifier and TypeMethodDescriptionaddAllHosts(Iterable<String> values) Required.addAllMethods(Iterable<String> values) Optional.addAllPorts(Iterable<? extends Integer> values) Required.Required.addHostsBytes(com.google.protobuf.ByteString value) Required.addMethods(String value) Optional.addMethodsBytes(com.google.protobuf.ByteString value) Optional.addPorts(int value) Required.build()clear()Required.Optional.Optional.Required.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetHosts(int index) Required.com.google.protobuf.ByteStringgetHostsBytes(int index) Required.intRequired.com.google.protobuf.ProtocolStringListRequired.Optional.Optional.Optional.getMethods(int index) Optional.com.google.protobuf.ByteStringgetMethodsBytes(int index) Optional.intOptional.com.google.protobuf.ProtocolStringListOptional.intgetPorts(int index) Required.intRequired.Required.booleanOptional.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Optional.Required.Optional.Optional.setMethods(int index, String value) Optional.setPorts(int index, int value) Required.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<AuthorizationPolicy.Rule.Destination.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<AuthorizationPolicy.Rule.Destination.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<AuthorizationPolicy.Rule.Destination.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin 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:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.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:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin 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:
getHostsListin 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:
getHostsCountin interfaceAuthorizationPolicy.Rule.DestinationOrBuilder- Returns:
- The count of hosts.
-
getHosts
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:
getHostsin 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:
getHostsBytesin interfaceAuthorizationPolicy.Rule.DestinationOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the hosts at the given index.
-
setHosts
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
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
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
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
Required. List of destination ports to match. At least one port should match.
repeated uint32 ports = 2 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getPortsListin 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:
getPortsCountin 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:
getPortsin interfaceAuthorizationPolicy.Rule.DestinationOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The ports at the given index.
-
setPorts
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
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
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
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:
getMethodsListin 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:
getMethodsCountin interfaceAuthorizationPolicy.Rule.DestinationOrBuilder- Returns:
- The count of methods.
-
getMethods
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:
getMethodsin 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:
getMethodsBytesin interfaceAuthorizationPolicy.Rule.DestinationOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the methods at the given index.
-
setMethods
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
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
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
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:
hasHttpHeaderMatchin interfaceAuthorizationPolicy.Rule.DestinationOrBuilder- Returns:
- Whether the httpHeaderMatch field is set.
-
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:
getHttpHeaderMatchin 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
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
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
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:
getHttpHeaderMatchOrBuilderin interfaceAuthorizationPolicy.Rule.DestinationOrBuilder
-