Package com.github.xds.core.v3
Class ResourceLocator
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- 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.GeneratedMessageV3 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 typexds.core.v3.ResourceLocator
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ResourceLocator.Builder
xDS resource locators identify a xDS resource name and instruct the data-plane load balancer on how the resource may be located.static class
ResourceLocator.ContextParamSpecifierCase
static class
ResourceLocator.Directive
Directives provide information to data-plane load balancers on how xDS resource names are to be interpreted and potentially further resolved.static interface
ResourceLocator.DirectiveOrBuilder
static class
ResourceLocator.Scheme
Protobuf enumxds.core.v3.ResourceLocator.Scheme
-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static int
AUTHORITY_FIELD_NUMBER
static int
DIRECTIVES_FIELD_NUMBER
static int
EXACT_CONTEXT_FIELD_NUMBER
static int
ID_FIELD_NUMBER
static int
RESOURCE_TYPE_FIELD_NUMBER
static int
SCHEME_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getAuthority()
Logical authority for resource (not necessarily transport network address).com.google.protobuf.ByteString
getAuthorityBytes()
Logical authority for resource (not necessarily transport network address).ResourceLocator.ContextParamSpecifierCase
getContextParamSpecifierCase()
static ResourceLocator
getDefaultInstance()
ResourceLocator
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
ResourceLocator.Directive
getDirectives(int index)
A list of directives that appear in the xDS resource locator #fragment.int
getDirectivesCount()
A list of directives that appear in the xDS resource locator #fragment.List<ResourceLocator.Directive>
getDirectivesList()
A list of directives that appear in the xDS resource locator #fragment.ResourceLocator.DirectiveOrBuilder
getDirectivesOrBuilder(int index)
A list of directives that appear in the xDS resource locator #fragment.List<? extends ResourceLocator.DirectiveOrBuilder>
getDirectivesOrBuilderList()
A list of directives that appear in the xDS resource locator #fragment.ContextParams
getExactContext()
Additional parameters that can be used to select resource variants.ContextParamsOrBuilder
getExactContextOrBuilder()
Additional parameters that can be used to select resource variants.String
getId()
Opaque identifier for the resource.com.google.protobuf.ByteString
getIdBytes()
Opaque identifier for the resource.com.google.protobuf.Parser<ResourceLocator>
getParserForType()
String
getResourceType()
Fully qualified resource type (as in type URL without types.googleapis.com/ prefix).com.google.protobuf.ByteString
getResourceTypeBytes()
Fully qualified resource type (as in type URL without types.googleapis.com/ prefix).ResourceLocator.Scheme
getScheme()
URI scheme.int
getSchemeValue()
URI scheme.int
getSerializedSize()
com.google.protobuf.UnknownFieldSet
getUnknownFields()
boolean
hasExactContext()
Additional parameters that can be used to select resource variants.int
hashCode()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
static ResourceLocator.Builder
newBuilder()
static ResourceLocator.Builder
newBuilder(ResourceLocator prototype)
ResourceLocator.Builder
newBuilderForType()
protected ResourceLocator.Builder
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected Object
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
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()
ResourceLocator.Builder
toBuilder()
void
writeTo(com.google.protobuf.CodedOutputStream output)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, 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, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
SCHEME_FIELD_NUMBER
public static final int SCHEME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ID_FIELD_NUMBER
public static final int ID_FIELD_NUMBER
- See Also:
- Constant Field Values
-
AUTHORITY_FIELD_NUMBER
public static final int AUTHORITY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
RESOURCE_TYPE_FIELD_NUMBER
public static final int RESOURCE_TYPE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
EXACT_CONTEXT_FIELD_NUMBER
public static final int EXACT_CONTEXT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DIRECTIVES_FIELD_NUMBER
public static final int DIRECTIVES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstance
in classcom.google.protobuf.GeneratedMessageV3
-
getUnknownFields
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
- Specified by:
getUnknownFields
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getUnknownFields
in classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3
-
getContextParamSpecifierCase
public ResourceLocator.ContextParamSpecifierCase 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
public ResourceLocator.Scheme getScheme()
URI scheme.
.xds.core.v3.ResourceLocator.Scheme scheme = 1 [(.validate.rules) = { ... }
- Specified by:
getScheme
in interfaceResourceLocatorOrBuilder
- Returns:
- The scheme.
-
getId
public String 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
public String 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
public String 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
public ContextParams 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
public ContextParamsOrBuilder 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
public List<ResourceLocator.Directive> 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
public List<? extends ResourceLocator.DirectiveOrBuilder> 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
public ResourceLocator.Directive getDirectives(int index)
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
public ResourceLocator.DirectiveOrBuilder getDirectivesOrBuilder(int index)
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.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessageV3
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- 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
public static ResourceLocator parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static ResourceLocator parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static ResourceLocator parseDelimitedFrom(InputStream input) throws IOException
- 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
public ResourceLocator.Builder newBuilderForType()
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.MessageLite
-
newBuilder
public static ResourceLocator.Builder newBuilder()
-
newBuilder
public static ResourceLocator.Builder newBuilder(ResourceLocator prototype)
-
toBuilder
public ResourceLocator.Builder 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.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static ResourceLocator getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<ResourceLocator> parser()
-
getParserForType
public com.google.protobuf.Parser<ResourceLocator> getParserForType()
- Specified by:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public ResourceLocator getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-