Class AuthorizationPolicy.Rule.Destination (0.40.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
TypeDescription
int

HTTP_HEADER_MATCH_FIELD_NUMBER

public static final int HTTP_HEADER_MATCH_FIELD_NUMBER
Field Value
TypeDescription
int

METHODS_FIELD_NUMBER

public static final int METHODS_FIELD_NUMBER
Field Value
TypeDescription
int

PORTS_FIELD_NUMBER

public static final int PORTS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static AuthorizationPolicy.Rule.Destination getDefaultInstance()
Returns
TypeDescription
AuthorizationPolicy.Rule.Destination

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static AuthorizationPolicy.Rule.Destination.Builder newBuilder()
Returns
TypeDescription
AuthorizationPolicy.Rule.Destination.Builder

newBuilder(AuthorizationPolicy.Rule.Destination prototype)

public static AuthorizationPolicy.Rule.Destination.Builder newBuilder(AuthorizationPolicy.Rule.Destination prototype)
Parameter
NameDescription
prototypeAuthorizationPolicy.Rule.Destination
Returns
TypeDescription
AuthorizationPolicy.Rule.Destination.Builder

parseDelimitedFrom(InputStream input)

public static AuthorizationPolicy.Rule.Destination parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
AuthorizationPolicy.Rule.Destination
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AuthorizationPolicy.Rule.Destination parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AuthorizationPolicy.Rule.Destination
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static AuthorizationPolicy.Rule.Destination parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
AuthorizationPolicy.Rule.Destination
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static AuthorizationPolicy.Rule.Destination parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AuthorizationPolicy.Rule.Destination
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static AuthorizationPolicy.Rule.Destination parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
AuthorizationPolicy.Rule.Destination
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static AuthorizationPolicy.Rule.Destination parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AuthorizationPolicy.Rule.Destination
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static AuthorizationPolicy.Rule.Destination parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
AuthorizationPolicy.Rule.Destination
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static AuthorizationPolicy.Rule.Destination parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AuthorizationPolicy.Rule.Destination
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static AuthorizationPolicy.Rule.Destination parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
AuthorizationPolicy.Rule.Destination
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AuthorizationPolicy.Rule.Destination parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AuthorizationPolicy.Rule.Destination
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static AuthorizationPolicy.Rule.Destination parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
AuthorizationPolicy.Rule.Destination
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static AuthorizationPolicy.Rule.Destination parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AuthorizationPolicy.Rule.Destination
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

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

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public AuthorizationPolicy.Rule.Destination getDefaultInstanceForType()
Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ProtocolStringList

A list containing the methods.

getParserForType()

public Parser<AuthorizationPolicy.Rule.Destination> getParserForType()
Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
List<Integer>

A list containing the ports.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
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
TypeDescription
boolean

Whether the httpHeaderMatch field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public AuthorizationPolicy.Rule.Destination.Builder newBuilderForType()
Returns
TypeDescription
AuthorizationPolicy.Rule.Destination.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected AuthorizationPolicy.Rule.Destination.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
AuthorizationPolicy.Rule.Destination.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public AuthorizationPolicy.Rule.Destination.Builder toBuilder()
Returns
TypeDescription
AuthorizationPolicy.Rule.Destination.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException