
io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2 Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: envoy/extensions/injected_credentials/oauth2/v3/oauth2.proto
package io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3;
/**
*
* OAuth2 extension can be used to retrieve an OAuth2 access token from an authorization server and inject it into the
* proxied requests.
* Currently, only the Client Credentials Grant flow is supported.
* The access token will be injected into the request headers using the ``Authorization`` header as a bearer token.
*
*
* Protobuf type {@code envoy.extensions.injected_credentials.oauth2.v3.OAuth2}
*/
public final class OAuth2 extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.extensions.injected_credentials.oauth2.v3.OAuth2)
OAuth2OrBuilder {
private static final long serialVersionUID = 0L;
// Use OAuth2.newBuilder() to construct.
private OAuth2(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private OAuth2() {
scopes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new OAuth2();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private OAuth2(
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: {
io.envoyproxy.envoy.config.core.v3.HttpUri.Builder subBuilder = null;
if (tokenEndpoint_ != null) {
subBuilder = tokenEndpoint_.toBuilder();
}
tokenEndpoint_ = input.readMessage(io.envoyproxy.envoy.config.core.v3.HttpUri.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(tokenEndpoint_);
tokenEndpoint_ = subBuilder.buildPartial();
}
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
scopes_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
scopes_.add(s);
break;
}
case 26: {
io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials.Builder subBuilder = null;
if (flowTypeCase_ == 3) {
subBuilder = ((io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials) flowType_).toBuilder();
}
flowType_ =
input.readMessage(io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials) flowType_);
flowType_ = subBuilder.buildPartial();
}
flowTypeCase_ = 3;
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 {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
scopes_ = scopes_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.Oauth2Proto.internal_static_envoy_extensions_injected_credentials_oauth2_v3_OAuth2_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.Oauth2Proto.internal_static_envoy_extensions_injected_credentials_oauth2_v3_OAuth2_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.class, io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.Builder.class);
}
/**
* Protobuf enum {@code envoy.extensions.injected_credentials.oauth2.v3.OAuth2.AuthType}
*/
public enum AuthType
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* The ``client_id`` and ``client_secret`` will be sent using HTTP Basic authentication scheme.
*
*
* BASIC_AUTH = 0;
*/
BASIC_AUTH(0),
/**
*
* The ``client_id`` and ``client_secret`` will be sent in the URL encoded request body.
* This type should only be used when Auth server does not support Basic authentication.
*
*
* URL_ENCODED_BODY = 1;
*/
URL_ENCODED_BODY(1),
UNRECOGNIZED(-1),
;
/**
*
* The ``client_id`` and ``client_secret`` will be sent using HTTP Basic authentication scheme.
*
*
* BASIC_AUTH = 0;
*/
public static final int BASIC_AUTH_VALUE = 0;
/**
*
* The ``client_id`` and ``client_secret`` will be sent in the URL encoded request body.
* This type should only be used when Auth server does not support Basic authentication.
*
*
* URL_ENCODED_BODY = 1;
*/
public static final int URL_ENCODED_BODY_VALUE = 1;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static AuthType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static AuthType forNumber(int value) {
switch (value) {
case 0: return BASIC_AUTH;
case 1: return URL_ENCODED_BODY;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
AuthType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public AuthType findValueByNumber(int number) {
return AuthType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.getDescriptor().getEnumTypes().get(0);
}
private static final AuthType[] VALUES = values();
public static AuthType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private AuthType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:envoy.extensions.injected_credentials.oauth2.v3.OAuth2.AuthType)
}
public interface ClientCredentialsOrBuilder extends
// @@protoc_insertion_point(interface_extends:envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials)
com.google.protobuf.MessageOrBuilder {
/**
*
* Client ID.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* string client_id = 1 [(.validate.rules) = { ... }
* @return The clientId.
*/
java.lang.String getClientId();
/**
*
* Client ID.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* string client_id = 1 [(.validate.rules) = { ... }
* @return The bytes for clientId.
*/
com.google.protobuf.ByteString
getClientIdBytes();
/**
*
* Client secret.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* .envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig client_secret = 2 [(.validate.rules) = { ... }
* @return Whether the clientSecret field is set.
*/
boolean hasClientSecret();
/**
*
* Client secret.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* .envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig client_secret = 2 [(.validate.rules) = { ... }
* @return The clientSecret.
*/
io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig getClientSecret();
/**
*
* Client secret.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* .envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig client_secret = 2 [(.validate.rules) = { ... }
*/
io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfigOrBuilder getClientSecretOrBuilder();
/**
*
* The method to use when sending credentials to the authorization server.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* .envoy.extensions.injected_credentials.oauth2.v3.OAuth2.AuthType auth_type = 3;
* @return The enum numeric value on the wire for authType.
*/
int getAuthTypeValue();
/**
*
* The method to use when sending credentials to the authorization server.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* .envoy.extensions.injected_credentials.oauth2.v3.OAuth2.AuthType auth_type = 3;
* @return The authType.
*/
io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.AuthType getAuthType();
}
/**
*
* Credentials to authenticate client to the authorization server.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3) for details.
*
*
* Protobuf type {@code envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials}
*/
public static final class ClientCredentials extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials)
ClientCredentialsOrBuilder {
private static final long serialVersionUID = 0L;
// Use ClientCredentials.newBuilder() to construct.
private ClientCredentials(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ClientCredentials() {
clientId_ = "";
authType_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ClientCredentials();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ClientCredentials(
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: {
java.lang.String s = input.readStringRequireUtf8();
clientId_ = s;
break;
}
case 18: {
io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig.Builder subBuilder = null;
if (clientSecret_ != null) {
subBuilder = clientSecret_.toBuilder();
}
clientSecret_ = input.readMessage(io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(clientSecret_);
clientSecret_ = subBuilder.buildPartial();
}
break;
}
case 24: {
int rawValue = input.readEnum();
authType_ = rawValue;
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.oauth2.v3.Oauth2Proto.internal_static_envoy_extensions_injected_credentials_oauth2_v3_OAuth2_ClientCredentials_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.Oauth2Proto.internal_static_envoy_extensions_injected_credentials_oauth2_v3_OAuth2_ClientCredentials_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials.class, io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials.Builder.class);
}
public static final int CLIENT_ID_FIELD_NUMBER = 1;
private volatile java.lang.Object clientId_;
/**
*
* Client ID.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* string client_id = 1 [(.validate.rules) = { ... }
* @return The clientId.
*/
@java.lang.Override
public java.lang.String getClientId() {
java.lang.Object ref = clientId_;
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();
clientId_ = s;
return s;
}
}
/**
*
* Client ID.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* string client_id = 1 [(.validate.rules) = { ... }
* @return The bytes for clientId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getClientIdBytes() {
java.lang.Object ref = clientId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
clientId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CLIENT_SECRET_FIELD_NUMBER = 2;
private io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig clientSecret_;
/**
*
* Client secret.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* .envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig client_secret = 2 [(.validate.rules) = { ... }
* @return Whether the clientSecret field is set.
*/
@java.lang.Override
public boolean hasClientSecret() {
return clientSecret_ != null;
}
/**
*
* Client secret.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* .envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig client_secret = 2 [(.validate.rules) = { ... }
* @return The clientSecret.
*/
@java.lang.Override
public io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig getClientSecret() {
return clientSecret_ == null ? io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig.getDefaultInstance() : clientSecret_;
}
/**
*
* Client secret.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* .envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig client_secret = 2 [(.validate.rules) = { ... }
*/
@java.lang.Override
public io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfigOrBuilder getClientSecretOrBuilder() {
return getClientSecret();
}
public static final int AUTH_TYPE_FIELD_NUMBER = 3;
private int authType_;
/**
*
* The method to use when sending credentials to the authorization server.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* .envoy.extensions.injected_credentials.oauth2.v3.OAuth2.AuthType auth_type = 3;
* @return The enum numeric value on the wire for authType.
*/
@java.lang.Override public int getAuthTypeValue() {
return authType_;
}
/**
*
* The method to use when sending credentials to the authorization server.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* .envoy.extensions.injected_credentials.oauth2.v3.OAuth2.AuthType auth_type = 3;
* @return The authType.
*/
@java.lang.Override public io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.AuthType getAuthType() {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.AuthType result = io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.AuthType.valueOf(authType_);
return result == null ? io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.AuthType.UNRECOGNIZED : result;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, clientId_);
}
if (clientSecret_ != null) {
output.writeMessage(2, getClientSecret());
}
if (authType_ != io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.AuthType.BASIC_AUTH.getNumber()) {
output.writeEnum(3, authType_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clientId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, clientId_);
}
if (clientSecret_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getClientSecret());
}
if (authType_ != io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.AuthType.BASIC_AUTH.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(3, authType_);
}
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.oauth2.v3.OAuth2.ClientCredentials)) {
return super.equals(obj);
}
io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials other = (io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials) obj;
if (!getClientId()
.equals(other.getClientId())) return false;
if (hasClientSecret() != other.hasClientSecret()) return false;
if (hasClientSecret()) {
if (!getClientSecret()
.equals(other.getClientSecret())) return false;
}
if (authType_ != other.authType_) 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();
hash = (37 * hash) + CLIENT_ID_FIELD_NUMBER;
hash = (53 * hash) + getClientId().hashCode();
if (hasClientSecret()) {
hash = (37 * hash) + CLIENT_SECRET_FIELD_NUMBER;
hash = (53 * hash) + getClientSecret().hashCode();
}
hash = (37 * hash) + AUTH_TYPE_FIELD_NUMBER;
hash = (53 * hash) + authType_;
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials 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.oauth2.v3.OAuth2.ClientCredentials parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials 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.oauth2.v3.OAuth2.ClientCredentials parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials 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.oauth2.v3.OAuth2.ClientCredentials 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.oauth2.v3.OAuth2.ClientCredentials 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.oauth2.v3.OAuth2.ClientCredentials 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.oauth2.v3.OAuth2.ClientCredentials 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.oauth2.v3.OAuth2.ClientCredentials 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.oauth2.v3.OAuth2.ClientCredentials 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.oauth2.v3.OAuth2.ClientCredentials 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;
}
/**
*
* Credentials to authenticate client to the authorization server.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3) for details.
*
*
* Protobuf type {@code envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials)
io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentialsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.Oauth2Proto.internal_static_envoy_extensions_injected_credentials_oauth2_v3_OAuth2_ClientCredentials_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.Oauth2Proto.internal_static_envoy_extensions_injected_credentials_oauth2_v3_OAuth2_ClientCredentials_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials.class, io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials.Builder.class);
}
// Construct using io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials.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();
clientId_ = "";
if (clientSecretBuilder_ == null) {
clientSecret_ = null;
} else {
clientSecret_ = null;
clientSecretBuilder_ = null;
}
authType_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.Oauth2Proto.internal_static_envoy_extensions_injected_credentials_oauth2_v3_OAuth2_ClientCredentials_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials getDefaultInstanceForType() {
return io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials build() {
io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials buildPartial() {
io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials result = new io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials(this);
result.clientId_ = clientId_;
if (clientSecretBuilder_ == null) {
result.clientSecret_ = clientSecret_;
} else {
result.clientSecret_ = clientSecretBuilder_.build();
}
result.authType_ = authType_;
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.oauth2.v3.OAuth2.ClientCredentials) {
return mergeFrom((io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials other) {
if (other == io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials.getDefaultInstance()) return this;
if (!other.getClientId().isEmpty()) {
clientId_ = other.clientId_;
onChanged();
}
if (other.hasClientSecret()) {
mergeClientSecret(other.getClientSecret());
}
if (other.authType_ != 0) {
setAuthTypeValue(other.getAuthTypeValue());
}
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.oauth2.v3.OAuth2.ClientCredentials parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object clientId_ = "";
/**
*
* Client ID.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* string client_id = 1 [(.validate.rules) = { ... }
* @return The clientId.
*/
public java.lang.String getClientId() {
java.lang.Object ref = clientId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
clientId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Client ID.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* string client_id = 1 [(.validate.rules) = { ... }
* @return The bytes for clientId.
*/
public com.google.protobuf.ByteString
getClientIdBytes() {
java.lang.Object ref = clientId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
clientId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Client ID.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* string client_id = 1 [(.validate.rules) = { ... }
* @param value The clientId to set.
* @return This builder for chaining.
*/
public Builder setClientId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
clientId_ = value;
onChanged();
return this;
}
/**
*
* Client ID.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* string client_id = 1 [(.validate.rules) = { ... }
* @return This builder for chaining.
*/
public Builder clearClientId() {
clientId_ = getDefaultInstance().getClientId();
onChanged();
return this;
}
/**
*
* Client ID.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* string client_id = 1 [(.validate.rules) = { ... }
* @param value The bytes for clientId to set.
* @return This builder for chaining.
*/
public Builder setClientIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
clientId_ = value;
onChanged();
return this;
}
private io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig clientSecret_;
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> clientSecretBuilder_;
/**
*
* Client secret.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* .envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig client_secret = 2 [(.validate.rules) = { ... }
* @return Whether the clientSecret field is set.
*/
public boolean hasClientSecret() {
return clientSecretBuilder_ != null || clientSecret_ != null;
}
/**
*
* Client secret.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* .envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig client_secret = 2 [(.validate.rules) = { ... }
* @return The clientSecret.
*/
public io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig getClientSecret() {
if (clientSecretBuilder_ == null) {
return clientSecret_ == null ? io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig.getDefaultInstance() : clientSecret_;
} else {
return clientSecretBuilder_.getMessage();
}
}
/**
*
* Client secret.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* .envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig client_secret = 2 [(.validate.rules) = { ... }
*/
public Builder setClientSecret(io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig value) {
if (clientSecretBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
clientSecret_ = value;
onChanged();
} else {
clientSecretBuilder_.setMessage(value);
}
return this;
}
/**
*
* Client secret.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* .envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig client_secret = 2 [(.validate.rules) = { ... }
*/
public Builder setClientSecret(
io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig.Builder builderForValue) {
if (clientSecretBuilder_ == null) {
clientSecret_ = builderForValue.build();
onChanged();
} else {
clientSecretBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Client secret.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* .envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig client_secret = 2 [(.validate.rules) = { ... }
*/
public Builder mergeClientSecret(io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig value) {
if (clientSecretBuilder_ == null) {
if (clientSecret_ != null) {
clientSecret_ =
io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig.newBuilder(clientSecret_).mergeFrom(value).buildPartial();
} else {
clientSecret_ = value;
}
onChanged();
} else {
clientSecretBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Client secret.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* .envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig client_secret = 2 [(.validate.rules) = { ... }
*/
public Builder clearClientSecret() {
if (clientSecretBuilder_ == null) {
clientSecret_ = null;
onChanged();
} else {
clientSecret_ = null;
clientSecretBuilder_ = null;
}
return this;
}
/**
*
* Client secret.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* .envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig client_secret = 2 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig.Builder getClientSecretBuilder() {
onChanged();
return getClientSecretFieldBuilder().getBuilder();
}
/**
*
* Client secret.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* .envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig client_secret = 2 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfigOrBuilder getClientSecretOrBuilder() {
if (clientSecretBuilder_ != null) {
return clientSecretBuilder_.getMessageOrBuilder();
} else {
return clientSecret_ == null ?
io.envoyproxy.envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig.getDefaultInstance() : clientSecret_;
}
}
/**
*
* Client secret.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* .envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig client_secret = 2 [(.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>
getClientSecretFieldBuilder() {
if (clientSecretBuilder_ == null) {
clientSecretBuilder_ = 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>(
getClientSecret(),
getParentForChildren(),
isClean());
clientSecret_ = null;
}
return clientSecretBuilder_;
}
private int authType_ = 0;
/**
*
* The method to use when sending credentials to the authorization server.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* .envoy.extensions.injected_credentials.oauth2.v3.OAuth2.AuthType auth_type = 3;
* @return The enum numeric value on the wire for authType.
*/
@java.lang.Override public int getAuthTypeValue() {
return authType_;
}
/**
*
* The method to use when sending credentials to the authorization server.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* .envoy.extensions.injected_credentials.oauth2.v3.OAuth2.AuthType auth_type = 3;
* @param value The enum numeric value on the wire for authType to set.
* @return This builder for chaining.
*/
public Builder setAuthTypeValue(int value) {
authType_ = value;
onChanged();
return this;
}
/**
*
* The method to use when sending credentials to the authorization server.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* .envoy.extensions.injected_credentials.oauth2.v3.OAuth2.AuthType auth_type = 3;
* @return The authType.
*/
@java.lang.Override
public io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.AuthType getAuthType() {
@SuppressWarnings("deprecation")
io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.AuthType result = io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.AuthType.valueOf(authType_);
return result == null ? io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.AuthType.UNRECOGNIZED : result;
}
/**
*
* The method to use when sending credentials to the authorization server.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* .envoy.extensions.injected_credentials.oauth2.v3.OAuth2.AuthType auth_type = 3;
* @param value The authType to set.
* @return This builder for chaining.
*/
public Builder setAuthType(io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.AuthType value) {
if (value == null) {
throw new NullPointerException();
}
authType_ = value.getNumber();
onChanged();
return this;
}
/**
*
* The method to use when sending credentials to the authorization server.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1) for details.
*
*
* .envoy.extensions.injected_credentials.oauth2.v3.OAuth2.AuthType auth_type = 3;
* @return This builder for chaining.
*/
public Builder clearAuthType() {
authType_ = 0;
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.oauth2.v3.OAuth2.ClientCredentials)
}
// @@protoc_insertion_point(class_scope:envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials)
private static final io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials();
}
public static io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ClientCredentials parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ClientCredentials(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.oauth2.v3.OAuth2.ClientCredentials getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int flowTypeCase_ = 0;
private java.lang.Object flowType_;
public enum FlowTypeCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
CLIENT_CREDENTIALS(3),
FLOWTYPE_NOT_SET(0);
private final int value;
private FlowTypeCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static FlowTypeCase valueOf(int value) {
return forNumber(value);
}
public static FlowTypeCase forNumber(int value) {
switch (value) {
case 3: return CLIENT_CREDENTIALS;
case 0: return FLOWTYPE_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public FlowTypeCase
getFlowTypeCase() {
return FlowTypeCase.forNumber(
flowTypeCase_);
}
public static final int TOKEN_ENDPOINT_FIELD_NUMBER = 1;
private io.envoyproxy.envoy.config.core.v3.HttpUri tokenEndpoint_;
/**
*
* Endpoint on the authorization server to retrieve the access token from.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-3.2) for details.
*
*
* .envoy.config.core.v3.HttpUri token_endpoint = 1 [(.validate.rules) = { ... }
* @return Whether the tokenEndpoint field is set.
*/
@java.lang.Override
public boolean hasTokenEndpoint() {
return tokenEndpoint_ != null;
}
/**
*
* Endpoint on the authorization server to retrieve the access token from.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-3.2) for details.
*
*
* .envoy.config.core.v3.HttpUri token_endpoint = 1 [(.validate.rules) = { ... }
* @return The tokenEndpoint.
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.HttpUri getTokenEndpoint() {
return tokenEndpoint_ == null ? io.envoyproxy.envoy.config.core.v3.HttpUri.getDefaultInstance() : tokenEndpoint_;
}
/**
*
* Endpoint on the authorization server to retrieve the access token from.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-3.2) for details.
*
*
* .envoy.config.core.v3.HttpUri token_endpoint = 1 [(.validate.rules) = { ... }
*/
@java.lang.Override
public io.envoyproxy.envoy.config.core.v3.HttpUriOrBuilder getTokenEndpointOrBuilder() {
return getTokenEndpoint();
}
public static final int SCOPES_FIELD_NUMBER = 2;
private com.google.protobuf.LazyStringList scopes_;
/**
*
* Optional list of OAuth scopes to be claimed in the authorization request.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4.2) for details.
*
*
* repeated string scopes = 2;
* @return A list containing the scopes.
*/
public com.google.protobuf.ProtocolStringList
getScopesList() {
return scopes_;
}
/**
*
* Optional list of OAuth scopes to be claimed in the authorization request.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4.2) for details.
*
*
* repeated string scopes = 2;
* @return The count of scopes.
*/
public int getScopesCount() {
return scopes_.size();
}
/**
*
* Optional list of OAuth scopes to be claimed in the authorization request.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4.2) for details.
*
*
* repeated string scopes = 2;
* @param index The index of the element to return.
* @return The scopes at the given index.
*/
public java.lang.String getScopes(int index) {
return scopes_.get(index);
}
/**
*
* Optional list of OAuth scopes to be claimed in the authorization request.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4.2) for details.
*
*
* repeated string scopes = 2;
* @param index The index of the value to return.
* @return The bytes of the scopes at the given index.
*/
public com.google.protobuf.ByteString
getScopesBytes(int index) {
return scopes_.getByteString(index);
}
public static final int CLIENT_CREDENTIALS_FIELD_NUMBER = 3;
/**
*
* Client Credentials Grant.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4) for details.
*
*
* .envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials client_credentials = 3;
* @return Whether the clientCredentials field is set.
*/
@java.lang.Override
public boolean hasClientCredentials() {
return flowTypeCase_ == 3;
}
/**
*
* Client Credentials Grant.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4) for details.
*
*
* .envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials client_credentials = 3;
* @return The clientCredentials.
*/
@java.lang.Override
public io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials getClientCredentials() {
if (flowTypeCase_ == 3) {
return (io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials) flowType_;
}
return io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials.getDefaultInstance();
}
/**
*
* Client Credentials Grant.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4) for details.
*
*
* .envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials client_credentials = 3;
*/
@java.lang.Override
public io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentialsOrBuilder getClientCredentialsOrBuilder() {
if (flowTypeCase_ == 3) {
return (io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials) flowType_;
}
return io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials.getDefaultInstance();
}
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 (tokenEndpoint_ != null) {
output.writeMessage(1, getTokenEndpoint());
}
for (int i = 0; i < scopes_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, scopes_.getRaw(i));
}
if (flowTypeCase_ == 3) {
output.writeMessage(3, (io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials) flowType_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (tokenEndpoint_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getTokenEndpoint());
}
{
int dataSize = 0;
for (int i = 0; i < scopes_.size(); i++) {
dataSize += computeStringSizeNoTag(scopes_.getRaw(i));
}
size += dataSize;
size += 1 * getScopesList().size();
}
if (flowTypeCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials) flowType_);
}
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.oauth2.v3.OAuth2)) {
return super.equals(obj);
}
io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2 other = (io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2) obj;
if (hasTokenEndpoint() != other.hasTokenEndpoint()) return false;
if (hasTokenEndpoint()) {
if (!getTokenEndpoint()
.equals(other.getTokenEndpoint())) return false;
}
if (!getScopesList()
.equals(other.getScopesList())) return false;
if (!getFlowTypeCase().equals(other.getFlowTypeCase())) return false;
switch (flowTypeCase_) {
case 3:
if (!getClientCredentials()
.equals(other.getClientCredentials())) return false;
break;
case 0:
default:
}
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 (hasTokenEndpoint()) {
hash = (37 * hash) + TOKEN_ENDPOINT_FIELD_NUMBER;
hash = (53 * hash) + getTokenEndpoint().hashCode();
}
if (getScopesCount() > 0) {
hash = (37 * hash) + SCOPES_FIELD_NUMBER;
hash = (53 * hash) + getScopesList().hashCode();
}
switch (flowTypeCase_) {
case 3:
hash = (37 * hash) + CLIENT_CREDENTIALS_FIELD_NUMBER;
hash = (53 * hash) + getClientCredentials().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2 parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2 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.oauth2.v3.OAuth2 parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2 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.oauth2.v3.OAuth2 parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2 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.oauth2.v3.OAuth2 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.oauth2.v3.OAuth2 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.oauth2.v3.OAuth2 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.oauth2.v3.OAuth2 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.oauth2.v3.OAuth2 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.oauth2.v3.OAuth2 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.oauth2.v3.OAuth2 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;
}
/**
*
* OAuth2 extension can be used to retrieve an OAuth2 access token from an authorization server and inject it into the
* proxied requests.
* Currently, only the Client Credentials Grant flow is supported.
* The access token will be injected into the request headers using the ``Authorization`` header as a bearer token.
*
*
* Protobuf type {@code envoy.extensions.injected_credentials.oauth2.v3.OAuth2}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:envoy.extensions.injected_credentials.oauth2.v3.OAuth2)
io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2OrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.Oauth2Proto.internal_static_envoy_extensions_injected_credentials_oauth2_v3_OAuth2_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.Oauth2Proto.internal_static_envoy_extensions_injected_credentials_oauth2_v3_OAuth2_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.class, io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.Builder.class);
}
// Construct using io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.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 (tokenEndpointBuilder_ == null) {
tokenEndpoint_ = null;
} else {
tokenEndpoint_ = null;
tokenEndpointBuilder_ = null;
}
scopes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
flowTypeCase_ = 0;
flowType_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.Oauth2Proto.internal_static_envoy_extensions_injected_credentials_oauth2_v3_OAuth2_descriptor;
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2 getDefaultInstanceForType() {
return io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.getDefaultInstance();
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2 build() {
io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2 result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2 buildPartial() {
io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2 result = new io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2(this);
int from_bitField0_ = bitField0_;
if (tokenEndpointBuilder_ == null) {
result.tokenEndpoint_ = tokenEndpoint_;
} else {
result.tokenEndpoint_ = tokenEndpointBuilder_.build();
}
if (((bitField0_ & 0x00000001) != 0)) {
scopes_ = scopes_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.scopes_ = scopes_;
if (flowTypeCase_ == 3) {
if (clientCredentialsBuilder_ == null) {
result.flowType_ = flowType_;
} else {
result.flowType_ = clientCredentialsBuilder_.build();
}
}
result.flowTypeCase_ = flowTypeCase_;
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.oauth2.v3.OAuth2) {
return mergeFrom((io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2 other) {
if (other == io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.getDefaultInstance()) return this;
if (other.hasTokenEndpoint()) {
mergeTokenEndpoint(other.getTokenEndpoint());
}
if (!other.scopes_.isEmpty()) {
if (scopes_.isEmpty()) {
scopes_ = other.scopes_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureScopesIsMutable();
scopes_.addAll(other.scopes_);
}
onChanged();
}
switch (other.getFlowTypeCase()) {
case CLIENT_CREDENTIALS: {
mergeClientCredentials(other.getClientCredentials());
break;
}
case FLOWTYPE_NOT_SET: {
break;
}
}
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.oauth2.v3.OAuth2 parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int flowTypeCase_ = 0;
private java.lang.Object flowType_;
public FlowTypeCase
getFlowTypeCase() {
return FlowTypeCase.forNumber(
flowTypeCase_);
}
public Builder clearFlowType() {
flowTypeCase_ = 0;
flowType_ = null;
onChanged();
return this;
}
private int bitField0_;
private io.envoyproxy.envoy.config.core.v3.HttpUri tokenEndpoint_;
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.HttpUri, io.envoyproxy.envoy.config.core.v3.HttpUri.Builder, io.envoyproxy.envoy.config.core.v3.HttpUriOrBuilder> tokenEndpointBuilder_;
/**
*
* Endpoint on the authorization server to retrieve the access token from.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-3.2) for details.
*
*
* .envoy.config.core.v3.HttpUri token_endpoint = 1 [(.validate.rules) = { ... }
* @return Whether the tokenEndpoint field is set.
*/
public boolean hasTokenEndpoint() {
return tokenEndpointBuilder_ != null || tokenEndpoint_ != null;
}
/**
*
* Endpoint on the authorization server to retrieve the access token from.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-3.2) for details.
*
*
* .envoy.config.core.v3.HttpUri token_endpoint = 1 [(.validate.rules) = { ... }
* @return The tokenEndpoint.
*/
public io.envoyproxy.envoy.config.core.v3.HttpUri getTokenEndpoint() {
if (tokenEndpointBuilder_ == null) {
return tokenEndpoint_ == null ? io.envoyproxy.envoy.config.core.v3.HttpUri.getDefaultInstance() : tokenEndpoint_;
} else {
return tokenEndpointBuilder_.getMessage();
}
}
/**
*
* Endpoint on the authorization server to retrieve the access token from.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-3.2) for details.
*
*
* .envoy.config.core.v3.HttpUri token_endpoint = 1 [(.validate.rules) = { ... }
*/
public Builder setTokenEndpoint(io.envoyproxy.envoy.config.core.v3.HttpUri value) {
if (tokenEndpointBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
tokenEndpoint_ = value;
onChanged();
} else {
tokenEndpointBuilder_.setMessage(value);
}
return this;
}
/**
*
* Endpoint on the authorization server to retrieve the access token from.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-3.2) for details.
*
*
* .envoy.config.core.v3.HttpUri token_endpoint = 1 [(.validate.rules) = { ... }
*/
public Builder setTokenEndpoint(
io.envoyproxy.envoy.config.core.v3.HttpUri.Builder builderForValue) {
if (tokenEndpointBuilder_ == null) {
tokenEndpoint_ = builderForValue.build();
onChanged();
} else {
tokenEndpointBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Endpoint on the authorization server to retrieve the access token from.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-3.2) for details.
*
*
* .envoy.config.core.v3.HttpUri token_endpoint = 1 [(.validate.rules) = { ... }
*/
public Builder mergeTokenEndpoint(io.envoyproxy.envoy.config.core.v3.HttpUri value) {
if (tokenEndpointBuilder_ == null) {
if (tokenEndpoint_ != null) {
tokenEndpoint_ =
io.envoyproxy.envoy.config.core.v3.HttpUri.newBuilder(tokenEndpoint_).mergeFrom(value).buildPartial();
} else {
tokenEndpoint_ = value;
}
onChanged();
} else {
tokenEndpointBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Endpoint on the authorization server to retrieve the access token from.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-3.2) for details.
*
*
* .envoy.config.core.v3.HttpUri token_endpoint = 1 [(.validate.rules) = { ... }
*/
public Builder clearTokenEndpoint() {
if (tokenEndpointBuilder_ == null) {
tokenEndpoint_ = null;
onChanged();
} else {
tokenEndpoint_ = null;
tokenEndpointBuilder_ = null;
}
return this;
}
/**
*
* Endpoint on the authorization server to retrieve the access token from.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-3.2) for details.
*
*
* .envoy.config.core.v3.HttpUri token_endpoint = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.core.v3.HttpUri.Builder getTokenEndpointBuilder() {
onChanged();
return getTokenEndpointFieldBuilder().getBuilder();
}
/**
*
* Endpoint on the authorization server to retrieve the access token from.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-3.2) for details.
*
*
* .envoy.config.core.v3.HttpUri token_endpoint = 1 [(.validate.rules) = { ... }
*/
public io.envoyproxy.envoy.config.core.v3.HttpUriOrBuilder getTokenEndpointOrBuilder() {
if (tokenEndpointBuilder_ != null) {
return tokenEndpointBuilder_.getMessageOrBuilder();
} else {
return tokenEndpoint_ == null ?
io.envoyproxy.envoy.config.core.v3.HttpUri.getDefaultInstance() : tokenEndpoint_;
}
}
/**
*
* Endpoint on the authorization server to retrieve the access token from.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-3.2) for details.
*
*
* .envoy.config.core.v3.HttpUri token_endpoint = 1 [(.validate.rules) = { ... }
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.HttpUri, io.envoyproxy.envoy.config.core.v3.HttpUri.Builder, io.envoyproxy.envoy.config.core.v3.HttpUriOrBuilder>
getTokenEndpointFieldBuilder() {
if (tokenEndpointBuilder_ == null) {
tokenEndpointBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.config.core.v3.HttpUri, io.envoyproxy.envoy.config.core.v3.HttpUri.Builder, io.envoyproxy.envoy.config.core.v3.HttpUriOrBuilder>(
getTokenEndpoint(),
getParentForChildren(),
isClean());
tokenEndpoint_ = null;
}
return tokenEndpointBuilder_;
}
private com.google.protobuf.LazyStringList scopes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureScopesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
scopes_ = new com.google.protobuf.LazyStringArrayList(scopes_);
bitField0_ |= 0x00000001;
}
}
/**
*
* Optional list of OAuth scopes to be claimed in the authorization request.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4.2) for details.
*
*
* repeated string scopes = 2;
* @return A list containing the scopes.
*/
public com.google.protobuf.ProtocolStringList
getScopesList() {
return scopes_.getUnmodifiableView();
}
/**
*
* Optional list of OAuth scopes to be claimed in the authorization request.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4.2) for details.
*
*
* repeated string scopes = 2;
* @return The count of scopes.
*/
public int getScopesCount() {
return scopes_.size();
}
/**
*
* Optional list of OAuth scopes to be claimed in the authorization request.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4.2) for details.
*
*
* repeated string scopes = 2;
* @param index The index of the element to return.
* @return The scopes at the given index.
*/
public java.lang.String getScopes(int index) {
return scopes_.get(index);
}
/**
*
* Optional list of OAuth scopes to be claimed in the authorization request.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4.2) for details.
*
*
* repeated string scopes = 2;
* @param index The index of the value to return.
* @return The bytes of the scopes at the given index.
*/
public com.google.protobuf.ByteString
getScopesBytes(int index) {
return scopes_.getByteString(index);
}
/**
*
* Optional list of OAuth scopes to be claimed in the authorization request.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4.2) for details.
*
*
* repeated string scopes = 2;
* @param index The index to set the value at.
* @param value The scopes to set.
* @return This builder for chaining.
*/
public Builder setScopes(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureScopesIsMutable();
scopes_.set(index, value);
onChanged();
return this;
}
/**
*
* Optional list of OAuth scopes to be claimed in the authorization request.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4.2) for details.
*
*
* repeated string scopes = 2;
* @param value The scopes to add.
* @return This builder for chaining.
*/
public Builder addScopes(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureScopesIsMutable();
scopes_.add(value);
onChanged();
return this;
}
/**
*
* Optional list of OAuth scopes to be claimed in the authorization request.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4.2) for details.
*
*
* repeated string scopes = 2;
* @param values The scopes to add.
* @return This builder for chaining.
*/
public Builder addAllScopes(
java.lang.Iterable values) {
ensureScopesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, scopes_);
onChanged();
return this;
}
/**
*
* Optional list of OAuth scopes to be claimed in the authorization request.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4.2) for details.
*
*
* repeated string scopes = 2;
* @return This builder for chaining.
*/
public Builder clearScopes() {
scopes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Optional list of OAuth scopes to be claimed in the authorization request.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4.2) for details.
*
*
* repeated string scopes = 2;
* @param value The bytes of the scopes to add.
* @return This builder for chaining.
*/
public Builder addScopesBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureScopesIsMutable();
scopes_.add(value);
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials, io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials.Builder, io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentialsOrBuilder> clientCredentialsBuilder_;
/**
*
* Client Credentials Grant.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4) for details.
*
*
* .envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials client_credentials = 3;
* @return Whether the clientCredentials field is set.
*/
@java.lang.Override
public boolean hasClientCredentials() {
return flowTypeCase_ == 3;
}
/**
*
* Client Credentials Grant.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4) for details.
*
*
* .envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials client_credentials = 3;
* @return The clientCredentials.
*/
@java.lang.Override
public io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials getClientCredentials() {
if (clientCredentialsBuilder_ == null) {
if (flowTypeCase_ == 3) {
return (io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials) flowType_;
}
return io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials.getDefaultInstance();
} else {
if (flowTypeCase_ == 3) {
return clientCredentialsBuilder_.getMessage();
}
return io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials.getDefaultInstance();
}
}
/**
*
* Client Credentials Grant.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4) for details.
*
*
* .envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials client_credentials = 3;
*/
public Builder setClientCredentials(io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials value) {
if (clientCredentialsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
flowType_ = value;
onChanged();
} else {
clientCredentialsBuilder_.setMessage(value);
}
flowTypeCase_ = 3;
return this;
}
/**
*
* Client Credentials Grant.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4) for details.
*
*
* .envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials client_credentials = 3;
*/
public Builder setClientCredentials(
io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials.Builder builderForValue) {
if (clientCredentialsBuilder_ == null) {
flowType_ = builderForValue.build();
onChanged();
} else {
clientCredentialsBuilder_.setMessage(builderForValue.build());
}
flowTypeCase_ = 3;
return this;
}
/**
*
* Client Credentials Grant.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4) for details.
*
*
* .envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials client_credentials = 3;
*/
public Builder mergeClientCredentials(io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials value) {
if (clientCredentialsBuilder_ == null) {
if (flowTypeCase_ == 3 &&
flowType_ != io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials.getDefaultInstance()) {
flowType_ = io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials.newBuilder((io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials) flowType_)
.mergeFrom(value).buildPartial();
} else {
flowType_ = value;
}
onChanged();
} else {
if (flowTypeCase_ == 3) {
clientCredentialsBuilder_.mergeFrom(value);
} else {
clientCredentialsBuilder_.setMessage(value);
}
}
flowTypeCase_ = 3;
return this;
}
/**
*
* Client Credentials Grant.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4) for details.
*
*
* .envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials client_credentials = 3;
*/
public Builder clearClientCredentials() {
if (clientCredentialsBuilder_ == null) {
if (flowTypeCase_ == 3) {
flowTypeCase_ = 0;
flowType_ = null;
onChanged();
}
} else {
if (flowTypeCase_ == 3) {
flowTypeCase_ = 0;
flowType_ = null;
}
clientCredentialsBuilder_.clear();
}
return this;
}
/**
*
* Client Credentials Grant.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4) for details.
*
*
* .envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials client_credentials = 3;
*/
public io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials.Builder getClientCredentialsBuilder() {
return getClientCredentialsFieldBuilder().getBuilder();
}
/**
*
* Client Credentials Grant.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4) for details.
*
*
* .envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials client_credentials = 3;
*/
@java.lang.Override
public io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentialsOrBuilder getClientCredentialsOrBuilder() {
if ((flowTypeCase_ == 3) && (clientCredentialsBuilder_ != null)) {
return clientCredentialsBuilder_.getMessageOrBuilder();
} else {
if (flowTypeCase_ == 3) {
return (io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials) flowType_;
}
return io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials.getDefaultInstance();
}
}
/**
*
* Client Credentials Grant.
* Refer to [RFC 6749: The OAuth 2.0 Authorization Framework](https://www.rfc-editor.org/rfc/rfc6749#section-4.4) for details.
*
*
* .envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials client_credentials = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials, io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials.Builder, io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentialsOrBuilder>
getClientCredentialsFieldBuilder() {
if (clientCredentialsBuilder_ == null) {
if (!(flowTypeCase_ == 3)) {
flowType_ = io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials.getDefaultInstance();
}
clientCredentialsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials, io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials.Builder, io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentialsOrBuilder>(
(io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2.ClientCredentials) flowType_,
getParentForChildren(),
isClean());
flowType_ = null;
}
flowTypeCase_ = 3;
onChanged();;
return clientCredentialsBuilder_;
}
@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.oauth2.v3.OAuth2)
}
// @@protoc_insertion_point(class_scope:envoy.extensions.injected_credentials.oauth2.v3.OAuth2)
private static final io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2 DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2();
}
public static io.envoyproxy.envoy.extensions.injected_credentials.oauth2.v3.OAuth2 getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public OAuth2 parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new OAuth2(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.oauth2.v3.OAuth2 getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy