Class AuthorizationPolicy.Rule.Destination (0.58.0)

public static final class AuthorizationPolicy.Rule.Destination extends GeneratedMessageV3 implements AuthorizationPolicy.Rule.DestinationOrBuilder

Specification of traffic destination attributes.

Protobuf type google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > AuthorizationPolicy.Rule.Destination

Static Fields

HOSTS_FIELD_NUMBER

public static final int HOSTS_FIELD_NUMBER
Field Value
Type Description
int

HTTP_HEADER_MATCH_FIELD_NUMBER

public static final int HTTP_HEADER_MATCH_FIELD_NUMBER
Field Value
Type Description
int

METHODS_FIELD_NUMBER

public static final int METHODS_FIELD_NUMBER
Field Value
Type Description
int

PORTS_FIELD_NUMBER

public static final int PORTS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static AuthorizationPolicy.Rule.Destination getDefaultInstance()
Returns
Type Description
AuthorizationPolicy.Rule.Destination

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static AuthorizationPolicy.Rule.Destination.Builder newBuilder()
Returns
Type Description
AuthorizationPolicy.Rule.Destination.Builder

newBuilder(AuthorizationPolicy.Rule.Destination prototype)

public static AuthorizationPolicy.Rule.Destination.Builder newBuilder(AuthorizationPolicy.Rule.Destination prototype)
Parameter
Name Description
prototype AuthorizationPolicy.Rule.Destination
Returns
Type Description
AuthorizationPolicy.Rule.Destination.Builder

parseDelimitedFrom(InputStream input)

public static AuthorizationPolicy.Rule.Destination parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AuthorizationPolicy.Rule.Destination
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AuthorizationPolicy.Rule.Destination parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AuthorizationPolicy.Rule.Destination
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static AuthorizationPolicy.Rule.Destination parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
AuthorizationPolicy.Rule.Destination
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static AuthorizationPolicy.Rule.Destination parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AuthorizationPolicy.Rule.Destination
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static AuthorizationPolicy.Rule.Destination parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
AuthorizationPolicy.Rule.Destination
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static AuthorizationPolicy.Rule.Destination parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AuthorizationPolicy.Rule.Destination
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static AuthorizationPolicy.Rule.Destination parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
AuthorizationPolicy.Rule.Destination
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static AuthorizationPolicy.Rule.Destination parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AuthorizationPolicy.Rule.Destination
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static AuthorizationPolicy.Rule.Destination parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AuthorizationPolicy.Rule.Destination
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AuthorizationPolicy.Rule.Destination parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AuthorizationPolicy.Rule.Destination
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static AuthorizationPolicy.Rule.Destination parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
AuthorizationPolicy.Rule.Destination
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static AuthorizationPolicy.Rule.Destination parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AuthorizationPolicy.Rule.Destination
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<AuthorizationPolicy.Rule.Destination> parser()
Returns
Type Description
Parser<Destination>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public AuthorizationPolicy.Rule.Destination getDefaultInstanceForType()
Returns
Type Description
AuthorizationPolicy.Rule.Destination

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
Type Description
ProtocolStringList

A list containing the hosts.

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];

Returns
Type Description
AuthorizationPolicy.Rule.Destination.HttpHeaderMatch

The httpHeaderMatch.

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];

Returns
Type Description
AuthorizationPolicy.Rule.Destination.HttpHeaderMatchOrBuilder

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
Type Description
ProtocolStringList

A list containing the methods.

getParserForType()

public Parser<AuthorizationPolicy.Rule.Destination> getParserForType()
Returns
Type Description
Parser<Destination>
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
Type Description
int
Overrides

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];

Returns
Type Description
boolean

Whether the httpHeaderMatch field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public AuthorizationPolicy.Rule.Destination.Builder newBuilderForType()
Returns
Type Description
AuthorizationPolicy.Rule.Destination.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected AuthorizationPolicy.Rule.Destination.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
AuthorizationPolicy.Rule.Destination.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public AuthorizationPolicy.Rule.Destination.Builder toBuilder()
Returns
Type Description
AuthorizationPolicy.Rule.Destination.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException