public static final class ResourceLocator.Directive.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<ResourceLocator.Directive.Builder> implements ResourceLocator.DirectiveOrBuilder
Directives provide information to data-plane load balancers on how xDS resource names are to be interpreted and potentially further resolved. For example, they may provide alternative resource locators for when primary resolution fails. Directives are not part of resource names and do not appear in a xDS transport discovery request. When encoding to URIs, directives take the form: <directive name>=<string representation of directive value> For example, we can have alt=xdstp://foo/bar or entry=some%20thing. Each directive value type may have its own string encoding, in the case of ResourceLocator there is a recursive URI encoding. Percent encoding applies to the URI encoding of the directive value. Multiple directives are comma-separated, so the reserved characters that require percent encoding in a directive value are [',', '#', '[', ']', '%']. These are the RFC3986 fragment reserved characters with the addition of the xDS scheme specific ','. See https://tools.ietf.org/html/rfc3986#page-49 for further details on URI ABNF and reserved characters.Protobuf type
xds.core.v3.ResourceLocator.Directive| Modifier and Type | Method and Description |
|---|---|
ResourceLocator.Directive.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
ResourceLocator.Directive |
build() |
ResourceLocator.Directive |
buildPartial() |
ResourceLocator.Directive.Builder |
clear() |
ResourceLocator.Directive.Builder |
clearAlt()
An alternative resource locator for fallback if the resource is
unavailable.
|
ResourceLocator.Directive.Builder |
clearDirective() |
ResourceLocator.Directive.Builder |
clearEntry()
List collections support inlining of resources via the entry field in
Resource.
|
ResourceLocator.Directive.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
ResourceLocator.Directive.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
ResourceLocator.Directive.Builder |
clone() |
ResourceLocator |
getAlt()
An alternative resource locator for fallback if the resource is
unavailable.
|
ResourceLocator.Builder |
getAltBuilder()
An alternative resource locator for fallback if the resource is
unavailable.
|
ResourceLocatorOrBuilder |
getAltOrBuilder()
An alternative resource locator for fallback if the resource is
unavailable.
|
ResourceLocator.Directive |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
ResourceLocator.Directive.DirectiveCase |
getDirectiveCase() |
String |
getEntry()
List collections support inlining of resources via the entry field in
Resource.
|
com.google.protobuf.ByteString |
getEntryBytes()
List collections support inlining of resources via the entry field in
Resource.
|
boolean |
hasAlt()
An alternative resource locator for fallback if the resource is
unavailable.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
ResourceLocator.Directive.Builder |
mergeAlt(ResourceLocator value)
An alternative resource locator for fallback if the resource is
unavailable.
|
ResourceLocator.Directive.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
ResourceLocator.Directive.Builder |
mergeFrom(com.google.protobuf.Message other) |
ResourceLocator.Directive.Builder |
mergeFrom(ResourceLocator.Directive other) |
ResourceLocator.Directive.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
ResourceLocator.Directive.Builder |
setAlt(ResourceLocator.Builder builderForValue)
An alternative resource locator for fallback if the resource is
unavailable.
|
ResourceLocator.Directive.Builder |
setAlt(ResourceLocator value)
An alternative resource locator for fallback if the resource is
unavailable.
|
ResourceLocator.Directive.Builder |
setEntry(String value)
List collections support inlining of resources via the entry field in
Resource.
|
ResourceLocator.Directive.Builder |
setEntryBytes(com.google.protobuf.ByteString value)
List collections support inlining of resources via the entry field in
Resource.
|
ResourceLocator.Directive.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
ResourceLocator.Directive.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
ResourceLocator.Directive.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceLocator.Directive.Builder>public ResourceLocator.Directive.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceLocator.Directive.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceLocator.Directive.Builder>public ResourceLocator.Directive getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic ResourceLocator.Directive build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic ResourceLocator.Directive buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic ResourceLocator.Directive.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceLocator.Directive.Builder>public ResourceLocator.Directive.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceLocator.Directive.Builder>public ResourceLocator.Directive.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceLocator.Directive.Builder>public ResourceLocator.Directive.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceLocator.Directive.Builder>public ResourceLocator.Directive.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceLocator.Directive.Builder>public ResourceLocator.Directive.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceLocator.Directive.Builder>public ResourceLocator.Directive.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<ResourceLocator.Directive.Builder>public ResourceLocator.Directive.Builder mergeFrom(ResourceLocator.Directive other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceLocator.Directive.Builder>public ResourceLocator.Directive.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<ResourceLocator.Directive.Builder>IOExceptionpublic ResourceLocator.Directive.DirectiveCase getDirectiveCase()
getDirectiveCase in interface ResourceLocator.DirectiveOrBuilderpublic ResourceLocator.Directive.Builder clearDirective()
public boolean hasAlt()
An alternative resource locator for fallback if the resource is unavailable. For example, take the resource locator: xdstp://foo/some-type/some-route-table#alt=xdstp://bar/some-type/another-route-table If the data-plane load balancer is unable to reach `foo` to fetch the resource, it will fallback to `bar`. Alternative resources do not need to have equivalent content, but they should be functional substitutes.
.xds.core.v3.ResourceLocator alt = 1;hasAlt in interface ResourceLocator.DirectiveOrBuilderpublic ResourceLocator getAlt()
An alternative resource locator for fallback if the resource is unavailable. For example, take the resource locator: xdstp://foo/some-type/some-route-table#alt=xdstp://bar/some-type/another-route-table If the data-plane load balancer is unable to reach `foo` to fetch the resource, it will fallback to `bar`. Alternative resources do not need to have equivalent content, but they should be functional substitutes.
.xds.core.v3.ResourceLocator alt = 1;getAlt in interface ResourceLocator.DirectiveOrBuilderpublic ResourceLocator.Directive.Builder setAlt(ResourceLocator value)
An alternative resource locator for fallback if the resource is unavailable. For example, take the resource locator: xdstp://foo/some-type/some-route-table#alt=xdstp://bar/some-type/another-route-table If the data-plane load balancer is unable to reach `foo` to fetch the resource, it will fallback to `bar`. Alternative resources do not need to have equivalent content, but they should be functional substitutes.
.xds.core.v3.ResourceLocator alt = 1;public ResourceLocator.Directive.Builder setAlt(ResourceLocator.Builder builderForValue)
An alternative resource locator for fallback if the resource is unavailable. For example, take the resource locator: xdstp://foo/some-type/some-route-table#alt=xdstp://bar/some-type/another-route-table If the data-plane load balancer is unable to reach `foo` to fetch the resource, it will fallback to `bar`. Alternative resources do not need to have equivalent content, but they should be functional substitutes.
.xds.core.v3.ResourceLocator alt = 1;public ResourceLocator.Directive.Builder mergeAlt(ResourceLocator value)
An alternative resource locator for fallback if the resource is unavailable. For example, take the resource locator: xdstp://foo/some-type/some-route-table#alt=xdstp://bar/some-type/another-route-table If the data-plane load balancer is unable to reach `foo` to fetch the resource, it will fallback to `bar`. Alternative resources do not need to have equivalent content, but they should be functional substitutes.
.xds.core.v3.ResourceLocator alt = 1;public ResourceLocator.Directive.Builder clearAlt()
An alternative resource locator for fallback if the resource is unavailable. For example, take the resource locator: xdstp://foo/some-type/some-route-table#alt=xdstp://bar/some-type/another-route-table If the data-plane load balancer is unable to reach `foo` to fetch the resource, it will fallback to `bar`. Alternative resources do not need to have equivalent content, but they should be functional substitutes.
.xds.core.v3.ResourceLocator alt = 1;public ResourceLocator.Builder getAltBuilder()
An alternative resource locator for fallback if the resource is unavailable. For example, take the resource locator: xdstp://foo/some-type/some-route-table#alt=xdstp://bar/some-type/another-route-table If the data-plane load balancer is unable to reach `foo` to fetch the resource, it will fallback to `bar`. Alternative resources do not need to have equivalent content, but they should be functional substitutes.
.xds.core.v3.ResourceLocator alt = 1;public ResourceLocatorOrBuilder getAltOrBuilder()
An alternative resource locator for fallback if the resource is unavailable. For example, take the resource locator: xdstp://foo/some-type/some-route-table#alt=xdstp://bar/some-type/another-route-table If the data-plane load balancer is unable to reach `foo` to fetch the resource, it will fallback to `bar`. Alternative resources do not need to have equivalent content, but they should be functional substitutes.
.xds.core.v3.ResourceLocator alt = 1;getAltOrBuilder in interface ResourceLocator.DirectiveOrBuilderpublic String getEntry()
List collections support inlining of resources via the entry field in Resource. These inlined Resource objects may have an optional name field specified. When specified, the entry directive allows ResourceLocator to directly reference these inlined resources, e.g. xdstp://.../foo#entry=bar.
string entry = 2 [(.validate.rules) = { ... }getEntry in interface ResourceLocator.DirectiveOrBuilderpublic com.google.protobuf.ByteString getEntryBytes()
List collections support inlining of resources via the entry field in Resource. These inlined Resource objects may have an optional name field specified. When specified, the entry directive allows ResourceLocator to directly reference these inlined resources, e.g. xdstp://.../foo#entry=bar.
string entry = 2 [(.validate.rules) = { ... }getEntryBytes in interface ResourceLocator.DirectiveOrBuilderpublic ResourceLocator.Directive.Builder setEntry(String value)
List collections support inlining of resources via the entry field in Resource. These inlined Resource objects may have an optional name field specified. When specified, the entry directive allows ResourceLocator to directly reference these inlined resources, e.g. xdstp://.../foo#entry=bar.
string entry = 2 [(.validate.rules) = { ... }public ResourceLocator.Directive.Builder clearEntry()
List collections support inlining of resources via the entry field in Resource. These inlined Resource objects may have an optional name field specified. When specified, the entry directive allows ResourceLocator to directly reference these inlined resources, e.g. xdstp://.../foo#entry=bar.
string entry = 2 [(.validate.rules) = { ... }public ResourceLocator.Directive.Builder setEntryBytes(com.google.protobuf.ByteString value)
List collections support inlining of resources via the entry field in Resource. These inlined Resource objects may have an optional name field specified. When specified, the entry directive allows ResourceLocator to directly reference these inlined resources, e.g. xdstp://.../foo#entry=bar.
string entry = 2 [(.validate.rules) = { ... }public final ResourceLocator.Directive.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceLocator.Directive.Builder>public final ResourceLocator.Directive.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ResourceLocator.Directive.Builder>Copyright © 2018–2021 The Envoy Project. All rights reserved.