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

io.envoyproxy.envoy.api.v2.Resource Maven / Gradle / Ivy

There is a newer version: 1.0.47
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: envoy/api/v2/discovery.proto

// Protobuf Java Version: 3.25.1
package io.envoyproxy.envoy.api.v2;

/**
 * Protobuf type {@code envoy.api.v2.Resource}
 */
public final class Resource extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:envoy.api.v2.Resource)
    ResourceOrBuilder {
private static final long serialVersionUID = 0L;
  // Use Resource.newBuilder() to construct.
  private Resource(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private Resource() {
    name_ = "";
    aliases_ =
        com.google.protobuf.LazyStringArrayList.emptyList();
    version_ = "";
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new Resource();
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return io.envoyproxy.envoy.api.v2.DiscoveryProto.internal_static_envoy_api_v2_Resource_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return io.envoyproxy.envoy.api.v2.DiscoveryProto.internal_static_envoy_api_v2_Resource_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            io.envoyproxy.envoy.api.v2.Resource.class, io.envoyproxy.envoy.api.v2.Resource.Builder.class);
  }

  private int bitField0_;
  public static final int NAME_FIELD_NUMBER = 3;
  @SuppressWarnings("serial")
  private volatile java.lang.Object name_ = "";
  /**
   * 
   * The resource's name, to distinguish it from others of the same type of resource.
   * 
* * string name = 3; * @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; } } /** *
   * The resource's name, to distinguish it from others of the same type of resource.
   * 
* * string name = 3; * @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 ALIASES_FIELD_NUMBER = 4; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList aliases_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** *
   * The aliases are a list of other names that this resource can go by.
   * 
* * repeated string aliases = 4; * @return A list containing the aliases. */ public com.google.protobuf.ProtocolStringList getAliasesList() { return aliases_; } /** *
   * The aliases are a list of other names that this resource can go by.
   * 
* * repeated string aliases = 4; * @return The count of aliases. */ public int getAliasesCount() { return aliases_.size(); } /** *
   * The aliases are a list of other names that this resource can go by.
   * 
* * repeated string aliases = 4; * @param index The index of the element to return. * @return The aliases at the given index. */ public java.lang.String getAliases(int index) { return aliases_.get(index); } /** *
   * The aliases are a list of other names that this resource can go by.
   * 
* * repeated string aliases = 4; * @param index The index of the value to return. * @return The bytes of the aliases at the given index. */ public com.google.protobuf.ByteString getAliasesBytes(int index) { return aliases_.getByteString(index); } public static final int VERSION_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object version_ = ""; /** *
   * The resource level version. It allows xDS to track the state of individual
   * resources.
   * 
* * string version = 1; * @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 level version. It allows xDS to track the state of individual
   * resources.
   * 
* * string version = 1; * @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 = 2; private com.google.protobuf.Any resource_; /** *
   * The resource being tracked.
   * 
* * .google.protobuf.Any resource = 2; * @return Whether the resource field is set. */ @java.lang.Override public boolean hasResource() { return ((bitField0_ & 0x00000001) != 0); } /** *
   * The resource being tracked.
   * 
* * .google.protobuf.Any resource = 2; * @return The resource. */ @java.lang.Override public com.google.protobuf.Any getResource() { return resource_ == null ? com.google.protobuf.Any.getDefaultInstance() : resource_; } /** *
   * The resource being tracked.
   * 
* * .google.protobuf.Any resource = 2; */ @java.lang.Override public com.google.protobuf.AnyOrBuilder getResourceOrBuilder() { return resource_ == null ? com.google.protobuf.Any.getDefaultInstance() : resource_; } 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(version_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, version_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getResource()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); } for (int i = 0; i < aliases_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, aliases_.getRaw(i)); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, version_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getResource()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); } { int dataSize = 0; for (int i = 0; i < aliases_.size(); i++) { dataSize += computeStringSizeNoTag(aliases_.getRaw(i)); } size += dataSize; size += 1 * getAliasesList().size(); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.envoyproxy.envoy.api.v2.Resource)) { return super.equals(obj); } io.envoyproxy.envoy.api.v2.Resource other = (io.envoyproxy.envoy.api.v2.Resource) obj; if (!getName() .equals(other.getName())) return false; if (!getAliasesList() .equals(other.getAliasesList())) 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 (!getUnknownFields().equals(other.getUnknownFields())) 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(); if (getAliasesCount() > 0) { hash = (37 * hash) + ALIASES_FIELD_NUMBER; hash = (53 * hash) + getAliasesList().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) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static io.envoyproxy.envoy.api.v2.Resource parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.api.v2.Resource parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.api.v2.Resource parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.api.v2.Resource parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.api.v2.Resource parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.envoyproxy.envoy.api.v2.Resource parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.envoyproxy.envoy.api.v2.Resource parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.api.v2.Resource 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 io.envoyproxy.envoy.api.v2.Resource parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.envoyproxy.envoy.api.v2.Resource 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 io.envoyproxy.envoy.api.v2.Resource parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.envoyproxy.envoy.api.v2.Resource 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(io.envoyproxy.envoy.api.v2.Resource 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; } /** * Protobuf type {@code envoy.api.v2.Resource} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:envoy.api.v2.Resource) io.envoyproxy.envoy.api.v2.ResourceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.envoyproxy.envoy.api.v2.DiscoveryProto.internal_static_envoy_api_v2_Resource_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.envoyproxy.envoy.api.v2.DiscoveryProto.internal_static_envoy_api_v2_Resource_fieldAccessorTable .ensureFieldAccessorsInitialized( io.envoyproxy.envoy.api.v2.Resource.class, io.envoyproxy.envoy.api.v2.Resource.Builder.class); } // Construct using io.envoyproxy.envoy.api.v2.Resource.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getResourceFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; name_ = ""; aliases_ = com.google.protobuf.LazyStringArrayList.emptyList(); version_ = ""; resource_ = null; if (resourceBuilder_ != null) { resourceBuilder_.dispose(); resourceBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.envoyproxy.envoy.api.v2.DiscoveryProto.internal_static_envoy_api_v2_Resource_descriptor; } @java.lang.Override public io.envoyproxy.envoy.api.v2.Resource getDefaultInstanceForType() { return io.envoyproxy.envoy.api.v2.Resource.getDefaultInstance(); } @java.lang.Override public io.envoyproxy.envoy.api.v2.Resource build() { io.envoyproxy.envoy.api.v2.Resource result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.envoyproxy.envoy.api.v2.Resource buildPartial() { io.envoyproxy.envoy.api.v2.Resource result = new io.envoyproxy.envoy.api.v2.Resource(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(io.envoyproxy.envoy.api.v2.Resource result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.name_ = name_; } if (((from_bitField0_ & 0x00000002) != 0)) { aliases_.makeImmutable(); result.aliases_ = aliases_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.version_ = version_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000008) != 0)) { result.resource_ = resourceBuilder_ == null ? resource_ : resourceBuilder_.build(); to_bitField0_ |= 0x00000001; } result.bitField0_ |= to_bitField0_; } @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 io.envoyproxy.envoy.api.v2.Resource) { return mergeFrom((io.envoyproxy.envoy.api.v2.Resource)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.envoyproxy.envoy.api.v2.Resource other) { if (other == io.envoyproxy.envoy.api.v2.Resource.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; bitField0_ |= 0x00000001; onChanged(); } if (!other.aliases_.isEmpty()) { if (aliases_.isEmpty()) { aliases_ = other.aliases_; bitField0_ |= 0x00000002; } else { ensureAliasesIsMutable(); aliases_.addAll(other.aliases_); } onChanged(); } if (!other.getVersion().isEmpty()) { version_ = other.version_; bitField0_ |= 0x00000004; onChanged(); } if (other.hasResource()) { mergeResource(other.getResource()); } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { version_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000004; break; } // case 10 case 18: { input.readMessage( getResourceFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 18 case 26: { name_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 26 case 34: { java.lang.String s = input.readStringRequireUtf8(); ensureAliasesIsMutable(); aliases_.add(s); break; } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object name_ = ""; /** *
     * The resource's name, to distinguish it from others of the same type of resource.
     * 
* * string name = 3; * @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; } } /** *
     * The resource's name, to distinguish it from others of the same type of resource.
     * 
* * string name = 3; * @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; } } /** *
     * The resource's name, to distinguish it from others of the same type of resource.
     * 
* * string name = 3; * @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; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     * The resource's name, to distinguish it from others of the same type of resource.
     * 
* * string name = 3; * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
     * The resource's name, to distinguish it from others of the same type of resource.
     * 
* * string name = 3; * @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; bitField0_ |= 0x00000001; onChanged(); return this; } private com.google.protobuf.LazyStringArrayList aliases_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureAliasesIsMutable() { if (!aliases_.isModifiable()) { aliases_ = new com.google.protobuf.LazyStringArrayList(aliases_); } bitField0_ |= 0x00000002; } /** *
     * The aliases are a list of other names that this resource can go by.
     * 
* * repeated string aliases = 4; * @return A list containing the aliases. */ public com.google.protobuf.ProtocolStringList getAliasesList() { aliases_.makeImmutable(); return aliases_; } /** *
     * The aliases are a list of other names that this resource can go by.
     * 
* * repeated string aliases = 4; * @return The count of aliases. */ public int getAliasesCount() { return aliases_.size(); } /** *
     * The aliases are a list of other names that this resource can go by.
     * 
* * repeated string aliases = 4; * @param index The index of the element to return. * @return The aliases at the given index. */ public java.lang.String getAliases(int index) { return aliases_.get(index); } /** *
     * The aliases are a list of other names that this resource can go by.
     * 
* * repeated string aliases = 4; * @param index The index of the value to return. * @return The bytes of the aliases at the given index. */ public com.google.protobuf.ByteString getAliasesBytes(int index) { return aliases_.getByteString(index); } /** *
     * The aliases are a list of other names that this resource can go by.
     * 
* * repeated string aliases = 4; * @param index The index to set the value at. * @param value The aliases to set. * @return This builder for chaining. */ public Builder setAliases( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureAliasesIsMutable(); aliases_.set(index, value); bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     * The aliases are a list of other names that this resource can go by.
     * 
* * repeated string aliases = 4; * @param value The aliases to add. * @return This builder for chaining. */ public Builder addAliases( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureAliasesIsMutable(); aliases_.add(value); bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     * The aliases are a list of other names that this resource can go by.
     * 
* * repeated string aliases = 4; * @param values The aliases to add. * @return This builder for chaining. */ public Builder addAllAliases( java.lang.Iterable values) { ensureAliasesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, aliases_); bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     * The aliases are a list of other names that this resource can go by.
     * 
* * repeated string aliases = 4; * @return This builder for chaining. */ public Builder clearAliases() { aliases_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000002);; onChanged(); return this; } /** *
     * The aliases are a list of other names that this resource can go by.
     * 
* * repeated string aliases = 4; * @param value The bytes of the aliases to add. * @return This builder for chaining. */ public Builder addAliasesBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureAliasesIsMutable(); aliases_.add(value); bitField0_ |= 0x00000002; onChanged(); return this; } private java.lang.Object version_ = ""; /** *
     * The resource level version. It allows xDS to track the state of individual
     * resources.
     * 
* * string version = 1; * @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 level version. It allows xDS to track the state of individual
     * resources.
     * 
* * string version = 1; * @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 level version. It allows xDS to track the state of individual
     * resources.
     * 
* * string version = 1; * @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; bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     * The resource level version. It allows xDS to track the state of individual
     * resources.
     * 
* * string version = 1; * @return This builder for chaining. */ public Builder clearVersion() { version_ = getDefaultInstance().getVersion(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** *
     * The resource level version. It allows xDS to track the state of individual
     * resources.
     * 
* * string version = 1; * @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; bitField0_ |= 0x00000004; 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 being tracked.
     * 
* * .google.protobuf.Any resource = 2; * @return Whether the resource field is set. */ public boolean hasResource() { return ((bitField0_ & 0x00000008) != 0); } /** *
     * The resource being tracked.
     * 
* * .google.protobuf.Any resource = 2; * @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 being tracked.
     * 
* * .google.protobuf.Any resource = 2; */ public Builder setResource(com.google.protobuf.Any value) { if (resourceBuilder_ == null) { if (value == null) { throw new NullPointerException(); } resource_ = value; } else { resourceBuilder_.setMessage(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** *
     * The resource being tracked.
     * 
* * .google.protobuf.Any resource = 2; */ public Builder setResource( com.google.protobuf.Any.Builder builderForValue) { if (resourceBuilder_ == null) { resource_ = builderForValue.build(); } else { resourceBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; onChanged(); return this; } /** *
     * The resource being tracked.
     * 
* * .google.protobuf.Any resource = 2; */ public Builder mergeResource(com.google.protobuf.Any value) { if (resourceBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0) && resource_ != null && resource_ != com.google.protobuf.Any.getDefaultInstance()) { getResourceBuilder().mergeFrom(value); } else { resource_ = value; } } else { resourceBuilder_.mergeFrom(value); } if (resource_ != null) { bitField0_ |= 0x00000008; onChanged(); } return this; } /** *
     * The resource being tracked.
     * 
* * .google.protobuf.Any resource = 2; */ public Builder clearResource() { bitField0_ = (bitField0_ & ~0x00000008); resource_ = null; if (resourceBuilder_ != null) { resourceBuilder_.dispose(); resourceBuilder_ = null; } onChanged(); return this; } /** *
     * The resource being tracked.
     * 
* * .google.protobuf.Any resource = 2; */ public com.google.protobuf.Any.Builder getResourceBuilder() { bitField0_ |= 0x00000008; onChanged(); return getResourceFieldBuilder().getBuilder(); } /** *
     * The resource being tracked.
     * 
* * .google.protobuf.Any resource = 2; */ public com.google.protobuf.AnyOrBuilder getResourceOrBuilder() { if (resourceBuilder_ != null) { return resourceBuilder_.getMessageOrBuilder(); } else { return resource_ == null ? com.google.protobuf.Any.getDefaultInstance() : resource_; } } /** *
     * The resource being tracked.
     * 
* * .google.protobuf.Any resource = 2; */ 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:envoy.api.v2.Resource) } // @@protoc_insertion_point(class_scope:envoy.api.v2.Resource) private static final io.envoyproxy.envoy.api.v2.Resource DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.envoyproxy.envoy.api.v2.Resource(); } public static io.envoyproxy.envoy.api.v2.Resource getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Resource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.envoyproxy.envoy.api.v2.Resource getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy