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

com.github.xds.core.v3.CollectionEntry 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/collection_entry.proto

package com.github.xds.core.v3;

/**
 * 
 * xDS collection resource wrapper. This encapsulates a xDS resource when
 * appearing inside a list collection resource. List collection resources are
 * regular Resource messages of type:
 * .. code-block:: proto
 *   message <T>Collection {
 *     repeated CollectionEntry resources = 1;
 *   }
 * 
* * Protobuf type {@code xds.core.v3.CollectionEntry} */ public final class CollectionEntry extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:xds.core.v3.CollectionEntry) CollectionEntryOrBuilder { private static final long serialVersionUID = 0L; // Use CollectionEntry.newBuilder() to construct. private CollectionEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private CollectionEntry() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new CollectionEntry(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private CollectionEntry( 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: { com.github.xds.core.v3.ResourceLocator.Builder subBuilder = null; if (resourceSpecifierCase_ == 1) { subBuilder = ((com.github.xds.core.v3.ResourceLocator) resourceSpecifier_).toBuilder(); } resourceSpecifier_ = input.readMessage(com.github.xds.core.v3.ResourceLocator.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.github.xds.core.v3.ResourceLocator) resourceSpecifier_); resourceSpecifier_ = subBuilder.buildPartial(); } resourceSpecifierCase_ = 1; break; } case 18: { com.github.xds.core.v3.CollectionEntry.InlineEntry.Builder subBuilder = null; if (resourceSpecifierCase_ == 2) { subBuilder = ((com.github.xds.core.v3.CollectionEntry.InlineEntry) resourceSpecifier_).toBuilder(); } resourceSpecifier_ = input.readMessage(com.github.xds.core.v3.CollectionEntry.InlineEntry.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.github.xds.core.v3.CollectionEntry.InlineEntry) resourceSpecifier_); resourceSpecifier_ = subBuilder.buildPartial(); } resourceSpecifierCase_ = 2; 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.CollectionEntryProto.internal_static_xds_core_v3_CollectionEntry_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.github.xds.core.v3.CollectionEntryProto.internal_static_xds_core_v3_CollectionEntry_fieldAccessorTable .ensureFieldAccessorsInitialized( com.github.xds.core.v3.CollectionEntry.class, com.github.xds.core.v3.CollectionEntry.Builder.class); } public interface InlineEntryOrBuilder extends // @@protoc_insertion_point(interface_extends:xds.core.v3.CollectionEntry.InlineEntry) com.google.protobuf.MessageOrBuilder { /** *
     * Optional name to describe the inlined resource. Resource names must match
     * ``[a-zA-Z0-9_-\./]+`` (TODO(htuch): turn this into a PGV constraint once
     * finalized, probably should be a RFC3986 pchar). This name allows
     * reference via the #entry directive in ResourceLocator.
     * 
* * string name = 1 [(.validate.rules) = { ... } * @return The name. */ java.lang.String getName(); /** *
     * Optional name to describe the inlined resource. Resource names must match
     * ``[a-zA-Z0-9_-\./]+`` (TODO(htuch): turn this into a PGV constraint once
     * finalized, probably should be a RFC3986 pchar). This name allows
     * reference via the #entry directive in ResourceLocator.
     * 
* * string name = 1 [(.validate.rules) = { ... } * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); /** *
     * The resource's logical version. It is illegal to have the same named xDS
     * resource name at a given version with different resource payloads.
     * 
* * string version = 2; * @return The version. */ java.lang.String getVersion(); /** *
     * The resource's logical version. It is illegal to have the same named xDS
     * resource name at a given version with different resource payloads.
     * 
* * string version = 2; * @return The bytes for version. */ com.google.protobuf.ByteString getVersionBytes(); /** *
     * The resource payload, including type URL.
     * 
* * .google.protobuf.Any resource = 3; * @return Whether the resource field is set. */ boolean hasResource(); /** *
     * The resource payload, including type URL.
     * 
* * .google.protobuf.Any resource = 3; * @return The resource. */ com.google.protobuf.Any getResource(); /** *
     * The resource payload, including type URL.
     * 
* * .google.protobuf.Any resource = 3; */ com.google.protobuf.AnyOrBuilder getResourceOrBuilder(); } /** *
   * Inlined resource entry.
   * 
* * Protobuf type {@code xds.core.v3.CollectionEntry.InlineEntry} */ public static final class InlineEntry extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:xds.core.v3.CollectionEntry.InlineEntry) InlineEntryOrBuilder { private static final long serialVersionUID = 0L; // Use InlineEntry.newBuilder() to construct. private InlineEntry(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private InlineEntry() { name_ = ""; version_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new InlineEntry(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private InlineEntry( 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(); name_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); version_ = s; break; } case 26: { com.google.protobuf.Any.Builder subBuilder = null; if (resource_ != null) { subBuilder = resource_.toBuilder(); } resource_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(resource_); resource_ = 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.CollectionEntryProto.internal_static_xds_core_v3_CollectionEntry_InlineEntry_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.github.xds.core.v3.CollectionEntryProto.internal_static_xds_core_v3_CollectionEntry_InlineEntry_fieldAccessorTable .ensureFieldAccessorsInitialized( com.github.xds.core.v3.CollectionEntry.InlineEntry.class, com.github.xds.core.v3.CollectionEntry.InlineEntry.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** *
     * Optional name to describe the inlined resource. Resource names must match
     * ``[a-zA-Z0-9_-\./]+`` (TODO(htuch): turn this into a PGV constraint once
     * finalized, probably should be a RFC3986 pchar). This name allows
     * reference via the #entry directive in ResourceLocator.
     * 
* * string name = 1 [(.validate.rules) = { ... } * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; 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(); name_ = s; return s; } } /** *
     * Optional name to describe the inlined resource. Resource names must match
     * ``[a-zA-Z0-9_-\./]+`` (TODO(htuch): turn this into a PGV constraint once
     * finalized, probably should be a RFC3986 pchar). This name allows
     * reference via the #entry directive in ResourceLocator.
     * 
* * string name = 1 [(.validate.rules) = { ... } * @return The bytes for name. */ @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int VERSION_FIELD_NUMBER = 2; private volatile java.lang.Object version_; /** *
     * The resource's logical version. It is illegal to have the same named xDS
     * resource name at a given version with different resource payloads.
     * 
* * string version = 2; * @return The version. */ @java.lang.Override public java.lang.String getVersion() { java.lang.Object ref = version_; 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(); version_ = s; return s; } } /** *
     * The resource's logical version. It is illegal to have the same named xDS
     * resource name at a given version with different resource payloads.
     * 
* * string version = 2; * @return The bytes for version. */ @java.lang.Override public com.google.protobuf.ByteString getVersionBytes() { java.lang.Object ref = version_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); version_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int RESOURCE_FIELD_NUMBER = 3; private com.google.protobuf.Any resource_; /** *
     * The resource payload, including type URL.
     * 
* * .google.protobuf.Any resource = 3; * @return Whether the resource field is set. */ @java.lang.Override public boolean hasResource() { return resource_ != null; } /** *
     * The resource payload, including type URL.
     * 
* * .google.protobuf.Any resource = 3; * @return The resource. */ @java.lang.Override public com.google.protobuf.Any getResource() { return resource_ == null ? com.google.protobuf.Any.getDefaultInstance() : resource_; } /** *
     * The resource payload, including type URL.
     * 
* * .google.protobuf.Any resource = 3; */ @java.lang.Override public com.google.protobuf.AnyOrBuilder getResourceOrBuilder() { return getResource(); } 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(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, version_); } if (resource_ != null) { output.writeMessage(3, getResource()); } 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(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, version_); } if (resource_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getResource()); } 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.CollectionEntry.InlineEntry)) { return super.equals(obj); } com.github.xds.core.v3.CollectionEntry.InlineEntry other = (com.github.xds.core.v3.CollectionEntry.InlineEntry) obj; if (!getName() .equals(other.getName())) return false; if (!getVersion() .equals(other.getVersion())) return false; if (hasResource() != other.hasResource()) return false; if (hasResource()) { if (!getResource() .equals(other.getResource())) 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) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + VERSION_FIELD_NUMBER; hash = (53 * hash) + getVersion().hashCode(); if (hasResource()) { hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.github.xds.core.v3.CollectionEntry.InlineEntry parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.github.xds.core.v3.CollectionEntry.InlineEntry 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.CollectionEntry.InlineEntry parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.github.xds.core.v3.CollectionEntry.InlineEntry 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.CollectionEntry.InlineEntry parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.github.xds.core.v3.CollectionEntry.InlineEntry 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.CollectionEntry.InlineEntry parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.github.xds.core.v3.CollectionEntry.InlineEntry 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.CollectionEntry.InlineEntry parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.github.xds.core.v3.CollectionEntry.InlineEntry 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.CollectionEntry.InlineEntry 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.CollectionEntry.InlineEntry 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.CollectionEntry.InlineEntry 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; } /** *
     * Inlined resource entry.
     * 
* * Protobuf type {@code xds.core.v3.CollectionEntry.InlineEntry} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:xds.core.v3.CollectionEntry.InlineEntry) com.github.xds.core.v3.CollectionEntry.InlineEntryOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.github.xds.core.v3.CollectionEntryProto.internal_static_xds_core_v3_CollectionEntry_InlineEntry_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.github.xds.core.v3.CollectionEntryProto.internal_static_xds_core_v3_CollectionEntry_InlineEntry_fieldAccessorTable .ensureFieldAccessorsInitialized( com.github.xds.core.v3.CollectionEntry.InlineEntry.class, com.github.xds.core.v3.CollectionEntry.InlineEntry.Builder.class); } // Construct using com.github.xds.core.v3.CollectionEntry.InlineEntry.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(); name_ = ""; version_ = ""; if (resourceBuilder_ == null) { resource_ = null; } else { resource_ = null; resourceBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.github.xds.core.v3.CollectionEntryProto.internal_static_xds_core_v3_CollectionEntry_InlineEntry_descriptor; } @java.lang.Override public com.github.xds.core.v3.CollectionEntry.InlineEntry getDefaultInstanceForType() { return com.github.xds.core.v3.CollectionEntry.InlineEntry.getDefaultInstance(); } @java.lang.Override public com.github.xds.core.v3.CollectionEntry.InlineEntry build() { com.github.xds.core.v3.CollectionEntry.InlineEntry result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.github.xds.core.v3.CollectionEntry.InlineEntry buildPartial() { com.github.xds.core.v3.CollectionEntry.InlineEntry result = new com.github.xds.core.v3.CollectionEntry.InlineEntry(this); result.name_ = name_; result.version_ = version_; if (resourceBuilder_ == null) { result.resource_ = resource_; } else { result.resource_ = resourceBuilder_.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.CollectionEntry.InlineEntry) { return mergeFrom((com.github.xds.core.v3.CollectionEntry.InlineEntry)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.github.xds.core.v3.CollectionEntry.InlineEntry other) { if (other == com.github.xds.core.v3.CollectionEntry.InlineEntry.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (!other.getVersion().isEmpty()) { version_ = other.version_; onChanged(); } if (other.hasResource()) { mergeResource(other.getResource()); } 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.CollectionEntry.InlineEntry parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.github.xds.core.v3.CollectionEntry.InlineEntry) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object name_ = ""; /** *
       * Optional name to describe the inlined resource. Resource names must match
       * ``[a-zA-Z0-9_-\./]+`` (TODO(htuch): turn this into a PGV constraint once
       * finalized, probably should be a RFC3986 pchar). This name allows
       * reference via the #entry directive in ResourceLocator.
       * 
* * string name = 1 [(.validate.rules) = { ... } * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Optional name to describe the inlined resource. Resource names must match
       * ``[a-zA-Z0-9_-\./]+`` (TODO(htuch): turn this into a PGV constraint once
       * finalized, probably should be a RFC3986 pchar). This name allows
       * reference via the #entry directive in ResourceLocator.
       * 
* * string name = 1 [(.validate.rules) = { ... } * @return The bytes for name. */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Optional name to describe the inlined resource. Resource names must match
       * ``[a-zA-Z0-9_-\./]+`` (TODO(htuch): turn this into a PGV constraint once
       * finalized, probably should be a RFC3986 pchar). This name allows
       * reference via the #entry directive in ResourceLocator.
       * 
