public static final class AuthorizationPolicy.Rule.Destination extends GeneratedMessageV3 implements AuthorizationPolicy.Rule.DestinationOrBuilder
Specification of traffic destination attributes.
Protobuf type google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination
Static Fields
HOSTS_FIELD_NUMBER
public static final int HOSTS_FIELD_NUMBER
Field Value
public static final int HTTP_HEADER_MATCH_FIELD_NUMBER
Field Value
METHODS_FIELD_NUMBER
public static final int METHODS_FIELD_NUMBER
Field Value
PORTS_FIELD_NUMBER
public static final int PORTS_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static AuthorizationPolicy.Rule.Destination getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static AuthorizationPolicy.Rule.Destination.Builder newBuilder()
Returns
newBuilder(AuthorizationPolicy.Rule.Destination prototype)
public static AuthorizationPolicy.Rule.Destination.Builder newBuilder(AuthorizationPolicy.Rule.Destination prototype)
Parameter
Returns
public static AuthorizationPolicy.Rule.Destination parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static AuthorizationPolicy.Rule.Destination parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static AuthorizationPolicy.Rule.Destination parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static AuthorizationPolicy.Rule.Destination parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static AuthorizationPolicy.Rule.Destination parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static AuthorizationPolicy.Rule.Destination parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static AuthorizationPolicy.Rule.Destination parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static AuthorizationPolicy.Rule.Destination parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static AuthorizationPolicy.Rule.Destination parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static AuthorizationPolicy.Rule.Destination parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static AuthorizationPolicy.Rule.Destination parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static AuthorizationPolicy.Rule.Destination parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<AuthorizationPolicy.Rule.Destination> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getDefaultInstanceForType()
public AuthorizationPolicy.Rule.Destination getDefaultInstanceForType()
Returns
getHosts(int index)
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];
Parameter
Name | Description |
index | int
The index of the element to return.
|
Returns
Type | Description |
String | The hosts at the given index.
|
getHostsBytes(int index)
public 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];
Parameter
Name | Description |
index | int
The index of the value to return.
|
Returns
Type | Description |
ByteString | The bytes of the hosts at the given index.
|
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];
Returns
Type | Description |
int | The count of hosts.
|
getHostsList()
public 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];
Returns
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.v1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL];
Returns
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.v1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL];
Returns
getMethods(int index)
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];
Parameter
Name | Description |
index | int
The index of the element to return.
|
Returns
Type | Description |
String | The methods at the given index.
|
getMethodsBytes(int index)
public 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];
Parameter
Name | Description |
index | int
The index of the value to return.
|
Returns
Type | Description |
ByteString | The bytes of the methods at the given index.
|
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];
Returns
Type | Description |
int | The count of methods.
|
getMethodsList()
public 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];
Returns
getParserForType()
public Parser<AuthorizationPolicy.Rule.Destination> getParserForType()
Returns
Overrides
getPorts(int index)
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];
Parameter
Name | Description |
index | int
The index of the element to return.
|
Returns
Type | Description |
int | The ports at the given index.
|
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];
Returns
Type | Description |
int | The count of ports.
|
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];
Returns
Type | Description |
List<Integer> | A list containing the ports.
|
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
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.v1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL];
Returns
Type | Description |
boolean | Whether the httpHeaderMatch field is set.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public AuthorizationPolicy.Rule.Destination.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected AuthorizationPolicy.Rule.Destination.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public AuthorizationPolicy.Rule.Destination.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions