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
@Generated
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 classxDS resource locators identify a xDS resource name and instruct the data-plane load balancer on how the resource may be located.static enumstatic final classDirectives provide information to data-plane load balancers on how xDS resource names are to be interpreted and potentially further resolved.static interfacestatic enumProtobuf enumxds.core.v3.ResourceLocator.SchemeNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT, T>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Objectstatic final intprivate Objectprivate intprivate static final ResourceLocatorprivate List<ResourceLocator.Directive> static final intstatic final intprivate Objectstatic final intprivate byteprivate static final com.google.protobuf.Parser<ResourceLocator> static final intprivate Objectprivate intstatic final intprivate static final longFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateprivateResourceLocator(com.google.protobuf.GeneratedMessage.Builder<?> builder) -
Method Summary
Modifier and TypeMethodDescriptionbooleanLogical authority for resource (not necessarily transport network address).com.google.protobuf.ByteStringLogical authority for resource (not necessarily transport network address).static ResourceLocatorstatic final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetDirectives(int index) 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.getId()Opaque identifier for the resource.com.google.protobuf.ByteStringOpaque 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.ByteStringFully qualified resource type (as in type URL without types.googleapis.com/ prefix).URI scheme.intURI scheme.intbooleanAdditional parameters that can be used to select resource variants.inthashCode()protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic ResourceLocator.Builderstatic ResourceLocator.BuildernewBuilder(ResourceLocator prototype) protected ResourceLocator.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static ResourceLocatorparseDelimitedFrom(InputStream input) static ResourceLocatorparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ResourceLocatorparseFrom(byte[] data) static ResourceLocatorparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ResourceLocatorparseFrom(com.google.protobuf.ByteString data) static ResourceLocatorparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ResourceLocatorparseFrom(com.google.protobuf.CodedInputStream input) static ResourceLocatorparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ResourceLocatorparseFrom(InputStream input) static ResourceLocatorparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static ResourceLocatorparseFrom(ByteBuffer data) static ResourceLocatorparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<ResourceLocator> parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, 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() -
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
getContextParamSpecifierCase
- Specified by:
getContextParamSpecifierCasein interfaceResourceLocatorOrBuilder
-
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.
-
getScheme
URI scheme.
.xds.core.v3.ResourceLocator.Scheme scheme = 1 [(.validate.rules) = { ... }- Specified by:
getSchemein 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:
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.
-
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.
-
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.
-
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.
-
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
-
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
-
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
-
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
-
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
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein 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:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected ResourceLocator.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-