com.alibaba.nacos.istio.model.Gateway Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: gateway.proto
package com.alibaba.nacos.istio.model;
/**
*
* Gateway describes a load balancer operating at the edge of the mesh
* receiving incoming or outgoing HTTP/TCP connections.
* <!-- go code generation tags
* +kubetype-gen
* +kubetype-gen:groupVersion=networking.istio.io/v1alpha3
* +genclient
* +k8s:deepcopy-gen=true
* -->
*
*
* Protobuf type {@code istio.networking.v1alpha3.Gateway}
*/
public final class Gateway extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:istio.networking.v1alpha3.Gateway)
GatewayOrBuilder {
private static final long serialVersionUID = 0L;
// Use Gateway.newBuilder() to construct.
private Gateway(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Gateway() {
servers_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Gateway();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Gateway(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
servers_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
servers_.add(
input.readMessage(com.alibaba.nacos.istio.model.Server.parser(), extensionRegistry));
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
selector_ = com.google.protobuf.MapField.newMapField(
SelectorDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000002;
}
com.google.protobuf.MapEntry
selector__ = input.readMessage(
SelectorDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
selector_.getMutableMap().put(
selector__.getKey(), selector__.getValue());
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
servers_ = java.util.Collections.unmodifiableList(servers_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.alibaba.nacos.istio.model.GatewayOuterClass.internal_static_istio_networking_v1alpha3_Gateway_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 2:
return internalGetSelector();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.alibaba.nacos.istio.model.GatewayOuterClass.internal_static_istio_networking_v1alpha3_Gateway_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.alibaba.nacos.istio.model.Gateway.class, com.alibaba.nacos.istio.model.Gateway.Builder.class);
}
public static final int SERVERS_FIELD_NUMBER = 1;
private java.util.List servers_;
/**
*
* REQUIRED: A list of server specifications.
*
*
* repeated .istio.networking.v1alpha3.Server servers = 1;
*/
public java.util.List getServersList() {
return servers_;
}
/**
*
* REQUIRED: A list of server specifications.
*
*
* repeated .istio.networking.v1alpha3.Server servers = 1;
*/
public java.util.List extends com.alibaba.nacos.istio.model.ServerOrBuilder>
getServersOrBuilderList() {
return servers_;
}
/**
*
* REQUIRED: A list of server specifications.
*
*
* repeated .istio.networking.v1alpha3.Server servers = 1;
*/
public int getServersCount() {
return servers_.size();
}
/**
*
* REQUIRED: A list of server specifications.
*
*
* repeated .istio.networking.v1alpha3.Server servers = 1;
*/
public com.alibaba.nacos.istio.model.Server getServers(int index) {
return servers_.get(index);
}
/**
*
* REQUIRED: A list of server specifications.
*
*
* repeated .istio.networking.v1alpha3.Server servers = 1;
*/
public com.alibaba.nacos.istio.model.ServerOrBuilder getServersOrBuilder(
int index) {
return servers_.get(index);
}
public static final int SELECTOR_FIELD_NUMBER = 2;
private static final class SelectorDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
com.alibaba.nacos.istio.model.GatewayOuterClass.internal_static_istio_networking_v1alpha3_Gateway_SelectorEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> selector_;
private com.google.protobuf.MapField
internalGetSelector() {
if (selector_ == null) {
return com.google.protobuf.MapField.emptyMapField(
SelectorDefaultEntryHolder.defaultEntry);
}
return selector_;
}
public int getSelectorCount() {
return internalGetSelector().getMap().size();
}
/**
*
* REQUIRED: One or more labels that indicate a specific set of pods/VMs
* on which this gateway configuration should be applied. The scope of
* label search is restricted to the configuration namespace in which the
* the resource is present. In other words, the Gateway resource must
* reside in the same namespace as the gateway workload instance.
*
*
* map<string, string> selector = 2;
*/
public boolean containsSelector(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetSelector().getMap().containsKey(key);
}
/**
* Use {@link #getSelectorMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getSelector() {
return getSelectorMap();
}
/**
*
* REQUIRED: One or more labels that indicate a specific set of pods/VMs
* on which this gateway configuration should be applied. The scope of
* label search is restricted to the configuration namespace in which the
* the resource is present. In other words, the Gateway resource must
* reside in the same namespace as the gateway workload instance.
*
*
* map<string, string> selector = 2;
*/
public java.util.Map getSelectorMap() {
return internalGetSelector().getMap();
}
/**
*
* REQUIRED: One or more labels that indicate a specific set of pods/VMs
* on which this gateway configuration should be applied. The scope of
* label search is restricted to the configuration namespace in which the
* the resource is present. In other words, the Gateway resource must
* reside in the same namespace as the gateway workload instance.
*
*
* map<string, string> selector = 2;
*/
public java.lang.String getSelectorOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetSelector().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* REQUIRED: One or more labels that indicate a specific set of pods/VMs
* on which this gateway configuration should be applied. The scope of
* label search is restricted to the configuration namespace in which the
* the resource is present. In other words, the Gateway resource must
* reside in the same namespace as the gateway workload instance.
*
*
* map<string, string> selector = 2;
*/
public java.lang.String getSelectorOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetSelector().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
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 {
for (int i = 0; i < servers_.size(); i++) {
output.writeMessage(1, servers_.get(i));
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetSelector(),
SelectorDefaultEntryHolder.defaultEntry,
2);
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < servers_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, servers_.get(i));
}
for (java.util.Map.Entry entry
: internalGetSelector().getMap().entrySet()) {
com.google.protobuf.MapEntry
selector__ = SelectorDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, selector__);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.alibaba.nacos.istio.model.Gateway)) {
return super.equals(obj);
}
com.alibaba.nacos.istio.model.Gateway other = (com.alibaba.nacos.istio.model.Gateway) obj;
if (!getServersList()
.equals(other.getServersList())) return false;
if (!internalGetSelector().equals(
other.internalGetSelector())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getServersCount() > 0) {
hash = (37 * hash) + SERVERS_FIELD_NUMBER;
hash = (53 * hash) + getServersList().hashCode();
}
if (!internalGetSelector().getMap().isEmpty()) {
hash = (37 * hash) + SELECTOR_FIELD_NUMBER;
hash = (53 * hash) + internalGetSelector().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.alibaba.nacos.istio.model.Gateway parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.alibaba.nacos.istio.model.Gateway parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.alibaba.nacos.istio.model.Gateway parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.alibaba.nacos.istio.model.Gateway parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.alibaba.nacos.istio.model.Gateway parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.alibaba.nacos.istio.model.Gateway parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.alibaba.nacos.istio.model.Gateway parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.alibaba.nacos.istio.model.Gateway parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.alibaba.nacos.istio.model.Gateway parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.alibaba.nacos.istio.model.Gateway parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.alibaba.nacos.istio.model.Gateway parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.alibaba.nacos.istio.model.Gateway parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.alibaba.nacos.istio.model.Gateway 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;
}
/**
*
* Gateway describes a load balancer operating at the edge of the mesh
* receiving incoming or outgoing HTTP/TCP connections.
* <!-- go code generation tags
* +kubetype-gen
* +kubetype-gen:groupVersion=networking.istio.io/v1alpha3
* +genclient
* +k8s:deepcopy-gen=true
* -->
*
*
* Protobuf type {@code istio.networking.v1alpha3.Gateway}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:istio.networking.v1alpha3.Gateway)
com.alibaba.nacos.istio.model.GatewayOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.alibaba.nacos.istio.model.GatewayOuterClass.internal_static_istio_networking_v1alpha3_Gateway_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 2:
return internalGetSelector();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 2:
return internalGetMutableSelector();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.alibaba.nacos.istio.model.GatewayOuterClass.internal_static_istio_networking_v1alpha3_Gateway_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.alibaba.nacos.istio.model.Gateway.class, com.alibaba.nacos.istio.model.Gateway.Builder.class);
}
// Construct using com.alibaba.nacos.istio.model.Gateway.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getServersFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (serversBuilder_ == null) {
servers_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
serversBuilder_.clear();
}
internalGetMutableSelector().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.alibaba.nacos.istio.model.GatewayOuterClass.internal_static_istio_networking_v1alpha3_Gateway_descriptor;
}
@java.lang.Override
public com.alibaba.nacos.istio.model.Gateway getDefaultInstanceForType() {
return com.alibaba.nacos.istio.model.Gateway.getDefaultInstance();
}
@java.lang.Override
public com.alibaba.nacos.istio.model.Gateway build() {
com.alibaba.nacos.istio.model.Gateway result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.alibaba.nacos.istio.model.Gateway buildPartial() {
com.alibaba.nacos.istio.model.Gateway result = new com.alibaba.nacos.istio.model.Gateway(this);
int from_bitField0_ = bitField0_;
if (serversBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
servers_ = java.util.Collections.unmodifiableList(servers_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.servers_ = servers_;
} else {
result.servers_ = serversBuilder_.build();
}
result.selector_ = internalGetSelector();
result.selector_.makeImmutable();
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.alibaba.nacos.istio.model.Gateway) {
return mergeFrom((com.alibaba.nacos.istio.model.Gateway)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.alibaba.nacos.istio.model.Gateway other) {
if (other == com.alibaba.nacos.istio.model.Gateway.getDefaultInstance()) return this;
if (serversBuilder_ == null) {
if (!other.servers_.isEmpty()) {
if (servers_.isEmpty()) {
servers_ = other.servers_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureServersIsMutable();
servers_.addAll(other.servers_);
}
onChanged();
}
} else {
if (!other.servers_.isEmpty()) {
if (serversBuilder_.isEmpty()) {
serversBuilder_.dispose();
serversBuilder_ = null;
servers_ = other.servers_;
bitField0_ = (bitField0_ & ~0x00000001);
serversBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getServersFieldBuilder() : null;
} else {
serversBuilder_.addAllMessages(other.servers_);
}
}
}
internalGetMutableSelector().mergeFrom(
other.internalGetSelector());
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.alibaba.nacos.istio.model.Gateway parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.alibaba.nacos.istio.model.Gateway) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List servers_ =
java.util.Collections.emptyList();
private void ensureServersIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
servers_ = new java.util.ArrayList(servers_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.alibaba.nacos.istio.model.Server, com.alibaba.nacos.istio.model.Server.Builder, com.alibaba.nacos.istio.model.ServerOrBuilder> serversBuilder_;
/**
*
* REQUIRED: A list of server specifications.
*
*
* repeated .istio.networking.v1alpha3.Server servers = 1;
*/
public java.util.List getServersList() {
if (serversBuilder_ == null) {
return java.util.Collections.unmodifiableList(servers_);
} else {
return serversBuilder_.getMessageList();
}
}
/**
*
* REQUIRED: A list of server specifications.
*
*
* repeated .istio.networking.v1alpha3.Server servers = 1;
*/
public int getServersCount() {
if (serversBuilder_ == null) {
return servers_.size();
} else {
return serversBuilder_.getCount();
}
}
/**
*
* REQUIRED: A list of server specifications.
*
*
* repeated .istio.networking.v1alpha3.Server servers = 1;
*/
public com.alibaba.nacos.istio.model.Server getServers(int index) {
if (serversBuilder_ == null) {
return servers_.get(index);
} else {
return serversBuilder_.getMessage(index);
}
}
/**
*
* REQUIRED: A list of server specifications.
*
*
* repeated .istio.networking.v1alpha3.Server servers = 1;
*/
public Builder setServers(
int index, com.alibaba.nacos.istio.model.Server value) {
if (serversBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureServersIsMutable();
servers_.set(index, value);
onChanged();
} else {
serversBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* REQUIRED: A list of server specifications.
*
*
* repeated .istio.networking.v1alpha3.Server servers = 1;
*/
public Builder setServers(
int index, com.alibaba.nacos.istio.model.Server.Builder builderForValue) {
if (serversBuilder_ == null) {
ensureServersIsMutable();
servers_.set(index, builderForValue.build());
onChanged();
} else {
serversBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* REQUIRED: A list of server specifications.
*
*
* repeated .istio.networking.v1alpha3.Server servers = 1;
*/
public Builder addServers(com.alibaba.nacos.istio.model.Server value) {
if (serversBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureServersIsMutable();
servers_.add(value);
onChanged();
} else {
serversBuilder_.addMessage(value);
}
return this;
}
/**
*
* REQUIRED: A list of server specifications.
*
*
* repeated .istio.networking.v1alpha3.Server servers = 1;
*/
public Builder addServers(
int index, com.alibaba.nacos.istio.model.Server value) {
if (serversBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureServersIsMutable();
servers_.add(index, value);
onChanged();
} else {
serversBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* REQUIRED: A list of server specifications.
*
*
* repeated .istio.networking.v1alpha3.Server servers = 1;
*/
public Builder addServers(
com.alibaba.nacos.istio.model.Server.Builder builderForValue) {
if (serversBuilder_ == null) {
ensureServersIsMutable();
servers_.add(builderForValue.build());
onChanged();
} else {
serversBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* REQUIRED: A list of server specifications.
*
*
* repeated .istio.networking.v1alpha3.Server servers = 1;
*/
public Builder addServers(
int index, com.alibaba.nacos.istio.model.Server.Builder builderForValue) {
if (serversBuilder_ == null) {
ensureServersIsMutable();
servers_.add(index, builderForValue.build());
onChanged();
} else {
serversBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* REQUIRED: A list of server specifications.
*
*
* repeated .istio.networking.v1alpha3.Server servers = 1;
*/
public Builder addAllServers(
java.lang.Iterable extends com.alibaba.nacos.istio.model.Server> values) {
if (serversBuilder_ == null) {
ensureServersIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, servers_);
onChanged();
} else {
serversBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* REQUIRED: A list of server specifications.
*
*
* repeated .istio.networking.v1alpha3.Server servers = 1;
*/
public Builder clearServers() {
if (serversBuilder_ == null) {
servers_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
serversBuilder_.clear();
}
return this;
}
/**
*
* REQUIRED: A list of server specifications.
*
*
* repeated .istio.networking.v1alpha3.Server servers = 1;
*/
public Builder removeServers(int index) {
if (serversBuilder_ == null) {
ensureServersIsMutable();
servers_.remove(index);
onChanged();
} else {
serversBuilder_.remove(index);
}
return this;
}
/**
*
* REQUIRED: A list of server specifications.
*
*
* repeated .istio.networking.v1alpha3.Server servers = 1;
*/
public com.alibaba.nacos.istio.model.Server.Builder getServersBuilder(
int index) {
return getServersFieldBuilder().getBuilder(index);
}
/**
*
* REQUIRED: A list of server specifications.
*
*
* repeated .istio.networking.v1alpha3.Server servers = 1;
*/
public com.alibaba.nacos.istio.model.ServerOrBuilder getServersOrBuilder(
int index) {
if (serversBuilder_ == null) {
return servers_.get(index); } else {
return serversBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* REQUIRED: A list of server specifications.
*
*
* repeated .istio.networking.v1alpha3.Server servers = 1;
*/
public java.util.List extends com.alibaba.nacos.istio.model.ServerOrBuilder>
getServersOrBuilderList() {
if (serversBuilder_ != null) {
return serversBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(servers_);
}
}
/**
*
* REQUIRED: A list of server specifications.
*
*
* repeated .istio.networking.v1alpha3.Server servers = 1;
*/
public com.alibaba.nacos.istio.model.Server.Builder addServersBuilder() {
return getServersFieldBuilder().addBuilder(
com.alibaba.nacos.istio.model.Server.getDefaultInstance());
}
/**
*
* REQUIRED: A list of server specifications.
*
*
* repeated .istio.networking.v1alpha3.Server servers = 1;
*/
public com.alibaba.nacos.istio.model.Server.Builder addServersBuilder(
int index) {
return getServersFieldBuilder().addBuilder(
index, com.alibaba.nacos.istio.model.Server.getDefaultInstance());
}
/**
*
* REQUIRED: A list of server specifications.
*
*
* repeated .istio.networking.v1alpha3.Server servers = 1;
*/
public java.util.List
getServersBuilderList() {
return getServersFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.alibaba.nacos.istio.model.Server, com.alibaba.nacos.istio.model.Server.Builder, com.alibaba.nacos.istio.model.ServerOrBuilder>
getServersFieldBuilder() {
if (serversBuilder_ == null) {
serversBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.alibaba.nacos.istio.model.Server, com.alibaba.nacos.istio.model.Server.Builder, com.alibaba.nacos.istio.model.ServerOrBuilder>(
servers_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
servers_ = null;
}
return serversBuilder_;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> selector_;
private com.google.protobuf.MapField
internalGetSelector() {
if (selector_ == null) {
return com.google.protobuf.MapField.emptyMapField(
SelectorDefaultEntryHolder.defaultEntry);
}
return selector_;
}
private com.google.protobuf.MapField
internalGetMutableSelector() {
onChanged();;
if (selector_ == null) {
selector_ = com.google.protobuf.MapField.newMapField(
SelectorDefaultEntryHolder.defaultEntry);
}
if (!selector_.isMutable()) {
selector_ = selector_.copy();
}
return selector_;
}
public int getSelectorCount() {
return internalGetSelector().getMap().size();
}
/**
*
* REQUIRED: One or more labels that indicate a specific set of pods/VMs
* on which this gateway configuration should be applied. The scope of
* label search is restricted to the configuration namespace in which the
* the resource is present. In other words, the Gateway resource must
* reside in the same namespace as the gateway workload instance.
*
*
* map<string, string> selector = 2;
*/
public boolean containsSelector(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetSelector().getMap().containsKey(key);
}
/**
* Use {@link #getSelectorMap()} instead.
*/
@java.lang.Deprecated
public java.util.Map getSelector() {
return getSelectorMap();
}
/**
*
* REQUIRED: One or more labels that indicate a specific set of pods/VMs
* on which this gateway configuration should be applied. The scope of
* label search is restricted to the configuration namespace in which the
* the resource is present. In other words, the Gateway resource must
* reside in the same namespace as the gateway workload instance.
*
*
* map<string, string> selector = 2;
*/
public java.util.Map getSelectorMap() {
return internalGetSelector().getMap();
}
/**
*
* REQUIRED: One or more labels that indicate a specific set of pods/VMs
* on which this gateway configuration should be applied. The scope of
* label search is restricted to the configuration namespace in which the
* the resource is present. In other words, the Gateway resource must
* reside in the same namespace as the gateway workload instance.
*
*
* map<string, string> selector = 2;
*/
public java.lang.String getSelectorOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetSelector().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* REQUIRED: One or more labels that indicate a specific set of pods/VMs
* on which this gateway configuration should be applied. The scope of
* label search is restricted to the configuration namespace in which the
* the resource is present. In other words, the Gateway resource must
* reside in the same namespace as the gateway workload instance.
*
*
* map<string, string> selector = 2;
*/
public java.lang.String getSelectorOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetSelector().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearSelector() {
internalGetMutableSelector().getMutableMap()
.clear();
return this;
}
/**
*
* REQUIRED: One or more labels that indicate a specific set of pods/VMs
* on which this gateway configuration should be applied. The scope of
* label search is restricted to the configuration namespace in which the
* the resource is present. In other words, the Gateway resource must
* reside in the same namespace as the gateway workload instance.
*
*
* map<string, string> selector = 2;
*/
public Builder removeSelector(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableSelector().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableSelector() {
return internalGetMutableSelector().getMutableMap();
}
/**
*
* REQUIRED: One or more labels that indicate a specific set of pods/VMs
* on which this gateway configuration should be applied. The scope of
* label search is restricted to the configuration namespace in which the
* the resource is present. In other words, the Gateway resource must
* reside in the same namespace as the gateway workload instance.
*
*
* map<string, string> selector = 2;
*/
public Builder putSelector(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new java.lang.NullPointerException(); }
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableSelector().getMutableMap()
.put(key, value);
return this;
}
/**
*
* REQUIRED: One or more labels that indicate a specific set of pods/VMs
* on which this gateway configuration should be applied. The scope of
* label search is restricted to the configuration namespace in which the
* the resource is present. In other words, the Gateway resource must
* reside in the same namespace as the gateway workload instance.
*
*
* map<string, string> selector = 2;
*/
public Builder putAllSelector(
java.util.Map values) {
internalGetMutableSelector().getMutableMap()
.putAll(values);
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:istio.networking.v1alpha3.Gateway)
}
// @@protoc_insertion_point(class_scope:istio.networking.v1alpha3.Gateway)
private static final com.alibaba.nacos.istio.model.Gateway DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.alibaba.nacos.istio.model.Gateway();
}
public static com.alibaba.nacos.istio.model.Gateway getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Gateway parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Gateway(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.alibaba.nacos.istio.model.Gateway getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy