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 classResourceLocator.BuilderxDS resource locators identify a xDS resource name and instruct the data-plane load balancer on how the resource may be located.static classResourceLocator.ContextParamSpecifierCasestatic classResourceLocator.DirectiveDirectives provide information to data-plane load balancers on how xDS resource names are to be interpreted and potentially further resolved.static interfaceResourceLocator.DirectiveOrBuilderstatic classResourceLocator.SchemeProtobuf 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 intAUTHORITY_FIELD_NUMBERstatic intDIRECTIVES_FIELD_NUMBERstatic intEXACT_CONTEXT_FIELD_NUMBERstatic intID_FIELD_NUMBERstatic intRESOURCE_TYPE_FIELD_NUMBERstatic intSCHEME_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetAuthority()Logical authority for resource (not necessarily transport network address).com.google.protobuf.ByteStringgetAuthorityBytes()Logical authority for resource (not necessarily transport network address).ResourceLocator.ContextParamSpecifierCasegetContextParamSpecifierCase()static ResourceLocatorgetDefaultInstance()ResourceLocatorgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()ResourceLocator.DirectivegetDirectives(int index)A list of directives that appear in the xDS resource locator #fragment.intgetDirectivesCount()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.DirectiveOrBuildergetDirectivesOrBuilder(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.ContextParamsgetExactContext()Additional parameters that can be used to select resource variants.ContextParamsOrBuildergetExactContextOrBuilder()Additional parameters that can be used to select resource variants.StringgetId()Opaque identifier for the resource.com.google.protobuf.ByteStringgetIdBytes()Opaque identifier for the resource.com.google.protobuf.Parser<ResourceLocator>getParserForType()StringgetResourceType()Fully qualified resource type (as in type URL without types.googleapis.com/ prefix).com.google.protobuf.ByteStringgetResourceTypeBytes()Fully qualified resource type (as in type URL without types.googleapis.com/ prefix).ResourceLocator.SchemegetScheme()URI scheme.intgetSchemeValue()URI scheme.intgetSerializedSize()com.google.protobuf.UnknownFieldSetgetUnknownFields()booleanhasExactContext()Additional parameters that can be used to select resource variants.inthashCode()protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static ResourceLocator.BuildernewBuilder()static ResourceLocator.BuildernewBuilder(ResourceLocator prototype)ResourceLocator.BuildernewBuilderForType()protected ResourceLocator.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)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()ResourceLocator.BuildertoBuilder()voidwriteTo(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:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getUnknownFields
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
- Specified by:
getUnknownFieldsin interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getContextParamSpecifierCase
public ResourceLocator.ContextParamSpecifierCase 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
public ResourceLocator.Scheme getScheme()
URI scheme.
.xds.core.v3.ResourceLocator.Scheme scheme = 1 [(.validate.rules) = { ... }- Specified by:
getSchemein 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:
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
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:
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
public String 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
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:
getExactContextin 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:
getExactContextOrBuilderin 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:
getDirectivesListin 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:
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
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:
getDirectivesin 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:
getDirectivesOrBuilderin interfaceResourceLocatorOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- 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
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:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein 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:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected ResourceLocator.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein 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:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public ResourceLocator getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-