io.envoyproxy.envoy.service.discovery.v3.Resource Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/service/discovery/v3/discovery.proto
// Protobuf Java Version: 3.25.5
package io.envoyproxy.envoy.service.discovery.v3;
/**
*
* [#next-free-field: 10]
*
*
* Protobuf type {@code envoy.service.discovery.v3.Resource}
*/
public final class Resource extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.service.discovery.v3.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.service.discovery.v3.DiscoveryProto.internal_static_envoy_service_discovery_v3_Resource_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.service.discovery.v3.DiscoveryProto.internal_static_envoy_service_discovery_v3_Resource_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.service.discovery.v3.Resource.class, io.envoyproxy.envoy.service.discovery.v3.Resource.Builder.class);
}
public interface CacheControlOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.service.discovery.v3.Resource.CacheControl)
com.google.protobuf.MessageOrBuilder {
/**
*
* If true, xDS proxies may not cache this resource.
* Note that this does not apply to clients other than xDS proxies, which must cache resources
* for their own use, regardless of the value of this field.
*
*
* bool do_not_cache = 1;
* @return The doNotCache.
*/
boolean getDoNotCache();
}
/**
*
* Cache control properties for the resource.
* [#not-implemented-hide:]
*
*
* Protobuf type {@code envoy.service.discovery.v3.Resource.CacheControl}
*/
public static final class CacheControl extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.service.discovery.v3.Resource.CacheControl)
CacheControlOrBuilder {
private static final long serialVersionUID = 0L;
// Use CacheControl.newBuilder() to construct.
private CacheControl(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CacheControl() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CacheControl();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.service.discovery.v3.DiscoveryProto.internal_static_envoy_service_discovery_v3_Resource_CacheControl_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.service.discovery.v3.DiscoveryProto.internal_static_envoy_service_discovery_v3_Resource_CacheControl_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl.class, io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl.Builder.class);
}
public static final int DO_NOT_CACHE_FIELD_NUMBER = 1;
private boolean doNotCache_ = false;
/**
*
* If true, xDS proxies may not cache this resource.
* Note that this does not apply to clients other than xDS proxies, which must cache resources
* for their own use, regardless of the value of this field.
*
*
* bool do_not_cache = 1;
* @return The doNotCache.
*/
@java.lang.Override
public boolean getDoNotCache() {
return doNotCache_;
}
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 (doNotCache_ != false) {
output.writeBool(1, doNotCache_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (doNotCache_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(1, doNotCache_);
}
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.service.discovery.v3.Resource.CacheControl)) {
return super.equals(obj);
}
io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl other = (io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl) obj;
if (getDoNotCache()
!= other.getDoNotCache()) 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) + DO_NOT_CACHE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getDoNotCache());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl 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.service.discovery.v3.Resource.CacheControl parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl 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.service.discovery.v3.Resource.CacheControl parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl 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.service.discovery.v3.Resource.CacheControl parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl 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.service.discovery.v3.Resource.CacheControl parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl 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.service.discovery.v3.Resource.CacheControl 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;
}
/**
*
* Cache control properties for the resource.
* [#not-implemented-hide:]
*
*
* Protobuf type {@code envoy.service.discovery.v3.Resource.CacheControl}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.service.discovery.v3.Resource.CacheControl)
io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControlOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.service.discovery.v3.DiscoveryProto.internal_static_envoy_service_discovery_v3_Resource_CacheControl_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.service.discovery.v3.DiscoveryProto.internal_static_envoy_service_discovery_v3_Resource_CacheControl_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl.class, io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl.Builder.class);
}
// Construct using io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
doNotCache_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.service.discovery.v3.DiscoveryProto.internal_static_envoy_service_discovery_v3_Resource_CacheControl_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl getDefaultInstanceForType() {
return io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl build() {
io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl buildPartial() {
io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl result = new io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.doNotCache_ = doNotCache_;
}
}
@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.service.discovery.v3.Resource.CacheControl) {
return mergeFrom((io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl other) {
if (other == io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl.getDefaultInstance()) return this;
if (other.getDoNotCache() != false) {
setDoNotCache(other.getDoNotCache());
}
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 8: {
doNotCache_ = input.readBool();
bitField0_ |= 0x00000001;
break;
} // case 8
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 boolean doNotCache_ ;
/**
*
* If true, xDS proxies may not cache this resource.
* Note that this does not apply to clients other than xDS proxies, which must cache resources
* for their own use, regardless of the value of this field.
*
*
* bool do_not_cache = 1;
* @return The doNotCache.
*/
@java.lang.Override
public boolean getDoNotCache() {
return doNotCache_;
}
/**
*
* If true, xDS proxies may not cache this resource.
* Note that this does not apply to clients other than xDS proxies, which must cache resources
* for their own use, regardless of the value of this field.
*
*
* bool do_not_cache = 1;
* @param value The doNotCache to set.
* @return This builder for chaining.
*/
public Builder setDoNotCache(boolean value) {
doNotCache_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* If true, xDS proxies may not cache this resource.
* Note that this does not apply to clients other than xDS proxies, which must cache resources
* for their own use, regardless of the value of this field.
*
*
* bool do_not_cache = 1;
* @return This builder for chaining.
*/
public Builder clearDoNotCache() {
bitField0_ = (bitField0_ & ~0x00000001);
doNotCache_ = false;
onChanged();
return this;
}
@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.service.discovery.v3.Resource.CacheControl)
}
// @@protoc_insertion_point(class_scope:envoy.service.discovery.v3.Resource.CacheControl)
private static final io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl();
}
public static io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CacheControl 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.service.discovery.v3.Resource.CacheControl getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
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.
* Only one of ``name`` or ``resource_name`` may be set.
*
*
* 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.
* Only one of ``name`` or ``resource_name`` may be set.
*
*
* 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 RESOURCE_NAME_FIELD_NUMBER = 8;
private io.envoyproxy.envoy.service.discovery.v3.ResourceName resourceName_;
/**
*
* Alternative to the ``name`` field, to be used when the server supports
* multiple variants of the named resource that are differentiated by
* dynamic parameter constraints.
* Only one of ``name`` or ``resource_name`` may be set.
*
*
* .envoy.service.discovery.v3.ResourceName resource_name = 8;
* @return Whether the resourceName field is set.
*/
@java.lang.Override
public boolean hasResourceName() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Alternative to the ``name`` field, to be used when the server supports
* multiple variants of the named resource that are differentiated by
* dynamic parameter constraints.
* Only one of ``name`` or ``resource_name`` may be set.
*
*
* .envoy.service.discovery.v3.ResourceName resource_name = 8;
* @return The resourceName.
*/
@java.lang.Override
public io.envoyproxy.envoy.service.discovery.v3.ResourceName getResourceName() {
return resourceName_ == null ? io.envoyproxy.envoy.service.discovery.v3.ResourceName.getDefaultInstance() : resourceName_;
}
/**
*
* Alternative to the ``name`` field, to be used when the server supports
* multiple variants of the named resource that are differentiated by
* dynamic parameter constraints.
* Only one of ``name`` or ``resource_name`` may be set.
*
*
* .envoy.service.discovery.v3.ResourceName resource_name = 8;
*/
@java.lang.Override
public io.envoyproxy.envoy.service.discovery.v3.ResourceNameOrBuilder getResourceNameOrBuilder() {
return resourceName_ == null ? io.envoyproxy.envoy.service.discovery.v3.ResourceName.getDefaultInstance() : resourceName_;
}
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_ & 0x00000002) != 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_;
}
public static final int TTL_FIELD_NUMBER = 6;
private com.google.protobuf.Duration ttl_;
/**
*
* Time-to-live value for the resource. For each resource, a timer is started. The timer is
* reset each time the resource is received with a new TTL. If the resource is received with
* no TTL set, the timer is removed for the resource. Upon expiration of the timer, the
* configuration for the resource will be removed.
*
* The TTL can be refreshed or changed by sending a response that doesn't change the resource
* version. In this case the resource field does not need to be populated, which allows for
* light-weight "heartbeat" updates to keep a resource with a TTL alive.
*
* The TTL feature is meant to support configurations that should be removed in the event of
* a management server failure. For example, the feature may be used for fault injection
* testing where the fault injection should be terminated in the event that Envoy loses contact
* with the management server.
*
*
* .google.protobuf.Duration ttl = 6;
* @return Whether the ttl field is set.
*/
@java.lang.Override
public boolean hasTtl() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Time-to-live value for the resource. For each resource, a timer is started. The timer is
* reset each time the resource is received with a new TTL. If the resource is received with
* no TTL set, the timer is removed for the resource. Upon expiration of the timer, the
* configuration for the resource will be removed.
*
* The TTL can be refreshed or changed by sending a response that doesn't change the resource
* version. In this case the resource field does not need to be populated, which allows for
* light-weight "heartbeat" updates to keep a resource with a TTL alive.
*
* The TTL feature is meant to support configurations that should be removed in the event of
* a management server failure. For example, the feature may be used for fault injection
* testing where the fault injection should be terminated in the event that Envoy loses contact
* with the management server.
*
*
* .google.protobuf.Duration ttl = 6;
* @return The ttl.
*/
@java.lang.Override
public com.google.protobuf.Duration getTtl() {
return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_;
}
/**
*
* Time-to-live value for the resource. For each resource, a timer is started. The timer is
* reset each time the resource is received with a new TTL. If the resource is received with
* no TTL set, the timer is removed for the resource. Upon expiration of the timer, the
* configuration for the resource will be removed.
*
* The TTL can be refreshed or changed by sending a response that doesn't change the resource
* version. In this case the resource field does not need to be populated, which allows for
* light-weight "heartbeat" updates to keep a resource with a TTL alive.
*
* The TTL feature is meant to support configurations that should be removed in the event of
* a management server failure. For example, the feature may be used for fault injection
* testing where the fault injection should be terminated in the event that Envoy loses contact
* with the management server.
*
*
* .google.protobuf.Duration ttl = 6;
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() {
return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_;
}
public static final int CACHE_CONTROL_FIELD_NUMBER = 7;
private io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl cacheControl_;
/**
*
* Cache control properties for the resource.
* [#not-implemented-hide:]
*
*
* .envoy.service.discovery.v3.Resource.CacheControl cache_control = 7;
* @return Whether the cacheControl field is set.
*/
@java.lang.Override
public boolean hasCacheControl() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* Cache control properties for the resource.
* [#not-implemented-hide:]
*
*
* .envoy.service.discovery.v3.Resource.CacheControl cache_control = 7;
* @return The cacheControl.
*/
@java.lang.Override
public io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl getCacheControl() {
return cacheControl_ == null ? io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl.getDefaultInstance() : cacheControl_;
}
/**
*
* Cache control properties for the resource.
* [#not-implemented-hide:]
*
*
* .envoy.service.discovery.v3.Resource.CacheControl cache_control = 7;
*/
@java.lang.Override
public io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControlOrBuilder getCacheControlOrBuilder() {
return cacheControl_ == null ? io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl.getDefaultInstance() : cacheControl_;
}
public static final int METADATA_FIELD_NUMBER = 9;
private io.envoyproxy.envoy.config.core.v3.Metadata metadata_;
/**
*
* The Metadata field can be used to provide additional information for the resource.
* E.g. the trace data for debugging.
*
*
* .envoy.config.core.v3.Metadata metadata = 9;
* @return Whether the metadata field is set.
*/
@java.lang.Override
public boolean hasMetadata() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* The Metadata field can be used to provide additional information for the resource.
* E.g. the trace data for debugging.
*
*
* .envoy.config.core.v3.Metadata metadata = 9;
* @return The metadata.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.Metadata getMetadata() {
return metadata_ == null ? io.envoyproxy.envoy.config.core.v3.Metadata.getDefaultInstance() : metadata_;
}
/**
*
* The Metadata field can be used to provide additional information for the resource.
* E.g. the trace data for debugging.
*
*
* .envoy.config.core.v3.Metadata metadata = 9;
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.MetadataOrBuilder getMetadataOrBuilder() {
return metadata_ == null ? io.envoyproxy.envoy.config.core.v3.Metadata.getDefaultInstance() : metadata_;
}
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_ & 0x00000002) != 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));
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(6, getTtl());
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(7, getCacheControl());
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(8, getResourceName());
}
if (((bitField0_ & 0x00000010) != 0)) {
output.writeMessage(9, getMetadata());
}
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_ & 0x00000002) != 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();
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getTtl());
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getCacheControl());
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, getResourceName());
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, getMetadata());
}
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.service.discovery.v3.Resource)) {
return super.equals(obj);
}
io.envoyproxy.envoy.service.discovery.v3.Resource other = (io.envoyproxy.envoy.service.discovery.v3.Resource) obj;
if (!getName()
.equals(other.getName())) return false;
if (hasResourceName() != other.hasResourceName()) return false;
if (hasResourceName()) {
if (!getResourceName()
.equals(other.getResourceName())) 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 (hasTtl() != other.hasTtl()) return false;
if (hasTtl()) {
if (!getTtl()
.equals(other.getTtl())) return false;
}
if (hasCacheControl() != other.hasCacheControl()) return false;
if (hasCacheControl()) {
if (!getCacheControl()
.equals(other.getCacheControl())) return false;
}
if (hasMetadata() != other.hasMetadata()) return false;
if (hasMetadata()) {
if (!getMetadata()
.equals(other.getMetadata())) 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 (hasResourceName()) {
hash = (37 * hash) + RESOURCE_NAME_FIELD_NUMBER;
hash = (53 * hash) + getResourceName().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();
}
if (hasTtl()) {
hash = (37 * hash) + TTL_FIELD_NUMBER;
hash = (53 * hash) + getTtl().hashCode();
}
if (hasCacheControl()) {
hash = (37 * hash) + CACHE_CONTROL_FIELD_NUMBER;
hash = (53 * hash) + getCacheControl().hashCode();
}
if (hasMetadata()) {
hash = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + getMetadata().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.service.discovery.v3.Resource parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.service.discovery.v3.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.service.discovery.v3.Resource parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.service.discovery.v3.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.service.discovery.v3.Resource parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.service.discovery.v3.Resource parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.service.discovery.v3.Resource parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.service.discovery.v3.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.service.discovery.v3.Resource parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.service.discovery.v3.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.service.discovery.v3.Resource parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.service.discovery.v3.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.service.discovery.v3.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;
}
/**
*
* [#next-free-field: 10]
*
*
* Protobuf type {@code envoy.service.discovery.v3.Resource}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.service.discovery.v3.Resource)
io.envoyproxy.envoy.service.discovery.v3.ResourceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.service.discovery.v3.DiscoveryProto.internal_static_envoy_service_discovery_v3_Resource_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.service.discovery.v3.DiscoveryProto.internal_static_envoy_service_discovery_v3_Resource_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.service.discovery.v3.Resource.class, io.envoyproxy.envoy.service.discovery.v3.Resource.Builder.class);
}
// Construct using io.envoyproxy.envoy.service.discovery.v3.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) {
getResourceNameFieldBuilder();
getResourceFieldBuilder();
getTtlFieldBuilder();
getCacheControlFieldBuilder();
getMetadataFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
resourceName_ = null;
if (resourceNameBuilder_ != null) {
resourceNameBuilder_.dispose();
resourceNameBuilder_ = null;
}
aliases_ =
com.google.protobuf.LazyStringArrayList.emptyList();
version_ = "";
resource_ = null;
if (resourceBuilder_ != null) {
resourceBuilder_.dispose();
resourceBuilder_ = null;
}
ttl_ = null;
if (ttlBuilder_ != null) {
ttlBuilder_.dispose();
ttlBuilder_ = null;
}
cacheControl_ = null;
if (cacheControlBuilder_ != null) {
cacheControlBuilder_.dispose();
cacheControlBuilder_ = null;
}
metadata_ = null;
if (metadataBuilder_ != null) {
metadataBuilder_.dispose();
metadataBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.service.discovery.v3.DiscoveryProto.internal_static_envoy_service_discovery_v3_Resource_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.service.discovery.v3.Resource getDefaultInstanceForType() {
return io.envoyproxy.envoy.service.discovery.v3.Resource.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.service.discovery.v3.Resource build() {
io.envoyproxy.envoy.service.discovery.v3.Resource result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.service.discovery.v3.Resource buildPartial() {
io.envoyproxy.envoy.service.discovery.v3.Resource result = new io.envoyproxy.envoy.service.discovery.v3.Resource(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(io.envoyproxy.envoy.service.discovery.v3.Resource result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.resourceName_ = resourceNameBuilder_ == null
? resourceName_
: resourceNameBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
aliases_.makeImmutable();
result.aliases_ = aliases_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.version_ = version_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.resource_ = resourceBuilder_ == null
? resource_
: resourceBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.ttl_ = ttlBuilder_ == null
? ttl_
: ttlBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.cacheControl_ = cacheControlBuilder_ == null
? cacheControl_
: cacheControlBuilder_.build();
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.metadata_ = metadataBuilder_ == null
? metadata_
: metadataBuilder_.build();
to_bitField0_ |= 0x00000010;
}
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.service.discovery.v3.Resource) {
return mergeFrom((io.envoyproxy.envoy.service.discovery.v3.Resource)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.service.discovery.v3.Resource other) {
if (other == io.envoyproxy.envoy.service.discovery.v3.Resource.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasResourceName()) {
mergeResourceName(other.getResourceName());
}
if (!other.aliases_.isEmpty()) {
if (aliases_.isEmpty()) {
aliases_ = other.aliases_;
bitField0_ |= 0x00000004;
} else {
ensureAliasesIsMutable();
aliases_.addAll(other.aliases_);
}
onChanged();
}
if (!other.getVersion().isEmpty()) {
version_ = other.version_;
bitField0_ |= 0x00000008;
onChanged();
}
if (other.hasResource()) {
mergeResource(other.getResource());
}
if (other.hasTtl()) {
mergeTtl(other.getTtl());
}
if (other.hasCacheControl()) {
mergeCacheControl(other.getCacheControl());
}
if (other.hasMetadata()) {
mergeMetadata(other.getMetadata());
}
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_ |= 0x00000008;
break;
} // case 10
case 18: {
input.readMessage(
getResourceFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000010;
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
case 50: {
input.readMessage(
getTtlFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 50
case 58: {
input.readMessage(
getCacheControlFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000040;
break;
} // case 58
case 66: {
input.readMessage(
getResourceNameFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 66
case 74: {
input.readMessage(
getMetadataFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000080;
break;
} // case 74
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.
* Only one of ``name`` or ``resource_name`` may be set.
*
*
* 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.
* Only one of ``name`` or ``resource_name`` may be set.
*
*
* 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.
* Only one of ``name`` or ``resource_name`` may be set.
*
*
* 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.
* Only one of ``name`` or ``resource_name`` may be set.
*
*
* 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.
* Only one of ``name`` or ``resource_name`` may be set.
*
*
* 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 io.envoyproxy.envoy.service.discovery.v3.ResourceName resourceName_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.service.discovery.v3.ResourceName, io.envoyproxy.envoy.service.discovery.v3.ResourceName.Builder, io.envoyproxy.envoy.service.discovery.v3.ResourceNameOrBuilder> resourceNameBuilder_;
/**
*
* Alternative to the ``name`` field, to be used when the server supports
* multiple variants of the named resource that are differentiated by
* dynamic parameter constraints.
* Only one of ``name`` or ``resource_name`` may be set.
*
*
* .envoy.service.discovery.v3.ResourceName resource_name = 8;
* @return Whether the resourceName field is set.
*/
public boolean hasResourceName() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Alternative to the ``name`` field, to be used when the server supports
* multiple variants of the named resource that are differentiated by
* dynamic parameter constraints.
* Only one of ``name`` or ``resource_name`` may be set.
*
*
* .envoy.service.discovery.v3.ResourceName resource_name = 8;
* @return The resourceName.
*/
public io.envoyproxy.envoy.service.discovery.v3.ResourceName getResourceName() {
if (resourceNameBuilder_ == null) {
return resourceName_ == null ? io.envoyproxy.envoy.service.discovery.v3.ResourceName.getDefaultInstance() : resourceName_;
} else {
return resourceNameBuilder_.getMessage();
}
}
/**
*
* Alternative to the ``name`` field, to be used when the server supports
* multiple variants of the named resource that are differentiated by
* dynamic parameter constraints.
* Only one of ``name`` or ``resource_name`` may be set.
*
*
* .envoy.service.discovery.v3.ResourceName resource_name = 8;
*/
public Builder setResourceName(io.envoyproxy.envoy.service.discovery.v3.ResourceName value) {
if (resourceNameBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
resourceName_ = value;
} else {
resourceNameBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Alternative to the ``name`` field, to be used when the server supports
* multiple variants of the named resource that are differentiated by
* dynamic parameter constraints.
* Only one of ``name`` or ``resource_name`` may be set.
*
*
* .envoy.service.discovery.v3.ResourceName resource_name = 8;
*/
public Builder setResourceName(
io.envoyproxy.envoy.service.discovery.v3.ResourceName.Builder builderForValue) {
if (resourceNameBuilder_ == null) {
resourceName_ = builderForValue.build();
} else {
resourceNameBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Alternative to the ``name`` field, to be used when the server supports
* multiple variants of the named resource that are differentiated by
* dynamic parameter constraints.
* Only one of ``name`` or ``resource_name`` may be set.
*
*
* .envoy.service.discovery.v3.ResourceName resource_name = 8;
*/
public Builder mergeResourceName(io.envoyproxy.envoy.service.discovery.v3.ResourceName value) {
if (resourceNameBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
resourceName_ != null &&
resourceName_ != io.envoyproxy.envoy.service.discovery.v3.ResourceName.getDefaultInstance()) {
getResourceNameBuilder().mergeFrom(value);
} else {
resourceName_ = value;
}
} else {
resourceNameBuilder_.mergeFrom(value);
}
if (resourceName_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
* Alternative to the ``name`` field, to be used when the server supports
* multiple variants of the named resource that are differentiated by
* dynamic parameter constraints.
* Only one of ``name`` or ``resource_name`` may be set.
*
*
* .envoy.service.discovery.v3.ResourceName resource_name = 8;
*/
public Builder clearResourceName() {
bitField0_ = (bitField0_ & ~0x00000002);
resourceName_ = null;
if (resourceNameBuilder_ != null) {
resourceNameBuilder_.dispose();
resourceNameBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Alternative to the ``name`` field, to be used when the server supports
* multiple variants of the named resource that are differentiated by
* dynamic parameter constraints.
* Only one of ``name`` or ``resource_name`` may be set.
*
*
* .envoy.service.discovery.v3.ResourceName resource_name = 8;
*/
public io.envoyproxy.envoy.service.discovery.v3.ResourceName.Builder getResourceNameBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getResourceNameFieldBuilder().getBuilder();
}
/**
*
* Alternative to the ``name`` field, to be used when the server supports
* multiple variants of the named resource that are differentiated by
* dynamic parameter constraints.
* Only one of ``name`` or ``resource_name`` may be set.
*
*
* .envoy.service.discovery.v3.ResourceName resource_name = 8;
*/
public io.envoyproxy.envoy.service.discovery.v3.ResourceNameOrBuilder getResourceNameOrBuilder() {
if (resourceNameBuilder_ != null) {
return resourceNameBuilder_.getMessageOrBuilder();
} else {
return resourceName_ == null ?
io.envoyproxy.envoy.service.discovery.v3.ResourceName.getDefaultInstance() : resourceName_;
}
}
/**
*
* Alternative to the ``name`` field, to be used when the server supports
* multiple variants of the named resource that are differentiated by
* dynamic parameter constraints.
* Only one of ``name`` or ``resource_name`` may be set.
*
*
* .envoy.service.discovery.v3.ResourceName resource_name = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.service.discovery.v3.ResourceName, io.envoyproxy.envoy.service.discovery.v3.ResourceName.Builder, io.envoyproxy.envoy.service.discovery.v3.ResourceNameOrBuilder>
getResourceNameFieldBuilder() {
if (resourceNameBuilder_ == null) {
resourceNameBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.service.discovery.v3.ResourceName, io.envoyproxy.envoy.service.discovery.v3.ResourceName.Builder, io.envoyproxy.envoy.service.discovery.v3.ResourceNameOrBuilder>(
getResourceName(),
getParentForChildren(),
isClean());
resourceName_ = null;
}
return resourceNameBuilder_;
}
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_ |= 0x00000004;
}
/**
*
* 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_ |= 0x00000004;
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_ |= 0x00000004;
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_ |= 0x00000004;
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_ & ~0x00000004);;
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_ |= 0x00000004;
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_ |= 0x00000008;
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_ & ~0x00000008);
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_ |= 0x00000008;
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_ & 0x00000010) != 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_ |= 0x00000010;
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_ |= 0x00000010;
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_ & 0x00000010) != 0) &&
resource_ != null &&
resource_ != com.google.protobuf.Any.getDefaultInstance()) {
getResourceBuilder().mergeFrom(value);
} else {
resource_ = value;
}
} else {
resourceBuilder_.mergeFrom(value);
}
if (resource_ != null) {
bitField0_ |= 0x00000010;
onChanged();
}
return this;
}
/**
*
* The resource being tracked.
*
*
* .google.protobuf.Any resource = 2;
*/
public Builder clearResource() {
bitField0_ = (bitField0_ & ~0x00000010);
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_ |= 0x00000010;
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_;
}
private com.google.protobuf.Duration ttl_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> ttlBuilder_;
/**
*
* Time-to-live value for the resource. For each resource, a timer is started. The timer is
* reset each time the resource is received with a new TTL. If the resource is received with
* no TTL set, the timer is removed for the resource. Upon expiration of the timer, the
* configuration for the resource will be removed.
*
* The TTL can be refreshed or changed by sending a response that doesn't change the resource
* version. In this case the resource field does not need to be populated, which allows for
* light-weight "heartbeat" updates to keep a resource with a TTL alive.
*
* The TTL feature is meant to support configurations that should be removed in the event of
* a management server failure. For example, the feature may be used for fault injection
* testing where the fault injection should be terminated in the event that Envoy loses contact
* with the management server.
*
*
* .google.protobuf.Duration ttl = 6;
* @return Whether the ttl field is set.
*/
public boolean hasTtl() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* Time-to-live value for the resource. For each resource, a timer is started. The timer is
* reset each time the resource is received with a new TTL. If the resource is received with
* no TTL set, the timer is removed for the resource. Upon expiration of the timer, the
* configuration for the resource will be removed.
*
* The TTL can be refreshed or changed by sending a response that doesn't change the resource
* version. In this case the resource field does not need to be populated, which allows for
* light-weight "heartbeat" updates to keep a resource with a TTL alive.
*
* The TTL feature is meant to support configurations that should be removed in the event of
* a management server failure. For example, the feature may be used for fault injection
* testing where the fault injection should be terminated in the event that Envoy loses contact
* with the management server.
*
*
* .google.protobuf.Duration ttl = 6;
* @return The ttl.
*/
public com.google.protobuf.Duration getTtl() {
if (ttlBuilder_ == null) {
return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_;
} else {
return ttlBuilder_.getMessage();
}
}
/**
*
* Time-to-live value for the resource. For each resource, a timer is started. The timer is
* reset each time the resource is received with a new TTL. If the resource is received with
* no TTL set, the timer is removed for the resource. Upon expiration of the timer, the
* configuration for the resource will be removed.
*
* The TTL can be refreshed or changed by sending a response that doesn't change the resource
* version. In this case the resource field does not need to be populated, which allows for
* light-weight "heartbeat" updates to keep a resource with a TTL alive.
*
* The TTL feature is meant to support configurations that should be removed in the event of
* a management server failure. For example, the feature may be used for fault injection
* testing where the fault injection should be terminated in the event that Envoy loses contact
* with the management server.
*
*
* .google.protobuf.Duration ttl = 6;
*/
public Builder setTtl(com.google.protobuf.Duration value) {
if (ttlBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ttl_ = value;
} else {
ttlBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* Time-to-live value for the resource. For each resource, a timer is started. The timer is
* reset each time the resource is received with a new TTL. If the resource is received with
* no TTL set, the timer is removed for the resource. Upon expiration of the timer, the
* configuration for the resource will be removed.
*
* The TTL can be refreshed or changed by sending a response that doesn't change the resource
* version. In this case the resource field does not need to be populated, which allows for
* light-weight "heartbeat" updates to keep a resource with a TTL alive.
*
* The TTL feature is meant to support configurations that should be removed in the event of
* a management server failure. For example, the feature may be used for fault injection
* testing where the fault injection should be terminated in the event that Envoy loses contact
* with the management server.
*
*
* .google.protobuf.Duration ttl = 6;
*/
public Builder setTtl(
com.google.protobuf.Duration.Builder builderForValue) {
if (ttlBuilder_ == null) {
ttl_ = builderForValue.build();
} else {
ttlBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* Time-to-live value for the resource. For each resource, a timer is started. The timer is
* reset each time the resource is received with a new TTL. If the resource is received with
* no TTL set, the timer is removed for the resource. Upon expiration of the timer, the
* configuration for the resource will be removed.
*
* The TTL can be refreshed or changed by sending a response that doesn't change the resource
* version. In this case the resource field does not need to be populated, which allows for
* light-weight "heartbeat" updates to keep a resource with a TTL alive.
*
* The TTL feature is meant to support configurations that should be removed in the event of
* a management server failure. For example, the feature may be used for fault injection
* testing where the fault injection should be terminated in the event that Envoy loses contact
* with the management server.
*
*
* .google.protobuf.Duration ttl = 6;
*/
public Builder mergeTtl(com.google.protobuf.Duration value) {
if (ttlBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0) &&
ttl_ != null &&
ttl_ != com.google.protobuf.Duration.getDefaultInstance()) {
getTtlBuilder().mergeFrom(value);
} else {
ttl_ = value;
}
} else {
ttlBuilder_.mergeFrom(value);
}
if (ttl_ != null) {
bitField0_ |= 0x00000020;
onChanged();
}
return this;
}
/**
*
* Time-to-live value for the resource. For each resource, a timer is started. The timer is
* reset each time the resource is received with a new TTL. If the resource is received with
* no TTL set, the timer is removed for the resource. Upon expiration of the timer, the
* configuration for the resource will be removed.
*
* The TTL can be refreshed or changed by sending a response that doesn't change the resource
* version. In this case the resource field does not need to be populated, which allows for
* light-weight "heartbeat" updates to keep a resource with a TTL alive.
*
* The TTL feature is meant to support configurations that should be removed in the event of
* a management server failure. For example, the feature may be used for fault injection
* testing where the fault injection should be terminated in the event that Envoy loses contact
* with the management server.
*
*
* .google.protobuf.Duration ttl = 6;
*/
public Builder clearTtl() {
bitField0_ = (bitField0_ & ~0x00000020);
ttl_ = null;
if (ttlBuilder_ != null) {
ttlBuilder_.dispose();
ttlBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Time-to-live value for the resource. For each resource, a timer is started. The timer is
* reset each time the resource is received with a new TTL. If the resource is received with
* no TTL set, the timer is removed for the resource. Upon expiration of the timer, the
* configuration for the resource will be removed.
*
* The TTL can be refreshed or changed by sending a response that doesn't change the resource
* version. In this case the resource field does not need to be populated, which allows for
* light-weight "heartbeat" updates to keep a resource with a TTL alive.
*
* The TTL feature is meant to support configurations that should be removed in the event of
* a management server failure. For example, the feature may be used for fault injection
* testing where the fault injection should be terminated in the event that Envoy loses contact
* with the management server.
*
*
* .google.protobuf.Duration ttl = 6;
*/
public com.google.protobuf.Duration.Builder getTtlBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getTtlFieldBuilder().getBuilder();
}
/**
*
* Time-to-live value for the resource. For each resource, a timer is started. The timer is
* reset each time the resource is received with a new TTL. If the resource is received with
* no TTL set, the timer is removed for the resource. Upon expiration of the timer, the
* configuration for the resource will be removed.
*
* The TTL can be refreshed or changed by sending a response that doesn't change the resource
* version. In this case the resource field does not need to be populated, which allows for
* light-weight "heartbeat" updates to keep a resource with a TTL alive.
*
* The TTL feature is meant to support configurations that should be removed in the event of
* a management server failure. For example, the feature may be used for fault injection
* testing where the fault injection should be terminated in the event that Envoy loses contact
* with the management server.
*
*
* .google.protobuf.Duration ttl = 6;
*/
public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() {
if (ttlBuilder_ != null) {
return ttlBuilder_.getMessageOrBuilder();
} else {
return ttl_ == null ?
com.google.protobuf.Duration.getDefaultInstance() : ttl_;
}
}
/**
*
* Time-to-live value for the resource. For each resource, a timer is started. The timer is
* reset each time the resource is received with a new TTL. If the resource is received with
* no TTL set, the timer is removed for the resource. Upon expiration of the timer, the
* configuration for the resource will be removed.
*
* The TTL can be refreshed or changed by sending a response that doesn't change the resource
* version. In this case the resource field does not need to be populated, which allows for
* light-weight "heartbeat" updates to keep a resource with a TTL alive.
*
* The TTL feature is meant to support configurations that should be removed in the event of
* a management server failure. For example, the feature may be used for fault injection
* testing where the fault injection should be terminated in the event that Envoy loses contact
* with the management server.
*
*
* .google.protobuf.Duration ttl = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
getTtlFieldBuilder() {
if (ttlBuilder_ == null) {
ttlBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
getTtl(),
getParentForChildren(),
isClean());
ttl_ = null;
}
return ttlBuilder_;
}
private io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl cacheControl_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl, io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl.Builder, io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControlOrBuilder> cacheControlBuilder_;
/**
*
* Cache control properties for the resource.
* [#not-implemented-hide:]
*
*
* .envoy.service.discovery.v3.Resource.CacheControl cache_control = 7;
* @return Whether the cacheControl field is set.
*/
public boolean hasCacheControl() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
* Cache control properties for the resource.
* [#not-implemented-hide:]
*
*
* .envoy.service.discovery.v3.Resource.CacheControl cache_control = 7;
* @return The cacheControl.
*/
public io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl getCacheControl() {
if (cacheControlBuilder_ == null) {
return cacheControl_ == null ? io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl.getDefaultInstance() : cacheControl_;
} else {
return cacheControlBuilder_.getMessage();
}
}
/**
*
* Cache control properties for the resource.
* [#not-implemented-hide:]
*
*
* .envoy.service.discovery.v3.Resource.CacheControl cache_control = 7;
*/
public Builder setCacheControl(io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl value) {
if (cacheControlBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
cacheControl_ = value;
} else {
cacheControlBuilder_.setMessage(value);
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* Cache control properties for the resource.
* [#not-implemented-hide:]
*
*
* .envoy.service.discovery.v3.Resource.CacheControl cache_control = 7;
*/
public Builder setCacheControl(
io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl.Builder builderForValue) {
if (cacheControlBuilder_ == null) {
cacheControl_ = builderForValue.build();
} else {
cacheControlBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* Cache control properties for the resource.
* [#not-implemented-hide:]
*
*
* .envoy.service.discovery.v3.Resource.CacheControl cache_control = 7;
*/
public Builder mergeCacheControl(io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl value) {
if (cacheControlBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 0) &&
cacheControl_ != null &&
cacheControl_ != io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl.getDefaultInstance()) {
getCacheControlBuilder().mergeFrom(value);
} else {
cacheControl_ = value;
}
} else {
cacheControlBuilder_.mergeFrom(value);
}
if (cacheControl_ != null) {
bitField0_ |= 0x00000040;
onChanged();
}
return this;
}
/**
*
* Cache control properties for the resource.
* [#not-implemented-hide:]
*
*
* .envoy.service.discovery.v3.Resource.CacheControl cache_control = 7;
*/
public Builder clearCacheControl() {
bitField0_ = (bitField0_ & ~0x00000040);
cacheControl_ = null;
if (cacheControlBuilder_ != null) {
cacheControlBuilder_.dispose();
cacheControlBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Cache control properties for the resource.
* [#not-implemented-hide:]
*
*
* .envoy.service.discovery.v3.Resource.CacheControl cache_control = 7;
*/
public io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl.Builder getCacheControlBuilder() {
bitField0_ |= 0x00000040;
onChanged();
return getCacheControlFieldBuilder().getBuilder();
}
/**
*
* Cache control properties for the resource.
* [#not-implemented-hide:]
*
*
* .envoy.service.discovery.v3.Resource.CacheControl cache_control = 7;
*/
public io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControlOrBuilder getCacheControlOrBuilder() {
if (cacheControlBuilder_ != null) {
return cacheControlBuilder_.getMessageOrBuilder();
} else {
return cacheControl_ == null ?
io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl.getDefaultInstance() : cacheControl_;
}
}
/**
*
* Cache control properties for the resource.
* [#not-implemented-hide:]
*
*
* .envoy.service.discovery.v3.Resource.CacheControl cache_control = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl, io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl.Builder, io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControlOrBuilder>
getCacheControlFieldBuilder() {
if (cacheControlBuilder_ == null) {
cacheControlBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl, io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControl.Builder, io.envoyproxy.envoy.service.discovery.v3.Resource.CacheControlOrBuilder>(
getCacheControl(),
getParentForChildren(),
isClean());
cacheControl_ = null;
}
return cacheControlBuilder_;
}
private io.envoyproxy.envoy.config.core.v3.Metadata metadata_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.Metadata, io.envoyproxy.envoy.config.core.v3.Metadata.Builder, io.envoyproxy.envoy.config.core.v3.MetadataOrBuilder> metadataBuilder_;
/**
*
* The Metadata field can be used to provide additional information for the resource.
* E.g. the trace data for debugging.
*
*
* .envoy.config.core.v3.Metadata metadata = 9;
* @return Whether the metadata field is set.
*/
public boolean hasMetadata() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
* The Metadata field can be used to provide additional information for the resource.
* E.g. the trace data for debugging.
*
*
* .envoy.config.core.v3.Metadata metadata = 9;
* @return The metadata.
*/
public io.envoyproxy.envoy.config.core.v3.Metadata getMetadata() {
if (metadataBuilder_ == null) {
return metadata_ == null ? io.envoyproxy.envoy.config.core.v3.Metadata.getDefaultInstance() : metadata_;
} else {
return metadataBuilder_.getMessage();
}
}
/**
*
* The Metadata field can be used to provide additional information for the resource.
* E.g. the trace data for debugging.
*
*
* .envoy.config.core.v3.Metadata metadata = 9;
*/
public Builder setMetadata(io.envoyproxy.envoy.config.core.v3.Metadata value) {
if (metadataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
metadata_ = value;
} else {
metadataBuilder_.setMessage(value);
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* The Metadata field can be used to provide additional information for the resource.
* E.g. the trace data for debugging.
*
*
* .envoy.config.core.v3.Metadata metadata = 9;
*/
public Builder setMetadata(
io.envoyproxy.envoy.config.core.v3.Metadata.Builder builderForValue) {
if (metadataBuilder_ == null) {
metadata_ = builderForValue.build();
} else {
metadataBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* The Metadata field can be used to provide additional information for the resource.
* E.g. the trace data for debugging.
*
*
* .envoy.config.core.v3.Metadata metadata = 9;
*/
public Builder mergeMetadata(io.envoyproxy.envoy.config.core.v3.Metadata value) {
if (metadataBuilder_ == null) {
if (((bitField0_ & 0x00000080) != 0) &&
metadata_ != null &&
metadata_ != io.envoyproxy.envoy.config.core.v3.Metadata.getDefaultInstance()) {
getMetadataBuilder().mergeFrom(value);
} else {
metadata_ = value;
}
} else {
metadataBuilder_.mergeFrom(value);
}
if (metadata_ != null) {
bitField0_ |= 0x00000080;
onChanged();
}
return this;
}
/**
*
* The Metadata field can be used to provide additional information for the resource.
* E.g. the trace data for debugging.
*
*
* .envoy.config.core.v3.Metadata metadata = 9;
*/
public Builder clearMetadata() {
bitField0_ = (bitField0_ & ~0x00000080);
metadata_ = null;
if (metadataBuilder_ != null) {
metadataBuilder_.dispose();
metadataBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* The Metadata field can be used to provide additional information for the resource.
* E.g. the trace data for debugging.
*
*
* .envoy.config.core.v3.Metadata metadata = 9;
*/
public io.envoyproxy.envoy.config.core.v3.Metadata.Builder getMetadataBuilder() {
bitField0_ |= 0x00000080;
onChanged();
return getMetadataFieldBuilder().getBuilder();
}
/**
*
* The Metadata field can be used to provide additional information for the resource.
* E.g. the trace data for debugging.
*
*
* .envoy.config.core.v3.Metadata metadata = 9;
*/
public io.envoyproxy.envoy.config.core.v3.MetadataOrBuilder getMetadataOrBuilder() {
if (metadataBuilder_ != null) {
return metadataBuilder_.getMessageOrBuilder();
} else {
return metadata_ == null ?
io.envoyproxy.envoy.config.core.v3.Metadata.getDefaultInstance() : metadata_;
}
}
/**
*
* The Metadata field can be used to provide additional information for the resource.
* E.g. the trace data for debugging.
*
*
* .envoy.config.core.v3.Metadata metadata = 9;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.Metadata, io.envoyproxy.envoy.config.core.v3.Metadata.Builder, io.envoyproxy.envoy.config.core.v3.MetadataOrBuilder>
getMetadataFieldBuilder() {
if (metadataBuilder_ == null) {
metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.Metadata, io.envoyproxy.envoy.config.core.v3.Metadata.Builder, io.envoyproxy.envoy.config.core.v3.MetadataOrBuilder>(
getMetadata(),
getParentForChildren(),
isClean());
metadata_ = null;
}
return metadataBuilder_;
}
@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.service.discovery.v3.Resource)
}
// @@protoc_insertion_point(class_scope:envoy.service.discovery.v3.Resource)
private static final io.envoyproxy.envoy.service.discovery.v3.Resource DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.service.discovery.v3.Resource();
}
public static io.envoyproxy.envoy.service.discovery.v3.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.service.discovery.v3.Resource getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy