Class EndpointPolicy

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.networkservices.v1.EndpointPolicy
All Implemented Interfaces:
EndpointPolicyOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class EndpointPolicy extends com.google.protobuf.GeneratedMessage implements EndpointPolicyOrBuilder
 EndpointPolicy is a resource that helps apply desired configuration
 on the endpoints that match specific criteria.
 For example, this resource can be used to apply "authentication config"
 an all endpoints that serve on port 8080.
 
Protobuf type google.cloud.networkservices.v1.EndpointPolicy
See Also:
  • Field Details

    • NAME_FIELD_NUMBER

      public static final int NAME_FIELD_NUMBER
      See Also:
    • CREATE_TIME_FIELD_NUMBER

      public static final int CREATE_TIME_FIELD_NUMBER
      See Also:
    • UPDATE_TIME_FIELD_NUMBER

      public static final int UPDATE_TIME_FIELD_NUMBER
      See Also:
    • LABELS_FIELD_NUMBER

      public static final int LABELS_FIELD_NUMBER
      See Also:
    • TYPE_FIELD_NUMBER

      public static final int TYPE_FIELD_NUMBER
      See Also:
    • AUTHORIZATION_POLICY_FIELD_NUMBER

      public static final int AUTHORIZATION_POLICY_FIELD_NUMBER
      See Also:
    • ENDPOINT_MATCHER_FIELD_NUMBER

      public static final int ENDPOINT_MATCHER_FIELD_NUMBER
      See Also:
    • TRAFFIC_PORT_SELECTOR_FIELD_NUMBER

      public static final int TRAFFIC_PORT_SELECTOR_FIELD_NUMBER
      See Also:
    • DESCRIPTION_FIELD_NUMBER

      public static final int DESCRIPTION_FIELD_NUMBER
      See Also:
    • SERVER_TLS_POLICY_FIELD_NUMBER

      public static final int SERVER_TLS_POLICY_FIELD_NUMBER
      See Also:
    • CLIENT_TLS_POLICY_FIELD_NUMBER

      public static final int CLIENT_TLS_POLICY_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getName

      public String getName()
       Identifier. Name of the EndpointPolicy resource. It matches pattern
       `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`.
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getName in interface EndpointPolicyOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Identifier. Name of the EndpointPolicy resource. It matches pattern
       `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`.
       
      string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
      Specified by:
      getNameBytes in interface EndpointPolicyOrBuilder
      Returns:
      The bytes for name.
    • hasCreateTime

      public boolean hasCreateTime()
       Output only. The timestamp when the resource was created.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasCreateTime in interface EndpointPolicyOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.Timestamp getCreateTime()
       Output only. The timestamp when the resource was created.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTime in interface EndpointPolicyOrBuilder
      Returns:
      The createTime.
    • getCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
       Output only. The timestamp when the resource was created.
       
      .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCreateTimeOrBuilder in interface EndpointPolicyOrBuilder
    • hasUpdateTime

      public boolean hasUpdateTime()
       Output only. The timestamp when the resource was updated.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasUpdateTime in interface EndpointPolicyOrBuilder
      Returns:
      Whether the updateTime field is set.
    • getUpdateTime

      public com.google.protobuf.Timestamp getUpdateTime()
       Output only. The timestamp when the resource was updated.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTime in interface EndpointPolicyOrBuilder
      Returns:
      The updateTime.
    • getUpdateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
       Output only. The timestamp when the resource was updated.
       
      .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTimeOrBuilder in interface EndpointPolicyOrBuilder
    • getLabelsCount

      public int getLabelsCount()
      Description copied from interface: EndpointPolicyOrBuilder
       Optional. Set of label tags associated with the EndpointPolicy resource.
       
      map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsCount in interface EndpointPolicyOrBuilder
    • containsLabels

      public boolean containsLabels(String key)
       Optional. Set of label tags associated with the EndpointPolicy resource.
       
      map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      containsLabels in interface EndpointPolicyOrBuilder
    • getLabels

      @Deprecated public Map<String,String> getLabels()
      Deprecated.
      Use getLabelsMap() instead.
      Specified by:
      getLabels in interface EndpointPolicyOrBuilder
    • getLabelsMap

      public Map<String,String> getLabelsMap()
       Optional. Set of label tags associated with the EndpointPolicy resource.
       
      map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsMap in interface EndpointPolicyOrBuilder
    • getLabelsOrDefault

      public String getLabelsOrDefault(String key, String defaultValue)
       Optional. Set of label tags associated with the EndpointPolicy resource.
       
      map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsOrDefault in interface EndpointPolicyOrBuilder
    • getLabelsOrThrow

      public String getLabelsOrThrow(String key)
       Optional. Set of label tags associated with the EndpointPolicy resource.
       
      map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLabelsOrThrow in interface EndpointPolicyOrBuilder
    • getTypeValue

      public int getTypeValue()
       Required. The type of endpoint policy. This is primarily used to validate
       the configuration.
       
      .google.cloud.networkservices.v1.EndpointPolicy.EndpointPolicyType type = 5 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getTypeValue in interface EndpointPolicyOrBuilder
      Returns:
      The enum numeric value on the wire for type.
    • getType

       Required. The type of endpoint policy. This is primarily used to validate
       the configuration.
       
      .google.cloud.networkservices.v1.EndpointPolicy.EndpointPolicyType type = 5 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getType in interface EndpointPolicyOrBuilder
      Returns:
      The type.
    • getAuthorizationPolicy

      public String getAuthorizationPolicy()
       Optional. This field specifies the URL of AuthorizationPolicy resource that
       applies authorization policies to the inbound traffic at the
       matched endpoints. Refer to Authorization. If this field is not
       specified, authorization is disabled(no authz checks) for this
       endpoint.
       
      string authorization_policy = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getAuthorizationPolicy in interface EndpointPolicyOrBuilder
      Returns:
      The authorizationPolicy.
    • getAuthorizationPolicyBytes

      public com.google.protobuf.ByteString getAuthorizationPolicyBytes()
       Optional. This field specifies the URL of AuthorizationPolicy resource that
       applies authorization policies to the inbound traffic at the
       matched endpoints. Refer to Authorization. If this field is not
       specified, authorization is disabled(no authz checks) for this
       endpoint.
       
      string authorization_policy = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getAuthorizationPolicyBytes in interface EndpointPolicyOrBuilder
      Returns:
      The bytes for authorizationPolicy.
    • hasEndpointMatcher

      public boolean hasEndpointMatcher()
       Required. A matcher that selects endpoints to which the policies should be
       applied.
       
      .google.cloud.networkservices.v1.EndpointMatcher endpoint_matcher = 9 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasEndpointMatcher in interface EndpointPolicyOrBuilder
      Returns:
      Whether the endpointMatcher field is set.
    • getEndpointMatcher

      public EndpointMatcher getEndpointMatcher()
       Required. A matcher that selects endpoints to which the policies should be
       applied.
       
      .google.cloud.networkservices.v1.EndpointMatcher endpoint_matcher = 9 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getEndpointMatcher in interface EndpointPolicyOrBuilder
      Returns:
      The endpointMatcher.
    • getEndpointMatcherOrBuilder

      public EndpointMatcherOrBuilder getEndpointMatcherOrBuilder()
       Required. A matcher that selects endpoints to which the policies should be
       applied.
       
      .google.cloud.networkservices.v1.EndpointMatcher endpoint_matcher = 9 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getEndpointMatcherOrBuilder in interface EndpointPolicyOrBuilder
    • hasTrafficPortSelector

      public boolean hasTrafficPortSelector()
       Optional. Port selector for the (matched) endpoints. If no port selector is
       provided, the matched config is applied to all ports.
       
      .google.cloud.networkservices.v1.TrafficPortSelector traffic_port_selector = 10 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasTrafficPortSelector in interface EndpointPolicyOrBuilder
      Returns:
      Whether the trafficPortSelector field is set.
    • getTrafficPortSelector

      public TrafficPortSelector getTrafficPortSelector()
       Optional. Port selector for the (matched) endpoints. If no port selector is
       provided, the matched config is applied to all ports.
       
      .google.cloud.networkservices.v1.TrafficPortSelector traffic_port_selector = 10 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getTrafficPortSelector in interface EndpointPolicyOrBuilder
      Returns:
      The trafficPortSelector.
    • getTrafficPortSelectorOrBuilder

      public TrafficPortSelectorOrBuilder getTrafficPortSelectorOrBuilder()
       Optional. Port selector for the (matched) endpoints. If no port selector is
       provided, the matched config is applied to all ports.
       
      .google.cloud.networkservices.v1.TrafficPortSelector traffic_port_selector = 10 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getTrafficPortSelectorOrBuilder in interface EndpointPolicyOrBuilder
    • getDescription

      public String getDescription()
       Optional. A free-text description of the resource. Max length 1024
       characters.
       
      string description = 11 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDescription in interface EndpointPolicyOrBuilder
      Returns:
      The description.
    • getDescriptionBytes

      public com.google.protobuf.ByteString getDescriptionBytes()
       Optional. A free-text description of the resource. Max length 1024
       characters.
       
      string description = 11 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDescriptionBytes in interface EndpointPolicyOrBuilder
      Returns:
      The bytes for description.
    • getServerTlsPolicy

      public String getServerTlsPolicy()
       Optional. A URL referring to ServerTlsPolicy resource. ServerTlsPolicy is
       used to determine the authentication policy to be applied to terminate the
       inbound traffic at the identified backends. If this field is not set,
       authentication is disabled(open) for this endpoint.
       
      string server_tls_policy = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getServerTlsPolicy in interface EndpointPolicyOrBuilder
      Returns:
      The serverTlsPolicy.
    • getServerTlsPolicyBytes

      public com.google.protobuf.ByteString getServerTlsPolicyBytes()
       Optional. A URL referring to ServerTlsPolicy resource. ServerTlsPolicy is
       used to determine the authentication policy to be applied to terminate the
       inbound traffic at the identified backends. If this field is not set,
       authentication is disabled(open) for this endpoint.
       
      string server_tls_policy = 12 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getServerTlsPolicyBytes in interface EndpointPolicyOrBuilder
      Returns:
      The bytes for serverTlsPolicy.
    • getClientTlsPolicy

      public String getClientTlsPolicy()
       Optional. A URL referring to a ClientTlsPolicy resource. ClientTlsPolicy
       can be set to specify the authentication for traffic from the proxy to the
       actual endpoints. More specifically, it is applied to the outgoing traffic
       from the proxy to the endpoint. This is typically used for sidecar model
       where the proxy identifies itself as endpoint to the control plane, with
       the connection between sidecar and endpoint requiring authentication. If
       this field is not set, authentication is disabled(open). Applicable only
       when EndpointPolicyType is SIDECAR_PROXY.
       
      string client_tls_policy = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getClientTlsPolicy in interface EndpointPolicyOrBuilder
      Returns:
      The clientTlsPolicy.
    • getClientTlsPolicyBytes

      public com.google.protobuf.ByteString getClientTlsPolicyBytes()
       Optional. A URL referring to a ClientTlsPolicy resource. ClientTlsPolicy
       can be set to specify the authentication for traffic from the proxy to the
       actual endpoints. More specifically, it is applied to the outgoing traffic
       from the proxy to the endpoint. This is typically used for sidecar model
       where the proxy identifies itself as endpoint to the control plane, with
       the connection between sidecar and endpoint requiring authentication. If
       this field is not set, authentication is disabled(open). Applicable only
       when EndpointPolicyType is SIDECAR_PROXY.
       
      string client_tls_policy = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
      Specified by:
      getClientTlsPolicyBytes in interface EndpointPolicyOrBuilder
      Returns:
      The bytes for clientTlsPolicy.
    • 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 EndpointPolicy parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

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

      public static EndpointPolicy parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

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

      public static EndpointPolicy parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

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

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

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

      public EndpointPolicy.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static EndpointPolicy.Builder newBuilder()
    • newBuilder

      public static EndpointPolicy.Builder newBuilder(EndpointPolicy prototype)
    • toBuilder

      public EndpointPolicy.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

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

      public static EndpointPolicy getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<EndpointPolicy> parser()
    • getParserForType

      public com.google.protobuf.Parser<EndpointPolicy> 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 EndpointPolicy getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder