Class AuthorizersTrait.Builder

java.lang.Object
software.amazon.smithy.model.traits.AbstractTraitBuilder<AuthorizersTrait,AuthorizersTrait.Builder>
software.amazon.smithy.aws.apigateway.traits.AuthorizersTrait.Builder
All Implemented Interfaces:
SmithyBuilder<AuthorizersTrait>
Enclosing class:
AuthorizersTrait

public static final class AuthorizersTrait.Builder extends AbstractTraitBuilder<AuthorizersTrait,AuthorizersTrait.Builder>
Builds an AuthorizersTrait.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

      public AuthorizersTrait build()
      Description copied from interface: SmithyBuilder
      Creates an immutable object that is created from the properties that have been set on the builder.
      Returns:
      an instance of T
    • putAuthorizer

      public AuthorizersTrait.Builder putAuthorizer(String name, AuthorizerDefinition authorizer)
      Adds an authorizer.
      Parameters:
      name - Name of the authorizer to add.
      authorizer - Authorizer definition.
      Returns:
      Returns the builder.
    • authorizers

      public AuthorizersTrait.Builder authorizers(Map<String,AuthorizerDefinition> authorizers)
      Replaces all of the authorizers with the given map.
      Parameters:
      authorizers - Map of authorizer names to their definitions.
      Returns:
      Returns the builder.
    • removeAuthorizer

      public AuthorizersTrait.Builder removeAuthorizer(String name)
      Removes an authorizer by name.
      Parameters:
      name - Name of the authorizer to remove.
      Returns:
      Returns the builder.
    • clearAuthorizers

      public AuthorizersTrait.Builder clearAuthorizers()
      Clears all of the authorizers in the builder.
      Returns:
      Returns the builder.