Package com.github.xds.core.v3
Class ResourceLocator
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.github.xds.core.v3.ResourceLocator
- All Implemented Interfaces:
ResourceLocatorOrBuilder
,com.google.protobuf.Message
,com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Serializable
public final class ResourceLocator
extends com.google.protobuf.GeneratedMessage
implements ResourceLocatorOrBuilder
xDS resource locators identify a xDS resource name and instruct the data-plane load balancer on how the resource may be located. Resource locators have a canonical xdstp:// URI representation: xdstp://{authority}/{type_url}/{id}?{context_params}{#directive,*} where context_params take the form of URI query parameters. Resource locators have a similar canonical http:// URI representation: http://{authority}/{type_url}/{id}?{context_params}{#directive,*} Resource locators also have a simplified file:// URI representation: file:///{id}{#directive,*}Protobuf type
xds.core.v3.ResourceLocator
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
xDS resource locators identify a xDS resource name and instruct the data-plane load balancer on how the resource may be located.static enum
static final class
Directives provide information to data-plane load balancers on how xDS resource names are to be interpreted and potentially further resolved.static interface
static enum
Protobuf enumxds.core.v3.ResourceLocator.Scheme
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,
BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParent
Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Object
static final int
private Object
private int
private static final ResourceLocator
private List
<ResourceLocator.Directive> static final int
static final int
private Object
static final int
private byte
private static final com.google.protobuf.Parser
<ResourceLocator> static final int
private Object
private int
static final int
private static final long
Fields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, unknownFields
Fields inherited from class com.google.protobuf.AbstractMessage
memoizedSize
Fields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
private
ResourceLocator
(com.google.protobuf.GeneratedMessage.Builder<?> builder) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Logical authority for resource (not necessarily transport network address).com.google.protobuf.ByteString
Logical authority for resource (not necessarily transport network address).static ResourceLocator
static final com.google.protobuf.Descriptors.Descriptor
getDirectives
(int index) 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.getId()
Opaque identifier for the resource.com.google.protobuf.ByteString
Opaque identifier for the resource.com.google.protobuf.Parser
<ResourceLocator> 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.int
boolean
Additional parameters that can be used to select resource variants.int
hashCode()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
final boolean
static ResourceLocator.Builder
static ResourceLocator.Builder
newBuilder
(ResourceLocator prototype) protected ResourceLocator.Builder
newBuilderForType
(com.google.protobuf.AbstractMessage.BuilderParent parent) static ResourceLocator
parseDelimitedFrom
(InputStream input) static ResourceLocator
parseDelimitedFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ResourceLocator
parseFrom
(byte[] data) static ResourceLocator
parseFrom
(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ResourceLocator
parseFrom
(com.google.protobuf.ByteString data) static ResourceLocator
parseFrom
(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ResourceLocator
parseFrom
(com.google.protobuf.CodedInputStream input) static ResourceLocator
parseFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ResourceLocator
parseFrom
(InputStream input) static ResourceLocator
parseFrom
(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ResourceLocator
parseFrom
(ByteBuffer data) static ResourceLocator
parseFrom
(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser
<ResourceLocator> parser()
void
writeTo
(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toString
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeTo
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
contextParamSpecifierCase_
private int contextParamSpecifierCase_ -
contextParamSpecifier_
-
SCHEME_FIELD_NUMBER
public static final int SCHEME_FIELD_NUMBER- See Also:
-
scheme_
private int scheme_ -
ID_FIELD_NUMBER
public static final int ID_FIELD_NUMBER- See Also:
-
id_
-
AUTHORITY_FIELD_NUMBER
public static final int AUTHORITY_FIELD_NUMBER- See Also:
-
authority_
-
RESOURCE_TYPE_FIELD_NUMBER
public static final int RESOURCE_TYPE_FIELD_NUMBER- See Also:
-
resourceType_
-
EXACT_CONTEXT_FIELD_NUMBER
public static final int EXACT_CONTEXT_FIELD_NUMBER- See Also:
-
DIRECTIVES_FIELD_NUMBER
public static final int DIRECTIVES_FIELD_NUMBER- See Also:
-
directives_
-
memoizedIsInitialized
private byte memoizedIsInitialized -
DEFAULT_INSTANCE
-
PARSER
-
-
Constructor Details
-
ResourceLocator
private ResourceLocator(com.google.protobuf.GeneratedMessage.Builder<?> builder) -
ResourceLocator
private ResourceLocator()
-
-
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
-
getContextParamSpecifierCase
- Specified by:
getContextParamSpecifierCase
in interfaceResourceLocatorOrBuilder
-
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.
-
getScheme
URI scheme.
.xds.core.v3.ResourceLocator.Scheme scheme = 1 [(.validate.rules) = { ... }
- Specified by:
getScheme
in interfaceResourceLocatorOrBuilder
- Returns:
- The scheme.
-
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.
-
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.
-
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.
-
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.
-
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
-
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
-
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
-
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
-
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
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessage
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in classcom.google.protobuf.AbstractMessage
-
parseFrom
public static ResourceLocator parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ResourceLocator parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ResourceLocator parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ResourceLocator parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ResourceLocator parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ResourceLocator parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static ResourceLocator parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static ResourceLocator parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static ResourceLocator parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static ResourceLocator parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected ResourceLocator.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForType
in classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-