java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<Generic.Builder>
io.envoyproxy.envoy.extensions.http.injected_credentials.generic.v3.Generic.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, GenericOrBuilder, Cloneable
Enclosing class:
Generic

public static final class Generic.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Generic.Builder> implements GenericOrBuilder
 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.
 Refer to [RFC 6750: The OAuth 2.0 Authorization Framework: Bearer Token Usage](https://www.rfc-editor.org/rfc/rfc6750) for details.
 
Protobuf type envoy.extensions.http.injected_credentials.generic.v3.Generic
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Generic.Builder>
    • clear

      public Generic.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<Generic.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Generic.Builder>
    • getDefaultInstanceForType

      public Generic getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Generic build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Generic buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      public Generic.Builder clone()
      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<Generic.Builder>
    • setField

      public Generic.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<Generic.Builder>
    • clearField

      public Generic.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Generic.Builder>
    • clearOneof

      public Generic.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Generic.Builder>
    • setRepeatedField

      public Generic.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Generic.Builder>
    • addRepeatedField

      public Generic.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Generic.Builder>
    • mergeFrom

      public Generic.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Generic.Builder>
    • mergeFrom

      public Generic.Builder mergeFrom(Generic other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Generic.Builder>
    • mergeFrom

      public Generic.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Generic.Builder>
      Throws:
      IOException
    • hasCredential

      public boolean hasCredential()
       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) = { ... }
      Specified by:
      hasCredential in interface GenericOrBuilder
      Returns:
      Whether the credential field is set.
    • getCredential

      public SdsSecretConfig getCredential()
       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) = { ... }
      Specified by:
      getCredential in interface GenericOrBuilder
      Returns:
      The credential.
    • setCredential

      public Generic.Builder setCredential(SdsSecretConfig value)
       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) = { ... }
    • setCredential

      public Generic.Builder setCredential(SdsSecretConfig.Builder builderForValue)
       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) = { ... }
    • mergeCredential

      public Generic.Builder mergeCredential(SdsSecretConfig value)
       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) = { ... }
    • clearCredential

      public Generic.Builder clearCredential()
       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) = { ... }
    • getCredentialBuilder

      public SdsSecretConfig.Builder getCredentialBuilder()
       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) = { ... }
    • getCredentialOrBuilder

      public SdsSecretConfigOrBuilder getCredentialOrBuilder()
       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) = { ... }
      Specified by:
      getCredentialOrBuilder in interface GenericOrBuilder
    • getHeader

      public String getHeader()
       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) = { ... }
      Specified by:
      getHeader in interface GenericOrBuilder
      Returns:
      The header.
    • getHeaderBytes

      public com.google.protobuf.ByteString getHeaderBytes()
       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) = { ... }
      Specified by:
      getHeaderBytes in interface GenericOrBuilder
      Returns:
      The bytes for header.
    • setHeader

      public Generic.Builder setHeader(String value)
       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) = { ... }
      Parameters:
      value - The header to set.
      Returns:
      This builder for chaining.
    • clearHeader

      public Generic.Builder clearHeader()
       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) = { ... }
      Returns:
      This builder for chaining.
    • setHeaderBytes

      public Generic.Builder setHeaderBytes(com.google.protobuf.ByteString value)
       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) = { ... }
      Parameters:
      value - The bytes for header to set.
      Returns:
      This builder for chaining.
    • getHeaderValuePrefix

      public String getHeaderValuePrefix()
       The prefix to prepend to the credential value before injecting it into the header.
       This is useful for adding a scheme such as ``Bearer `` or ``Basic `` to the credential.
       For example, if the credential is ``xyz123`` and the prefix is ``Bearer ``, the
       final header value will be ``Bearer xyz123``.
       If not set, the raw credential value will be injected without any prefix.
       
      string header_value_prefix = 3;
      Specified by:
      getHeaderValuePrefix in interface GenericOrBuilder
      Returns:
      The headerValuePrefix.
    • getHeaderValuePrefixBytes

      public com.google.protobuf.ByteString getHeaderValuePrefixBytes()
       The prefix to prepend to the credential value before injecting it into the header.
       This is useful for adding a scheme such as ``Bearer `` or ``Basic `` to the credential.
       For example, if the credential is ``xyz123`` and the prefix is ``Bearer ``, the
       final header value will be ``Bearer xyz123``.
       If not set, the raw credential value will be injected without any prefix.
       
      string header_value_prefix = 3;
      Specified by:
      getHeaderValuePrefixBytes in interface GenericOrBuilder
      Returns:
      The bytes for headerValuePrefix.
    • setHeaderValuePrefix

      public Generic.Builder setHeaderValuePrefix(String value)
       The prefix to prepend to the credential value before injecting it into the header.
       This is useful for adding a scheme such as ``Bearer `` or ``Basic `` to the credential.
       For example, if the credential is ``xyz123`` and the prefix is ``Bearer ``, the
       final header value will be ``Bearer xyz123``.
       If not set, the raw credential value will be injected without any prefix.
       
      string header_value_prefix = 3;
      Parameters:
      value - The headerValuePrefix to set.
      Returns:
      This builder for chaining.
    • clearHeaderValuePrefix

      public Generic.Builder clearHeaderValuePrefix()
       The prefix to prepend to the credential value before injecting it into the header.
       This is useful for adding a scheme such as ``Bearer `` or ``Basic `` to the credential.
       For example, if the credential is ``xyz123`` and the prefix is ``Bearer ``, the
       final header value will be ``Bearer xyz123``.
       If not set, the raw credential value will be injected without any prefix.
       
      string header_value_prefix = 3;
      Returns:
      This builder for chaining.
    • setHeaderValuePrefixBytes

      public Generic.Builder setHeaderValuePrefixBytes(com.google.protobuf.ByteString value)
       The prefix to prepend to the credential value before injecting it into the header.
       This is useful for adding a scheme such as ``Bearer `` or ``Basic `` to the credential.
       For example, if the credential is ``xyz123`` and the prefix is ``Bearer ``, the
       final header value will be ``Bearer xyz123``.
       If not set, the raw credential value will be injected without any prefix.
       
      string header_value_prefix = 3;
      Parameters:
      value - The bytes for headerValuePrefix to set.
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final Generic.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Generic.Builder>
    • mergeUnknownFields

      public final Generic.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Generic.Builder>