* * string name = 1 [(.validate.rules) = { ... } * @param value The name to set. * @return This builder for chaining. */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /** *
       * Optional name to describe the inlined resource. Resource names must match
       * ``[a-zA-Z0-9_-\./]+`` (TODO(htuch): turn this into a PGV constraint once
       * finalized, probably should be a RFC3986 pchar). This name allows
       * reference via the #entry directive in ResourceLocator.
       * 
* * string name = 1 [(.validate.rules) = { ... } * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /** *
       * Optional name to describe the inlined resource. Resource names must match
       * ``[a-zA-Z0-9_-\./]+`` (TODO(htuch): turn this into a PGV constraint once
       * finalized, probably should be a RFC3986 pchar). This name allows
       * reference via the #entry directive in ResourceLocator.
       * 
* * string name = 1 [(.validate.rules) = { ... } * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; } private java.lang.Object version_ = ""; /** *
       * The resource's logical version. It is illegal to have the same named xDS
       * resource name at a given version with different resource payloads.
       * 
* * string version = 2; * @return The version. */ public java.lang.String getVersion() { java.lang.Object ref = version_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); version_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * The resource's logical version. It is illegal to have the same named xDS
       * resource name at a given version with different resource payloads.
       * 
* * string version = 2; * @return The bytes for version. */ public com.google.protobuf.ByteString getVersionBytes() { java.lang.Object ref = version_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); version_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * The resource's logical version. It is illegal to have the same named xDS
       * resource name at a given version with different resource payloads.
       * 
* * string version = 2; * @param value The version to set. * @return This builder for chaining. */ public Builder setVersion( java.lang.String value) { if (value == null) { throw new NullPointerException(); } version_ = value; onChanged(); return this; } /** *
       * The resource's logical version. It is illegal to have the same named xDS
       * resource name at a given version with different resource payloads.
       * 
* * string version = 2; * @return This builder for chaining. */ public Builder clearVersion() { version_ = getDefaultInstance().getVersion(); onChanged(); return this; } /** *
       * The resource's logical version. It is illegal to have the same named xDS
       * resource name at a given version with different resource payloads.
       * 
* * string version = 2; * @param value The bytes for version to set. * @return This builder for chaining. */ public Builder setVersionBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); version_ = value; onChanged(); return this; } private com.google.protobuf.Any resource_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> resourceBuilder_; /** *
       * The resource payload, including type URL.
       * 
* * .google.protobuf.Any resource = 3; * @return Whether the resource field is set. */ public boolean hasResource() { return resourceBuilder_ != null || resource_ != null; } /** *
       * The resource payload, including type URL.
       * 
* * .google.protobuf.Any resource = 3; * @return The resource. */ public com.google.protobuf.Any getResource() { if (resourceBuilder_ == null) { return resource_ == null ? com.google.protobuf.Any.getDefaultInstance() : resource_; } else { return resourceBuilder_.getMessage(); } } /** *
       * The resource payload, including type URL.
       * 
* * .google.protobuf.Any resource = 3; */ public Builder setResource(com.google.protobuf.Any value) { if (resourceBuilder_ == null) { if (value == null) { throw new NullPointerException(); } resource_ = value; onChanged(); } else { resourceBuilder_.setMessage(value); } return this; } /** *
       * The resource payload, including type URL.
       * 
* * .google.protobuf.Any resource = 3; */ public Builder setResource( com.google.protobuf.Any.Builder builderForValue) { if (resourceBuilder_ == null) { resource_ = builderForValue.build(); onChanged(); } else { resourceBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * The resource payload, including type URL.
       * 
* * .google.protobuf.Any resource = 3; */ public Builder mergeResource(com.google.protobuf.Any value) { if (resourceBuilder_ == null) { if (resource_ != null) { resource_ = com.google.protobuf.Any.newBuilder(resource_).mergeFrom(value).buildPartial(); } else { resource_ = value; } onChanged(); } else { resourceBuilder_.mergeFrom(value); } return this; } /** *
       * The resource payload, including type URL.
       * 
* * .google.protobuf.Any resource = 3; */ public Builder clearResource() { if (resourceBuilder_ == null) { resource_ = null; onChanged(); } else { resource_ = null; resourceBuilder_ = null; } return this; } /** *
       * The resource payload, including type URL.
       * 
* * .google.protobuf.Any resource = 3; */ public com.google.protobuf.Any.Builder getResourceBuilder() { onChanged(); return getResourceFieldBuilder().getBuilder(); } /** *
       * The resource payload, including type URL.
       * 
* * .google.protobuf.Any resource = 3; */ public com.google.protobuf.AnyOrBuilder getResourceOrBuilder() { if (resourceBuilder_ != null) { return resourceBuilder_.getMessageOrBuilder(); } else { return resource_ == null ? com.google.protobuf.Any.getDefaultInstance() : resource_; } } /** *
       * The resource payload, including type URL.
       * 
* * .google.protobuf.Any resource = 3; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> getResourceFieldBuilder() { if (resourceBuilder_ == null) { resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( getResource(), getParentForChildren(), isClean()); resource_ = null; } return resourceBuilder_; } @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.CollectionEntry.InlineEntry) } // @@protoc_insertion_point(class_scope:xds.core.v3.CollectionEntry.InlineEntry) private static final com.github.xds.core.v3.CollectionEntry.InlineEntry DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.github.xds.core.v3.CollectionEntry.InlineEntry(); } public static com.github.xds.core.v3.CollectionEntry.InlineEntry getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public InlineEntry parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new InlineEntry(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.CollectionEntry.InlineEntry getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int resourceSpecifierCase_ = 0; private java.lang.Object resourceSpecifier_; public enum ResourceSpecifierCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { LOCATOR(1), INLINE_ENTRY(2), RESOURCESPECIFIER_NOT_SET(0); private final int value; private ResourceSpecifierCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static ResourceSpecifierCase valueOf(int value) { return forNumber(value); } public static ResourceSpecifierCase forNumber(int value) { switch (value) { case 1: return LOCATOR; case 2: return INLINE_ENTRY; case 0: return RESOURCESPECIFIER_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public ResourceSpecifierCase getResourceSpecifierCase() { return ResourceSpecifierCase.forNumber( resourceSpecifierCase_); } public static final int LOCATOR_FIELD_NUMBER = 1; /** *
   * A resource locator describing how the member resource is to be located.
   * 
* * .xds.core.v3.ResourceLocator locator = 1; * @return Whether the locator field is set. */ @java.lang.Override public boolean hasLocator() { return resourceSpecifierCase_ == 1; } /** *
   * A resource locator describing how the member resource is to be located.
   * 
* * .xds.core.v3.ResourceLocator locator = 1; * @return The locator. */ @java.lang.Override public com.github.xds.core.v3.ResourceLocator getLocator() { if (resourceSpecifierCase_ == 1) { return (com.github.xds.core.v3.ResourceLocator) resourceSpecifier_; } return com.github.xds.core.v3.ResourceLocator.getDefaultInstance(); } /** *
   * A resource locator describing how the member resource is to be located.
   * 
* * .xds.core.v3.ResourceLocator locator = 1; */ @java.lang.Override public com.github.xds.core.v3.ResourceLocatorOrBuilder getLocatorOrBuilder() { if (resourceSpecifierCase_ == 1) { return (com.github.xds.core.v3.ResourceLocator) resourceSpecifier_; } return com.github.xds.core.v3.ResourceLocator.getDefaultInstance(); } public static final int INLINE_ENTRY_FIELD_NUMBER = 2; /** *
   * The resource is inlined in the list collection.
   * 
* * .xds.core.v3.CollectionEntry.InlineEntry inline_entry = 2; * @return Whether the inlineEntry field is set. */ @java.lang.Override public boolean hasInlineEntry() { return resourceSpecifierCase_ == 2; } /** *
   * The resource is inlined in the list collection.
   * 
* * .xds.core.v3.CollectionEntry.InlineEntry inline_entry = 2; * @return The inlineEntry. */ @java.lang.Override public com.github.xds.core.v3.CollectionEntry.InlineEntry getInlineEntry() { if (resourceSpecifierCase_ == 2) { return (com.github.xds.core.v3.CollectionEntry.InlineEntry) resourceSpecifier_; } return com.github.xds.core.v3.CollectionEntry.InlineEntry.getDefaultInstance(); } /** *
   * The resource is inlined in the list collection.
   * 
* * .xds.core.v3.CollectionEntry.InlineEntry inline_entry = 2; */ @java.lang.Override public com.github.xds.core.v3.CollectionEntry.InlineEntryOrBuilder getInlineEntryOrBuilder() { if (resourceSpecifierCase_ == 2) { return (com.github.xds.core.v3.CollectionEntry.InlineEntry) resourceSpecifier_; } return com.github.xds.core.v3.CollectionEntry.InlineEntry.getDefaultInstance(); } 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 (resourceSpecifierCase_ == 1) { output.writeMessage(1, (com.github.xds.core.v3.ResourceLocator) resourceSpecifier_); } if (resourceSpecifierCase_ == 2) { output.writeMessage(2, (com.github.xds.core.v3.CollectionEntry.InlineEntry) resourceSpecifier_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (resourceSpecifierCase_ == 1) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, (com.github.xds.core.v3.ResourceLocator) resourceSpecifier_); } if (resourceSpecifierCase_ == 2) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, (com.github.xds.core.v3.CollectionEntry.InlineEntry) resourceSpecifier_); } 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.CollectionEntry)) { return super.equals(obj); } com.github.xds.core.v3.CollectionEntry other = (com.github.xds.core.v3.CollectionEntry) obj; if (!getResourceSpecifierCase().equals(other.getResourceSpecifierCase())) return false; switch (resourceSpecifierCase_) { case 1: if (!getLocator() .equals(other.getLocator())) return false; break; case 2: if (!getInlineEntry() .equals(other.getInlineEntry())) return false; break; case 0: default: } 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(); switch (resourceSpecifierCase_) { case 1: hash = (37 * hash) + LOCATOR_FIELD_NUMBER; hash = (53 * hash) + getLocator().hashCode(); break; case 2: hash = (37 * hash) + INLINE_ENTRY_FIELD_NUMBER; hash = (53 * hash) + getInlineEntry().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.github.xds.core.v3.CollectionEntry parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.github.xds.core.v3.CollectionEntry 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.CollectionEntry parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.github.xds.core.v3.CollectionEntry 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.CollectionEntry parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.github.xds.core.v3.CollectionEntry 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.CollectionEntry parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.github.xds.core.v3.CollectionEntry 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.CollectionEntry parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.github.xds.core.v3.CollectionEntry 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.CollectionEntry 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.CollectionEntry 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.CollectionEntry 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 collection resource wrapper. This encapsulates a xDS resource when
   * appearing inside a list collection resource. List collection resources are
   * regular Resource messages of type:
   * .. code-block:: proto
   *   message <T>Collection {
   *     repeated CollectionEntry resources = 1;
   *   }
   * 
* * Protobuf type {@code xds.core.v3.CollectionEntry} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:xds.core.v3.CollectionEntry) com.github.xds.core.v3.CollectionEntryOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.github.xds.core.v3.CollectionEntryProto.internal_static_xds_core_v3_CollectionEntry_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.github.xds.core.v3.CollectionEntryProto.internal_static_xds_core_v3_CollectionEntry_fieldAccessorTable .ensureFieldAccessorsInitialized( com.github.xds.core.v3.CollectionEntry.class, com.github.xds.core.v3.CollectionEntry.Builder.class); } // Construct using com.github.xds.core.v3.CollectionEntry.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(); resourceSpecifierCase_ = 0; resourceSpecifier_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.github.xds.core.v3.CollectionEntryProto.internal_static_xds_core_v3_CollectionEntry_descriptor; } @java.lang.Override public com.github.xds.core.v3.CollectionEntry getDefaultInstanceForType() { return com.github.xds.core.v3.CollectionEntry.getDefaultInstance(); } @java.lang.Override public com.github.xds.core.v3.CollectionEntry build() { com.github.xds.core.v3.CollectionEntry result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.github.xds.core.v3.CollectionEntry buildPartial() { com.github.xds.core.v3.CollectionEntry result = new com.github.xds.core.v3.CollectionEntry(this); if (resourceSpecifierCase_ == 1) { if (locatorBuilder_ == null) { result.resourceSpecifier_ = resourceSpecifier_; } else { result.resourceSpecifier_ = locatorBuilder_.build(); } } if (resourceSpecifierCase_ == 2) { if (inlineEntryBuilder_ == null) { result.resourceSpecifier_ = resourceSpecifier_; } else { result.resourceSpecifier_ = inlineEntryBuilder_.build(); } } result.resourceSpecifierCase_ = resourceSpecifierCase_; 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.CollectionEntry) { return mergeFrom((com.github.xds.core.v3.CollectionEntry)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.github.xds.core.v3.CollectionEntry other) { if (other == com.github.xds.core.v3.CollectionEntry.getDefaultInstance()) return this; switch (other.getResourceSpecifierCase()) { case LOCATOR: { mergeLocator(other.getLocator()); break; } case INLINE_ENTRY: { mergeInlineEntry(other.getInlineEntry()); break; } case RESOURCESPECIFIER_NOT_SET: { break; } } 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.CollectionEntry parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.github.xds.core.v3.CollectionEntry) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int resourceSpecifierCase_ = 0; private java.lang.Object resourceSpecifier_; public ResourceSpecifierCase getResourceSpecifierCase() { return ResourceSpecifierCase.forNumber( resourceSpecifierCase_); } public Builder clearResourceSpecifier() { resourceSpecifierCase_ = 0; resourceSpecifier_ = null; onChanged(); return this; } private com.google.protobuf.SingleFieldBuilderV3< com.github.xds.core.v3.ResourceLocator, com.github.xds.core.v3.ResourceLocator.Builder, com.github.xds.core.v3.ResourceLocatorOrBuilder> locatorBuilder_; /** *
     * A resource locator describing how the member resource is to be located.
     * 
* * .xds.core.v3.ResourceLocator locator = 1; * @return Whether the locator field is set. */ @java.lang.Override public boolean hasLocator() { return resourceSpecifierCase_ == 1; } /** *
     * A resource locator describing how the member resource is to be located.
     * 
* * .xds.core.v3.ResourceLocator locator = 1; * @return The locator. */ @java.lang.Override public com.github.xds.core.v3.ResourceLocator getLocator() { if (locatorBuilder_ == null) { if (resourceSpecifierCase_ == 1) { return (com.github.xds.core.v3.ResourceLocator) resourceSpecifier_; } return com.github.xds.core.v3.ResourceLocator.getDefaultInstance(); } else { if (resourceSpecifierCase_ == 1) { return locatorBuilder_.getMessage(); } return com.github.xds.core.v3.ResourceLocator.getDefaultInstance(); } } /** *
     * A resource locator describing how the member resource is to be located.
     * 
* * .xds.core.v3.ResourceLocator locator = 1; */ public Builder setLocator(com.github.xds.core.v3.ResourceLocator value) { if (locatorBuilder_ == null) { if (value == null) { throw new NullPointerException(); } resourceSpecifier_ = value; onChanged(); } else { locatorBuilder_.setMessage(value); } resourceSpecifierCase_ = 1; return this; } /** *
     * A resource locator describing how the member resource is to be located.
     * 
* * .xds.core.v3.ResourceLocator locator = 1; */ public Builder setLocator( com.github.xds.core.v3.ResourceLocator.Builder builderForValue) { if (locatorBuilder_ == null) { resourceSpecifier_ = builderForValue.build(); onChanged(); } else { locatorBuilder_.setMessage(builderForValue.build()); } resourceSpecifierCase_ = 1; return this; } /** *
     * A resource locator describing how the member resource is to be located.
     * 
* * .xds.core.v3.ResourceLocator locator = 1; */ public Builder mergeLocator(com.github.xds.core.v3.ResourceLocator value) { if (locatorBuilder_ == null) { if (resourceSpecifierCase_ == 1 && resourceSpecifier_ != com.github.xds.core.v3.ResourceLocator.getDefaultInstance()) { resourceSpecifier_ = com.github.xds.core.v3.ResourceLocator.newBuilder((com.github.xds.core.v3.ResourceLocator) resourceSpecifier_) .mergeFrom(value).buildPartial(); } else { resourceSpecifier_ = value; } onChanged(); } else { if (resourceSpecifierCase_ == 1) { locatorBuilder_.mergeFrom(value); } else { locatorBuilder_.setMessage(value); } } resourceSpecifierCase_ = 1; return this; } /** *
     * A resource locator describing how the member resource is to be located.
     * 
* * .xds.core.v3.ResourceLocator locator = 1; */ public Builder clearLocator() { if (locatorBuilder_ == null) { if (resourceSpecifierCase_ == 1) { resourceSpecifierCase_ = 0; resourceSpecifier_ = null; onChanged(); } } else { if (resourceSpecifierCase_ == 1) { resourceSpecifierCase_ = 0; resourceSpecifier_ = null; } locatorBuilder_.clear(); } return this; } /** *
     * A resource locator describing how the member resource is to be located.
     * 
* * .xds.core.v3.ResourceLocator locator = 1; */ public com.github.xds.core.v3.ResourceLocator.Builder getLocatorBuilder() { return getLocatorFieldBuilder().getBuilder(); } /** *
     * A resource locator describing how the member resource is to be located.
     * 
* * .xds.core.v3.ResourceLocator locator = 1; */ @java.lang.Override public com.github.xds.core.v3.ResourceLocatorOrBuilder getLocatorOrBuilder() { if ((resourceSpecifierCase_ == 1) && (locatorBuilder_ != null)) { return locatorBuilder_.getMessageOrBuilder(); } else { if (resourceSpecifierCase_ == 1) { return (com.github.xds.core.v3.ResourceLocator) resourceSpecifier_; } return com.github.xds.core.v3.ResourceLocator.getDefaultInstance(); } } /** *
     * A resource locator describing how the member resource is to be located.
     * 
* * .xds.core.v3.ResourceLocator locator = 1; */ private com.google.protobuf.SingleFieldBuilderV3< com.github.xds.core.v3.ResourceLocator, com.github.xds.core.v3.ResourceLocator.Builder, com.github.xds.core.v3.ResourceLocatorOrBuilder> getLocatorFieldBuilder() { if (locatorBuilder_ == null) { if (!(resourceSpecifierCase_ == 1)) { resourceSpecifier_ = com.github.xds.core.v3.ResourceLocator.getDefaultInstance(); } locatorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.github.xds.core.v3.ResourceLocator, com.github.xds.core.v3.ResourceLocator.Builder, com.github.xds.core.v3.ResourceLocatorOrBuilder>( (com.github.xds.core.v3.ResourceLocator) resourceSpecifier_, getParentForChildren(), isClean()); resourceSpecifier_ = null; } resourceSpecifierCase_ = 1; onChanged();; return locatorBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.github.xds.core.v3.CollectionEntry.InlineEntry, com.github.xds.core.v3.CollectionEntry.InlineEntry.Builder, com.github.xds.core.v3.CollectionEntry.InlineEntryOrBuilder> inlineEntryBuilder_; /** *
     * The resource is inlined in the list collection.
     * 
* * .xds.core.v3.CollectionEntry.InlineEntry inline_entry = 2; * @return Whether the inlineEntry field is set. */ @java.lang.Override public boolean hasInlineEntry() { return resourceSpecifierCase_ == 2; } /** *
     * The resource is inlined in the list collection.
     * 
* * .xds.core.v3.CollectionEntry.InlineEntry inline_entry = 2; * @return The inlineEntry. */ @java.lang.Override public com.github.xds.core.v3.CollectionEntry.InlineEntry getInlineEntry() { if (inlineEntryBuilder_ == null) { if (resourceSpecifierCase_ == 2) { return (com.github.xds.core.v3.CollectionEntry.InlineEntry) resourceSpecifier_; } return com.github.xds.core.v3.CollectionEntry.InlineEntry.getDefaultInstance(); } else { if (resourceSpecifierCase_ == 2) { return inlineEntryBuilder_.getMessage(); } return com.github.xds.core.v3.CollectionEntry.InlineEntry.getDefaultInstance(); } } /** *
     * The resource is inlined in the list collection.
     * 
* * .xds.core.v3.CollectionEntry.InlineEntry inline_entry = 2; */ public Builder setInlineEntry(com.github.xds.core.v3.CollectionEntry.InlineEntry value) { if (inlineEntryBuilder_ == null) { if (value == null) { throw new NullPointerException(); } resourceSpecifier_ = value; onChanged(); } else { inlineEntryBuilder_.setMessage(value); } resourceSpecifierCase_ = 2; return this; } /** *
     * The resource is inlined in the list collection.
     * 
* * .xds.core.v3.CollectionEntry.InlineEntry inline_entry = 2; */ public Builder setInlineEntry( com.github.xds.core.v3.CollectionEntry.InlineEntry.Builder builderForValue) { if (inlineEntryBuilder_ == null) { resourceSpecifier_ = builderForValue.build(); onChanged(); } else { inlineEntryBuilder_.setMessage(builderForValue.build()); } resourceSpecifierCase_ = 2; return this; } /** *
     * The resource is inlined in the list collection.
     * 
* * .xds.core.v3.CollectionEntry.InlineEntry inline_entry = 2; */ public Builder mergeInlineEntry(com.github.xds.core.v3.CollectionEntry.InlineEntry value) { if (inlineEntryBuilder_ == null) { if (resourceSpecifierCase_ == 2 && resourceSpecifier_ != com.github.xds.core.v3.CollectionEntry.InlineEntry.getDefaultInstance()) { resourceSpecifier_ = com.github.xds.core.v3.CollectionEntry.InlineEntry.newBuilder((com.github.xds.core.v3.CollectionEntry.InlineEntry) resourceSpecifier_) .mergeFrom(value).buildPartial(); } else { resourceSpecifier_ = value; } onChanged(); } else { if (resourceSpecifierCase_ == 2) { inlineEntryBuilder_.mergeFrom(value); } else { inlineEntryBuilder_.setMessage(value); } } resourceSpecifierCase_ = 2; return this; } /** *
     * The resource is inlined in the list collection.
     * 
* * .xds.core.v3.CollectionEntry.InlineEntry inline_entry = 2; */ public Builder clearInlineEntry() { if (inlineEntryBuilder_ == null) { if (resourceSpecifierCase_ == 2) { resourceSpecifierCase_ = 0; resourceSpecifier_ = null; onChanged(); } } else { if (resourceSpecifierCase_ == 2) { resourceSpecifierCase_ = 0; resourceSpecifier_ = null; } inlineEntryBuilder_.clear(); } return this; } /** *
     * The resource is inlined in the list collection.
     * 
* * .xds.core.v3.CollectionEntry.InlineEntry inline_entry = 2; */ public com.github.xds.core.v3.CollectionEntry.InlineEntry.Builder getInlineEntryBuilder() { return getInlineEntryFieldBuilder().getBuilder(); } /** *
     * The resource is inlined in the list collection.
     * 
* * .xds.core.v3.CollectionEntry.InlineEntry inline_entry = 2; */ @java.lang.Override public com.github.xds.core.v3.CollectionEntry.InlineEntryOrBuilder getInlineEntryOrBuilder() { if ((resourceSpecifierCase_ == 2) && (inlineEntryBuilder_ != null)) { return inlineEntryBuilder_.getMessageOrBuilder(); } else { if (resourceSpecifierCase_ == 2) { return (com.github.xds.core.v3.CollectionEntry.InlineEntry) resourceSpecifier_; } return com.github.xds.core.v3.CollectionEntry.InlineEntry.getDefaultInstance(); } } /** *
     * The resource is inlined in the list collection.
     * 
* * .xds.core.v3.CollectionEntry.InlineEntry inline_entry = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.github.xds.core.v3.CollectionEntry.InlineEntry, com.github.xds.core.v3.CollectionEntry.InlineEntry.Builder, com.github.xds.core.v3.CollectionEntry.InlineEntryOrBuilder> getInlineEntryFieldBuilder() { if (inlineEntryBuilder_ == null) { if (!(resourceSpecifierCase_ == 2)) { resourceSpecifier_ = com.github.xds.core.v3.CollectionEntry.InlineEntry.getDefaultInstance(); } inlineEntryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.github.xds.core.v3.CollectionEntry.InlineEntry, com.github.xds.core.v3.CollectionEntry.InlineEntry.Builder, com.github.xds.core.v3.CollectionEntry.InlineEntryOrBuilder>( (com.github.xds.core.v3.CollectionEntry.InlineEntry) resourceSpecifier_, getParentForChildren(), isClean()); resourceSpecifier_ = null; } resourceSpecifierCase_ = 2; onChanged();; return inlineEntryBuilder_; } @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.CollectionEntry) } // @@protoc_insertion_point(class_scope:xds.core.v3.CollectionEntry) private static final com.github.xds.core.v3.CollectionEntry DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.github.xds.core.v3.CollectionEntry(); } public static com.github.xds.core.v3.CollectionEntry getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public CollectionEntry parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new CollectionEntry(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.CollectionEntry getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy