Class HttpBearerConfig

java.lang.Object
com.google.genai.gaos.models.credentials.HttpBearerConfig
All Implemented Interfaces:
CredentialCreateParams

public class HttpBearerConfig extends Object implements CredentialCreateParams
HttpBearerConfig

Configuration for HTTP Bearer token credentials.

  • Constructor Details

    • HttpBearerConfig

      public HttpBearerConfig(@Nullable String headerName, @Nonnull String id, @Nullable String prefix, @Nonnull String token)
    • HttpBearerConfig

      public HttpBearerConfig(@Nonnull String id, @Nonnull String token)
  • Method Details

    • headerName

      public Optional<String> headerName()
      Optional. Header name to inject the token into. Defaults to 'Authorization'.
    • id

      public Optional<String> id()
    • prefix

      public Optional<String> prefix()
      Optional. Prefix to prepend to the token. Defaults to 'Bearer'.

      Set to '' for no prefix.

    • token

      public Optional<String> token()
      Required. Input only. The static bearer token.

      Write-only; never returned in responses.

    • type

      public String type()
      Specified by:
      type in interface CredentialCreateParams
    • builder

      public static HttpBearerConfig.Builder builder()
    • withHeaderName

      public HttpBearerConfig withHeaderName(@Nullable String headerName)
      Optional. Header name to inject the token into. Defaults to 'Authorization'.
    • withId

      public HttpBearerConfig withId(@Nonnull String id)
    • withPrefix

      public HttpBearerConfig withPrefix(@Nullable String prefix)
      Optional. Prefix to prepend to the token. Defaults to 'Bearer'.

      Set to '' for no prefix.

    • withToken

      public HttpBearerConfig withToken(@Nonnull String token)
      Required. Input only. The static bearer token.

      Write-only; never returned in responses.

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object