Class 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.GeneratedMessageV3
    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:
    Serialized Form
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getUnknownFields

        public final com.google.protobuf.UnknownFieldSet getUnknownFields()
        Specified by:
        getUnknownFields in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getUnknownFields in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • 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.
      • 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
      • 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.GeneratedMessageV3
      • 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.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • 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​(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
      • 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.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • 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.GeneratedMessageV3
      • getDefaultInstanceForType

        public ResourceLocator getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder