Package com.github.xds.core.v3
Class ResourceLocator.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<ResourceLocator.Builder>
com.google.protobuf.GeneratedMessage.Builder<ResourceLocator.Builder>
com.github.xds.core.v3.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.GeneratedMessage.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-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Objectprivate intprivate Objectprivate intprivate List<ResourceLocator.Directive> private com.google.protobuf.RepeatedFieldBuilder<ResourceLocator.Directive, ResourceLocator.Directive.Builder, ResourceLocator.DirectiveOrBuilder> private com.google.protobuf.SingleFieldBuilder<ContextParams, ContextParams.Builder, ContextParamsOrBuilder> private Objectprivate Objectprivate int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllDirectives(Iterable<? extends ResourceLocator.Directive> values) A list of directives that appear in the xDS resource locator #fragment.addDirectives(int index, ResourceLocator.Directive value) A list of directives that appear in the xDS resource locator #fragment.addDirectives(int index, ResourceLocator.Directive.Builder builderForValue) A list of directives that appear in the xDS resource locator #fragment.A list of directives that appear in the xDS resource locator #fragment.addDirectives(ResourceLocator.Directive.Builder builderForValue) A list of directives that appear in the xDS resource locator #fragment.A list of directives that appear in the xDS resource locator #fragment.addDirectivesBuilder(int index) A list of directives that appear in the xDS resource locator #fragment.build()private voidbuildPartial0(ResourceLocator result) private voidbuildPartialOneofs(ResourceLocator result) private voidclear()Logical authority for resource (not necessarily transport network address).A list of directives that appear in the xDS resource locator #fragment.Additional parameters that can be used to select resource variants.clearId()Opaque identifier for the resource.Fully qualified resource type (as in type URL without types.googleapis.com/ prefix).URI scheme.private voidLogical authority for resource (not necessarily transport network address).com.google.protobuf.ByteStringLogical authority for resource (not necessarily transport network address).static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetDirectives(int index) A list of directives that appear in the xDS resource locator #fragment.getDirectivesBuilder(int index) A list of directives that appear in the xDS resource locator #fragment.A list of directives that appear in the xDS resource locator #fragment.intA list of directives that appear in the xDS resource locator #fragment.A list of directives that appear in the xDS resource locator #fragment.getDirectivesOrBuilder(int index) A list of directives that appear in the xDS resource locator #fragment.List<? extends ResourceLocator.DirectiveOrBuilder> A list of directives that appear in the xDS resource locator #fragment.Additional parameters that can be used to select resource variants.Additional parameters that can be used to select resource variants.Additional parameters that can be used to select resource variants.getId()Opaque identifier for the resource.com.google.protobuf.ByteStringOpaque identifier for the resource.Fully qualified resource type (as in type URL without types.googleapis.com/ prefix).com.google.protobuf.ByteStringFully qualified resource type (as in type URL without types.googleapis.com/ prefix).URI scheme.intURI scheme.booleanAdditional parameters that can be used to select resource variants.private com.google.protobuf.RepeatedFieldBuilder<ResourceLocator.Directive, ResourceLocator.Directive.Builder, ResourceLocator.DirectiveOrBuilder> private com.google.protobuf.SingleFieldBuilder<ContextParams, ContextParams.Builder, ContextParamsOrBuilder> Additional parameters that can be used to select resource variants.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeExactContext(ContextParams value) Additional parameters that can be used to select resource variants.mergeFrom(ResourceLocator other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) removeDirectives(int index) A list of directives that appear in the xDS resource locator #fragment.setAuthority(String value) Logical authority for resource (not necessarily transport network address).setAuthorityBytes(com.google.protobuf.ByteString value) Logical authority for resource (not necessarily transport network address).setDirectives(int index, ResourceLocator.Directive value) A list of directives that appear in the xDS resource locator #fragment.setDirectives(int index, ResourceLocator.Directive.Builder builderForValue) A list of directives that appear in the xDS resource locator #fragment.setExactContext(ContextParams value) Additional parameters that can be used to select resource variants.setExactContext(ContextParams.Builder builderForValue) Additional parameters that can be used to select resource variants.Opaque identifier for the resource.setIdBytes(com.google.protobuf.ByteString value) Opaque identifier for the resource.setResourceType(String value) Fully qualified resource type (as in type URL without types.googleapis.com/ prefix).setResourceTypeBytes(com.google.protobuf.ByteString value) Fully qualified resource type (as in type URL without types.googleapis.com/ prefix).setScheme(ResourceLocator.Scheme value) URI scheme.setSchemeValue(int value) URI scheme.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
contextParamSpecifierCase_
private int contextParamSpecifierCase_ -
contextParamSpecifier_
-
bitField0_
private int bitField0_ -
scheme_
private int scheme_ -
id_
-
authority_
-
resourceType_
-
exactContextBuilder_
private com.google.protobuf.SingleFieldBuilder<ContextParams,ContextParams.Builder, exactContextBuilder_ContextParamsOrBuilder> -
directives_
-
directivesBuilder_
private com.google.protobuf.RepeatedFieldBuilder<ResourceLocator.Directive,ResourceLocator.Directive.Builder, directivesBuilder_ResourceLocator.DirectiveOrBuilder>
-
-
Constructor Details
-
Builder
private Builder() -
Builder
private Builder(com.google.protobuf.AbstractMessage.BuilderParent parent)
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<ResourceLocator.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<ResourceLocator.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<ResourceLocator.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartialRepeatedFields
-
buildPartial0
-
buildPartialOneofs
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<ResourceLocator.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<ResourceLocator.Builder>
-
mergeFrom
public ResourceLocator.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<ResourceLocator.Builder>- Throws:
IOException
-
getContextParamSpecifierCase
- Specified by:
getContextParamSpecifierCasein interfaceResourceLocatorOrBuilder
-
clearContextParamSpecifier
-
getSchemeValue
public int getSchemeValue()URI scheme.
.xds.core.v3.ResourceLocator.Scheme scheme = 1 [(.validate.rules) = { ... }- Specified by:
getSchemeValuein interfaceResourceLocatorOrBuilder- Returns:
- The enum numeric value on the wire for scheme.
-
setSchemeValue
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.
- Throws:
IllegalArgumentException- if UNRECOGNIZED is provided.
-
getScheme
URI scheme.
.xds.core.v3.ResourceLocator.Scheme scheme = 1 [(.validate.rules) = { ... }- Specified by:
getSchemein interfaceResourceLocatorOrBuilder- Returns:
- The scheme.
-
setScheme
URI scheme.
.xds.core.v3.ResourceLocator.Scheme scheme = 1 [(.validate.rules) = { ... }- Parameters:
value- The scheme to set.- Returns:
- This builder for chaining.
-
clearScheme
URI scheme.
.xds.core.v3.ResourceLocator.Scheme scheme = 1 [(.validate.rules) = { ... }- Returns:
- This builder for chaining.
-
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:
getIdin interfaceResourceLocatorOrBuilder- 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:
getIdBytesin interfaceResourceLocatorOrBuilder- Returns:
- The bytes for id.
-
setId
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
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
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
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:
getAuthorityin interfaceResourceLocatorOrBuilder- 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:
getAuthorityBytesin interfaceResourceLocatorOrBuilder- Returns:
- The bytes for authority.
-
setAuthority
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
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
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
Fully qualified resource type (as in type URL without types.googleapis.com/ prefix).
string resource_type = 4 [(.validate.rules) = { ... }- Specified by:
getResourceTypein interfaceResourceLocatorOrBuilder- 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:
getResourceTypeBytesin interfaceResourceLocatorOrBuilder- Returns:
- The bytes for resourceType.
-
setResourceType
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
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
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:
hasExactContextin interfaceResourceLocatorOrBuilder- Returns:
- Whether the exactContext field is set.
-
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:
getExactContextin interfaceResourceLocatorOrBuilder- Returns:
- The exactContext.
-
setExactContext
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
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
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
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
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
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:
getExactContextOrBuilderin interfaceResourceLocatorOrBuilder
-
internalGetExactContextFieldBuilder
private com.google.protobuf.SingleFieldBuilder<ContextParams,ContextParams.Builder, internalGetExactContextFieldBuilder()ContextParamsOrBuilder> 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; -
ensureDirectivesIsMutable
private void ensureDirectivesIsMutable() -
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:
getDirectivesListin interfaceResourceLocatorOrBuilder
-
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:
getDirectivesCountin interfaceResourceLocatorOrBuilder
-
getDirectives
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:
getDirectivesin interfaceResourceLocatorOrBuilder
-
setDirectives
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
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
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
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
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
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
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
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:
getDirectivesOrBuilderin interfaceResourceLocatorOrBuilder
-
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:
getDirectivesOrBuilderListin interfaceResourceLocatorOrBuilder
-
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
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
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; -
internalGetDirectivesFieldBuilder
private com.google.protobuf.RepeatedFieldBuilder<ResourceLocator.Directive,ResourceLocator.Directive.Builder, internalGetDirectivesFieldBuilder()ResourceLocator.DirectiveOrBuilder>
-