Class HTTPAuthSecurityScheme.Builder

java.lang.Object
org.a2aproject.sdk.spec.HTTPAuthSecurityScheme.Builder
Enclosing class:
HTTPAuthSecurityScheme

public static class HTTPAuthSecurityScheme.Builder extends Object
Builder for constructing HTTPAuthSecurityScheme instances.

Provides a fluent API for creating HTTP authentication security schemes. The scheme parameter is required and must be set before calling build().

  • Method Details

    • bearerFormat

      public HTTPAuthSecurityScheme.Builder bearerFormat(String bearerFormat)
      Sets the bearer token format hint.
      Parameters:
      bearerFormat - hint to the client about the format of bearer tokens (e.g., "JWT")
      Returns:
      this builder instance
    • scheme

      public HTTPAuthSecurityScheme.Builder scheme(String scheme)
      Sets the HTTP authentication scheme name.
      Parameters:
      scheme - the scheme name (required, e.g., "basic" or "bearer")
      Returns:
      this builder instance
    • description

      public HTTPAuthSecurityScheme.Builder description(String description)
      Sets an optional description of the security scheme.
      Parameters:
      description - human-readable description
      Returns:
      this builder instance
    • build

      public HTTPAuthSecurityScheme build()
      Builds the HTTPAuthSecurityScheme instance.
      Returns:
      a new immutable HTTPAuthSecurityScheme
      Throws:
      IllegalArgumentException - if required fields are missing