
io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/extensions/injected_credentials/generic/v3/generic.proto
package io.envoyproxy.envoy.extensions.injected_credentials.generic.v3;
/**
*
* Generic extension can be used to inject HTTP Basic Auth, Bearer Token, or any arbitrary credential
* into the proxied requests.
* The credential will be injected into the specified HTTP request header.
* Example:
* .. code-block:: yaml
* credential:
* name: generic_credential
* typed_config:
* "@type": type.googleapis.com/envoy.extensions.injected_credentials.generic.v3.Generic
* credential:
* name: credential
* sds_config:
* path_config_source:
* path: credential.yaml
* header: Authorization
* credential.yaml for Basic Auth:
* .. code-block:: yaml
* resources:
* - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.Secret"
* name: credential
* generic_secret:
* secret:
* inline_string: "Basic base64EncodedUsernamePassword"
* Refer to [RFC 7617: The 'Basic' HTTP Authentication Scheme](https://www.rfc-editor.org/rfc/rfc7617) for details.
* credential.yaml for Bearer Token:
* .. code-block:: yaml
* resources:
* - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.Secret"
* name: credential
* generic_secret:
* secret:
* inline_string: "Bearer myToken"
* Refer to [RFC 6750: The OAuth 2.0 Authorization Framework: Bearer Token Usage](https://www.rfc-editor.org/rfc/rfc6750) for details.
*
*
* Protobuf type {@code envoy.extensions.injected_credentials.generic.v3.Generic}
*/
public final class Generic extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.extensions.injected_credentials.generic.v3.Generic)
GenericOrBuilder {
private static final long serialVersionUID = 0L;
// Use Generic.newBuilder() to construct.
private Generic(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Generic() {
header_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Generic();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Generic(
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.extensions.transport_sockets.tls.v3.SdsSecretConfig.Builder subBuilder = null;
if (credential_ != null) {
subBuilder = credential_.toBuilder();
}
credential_ = input.readMessage(io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(credential_);
credential_ = subBuilder.buildPartial();
}
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
header_ = s;
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.extensions.injected_credentials.generic.v3.GenericProto.internal_static_envoy_extensions_injected_credentials_generic_v3_Generic_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.GenericProto.internal_static_envoy_extensions_injected_credentials_generic_v3_Generic_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic.class, io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic.Builder.class);
}
public static final int CREDENTIAL_FIELD_NUMBER = 1;
private io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig credential_;
/**
*
* The SDS configuration for the credential that will be injected to the specified HTTP request header.
* It must be a generic secret.
*
*
* .envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig credential = 1 [(.validate.rules) = { ... }
* @return Whether the credential field is set.
*/
@java.lang.Override
public boolean hasCredential() {
return credential_ != null;
}
/**
*
* The SDS configuration for the credential that will be injected to the specified HTTP request header.
* It must be a generic secret.
*
*
* .envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig credential = 1 [(.validate.rules) = { ... }
* @return The credential.
*/
@java.lang.Override
public io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig getCredential() {
return credential_ == null ? io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig.getDefaultInstance() : credential_;
}
/**
*
* The SDS configuration for the credential that will be injected to the specified HTTP request header.
* It must be a generic secret.
*
*
* .envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig credential = 1 [(.validate.rules) = { ... }
*/
@java.lang.Override
public io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfigOrBuilder getCredentialOrBuilder() {
return getCredential();
}
public static final int HEADER_FIELD_NUMBER = 2;
private volatile java.lang.Object header_;
/**
*
* The header that will be injected to the HTTP request with the provided credential.
* If not set, filter will default to: ``Authorization``
*
*
* string header = 2 [(.validate.rules) = { ... }
* @return The header.
*/
@java.lang.Override
public java.lang.String getHeader() {
java.lang.Object ref = header_;
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();
header_ = s;
return s;
}
}
/**
*
* The header that will be injected to the HTTP request with the provided credential.
* If not set, filter will default to: ``Authorization``
*
*
* string header = 2 [(.validate.rules) = { ... }
* @return The bytes for header.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getHeaderBytes() {
java.lang.Object ref = header_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
header_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
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 (credential_ != null) {
output.writeMessage(1, getCredential());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(header_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, header_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (credential_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getCredential());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(header_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, header_);
}
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.extensions.injected_credentials.generic.v3.Generic)) {
return super.equals(obj);
}
io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic other = (io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic) obj;
if (hasCredential() != other.hasCredential()) return false;
if (hasCredential()) {
if (!getCredential()
.equals(other.getCredential())) return false;
}
if (!getHeader()
.equals(other.getHeader())) 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 (hasCredential()) {
hash = (37 * hash) + CREDENTIAL_FIELD_NUMBER;
hash = (53 * hash) + getCredential().hashCode();
}
hash = (37 * hash) + HEADER_FIELD_NUMBER;
hash = (53 * hash) + getHeader().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic 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.extensions.injected_credentials.generic.v3.Generic parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic 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.extensions.injected_credentials.generic.v3.Generic parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic 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.extensions.injected_credentials.generic.v3.Generic parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic 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.extensions.injected_credentials.generic.v3.Generic parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic 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.extensions.injected_credentials.generic.v3.Generic 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;
}
/**
*
* Generic extension can be used to inject HTTP Basic Auth, Bearer Token, or any arbitrary credential
* into the proxied requests.
* The credential will be injected into the specified HTTP request header.
* Example:
* .. code-block:: yaml
* credential:
* name: generic_credential
* typed_config:
* "@type": type.googleapis.com/envoy.extensions.injected_credentials.generic.v3.Generic
* credential:
* name: credential
* sds_config:
* path_config_source:
* path: credential.yaml
* header: Authorization
* credential.yaml for Basic Auth:
* .. code-block:: yaml
* resources:
* - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.Secret"
* name: credential
* generic_secret:
* secret:
* inline_string: "Basic base64EncodedUsernamePassword"
* Refer to [RFC 7617: The 'Basic' HTTP Authentication Scheme](https://www.rfc-editor.org/rfc/rfc7617) for details.
* credential.yaml for Bearer Token:
* .. code-block:: yaml
* resources:
* - "@type": "type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.Secret"
* name: credential
* generic_secret:
* secret:
* inline_string: "Bearer myToken"
* Refer to [RFC 6750: The OAuth 2.0 Authorization Framework: Bearer Token Usage](https://www.rfc-editor.org/rfc/rfc6750) for details.
*
*
* Protobuf type {@code envoy.extensions.injected_credentials.generic.v3.Generic}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.extensions.injected_credentials.generic.v3.Generic)
io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.GenericOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.GenericProto.internal_static_envoy_extensions_injected_credentials_generic_v3_Generic_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.GenericProto.internal_static_envoy_extensions_injected_credentials_generic_v3_Generic_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic.class, io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic.Builder.class);
}
// Construct using io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic.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 (credentialBuilder_ == null) {
credential_ = null;
} else {
credential_ = null;
credentialBuilder_ = null;
}
header_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.GenericProto.internal_static_envoy_extensions_injected_credentials_generic_v3_Generic_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic getDefaultInstanceForType() {
return io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic build() {
io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic buildPartial() {
io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic result = new io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic(this);
if (credentialBuilder_ == null) {
result.credential_ = credential_;
} else {
result.credential_ = credentialBuilder_.build();
}
result.header_ = header_;
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.extensions.injected_credentials.generic.v3.Generic) {
return mergeFrom((io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic other) {
if (other == io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic.getDefaultInstance()) return this;
if (other.hasCredential()) {
mergeCredential(other.getCredential());
}
if (!other.getHeader().isEmpty()) {
header_ = other.header_;
onChanged();
}
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.extensions.injected_credentials.generic.v3.Generic parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig credential_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig, io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig.Builder, io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfigOrBuilder> credentialBuilder_;
/**
*
* The SDS configuration for the credential that will be injected to the specified HTTP request header.
* It must be a generic secret.
*
*
* .envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig credential = 1 [(.validate.rules) = { ... }
* @return Whether the credential field is set.
*/
public boolean hasCredential() {
return credentialBuilder_ != null || credential_ != null;
}
/**
*
* The SDS configuration for the credential that will be injected to the specified HTTP request header.
* It must be a generic secret.
*
*
* .envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig credential = 1 [(.validate.rules) = { ... }
* @return The credential.
*/
public io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig getCredential() {
if (credentialBuilder_ == null) {
return credential_ == null ? io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig.getDefaultInstance() : credential_;
} else {
return credentialBuilder_.getMessage();
}
}
/**
*
* The SDS configuration for the credential that will be injected to the specified HTTP request header.
* It must be a generic secret.
*
*
* .envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig credential = 1 [(.validate.rules) = { ... }
*/
public Builder setCredential(io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig value) {
if (credentialBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
credential_ = value;
onChanged();
} else {
credentialBuilder_.setMessage(value);
}
return this;
}
/**
*
* The SDS configuration for the credential that will be injected to the specified HTTP request header.
* It must be a generic secret.
*
*
* .envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig credential = 1 [(.validate.rules) = { ... }
*/
public Builder setCredential(
io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig.Builder builderForValue) {
if (credentialBuilder_ == null) {
credential_ = builderForValue.build();
onChanged();
} else {
credentialBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The SDS configuration for the credential that will be injected to the specified HTTP request header.
* It must be a generic secret.
*
*
* .envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig credential = 1 [(.validate.rules) = { ... }
*/
public Builder mergeCredential(io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig value) {
if (credentialBuilder_ == null) {
if (credential_ != null) {
credential_ =
io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig.newBuilder(credential_).mergeFrom(value).buildPartial();
} else {
credential_ = value;
}
onChanged();
} else {
credentialBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The SDS configuration for the credential that will be injected to the specified HTTP request header.
* It must be a generic secret.
*
*
* .envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig credential = 1 [(.validate.rules) = { ... }
*/
public Builder clearCredential() {
if (credentialBuilder_ == null) {
credential_ = null;
onChanged();
} else {
credential_ = null;
credentialBuilder_ = null;
}
return this;
}
/**
*
* The SDS configuration for the credential that will be injected to the specified HTTP request header.
* It must be a generic secret.
*
*
* .envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig credential = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig.Builder getCredentialBuilder() {
onChanged();
return getCredentialFieldBuilder().getBuilder();
}
/**
*
* The SDS configuration for the credential that will be injected to the specified HTTP request header.
* It must be a generic secret.
*
*
* .envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig credential = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfigOrBuilder getCredentialOrBuilder() {
if (credentialBuilder_ != null) {
return credentialBuilder_.getMessageOrBuilder();
} else {
return credential_ == null ?
io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig.getDefaultInstance() : credential_;
}
}
/**
*
* The SDS configuration for the credential that will be injected to the specified HTTP request header.
* It must be a generic secret.
*
*
* .envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig credential = 1 [(.validate.rules) = { ... }
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig, io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig.Builder, io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfigOrBuilder>
getCredentialFieldBuilder() {
if (credentialBuilder_ == null) {
credentialBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig, io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig.Builder, io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfigOrBuilder>(
getCredential(),
getParentForChildren(),
isClean());
credential_ = null;
}
return credentialBuilder_;
}
private java.lang.Object header_ = "";
/**
*
* The header that will be injected to the HTTP request with the provided credential.
* If not set, filter will default to: ``Authorization``
*
*
* string header = 2 [(.validate.rules) = { ... }
* @return The header.
*/
public java.lang.String getHeader() {
java.lang.Object ref = header_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
header_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The header that will be injected to the HTTP request with the provided credential.
* If not set, filter will default to: ``Authorization``
*
*
* string header = 2 [(.validate.rules) = { ... }
* @return The bytes for header.
*/
public com.google.protobuf.ByteString
getHeaderBytes() {
java.lang.Object ref = header_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
header_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The header that will be injected to the HTTP request with the provided credential.
* If not set, filter will default to: ``Authorization``
*
*
* string header = 2 [(.validate.rules) = { ... }
* @param value The header to set.
* @return This builder for chaining.
*/
public Builder setHeader(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
header_ = value;
onChanged();
return this;
}
/**
*
* The header that will be injected to the HTTP request with the provided credential.
* If not set, filter will default to: ``Authorization``
*
*
* string header = 2 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearHeader() {
header_ = getDefaultInstance().getHeader();
onChanged();
return this;
}
/**
*
* The header that will be injected to the HTTP request with the provided credential.
* If not set, filter will default to: ``Authorization``
*
*
* string header = 2 [(.validate.rules) = { ... }
* @param value The bytes for header to set.
* @return This builder for chaining.
*/
public Builder setHeaderBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
header_ = value;
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.extensions.injected_credentials.generic.v3.Generic)
}
// @@protoc_insertion_point(class_scope:envoy.extensions.injected_credentials.generic.v3.Generic)
private static final io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic();
}
public static io.envoyproxy.envoy.extensions.injected_credentials.generic.v3.Generic getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Generic parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Generic(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.extensions.injected_credentials.generic.v3.Generic getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy