Class ResourceLocator.Builder

  • All Implemented Interfaces:
    ResourceLocatorOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    ResourceLocator

    public static final class ResourceLocator.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<ResourceLocator.Builder>
    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
    • Method Detail

      • 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.Builder<ResourceLocator.Builder>
      • clear

        public ResourceLocator.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceLocator.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceLocator.Builder>
      • getDefaultInstanceForType

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

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

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

        public ResourceLocator.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceLocator.Builder>
      • setField

        public ResourceLocator.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceLocator.Builder>
      • clearField

        public ResourceLocator.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceLocator.Builder>
      • clearOneof

        public ResourceLocator.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceLocator.Builder>
      • setRepeatedField

        public ResourceLocator.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                        int index,
                                                        Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceLocator.Builder>
      • addRepeatedField

        public ResourceLocator.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                        Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceLocator.Builder>
      • mergeFrom

        public ResourceLocator.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ResourceLocator.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceLocator.Builder>
      • mergeFrom

        public ResourceLocator.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                          throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ResourceLocator.Builder>
        Throws:
        IOException
      • 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.
      • setSchemeValue

        public ResourceLocator.Builder setSchemeValue​(int value)
         URI scheme.
         
        .xds.core.v3.ResourceLocator.Scheme scheme = 1 [(.validate.rules) = { ... }
        Parameters:
        value - The enum numeric value on the wire for scheme to set.
        Returns:
        This builder for chaining.
      • setScheme

        public ResourceLocator.Builder setScheme​(ResourceLocator.Scheme value)
         URI scheme.
         
        .xds.core.v3.ResourceLocator.Scheme scheme = 1 [(.validate.rules) = { ... }
        Parameters:
        value - The scheme to set.
        Returns:
        This builder for chaining.
      • clearScheme

        public ResourceLocator.Builder clearScheme()
         URI scheme.
         
        .xds.core.v3.ResourceLocator.Scheme scheme = 1 [(.validate.rules) = { ... }
        Returns:
        This builder for chaining.
      • 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.
      • setId

        public ResourceLocator.Builder setId​(String value)
         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;
        Parameters:
        value - The id to set.
        Returns:
        This builder for chaining.
      • clearId

        public ResourceLocator.Builder clearId()
         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;
        Returns:
        This builder for chaining.
      • setIdBytes

        public ResourceLocator.Builder setIdBytes​(com.google.protobuf.ByteString value)
         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;
        Parameters:
        value - The bytes for id to set.
        Returns:
        This builder for chaining.
      • 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.
      • setAuthority

        public ResourceLocator.Builder setAuthority​(String value)
         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;
        Parameters:
        value - The authority to set.
        Returns:
        This builder for chaining.
      • clearAuthority

        public ResourceLocator.Builder clearAuthority()
         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;
        Returns:
        This builder for chaining.
      • setAuthorityBytes

        public ResourceLocator.Builder setAuthorityBytes​(com.google.protobuf.ByteString value)
         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;
        Parameters:
        value - The bytes for authority to set.
        Returns:
        This builder for chaining.
      • 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.
      • setResourceType

        public ResourceLocator.Builder setResourceType​(String value)
         Fully qualified resource type (as in type URL without types.googleapis.com/
         prefix).
         
        string resource_type = 4 [(.validate.rules) = { ... }
        Parameters:
        value - The resourceType to set.
        Returns:
        This builder for chaining.
      • clearResourceType

        public ResourceLocator.Builder clearResourceType()
         Fully qualified resource type (as in type URL without types.googleapis.com/
         prefix).
         
        string resource_type = 4 [(.validate.rules) = { ... }
        Returns:
        This builder for chaining.
      • setResourceTypeBytes

        public ResourceLocator.Builder setResourceTypeBytes​(com.google.protobuf.ByteString value)
         Fully qualified resource type (as in type URL without types.googleapis.com/
         prefix).
         
        string resource_type = 4 [(.validate.rules) = { ... }
        Parameters:
        value - The bytes for resourceType to set.
        Returns:
        This builder for chaining.
      • 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.
      • setExactContext

        public ResourceLocator.Builder setExactContext​(ContextParams value)
         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;
      • setExactContext

        public ResourceLocator.Builder setExactContext​(ContextParams.Builder builderForValue)
         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;
      • mergeExactContext

        public ResourceLocator.Builder mergeExactContext​(ContextParams value)
         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;
      • clearExactContext

        public ResourceLocator.Builder clearExactContext()
         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;
      • getExactContextBuilder

        public ContextParams.Builder getExactContextBuilder()
         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;
      • 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
      • setDirectives

        public ResourceLocator.Builder setDirectives​(int index,
                                                     ResourceLocator.Directive value)
         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;
      • setDirectives

        public ResourceLocator.Builder setDirectives​(int index,
                                                     ResourceLocator.Directive.Builder builderForValue)
         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;
      • addDirectives

        public ResourceLocator.Builder addDirectives​(ResourceLocator.Directive value)
         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;
      • addDirectives

        public ResourceLocator.Builder addDirectives​(int index,
                                                     ResourceLocator.Directive value)
         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;
      • addDirectives

        public ResourceLocator.Builder addDirectives​(ResourceLocator.Directive.Builder builderForValue)
         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;
      • addDirectives

        public ResourceLocator.Builder addDirectives​(int index,
                                                     ResourceLocator.Directive.Builder builderForValue)
         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;
      • addAllDirectives

        public ResourceLocator.Builder addAllDirectives​(Iterable<? extends ResourceLocator.Directive> values)
         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;
      • clearDirectives

        public ResourceLocator.Builder clearDirectives()
         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;
      • removeDirectives

        public ResourceLocator.Builder removeDirectives​(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;
      • getDirectivesBuilder

        public ResourceLocator.Directive.Builder getDirectivesBuilder​(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;
      • 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
      • addDirectivesBuilder

        public ResourceLocator.Directive.Builder addDirectivesBuilder()
         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;
      • addDirectivesBuilder

        public ResourceLocator.Directive.Builder addDirectivesBuilder​(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;
      • getDirectivesBuilderList

        public List<ResourceLocator.Directive.Builder> getDirectivesBuilderList()
         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;
      • setUnknownFields

        public final ResourceLocator.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceLocator.Builder>
      • mergeUnknownFields

        public final ResourceLocator.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceLocator.Builder>