Class ResourceLocator

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.github.xds.core.v3.ResourceLocator
All Implemented Interfaces:
ResourceLocatorOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

public final class ResourceLocator extends com.google.protobuf.GeneratedMessage implements ResourceLocatorOrBuilder
 xDS resource locators identify a xDS resource name and instruct the
 data-plane load balancer on how the resource may be located.

 Resource locators have a canonical xdstp:// URI representation:

 xdstp://{authority}/{type_url}/{id}?{context_params}{#directive,*}

 where context_params take the form of URI query parameters.

 Resource locators have a similar canonical http:// URI representation:

 http://{authority}/{type_url}/{id}?{context_params}{#directive,*}

 Resource locators also have a simplified file:// URI representation:

 file:///{id}{#directive,*}
 
Protobuf type xds.core.v3.ResourceLocator
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • contextParamSpecifierCase_

      private int contextParamSpecifierCase_
    • contextParamSpecifier_

      private Object contextParamSpecifier_
    • SCHEME_FIELD_NUMBER

      public static final int SCHEME_FIELD_NUMBER
      See Also:
    • scheme_

      private int scheme_
    • ID_FIELD_NUMBER

      public static final int ID_FIELD_NUMBER
      See Also:
    • id_

      private volatile Object id_
    • AUTHORITY_FIELD_NUMBER

      public static final int AUTHORITY_FIELD_NUMBER
      See Also:
    • authority_

      private volatile Object authority_
    • RESOURCE_TYPE_FIELD_NUMBER

      public static final int RESOURCE_TYPE_FIELD_NUMBER
      See Also:
    • resourceType_

      private volatile Object resourceType_
    • EXACT_CONTEXT_FIELD_NUMBER

      public static final int EXACT_CONTEXT_FIELD_NUMBER
      See Also:
    • DIRECTIVES_FIELD_NUMBER

      public static final int DIRECTIVES_FIELD_NUMBER
      See Also:
    • directives_

      private List<ResourceLocator.Directive> directives_
    • memoizedIsInitialized

      private byte memoizedIsInitialized
    • DEFAULT_INSTANCE

      private static final ResourceLocator DEFAULT_INSTANCE
    • PARSER

      private static final com.google.protobuf.Parser<ResourceLocator> PARSER
  • Constructor Details

    • ResourceLocator

      private ResourceLocator(com.google.protobuf.GeneratedMessage.Builder<?> builder)
    • ResourceLocator

      private ResourceLocator()
  • 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
    • getContextParamSpecifierCase

      public ResourceLocator.ContextParamSpecifierCase getContextParamSpecifierCase()
      Specified by:
      getContextParamSpecifierCase in interface ResourceLocatorOrBuilder
    • getSchemeValue

      public int getSchemeValue()
       URI scheme.
       
      .xds.core.v3.ResourceLocator.Scheme scheme = 1 [(.validate.rules) = { ... }
      Specified by:
      getSchemeValue in interface ResourceLocatorOrBuilder
      Returns:
      The enum numeric value on the wire for scheme.
    • getScheme

      public ResourceLocator.Scheme getScheme()
       URI scheme.
       
      .xds.core.v3.ResourceLocator.Scheme scheme = 1 [(.validate.rules) = { ... }
      Specified by:
      getScheme in interface ResourceLocatorOrBuilder
      Returns:
      The scheme.
    • getId

      public String getId()
       Opaque identifier for the resource. Any '/' will not be escaped during URI
       encoding and will form part of the URI path. This may end
       with ‘*’ for glob collection references.
       
      string id = 2;
      Specified by:
      getId in interface ResourceLocatorOrBuilder
      Returns:
      The id.
    • getIdBytes

      public com.google.protobuf.ByteString getIdBytes()
       Opaque identifier for the resource. Any '/' will not be escaped during URI
       encoding and will form part of the URI path. This may end
       with ‘*’ for glob collection references.
       
      string id = 2;
      Specified by:
      getIdBytes in interface ResourceLocatorOrBuilder
      Returns:
      The bytes for id.
    • getAuthority

      public String getAuthority()
       Logical authority for resource (not necessarily transport network address).
       Authorities are opaque in the xDS API, data-plane load balancers will map
       them to concrete network transports such as an xDS management server, e.g.
       via envoy.config.core.v3.ConfigSource.
       
      string authority = 3;
      Specified by:
      getAuthority in interface ResourceLocatorOrBuilder
      Returns:
      The authority.
    • getAuthorityBytes

      public com.google.protobuf.ByteString getAuthorityBytes()
       Logical authority for resource (not necessarily transport network address).
       Authorities are opaque in the xDS API, data-plane load balancers will map
       them to concrete network transports such as an xDS management server, e.g.
       via envoy.config.core.v3.ConfigSource.
       
      string authority = 3;
      Specified by:
      getAuthorityBytes in interface ResourceLocatorOrBuilder
      Returns:
      The bytes for authority.
    • getResourceType

      public String getResourceType()
       Fully qualified resource type (as in type URL without types.googleapis.com/
       prefix).
       
      string resource_type = 4 [(.validate.rules) = { ... }
      Specified by:
      getResourceType in interface ResourceLocatorOrBuilder
      Returns:
      The resourceType.
    • getResourceTypeBytes

      public com.google.protobuf.ByteString getResourceTypeBytes()
       Fully qualified resource type (as in type URL without types.googleapis.com/
       prefix).
       
      string resource_type = 4 [(.validate.rules) = { ... }
      Specified by:
      getResourceTypeBytes in interface ResourceLocatorOrBuilder
      Returns:
      The bytes for resourceType.
    • hasExactContext

      public boolean hasExactContext()
       Additional parameters that can be used to select resource variants.
       Matches must be exact, i.e. all context parameters must match exactly and
       there must be no additional context parameters set on the matched
       resource.
       
      .xds.core.v3.ContextParams exact_context = 5;
      Specified by:
      hasExactContext in interface ResourceLocatorOrBuilder
      Returns:
      Whether the exactContext field is set.
    • getExactContext

      public ContextParams getExactContext()
       Additional parameters that can be used to select resource variants.
       Matches must be exact, i.e. all context parameters must match exactly and
       there must be no additional context parameters set on the matched
       resource.
       
      .xds.core.v3.ContextParams exact_context = 5;
      Specified by:
      getExactContext in interface ResourceLocatorOrBuilder
      Returns:
      The exactContext.
    • getExactContextOrBuilder

      public ContextParamsOrBuilder getExactContextOrBuilder()
       Additional parameters that can be used to select resource variants.
       Matches must be exact, i.e. all context parameters must match exactly and
       there must be no additional context parameters set on the matched
       resource.
       
      .xds.core.v3.ContextParams exact_context = 5;
      Specified by:
      getExactContextOrBuilder in interface ResourceLocatorOrBuilder
    • getDirectivesList

      public List<ResourceLocator.Directive> getDirectivesList()
       A list of directives that appear in the xDS resource locator #fragment.
      
       When encoding to URI form, directives are percent encoded with comma
       separation.
       
      repeated .xds.core.v3.ResourceLocator.Directive directives = 6;
      Specified by:
      getDirectivesList in interface ResourceLocatorOrBuilder
    • getDirectivesOrBuilderList

      public List<? extends ResourceLocator.DirectiveOrBuilder> getDirectivesOrBuilderList()
       A list of directives that appear in the xDS resource locator #fragment.
      
       When encoding to URI form, directives are percent encoded with comma
       separation.
       
      repeated .xds.core.v3.ResourceLocator.Directive directives = 6;
      Specified by:
      getDirectivesOrBuilderList in interface ResourceLocatorOrBuilder
    • getDirectivesCount

      public int getDirectivesCount()
       A list of directives that appear in the xDS resource locator #fragment.
      
       When encoding to URI form, directives are percent encoded with comma
       separation.
       
      repeated .xds.core.v3.ResourceLocator.Directive directives = 6;
      Specified by:
      getDirectivesCount in interface ResourceLocatorOrBuilder
    • getDirectives

      public ResourceLocator.Directive getDirectives(int index)
       A list of directives that appear in the xDS resource locator #fragment.
      
       When encoding to URI form, directives are percent encoded with comma
       separation.
       
      repeated .xds.core.v3.ResourceLocator.Directive directives = 6;
      Specified by:
      getDirectives in interface ResourceLocatorOrBuilder
    • getDirectivesOrBuilder

      public ResourceLocator.DirectiveOrBuilder getDirectivesOrBuilder(int index)
       A list of directives that appear in the xDS resource locator #fragment.
      
       When encoding to URI form, directives are percent encoded with comma
       separation.
       
      repeated .xds.core.v3.ResourceLocator.Directive directives = 6;
      Specified by:
      getDirectivesOrBuilder in interface ResourceLocatorOrBuilder
    • 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 ResourceLocator parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

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

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

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

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

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

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

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

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

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

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

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

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

      public static ResourceLocator.Builder newBuilder()
    • newBuilder

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

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

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

      public static ResourceLocator getDefaultInstance()
    • parser

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

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