All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.xds.core.v3.ResourceName Maven / Gradle / Ivy

There is a newer version: 1.0.46
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: xds/core/v3/resource_name.proto

package com.github.xds.core.v3;

/**
 * 
 * xDS resource name. This has a canonical xdstp:// URI representation:
 *   xdstp://{authority}/{type_url}/{id}?{context_params}
 * where context_params take the form of URI query parameters.
 * A xDS resource name fully identifies a network resource for transport
 * purposes. xDS resource names in this form appear only in discovery
 * request/response messages used with the xDS transport.
 * 
* * Protobuf type {@code xds.core.v3.ResourceName} */ public final class ResourceName extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:xds.core.v3.ResourceName) ResourceNameOrBuilder { private static final long serialVersionUID = 0L; // Use ResourceName.newBuilder() to construct. private ResourceName(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ResourceName() { id_ = ""; authority_ = ""; resourceType_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new ResourceName(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ResourceName( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); id_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); authority_ = s; break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); resourceType_ = s; break; } case 34: { com.github.xds.core.v3.ContextParams.Builder subBuilder = null; if (context_ != null) { subBuilder = context_.toBuilder(); } context_ = input.readMessage(com.github.xds.core.v3.ContextParams.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(context_); context_ = subBuilder.buildPartial(); } break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.github.xds.core.v3.ResourceNameProto.internal_static_xds_core_v3_ResourceName_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.github.xds.core.v3.ResourceNameProto.internal_static_xds_core_v3_ResourceName_fieldAccessorTable .ensureFieldAccessorsInitialized( com.github.xds.core.v3.ResourceName.class, com.github.xds.core.v3.ResourceName.Builder.class); } public static final int ID_FIELD_NUMBER = 1; private volatile java.lang.Object id_; /** *
   * Opaque identifier for the resource. Any '/' will not be escaped during URI
   * encoding and will form part of the URI path.
   * 
* * string id = 1; * @return The id. */ @java.lang.Override public java.lang.String getId() { java.lang.Object ref = id_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); id_ = s; return s; } } /** *
   * Opaque identifier for the resource. Any '/' will not be escaped during URI
   * encoding and will form part of the URI path.
   * 
* * string id = 1; * @return The bytes for id. */ @java.lang.Override public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int AUTHORITY_FIELD_NUMBER = 2; private volatile java.lang.Object authority_; /** *
   * 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.
   * 
* * string authority = 2; * @return The authority. */ @java.lang.Override public java.lang.String getAuthority() { java.lang.Object ref = authority_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); authority_ = s; return s; } } /** *
   * 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.
   * 
* * string authority = 2; * @return The bytes for authority. */ @java.lang.Override public com.google.protobuf.ByteString getAuthorityBytes() { java.lang.Object ref = authority_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); authority_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int RESOURCE_TYPE_FIELD_NUMBER = 3; private volatile java.lang.Object resourceType_; /** *
   * Fully qualified resource type (as in type URL without types.googleapis.com/
   * prefix).
   * 
* * string resource_type = 3 [(.validate.rules) = { ... } * @return The resourceType. */ @java.lang.Override public java.lang.String getResourceType() { java.lang.Object ref = resourceType_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); resourceType_ = s; return s; } } /** *
   * Fully qualified resource type (as in type URL without types.googleapis.com/
   * prefix).
   * 
* * string resource_type = 3 [(.validate.rules) = { ... } * @return The bytes for resourceType. */ @java.lang.Override public com.google.protobuf.ByteString getResourceTypeBytes() { java.lang.Object ref = resourceType_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); resourceType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CONTEXT_FIELD_NUMBER = 4; private com.github.xds.core.v3.ContextParams context_; /** *
   * Additional parameters that can be used to select resource variants.
   * 
* * .xds.core.v3.ContextParams context = 4; * @return Whether the context field is set. */ @java.lang.Override public boolean hasContext() { return context_ != null; } /** *
   * Additional parameters that can be used to select resource variants.
   * 
* * .xds.core.v3.ContextParams context = 4; * @return The context. */ @java.lang.Override public com.github.xds.core.v3.ContextParams getContext() { return context_ == null ? com.github.xds.core.v3.ContextParams.getDefaultInstance() : context_; } /** *
   * Additional parameters that can be used to select resource variants.
   * 
* * .xds.core.v3.ContextParams context = 4; */ @java.lang.Override public com.github.xds.core.v3.ContextParamsOrBuilder getContextOrBuilder() { return getContext(); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authority_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, authority_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, resourceType_); } if (context_ != null) { output.writeMessage(4, getContext()); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authority_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, authority_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, resourceType_); } if (context_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, getContext()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.github.xds.core.v3.ResourceName)) { return super.equals(obj); } com.github.xds.core.v3.ResourceName other = (com.github.xds.core.v3.ResourceName) obj; if (!getId() .equals(other.getId())) return false; if (!getAuthority() .equals(other.getAuthority())) return false; if (!getResourceType() .equals(other.getResourceType())) return false; if (hasContext() != other.hasContext()) return false; if (hasContext()) { if (!getContext() .equals(other.getContext())) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); hash = (37 * hash) + AUTHORITY_FIELD_NUMBER; hash = (53 * hash) + getAuthority().hashCode(); hash = (37 * hash) + RESOURCE_TYPE_FIELD_NUMBER; hash = (53 * hash) + getResourceType().hashCode(); if (hasContext()) { hash = (37 * hash) + CONTEXT_FIELD_NUMBER; hash = (53 * hash) + getContext().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.github.xds.core.v3.ResourceName parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.github.xds.core.v3.ResourceName parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.github.xds.core.v3.ResourceName parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.github.xds.core.v3.ResourceName parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.github.xds.core.v3.ResourceName parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.github.xds.core.v3.ResourceName parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.github.xds.core.v3.ResourceName parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.github.xds.core.v3.ResourceName parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.github.xds.core.v3.ResourceName parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.github.xds.core.v3.ResourceName parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.github.xds.core.v3.ResourceName parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.github.xds.core.v3.ResourceName parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.github.xds.core.v3.ResourceName prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * xDS resource name. This has a canonical xdstp:// URI representation:
   *   xdstp://{authority}/{type_url}/{id}?{context_params}
   * where context_params take the form of URI query parameters.
   * A xDS resource name fully identifies a network resource for transport
   * purposes. xDS resource names in this form appear only in discovery
   * request/response messages used with the xDS transport.
   * 
* * Protobuf type {@code xds.core.v3.ResourceName} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:xds.core.v3.ResourceName) com.github.xds.core.v3.ResourceNameOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.github.xds.core.v3.ResourceNameProto.internal_static_xds_core_v3_ResourceName_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.github.xds.core.v3.ResourceNameProto.internal_static_xds_core_v3_ResourceName_fieldAccessorTable .ensureFieldAccessorsInitialized( com.github.xds.core.v3.ResourceName.class, com.github.xds.core.v3.ResourceName.Builder.class); } // Construct using com.github.xds.core.v3.ResourceName.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); id_ = ""; authority_ = ""; resourceType_ = ""; if (contextBuilder_ == null) { context_ = null; } else { context_ = null; contextBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.github.xds.core.v3.ResourceNameProto.internal_static_xds_core_v3_ResourceName_descriptor; } @java.lang.Override public com.github.xds.core.v3.ResourceName getDefaultInstanceForType() { return com.github.xds.core.v3.ResourceName.getDefaultInstance(); } @java.lang.Override public com.github.xds.core.v3.ResourceName build() { com.github.xds.core.v3.ResourceName result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.github.xds.core.v3.ResourceName buildPartial() { com.github.xds.core.v3.ResourceName result = new com.github.xds.core.v3.ResourceName(this); result.id_ = id_; result.authority_ = authority_; result.resourceType_ = resourceType_; if (contextBuilder_ == null) { result.context_ = context_; } else { result.context_ = contextBuilder_.build(); } onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.github.xds.core.v3.ResourceName) { return mergeFrom((com.github.xds.core.v3.ResourceName)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.github.xds.core.v3.ResourceName other) { if (other == com.github.xds.core.v3.ResourceName.getDefaultInstance()) return this; if (!other.getId().isEmpty()) { id_ = other.id_; onChanged(); } if (!other.getAuthority().isEmpty()) { authority_ = other.authority_; onChanged(); } if (!other.getResourceType().isEmpty()) { resourceType_ = other.resourceType_; onChanged(); } if (other.hasContext()) { mergeContext(other.getContext()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.github.xds.core.v3.ResourceName parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.github.xds.core.v3.ResourceName) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object id_ = ""; /** *
     * Opaque identifier for the resource. Any '/' will not be escaped during URI
     * encoding and will form part of the URI path.
     * 
* * string id = 1; * @return The id. */ public java.lang.String getId() { java.lang.Object ref = id_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); id_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * Opaque identifier for the resource. Any '/' will not be escaped during URI
     * encoding and will form part of the URI path.
     * 
* * string id = 1; * @return The bytes for id. */ public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Opaque identifier for the resource. Any '/' will not be escaped during URI
     * encoding and will form part of the URI path.
     * 
* * string id = 1; * @param value The id to set. * @return This builder for chaining. */ public Builder setId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } id_ = value; onChanged(); return this; } /** *
     * Opaque identifier for the resource. Any '/' will not be escaped during URI
     * encoding and will form part of the URI path.
     * 
* * string id = 1; * @return This builder for chaining. */ public Builder clearId() { id_ = getDefaultInstance().getId(); onChanged(); return this; } /** *
     * Opaque identifier for the resource. Any '/' will not be escaped during URI
     * encoding and will form part of the URI path.
     * 
* * string id = 1; * @param value The bytes for id to set. * @return This builder for chaining. */ public Builder setIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); id_ = value; onChanged(); return this; } private java.lang.Object authority_ = ""; /** *
     * 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.
     * 
* * string authority = 2; * @return The authority. */ public java.lang.String getAuthority() { java.lang.Object ref = authority_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); authority_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * 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.
     * 
