Class AuthorizationPolicy.Rule.Destination

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination
All Implemented Interfaces:
AuthorizationPolicy.Rule.DestinationOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable
Enclosing class:
AuthorizationPolicy.Rule

public static final class AuthorizationPolicy.Rule.Destination extends com.google.protobuf.GeneratedMessage implements AuthorizationPolicy.Rule.DestinationOrBuilder
 Specification of traffic destination attributes.
 
Protobuf type google.cloud.networksecurity.v1.AuthorizationPolicy.Rule.Destination
See Also:
  • Field Details

  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • 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 interface AuthorizationPolicy.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 interface AuthorizationPolicy.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 interface AuthorizationPolicy.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 interface AuthorizationPolicy.Rule.DestinationOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the hosts at the given index.
    • 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 interface AuthorizationPolicy.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 interface AuthorizationPolicy.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 interface AuthorizationPolicy.Rule.DestinationOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The ports at the given index.
    • 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 interface AuthorizationPolicy.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 interface AuthorizationPolicy.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 interface AuthorizationPolicy.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 interface AuthorizationPolicy.Rule.DestinationOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the methods at the given index.
    • 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.v1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasHttpHeaderMatch in interface AuthorizationPolicy.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.v1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getHttpHeaderMatch in interface AuthorizationPolicy.Rule.DestinationOrBuilder
      Returns:
      The httpHeaderMatch.
    • 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];
      Specified by:
      getHttpHeaderMatchOrBuilder in interface AuthorizationPolicy.Rule.DestinationOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static AuthorizationPolicy.Rule.Destination parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AuthorizationPolicy.Rule.Destination parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AuthorizationPolicy.Rule.Destination parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AuthorizationPolicy.Rule.Destination parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AuthorizationPolicy.Rule.Destination parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AuthorizationPolicy.Rule.Destination parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static AuthorizationPolicy.Rule.Destination parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AuthorizationPolicy.Rule.Destination parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static AuthorizationPolicy.Rule.Destination parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static AuthorizationPolicy.Rule.Destination parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AuthorizationPolicy.Rule.Destination parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static AuthorizationPolicy.Rule.Destination parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

    • newBuilder

    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected AuthorizationPolicy.Rule.Destination.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static AuthorizationPolicy.Rule.Destination getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<AuthorizationPolicy.Rule.Destination> parser()
    • getParserForType

      public com.google.protobuf.Parser<AuthorizationPolicy.Rule.Destination> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public AuthorizationPolicy.Rule.Destination getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder