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 Object
private int
private Object
private int
private 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 Object
private Object
private 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 void
buildPartial0
(ResourceLocator result) private void
buildPartialOneofs
(ResourceLocator result) private void
clear()
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 void
Logical authority for resource (not necessarily transport network address).com.google.protobuf.ByteString
Logical authority for resource (not necessarily transport network address).static final com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Descriptors.Descriptor
getDirectives
(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.int
A 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.ByteString
Opaque identifier for the resource.Fully qualified resource type (as in type URL without types.googleapis.com/ prefix).com.google.protobuf.ByteString
Fully qualified resource type (as in type URL without types.googleapis.com/ prefix).URI scheme.int
URI scheme.boolean
Additional 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.FieldAccessorTable
final boolean
mergeExactContext
(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, setUnknownFieldsProto3
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFrom
Methods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFrom
Methods 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:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessage.Builder<ResourceLocator.Builder>
-
clear
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessage.Builder<ResourceLocator.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessage.Builder<ResourceLocator.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartialRepeatedFields
-
buildPartial0
-
buildPartialOneofs
-
mergeFrom
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<ResourceLocator.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in 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:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<ResourceLocator.Builder>
- Throws:
IOException
-
getContextParamSpecifierCase
- Specified by:
getContextParamSpecifierCase
in interfaceResourceLocatorOrBuilder
-
clearContextParamSpecifier
-
getSchemeValue
public int getSchemeValue()URI scheme.
.xds.core.v3.ResourceLocator.Scheme scheme = 1 [(.validate.rules) = { ... }
- Specified by:
getSchemeValue
in 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.
-
getScheme
URI scheme.
.xds.core.v3.ResourceLocator.Scheme scheme = 1 [(.validate.rules) = { ... }
- Specified by:
getScheme
in 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:
getId
in 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:
getIdBytes
in 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:
getAuthority
in 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:
getAuthorityBytes
in 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:
getResourceType
in 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:
getResourceTypeBytes
in 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:
hasExactContext
in 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:
getExactContext
in 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:
getExactContextOrBuilder
in 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:
getDirectivesList
in 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:
getDirectivesCount
in 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:
getDirectives
in 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:
getDirectivesOrBuilder
in 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:
getDirectivesOrBuilderList
in 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>
-