* * string authority = 2; * @return The bytes for authority. */ public com.google.protobuf.ByteString getAuthorityBytes() { java.lang.Object ref = authority_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); authority_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * 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.
     * 
* * string authority = 2; * @param value The authority to set. * @return This builder for chaining. */ public Builder setAuthority( java.lang.String value) { if (value == null) { throw new NullPointerException(); } authority_ = value; onChanged(); return this; } /** *
     * 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.
     * 
* * string authority = 2; * @return This builder for chaining. */ public Builder clearAuthority() { authority_ = getDefaultInstance().getAuthority(); onChanged(); return this; } /** *
     * 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.
     * 
* * string authority = 2; * @param value The bytes for authority to set. * @return This builder for chaining. */ public Builder setAuthorityBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); authority_ = value; onChanged(); return this; } private java.lang.Object resourceType_ = ""; /** *
     * Fully qualified resource type (as in type URL without types.googleapis.com/
     * prefix).
     * 
* * string resource_type = 3 [(.validate.rules) = { ... } * @return The resourceType. */ public java.lang.String getResourceType() { java.lang.Object ref = resourceType_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); resourceType_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * Fully qualified resource type (as in type URL without types.googleapis.com/
     * prefix).
     * 
* * string resource_type = 3 [(.validate.rules) = { ... } * @return The bytes for resourceType. */ public com.google.protobuf.ByteString getResourceTypeBytes() { java.lang.Object ref = resourceType_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); resourceType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Fully qualified resource type (as in type URL without types.googleapis.com/
     * prefix).
     * 
* * string resource_type = 3 [(.validate.rules) = { ... } * @param value The resourceType to set. * @return This builder for chaining. */ public Builder setResourceType( java.lang.String value) { if (value == null) { throw new NullPointerException(); } resourceType_ = value; onChanged(); return this; } /** *
     * Fully qualified resource type (as in type URL without types.googleapis.com/
     * prefix).
     * 
* * string resource_type = 3 [(.validate.rules) = { ... } * @return This builder for chaining. */ public Builder clearResourceType() { resourceType_ = getDefaultInstance().getResourceType(); onChanged(); return this; } /** *
     * Fully qualified resource type (as in type URL without types.googleapis.com/
     * prefix).
     * 
* * string resource_type = 3 [(.validate.rules) = { ... } * @param value The bytes for resourceType to set. * @return This builder for chaining. */ public Builder setResourceTypeBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); resourceType_ = value; onChanged(); return this; } private com.github.xds.core.v3.ContextParams context_; private com.google.protobuf.SingleFieldBuilderV3< com.github.xds.core.v3.ContextParams, com.github.xds.core.v3.ContextParams.Builder, com.github.xds.core.v3.ContextParamsOrBuilder> contextBuilder_; /** *
     * Additional parameters that can be used to select resource variants.
     * 
* * .xds.core.v3.ContextParams context = 4; * @return Whether the context field is set. */ public boolean hasContext() { return contextBuilder_ != null || context_ != null; } /** *
     * Additional parameters that can be used to select resource variants.
     * 
* * .xds.core.v3.ContextParams context = 4; * @return The context. */ public com.github.xds.core.v3.ContextParams getContext() { if (contextBuilder_ == null) { return context_ == null ? com.github.xds.core.v3.ContextParams.getDefaultInstance() : context_; } else { return contextBuilder_.getMessage(); } } /** *
     * Additional parameters that can be used to select resource variants.
     * 
* * .xds.core.v3.ContextParams context = 4; */ public Builder setContext(com.github.xds.core.v3.ContextParams value) { if (contextBuilder_ == null) { if (value == null) { throw new NullPointerException(); } context_ = value; onChanged(); } else { contextBuilder_.setMessage(value); } return this; } /** *
     * Additional parameters that can be used to select resource variants.
     * 
* * .xds.core.v3.ContextParams context = 4; */ public Builder setContext( com.github.xds.core.v3.ContextParams.Builder builderForValue) { if (contextBuilder_ == null) { context_ = builderForValue.build(); onChanged(); } else { contextBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     * Additional parameters that can be used to select resource variants.
     * 
* * .xds.core.v3.ContextParams context = 4; */ public Builder mergeContext(com.github.xds.core.v3.ContextParams value) { if (contextBuilder_ == null) { if (context_ != null) { context_ = com.github.xds.core.v3.ContextParams.newBuilder(context_).mergeFrom(value).buildPartial(); } else { context_ = value; } onChanged(); } else { contextBuilder_.mergeFrom(value); } return this; } /** *
     * Additional parameters that can be used to select resource variants.
     * 
* * .xds.core.v3.ContextParams context = 4; */ public Builder clearContext() { if (contextBuilder_ == null) { context_ = null; onChanged(); } else { context_ = null; contextBuilder_ = null; } return this; } /** *
     * Additional parameters that can be used to select resource variants.
     * 
* * .xds.core.v3.ContextParams context = 4; */ public com.github.xds.core.v3.ContextParams.Builder getContextBuilder() { onChanged(); return getContextFieldBuilder().getBuilder(); } /** *
     * Additional parameters that can be used to select resource variants.
     * 
* * .xds.core.v3.ContextParams context = 4; */ public com.github.xds.core.v3.ContextParamsOrBuilder getContextOrBuilder() { if (contextBuilder_ != null) { return contextBuilder_.getMessageOrBuilder(); } else { return context_ == null ? com.github.xds.core.v3.ContextParams.getDefaultInstance() : context_; } } /** *
     * Additional parameters that can be used to select resource variants.
     * 
* * .xds.core.v3.ContextParams context = 4; */ private com.google.protobuf.SingleFieldBuilderV3< com.github.xds.core.v3.ContextParams, com.github.xds.core.v3.ContextParams.Builder, com.github.xds.core.v3.ContextParamsOrBuilder> getContextFieldBuilder() { if (contextBuilder_ == null) { contextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.github.xds.core.v3.ContextParams, com.github.xds.core.v3.ContextParams.Builder, com.github.xds.core.v3.ContextParamsOrBuilder>( getContext(), getParentForChildren(), isClean()); context_ = null; } return contextBuilder_; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:xds.core.v3.ResourceName) } // @@protoc_insertion_point(class_scope:xds.core.v3.ResourceName) private static final com.github.xds.core.v3.ResourceName DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.github.xds.core.v3.ResourceName(); } public static com.github.xds.core.v3.ResourceName getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ResourceName parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new ResourceName(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.github.xds.core.v3.ResourceName getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy