
io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/api/v2/auth/tls.proto
package io.envoyproxy.envoy.api.v2.auth;
/**
* Protobuf type {@code envoy.api.v2.auth.UpstreamTlsContext}
*/
public final class UpstreamTlsContext extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.api.v2.auth.UpstreamTlsContext)
UpstreamTlsContextOrBuilder {
private static final long serialVersionUID = 0L;
// Use UpstreamTlsContext.newBuilder() to construct.
private UpstreamTlsContext(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private UpstreamTlsContext() {
sni_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new UpstreamTlsContext();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private UpstreamTlsContext(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
io.envoyproxy.envoy.api.v2.auth.CommonTlsContext.Builder subBuilder = null;
if (commonTlsContext_ != null) {
subBuilder = commonTlsContext_.toBuilder();
}
commonTlsContext_ = input.readMessage(io.envoyproxy.envoy.api.v2.auth.CommonTlsContext.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(commonTlsContext_);
commonTlsContext_ = subBuilder.buildPartial();
}
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
sni_ = s;
break;
}
case 24: {
allowRenegotiation_ = input.readBool();
break;
}
case 34: {
com.google.protobuf.UInt32Value.Builder subBuilder = null;
if (maxSessionKeys_ != null) {
subBuilder = maxSessionKeys_.toBuilder();
}
maxSessionKeys_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(maxSessionKeys_);
maxSessionKeys_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.api.v2.auth.TlsProto.internal_static_envoy_api_v2_auth_UpstreamTlsContext_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.api.v2.auth.TlsProto.internal_static_envoy_api_v2_auth_UpstreamTlsContext_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext.class, io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext.Builder.class);
}
public static final int COMMON_TLS_CONTEXT_FIELD_NUMBER = 1;
private io.envoyproxy.envoy.api.v2.auth.CommonTlsContext commonTlsContext_;
/**
*
* Common TLS context settings.
* .. attention::
* Server certificate verification is not enabled by default. Configure
* :ref:`trusted_ca<envoy_api_field_auth.CertificateValidationContext.trusted_ca>` to enable
* verification.
*
*
* .envoy.api.v2.auth.CommonTlsContext common_tls_context = 1;
* @return Whether the commonTlsContext field is set.
*/
@java.lang.Override
public boolean hasCommonTlsContext() {
return commonTlsContext_ != null;
}
/**
*
* Common TLS context settings.
* .. attention::
* Server certificate verification is not enabled by default. Configure
* :ref:`trusted_ca<envoy_api_field_auth.CertificateValidationContext.trusted_ca>` to enable
* verification.
*
*
* .envoy.api.v2.auth.CommonTlsContext common_tls_context = 1;
* @return The commonTlsContext.
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.auth.CommonTlsContext getCommonTlsContext() {
return commonTlsContext_ == null ? io.envoyproxy.envoy.api.v2.auth.CommonTlsContext.getDefaultInstance() : commonTlsContext_;
}
/**
*
* Common TLS context settings.
* .. attention::
* Server certificate verification is not enabled by default. Configure
* :ref:`trusted_ca<envoy_api_field_auth.CertificateValidationContext.trusted_ca>` to enable
* verification.
*
*
* .envoy.api.v2.auth.CommonTlsContext common_tls_context = 1;
*/
@java.lang.Override
public io.envoyproxy.envoy.api.v2.auth.CommonTlsContextOrBuilder getCommonTlsContextOrBuilder() {
return getCommonTlsContext();
}
public static final int SNI_FIELD_NUMBER = 2;
private volatile java.lang.Object sni_;
/**
*
* SNI string to use when creating TLS backend connections.
*
*
* string sni = 2 [(.validate.rules) = { ... }
* @return The sni.
*/
@java.lang.Override
public java.lang.String getSni() {
java.lang.Object ref = sni_;
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();
sni_ = s;
return s;
}
}
/**
*
* SNI string to use when creating TLS backend connections.
*
*
* string sni = 2 [(.validate.rules) = { ... }
* @return The bytes for sni.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSniBytes() {
java.lang.Object ref = sni_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sni_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ALLOW_RENEGOTIATION_FIELD_NUMBER = 3;
private boolean allowRenegotiation_;
/**
*
* If true, server-initiated TLS renegotiation will be allowed.
* .. attention::
* TLS renegotiation is considered insecure and shouldn't be used unless absolutely necessary.
*
*
* bool allow_renegotiation = 3;
* @return The allowRenegotiation.
*/
@java.lang.Override
public boolean getAllowRenegotiation() {
return allowRenegotiation_;
}
public static final int MAX_SESSION_KEYS_FIELD_NUMBER = 4;
private com.google.protobuf.UInt32Value maxSessionKeys_;
/**
*
* Maximum number of session keys (Pre-Shared Keys for TLSv1.3+, Session IDs and Session Tickets
* for TLSv1.2 and older) to store for the purpose of session resumption.
* Defaults to 1, setting this to 0 disables session resumption.
*
*
* .google.protobuf.UInt32Value max_session_keys = 4;
* @return Whether the maxSessionKeys field is set.
*/
@java.lang.Override
public boolean hasMaxSessionKeys() {
return maxSessionKeys_ != null;
}
/**
*
* Maximum number of session keys (Pre-Shared Keys for TLSv1.3+, Session IDs and Session Tickets
* for TLSv1.2 and older) to store for the purpose of session resumption.
* Defaults to 1, setting this to 0 disables session resumption.
*
*
* .google.protobuf.UInt32Value max_session_keys = 4;
* @return The maxSessionKeys.
*/
@java.lang.Override
public com.google.protobuf.UInt32Value getMaxSessionKeys() {
return maxSessionKeys_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : maxSessionKeys_;
}
/**
*
* Maximum number of session keys (Pre-Shared Keys for TLSv1.3+, Session IDs and Session Tickets
* for TLSv1.2 and older) to store for the purpose of session resumption.
* Defaults to 1, setting this to 0 disables session resumption.
*
*
* .google.protobuf.UInt32Value max_session_keys = 4;
*/
@java.lang.Override
public com.google.protobuf.UInt32ValueOrBuilder getMaxSessionKeysOrBuilder() {
return getMaxSessionKeys();
}
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 (commonTlsContext_ != null) {
output.writeMessage(1, getCommonTlsContext());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sni_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sni_);
}
if (allowRenegotiation_ != false) {
output.writeBool(3, allowRenegotiation_);
}
if (maxSessionKeys_ != null) {
output.writeMessage(4, getMaxSessionKeys());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (commonTlsContext_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getCommonTlsContext());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sni_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sni_);
}
if (allowRenegotiation_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, allowRenegotiation_);
}
if (maxSessionKeys_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getMaxSessionKeys());
}
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 io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext)) {
return super.equals(obj);
}
io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext other = (io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext) obj;
if (hasCommonTlsContext() != other.hasCommonTlsContext()) return false;
if (hasCommonTlsContext()) {
if (!getCommonTlsContext()
.equals(other.getCommonTlsContext())) return false;
}
if (!getSni()
.equals(other.getSni())) return false;
if (getAllowRenegotiation()
!= other.getAllowRenegotiation()) return false;
if (hasMaxSessionKeys() != other.hasMaxSessionKeys()) return false;
if (hasMaxSessionKeys()) {
if (!getMaxSessionKeys()
.equals(other.getMaxSessionKeys())) 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 (hasCommonTlsContext()) {
hash = (37 * hash) + COMMON_TLS_CONTEXT_FIELD_NUMBER;
hash = (53 * hash) + getCommonTlsContext().hashCode();
}
hash = (37 * hash) + SNI_FIELD_NUMBER;
hash = (53 * hash) + getSni().hashCode();
hash = (37 * hash) + ALLOW_RENEGOTIATION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getAllowRenegotiation());
if (hasMaxSessionKeys()) {
hash = (37 * hash) + MAX_SESSION_KEYS_FIELD_NUMBER;
hash = (53 * hash) + getMaxSessionKeys().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code envoy.api.v2.auth.UpstreamTlsContext}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.api.v2.auth.UpstreamTlsContext)
io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContextOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.api.v2.auth.TlsProto.internal_static_envoy_api_v2_auth_UpstreamTlsContext_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.api.v2.auth.TlsProto.internal_static_envoy_api_v2_auth_UpstreamTlsContext_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext.class, io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext.Builder.class);
}
// Construct using io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (commonTlsContextBuilder_ == null) {
commonTlsContext_ = null;
} else {
commonTlsContext_ = null;
commonTlsContextBuilder_ = null;
}
sni_ = "";
allowRenegotiation_ = false;
if (maxSessionKeysBuilder_ == null) {
maxSessionKeys_ = null;
} else {
maxSessionKeys_ = null;
maxSessionKeysBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.api.v2.auth.TlsProto.internal_static_envoy_api_v2_auth_UpstreamTlsContext_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext getDefaultInstanceForType() {
return io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext build() {
io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext buildPartial() {
io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext result = new io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext(this);
if (commonTlsContextBuilder_ == null) {
result.commonTlsContext_ = commonTlsContext_;
} else {
result.commonTlsContext_ = commonTlsContextBuilder_.build();
}
result.sni_ = sni_;
result.allowRenegotiation_ = allowRenegotiation_;
if (maxSessionKeysBuilder_ == null) {
result.maxSessionKeys_ = maxSessionKeys_;
} else {
result.maxSessionKeys_ = maxSessionKeysBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext) {
return mergeFrom((io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext other) {
if (other == io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext.getDefaultInstance()) return this;
if (other.hasCommonTlsContext()) {
mergeCommonTlsContext(other.getCommonTlsContext());
}
if (!other.getSni().isEmpty()) {
sni_ = other.sni_;
onChanged();
}
if (other.getAllowRenegotiation() != false) {
setAllowRenegotiation(other.getAllowRenegotiation());
}
if (other.hasMaxSessionKeys()) {
mergeMaxSessionKeys(other.getMaxSessionKeys());
}
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 {
io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private io.envoyproxy.envoy.api.v2.auth.CommonTlsContext commonTlsContext_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.auth.CommonTlsContext, io.envoyproxy.envoy.api.v2.auth.CommonTlsContext.Builder, io.envoyproxy.envoy.api.v2.auth.CommonTlsContextOrBuilder> commonTlsContextBuilder_;
/**
*
* Common TLS context settings.
* .. attention::
* Server certificate verification is not enabled by default. Configure
* :ref:`trusted_ca<envoy_api_field_auth.CertificateValidationContext.trusted_ca>` to enable
* verification.
*
*
* .envoy.api.v2.auth.CommonTlsContext common_tls_context = 1;
* @return Whether the commonTlsContext field is set.
*/
public boolean hasCommonTlsContext() {
return commonTlsContextBuilder_ != null || commonTlsContext_ != null;
}
/**
*
* Common TLS context settings.
* .. attention::
* Server certificate verification is not enabled by default. Configure
* :ref:`trusted_ca<envoy_api_field_auth.CertificateValidationContext.trusted_ca>` to enable
* verification.
*
*
* .envoy.api.v2.auth.CommonTlsContext common_tls_context = 1;
* @return The commonTlsContext.
*/
public io.envoyproxy.envoy.api.v2.auth.CommonTlsContext getCommonTlsContext() {
if (commonTlsContextBuilder_ == null) {
return commonTlsContext_ == null ? io.envoyproxy.envoy.api.v2.auth.CommonTlsContext.getDefaultInstance() : commonTlsContext_;
} else {
return commonTlsContextBuilder_.getMessage();
}
}
/**
*
* Common TLS context settings.
* .. attention::
* Server certificate verification is not enabled by default. Configure
* :ref:`trusted_ca<envoy_api_field_auth.CertificateValidationContext.trusted_ca>` to enable
* verification.
*
*
* .envoy.api.v2.auth.CommonTlsContext common_tls_context = 1;
*/
public Builder setCommonTlsContext(io.envoyproxy.envoy.api.v2.auth.CommonTlsContext value) {
if (commonTlsContextBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
commonTlsContext_ = value;
onChanged();
} else {
commonTlsContextBuilder_.setMessage(value);
}
return this;
}
/**
*
* Common TLS context settings.
* .. attention::
* Server certificate verification is not enabled by default. Configure
* :ref:`trusted_ca<envoy_api_field_auth.CertificateValidationContext.trusted_ca>` to enable
* verification.
*
*
* .envoy.api.v2.auth.CommonTlsContext common_tls_context = 1;
*/
public Builder setCommonTlsContext(
io.envoyproxy.envoy.api.v2.auth.CommonTlsContext.Builder builderForValue) {
if (commonTlsContextBuilder_ == null) {
commonTlsContext_ = builderForValue.build();
onChanged();
} else {
commonTlsContextBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Common TLS context settings.
* .. attention::
* Server certificate verification is not enabled by default. Configure
* :ref:`trusted_ca<envoy_api_field_auth.CertificateValidationContext.trusted_ca>` to enable
* verification.
*
*
* .envoy.api.v2.auth.CommonTlsContext common_tls_context = 1;
*/
public Builder mergeCommonTlsContext(io.envoyproxy.envoy.api.v2.auth.CommonTlsContext value) {
if (commonTlsContextBuilder_ == null) {
if (commonTlsContext_ != null) {
commonTlsContext_ =
io.envoyproxy.envoy.api.v2.auth.CommonTlsContext.newBuilder(commonTlsContext_).mergeFrom(value).buildPartial();
} else {
commonTlsContext_ = value;
}
onChanged();
} else {
commonTlsContextBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Common TLS context settings.
* .. attention::
* Server certificate verification is not enabled by default. Configure
* :ref:`trusted_ca<envoy_api_field_auth.CertificateValidationContext.trusted_ca>` to enable
* verification.
*
*
* .envoy.api.v2.auth.CommonTlsContext common_tls_context = 1;
*/
public Builder clearCommonTlsContext() {
if (commonTlsContextBuilder_ == null) {
commonTlsContext_ = null;
onChanged();
} else {
commonTlsContext_ = null;
commonTlsContextBuilder_ = null;
}
return this;
}
/**
*
* Common TLS context settings.
* .. attention::
* Server certificate verification is not enabled by default. Configure
* :ref:`trusted_ca<envoy_api_field_auth.CertificateValidationContext.trusted_ca>` to enable
* verification.
*
*
* .envoy.api.v2.auth.CommonTlsContext common_tls_context = 1;
*/
public io.envoyproxy.envoy.api.v2.auth.CommonTlsContext.Builder getCommonTlsContextBuilder() {
onChanged();
return getCommonTlsContextFieldBuilder().getBuilder();
}
/**
*
* Common TLS context settings.
* .. attention::
* Server certificate verification is not enabled by default. Configure
* :ref:`trusted_ca<envoy_api_field_auth.CertificateValidationContext.trusted_ca>` to enable
* verification.
*
*
* .envoy.api.v2.auth.CommonTlsContext common_tls_context = 1;
*/
public io.envoyproxy.envoy.api.v2.auth.CommonTlsContextOrBuilder getCommonTlsContextOrBuilder() {
if (commonTlsContextBuilder_ != null) {
return commonTlsContextBuilder_.getMessageOrBuilder();
} else {
return commonTlsContext_ == null ?
io.envoyproxy.envoy.api.v2.auth.CommonTlsContext.getDefaultInstance() : commonTlsContext_;
}
}
/**
*
* Common TLS context settings.
* .. attention::
* Server certificate verification is not enabled by default. Configure
* :ref:`trusted_ca<envoy_api_field_auth.CertificateValidationContext.trusted_ca>` to enable
* verification.
*
*
* .envoy.api.v2.auth.CommonTlsContext common_tls_context = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.auth.CommonTlsContext, io.envoyproxy.envoy.api.v2.auth.CommonTlsContext.Builder, io.envoyproxy.envoy.api.v2.auth.CommonTlsContextOrBuilder>
getCommonTlsContextFieldBuilder() {
if (commonTlsContextBuilder_ == null) {
commonTlsContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.api.v2.auth.CommonTlsContext, io.envoyproxy.envoy.api.v2.auth.CommonTlsContext.Builder, io.envoyproxy.envoy.api.v2.auth.CommonTlsContextOrBuilder>(
getCommonTlsContext(),
getParentForChildren(),
isClean());
commonTlsContext_ = null;
}
return commonTlsContextBuilder_;
}
private java.lang.Object sni_ = "";
/**
*
* SNI string to use when creating TLS backend connections.
*
*
* string sni = 2 [(.validate.rules) = { ... }
* @return The sni.
*/
public java.lang.String getSni() {
java.lang.Object ref = sni_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
sni_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* SNI string to use when creating TLS backend connections.
*
*
* string sni = 2 [(.validate.rules) = { ... }
* @return The bytes for sni.
*/
public com.google.protobuf.ByteString
getSniBytes() {
java.lang.Object ref = sni_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
sni_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* SNI string to use when creating TLS backend connections.
*
*
* string sni = 2 [(.validate.rules) = { ... }
* @param value The sni to set.
* @return This builder for chaining.
*/
public Builder setSni(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
sni_ = value;
onChanged();
return this;
}
/**
*
* SNI string to use when creating TLS backend connections.
*
*
* string sni = 2 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearSni() {
sni_ = getDefaultInstance().getSni();
onChanged();
return this;
}
/**
*
* SNI string to use when creating TLS backend connections.
*
*
* string sni = 2 [(.validate.rules) = { ... }
* @param value The bytes for sni to set.
* @return This builder for chaining.
*/
public Builder setSniBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
sni_ = value;
onChanged();
return this;
}
private boolean allowRenegotiation_ ;
/**
*
* If true, server-initiated TLS renegotiation will be allowed.
* .. attention::
* TLS renegotiation is considered insecure and shouldn't be used unless absolutely necessary.
*
*
* bool allow_renegotiation = 3;
* @return The allowRenegotiation.
*/
@java.lang.Override
public boolean getAllowRenegotiation() {
return allowRenegotiation_;
}
/**
*
* If true, server-initiated TLS renegotiation will be allowed.
* .. attention::
* TLS renegotiation is considered insecure and shouldn't be used unless absolutely necessary.
*
*
* bool allow_renegotiation = 3;
* @param value The allowRenegotiation to set.
* @return This builder for chaining.
*/
public Builder setAllowRenegotiation(boolean value) {
allowRenegotiation_ = value;
onChanged();
return this;
}
/**
*
* If true, server-initiated TLS renegotiation will be allowed.
* .. attention::
* TLS renegotiation is considered insecure and shouldn't be used unless absolutely necessary.
*
*
* bool allow_renegotiation = 3;
* @return This builder for chaining.
*/
public Builder clearAllowRenegotiation() {
allowRenegotiation_ = false;
onChanged();
return this;
}
private com.google.protobuf.UInt32Value maxSessionKeys_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder> maxSessionKeysBuilder_;
/**
*
* Maximum number of session keys (Pre-Shared Keys for TLSv1.3+, Session IDs and Session Tickets
* for TLSv1.2 and older) to store for the purpose of session resumption.
* Defaults to 1, setting this to 0 disables session resumption.
*
*
* .google.protobuf.UInt32Value max_session_keys = 4;
* @return Whether the maxSessionKeys field is set.
*/
public boolean hasMaxSessionKeys() {
return maxSessionKeysBuilder_ != null || maxSessionKeys_ != null;
}
/**
*
* Maximum number of session keys (Pre-Shared Keys for TLSv1.3+, Session IDs and Session Tickets
* for TLSv1.2 and older) to store for the purpose of session resumption.
* Defaults to 1, setting this to 0 disables session resumption.
*
*
* .google.protobuf.UInt32Value max_session_keys = 4;
* @return The maxSessionKeys.
*/
public com.google.protobuf.UInt32Value getMaxSessionKeys() {
if (maxSessionKeysBuilder_ == null) {
return maxSessionKeys_ == null ? com.google.protobuf.UInt32Value.getDefaultInstance() : maxSessionKeys_;
} else {
return maxSessionKeysBuilder_.getMessage();
}
}
/**
*
* Maximum number of session keys (Pre-Shared Keys for TLSv1.3+, Session IDs and Session Tickets
* for TLSv1.2 and older) to store for the purpose of session resumption.
* Defaults to 1, setting this to 0 disables session resumption.
*
*
* .google.protobuf.UInt32Value max_session_keys = 4;
*/
public Builder setMaxSessionKeys(com.google.protobuf.UInt32Value value) {
if (maxSessionKeysBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
maxSessionKeys_ = value;
onChanged();
} else {
maxSessionKeysBuilder_.setMessage(value);
}
return this;
}
/**
*
* Maximum number of session keys (Pre-Shared Keys for TLSv1.3+, Session IDs and Session Tickets
* for TLSv1.2 and older) to store for the purpose of session resumption.
* Defaults to 1, setting this to 0 disables session resumption.
*
*
* .google.protobuf.UInt32Value max_session_keys = 4;
*/
public Builder setMaxSessionKeys(
com.google.protobuf.UInt32Value.Builder builderForValue) {
if (maxSessionKeysBuilder_ == null) {
maxSessionKeys_ = builderForValue.build();
onChanged();
} else {
maxSessionKeysBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Maximum number of session keys (Pre-Shared Keys for TLSv1.3+, Session IDs and Session Tickets
* for TLSv1.2 and older) to store for the purpose of session resumption.
* Defaults to 1, setting this to 0 disables session resumption.
*
*
* .google.protobuf.UInt32Value max_session_keys = 4;
*/
public Builder mergeMaxSessionKeys(com.google.protobuf.UInt32Value value) {
if (maxSessionKeysBuilder_ == null) {
if (maxSessionKeys_ != null) {
maxSessionKeys_ =
com.google.protobuf.UInt32Value.newBuilder(maxSessionKeys_).mergeFrom(value).buildPartial();
} else {
maxSessionKeys_ = value;
}
onChanged();
} else {
maxSessionKeysBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Maximum number of session keys (Pre-Shared Keys for TLSv1.3+, Session IDs and Session Tickets
* for TLSv1.2 and older) to store for the purpose of session resumption.
* Defaults to 1, setting this to 0 disables session resumption.
*
*
* .google.protobuf.UInt32Value max_session_keys = 4;
*/
public Builder clearMaxSessionKeys() {
if (maxSessionKeysBuilder_ == null) {
maxSessionKeys_ = null;
onChanged();
} else {
maxSessionKeys_ = null;
maxSessionKeysBuilder_ = null;
}
return this;
}
/**
*
* Maximum number of session keys (Pre-Shared Keys for TLSv1.3+, Session IDs and Session Tickets
* for TLSv1.2 and older) to store for the purpose of session resumption.
* Defaults to 1, setting this to 0 disables session resumption.
*
*
* .google.protobuf.UInt32Value max_session_keys = 4;
*/
public com.google.protobuf.UInt32Value.Builder getMaxSessionKeysBuilder() {
onChanged();
return getMaxSessionKeysFieldBuilder().getBuilder();
}
/**
*
* Maximum number of session keys (Pre-Shared Keys for TLSv1.3+, Session IDs and Session Tickets
* for TLSv1.2 and older) to store for the purpose of session resumption.
* Defaults to 1, setting this to 0 disables session resumption.
*
*
* .google.protobuf.UInt32Value max_session_keys = 4;
*/
public com.google.protobuf.UInt32ValueOrBuilder getMaxSessionKeysOrBuilder() {
if (maxSessionKeysBuilder_ != null) {
return maxSessionKeysBuilder_.getMessageOrBuilder();
} else {
return maxSessionKeys_ == null ?
com.google.protobuf.UInt32Value.getDefaultInstance() : maxSessionKeys_;
}
}
/**
*
* Maximum number of session keys (Pre-Shared Keys for TLSv1.3+, Session IDs and Session Tickets
* for TLSv1.2 and older) to store for the purpose of session resumption.
* Defaults to 1, setting this to 0 disables session resumption.
*
*
* .google.protobuf.UInt32Value max_session_keys = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>
getMaxSessionKeysFieldBuilder() {
if (maxSessionKeysBuilder_ == null) {
maxSessionKeysBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.UInt32Value, com.google.protobuf.UInt32Value.Builder, com.google.protobuf.UInt32ValueOrBuilder>(
getMaxSessionKeys(),
getParentForChildren(),
isClean());
maxSessionKeys_ = null;
}
return maxSessionKeysBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:envoy.api.v2.auth.UpstreamTlsContext)
}
// @@protoc_insertion_point(class_scope:envoy.api.v2.auth.UpstreamTlsContext)
private static final io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext();
}
public static io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public UpstreamTlsContext parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new UpstreamTlsContext(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 io.envoyproxy.envoy.api.v2.auth.UpstreamTlsContext getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy