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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionauthorizers
(Map<String, AuthorizerDefinition> authorizers) Replaces all of the authorizers with the given map.build()
Creates an immutable object that is created from the properties that have been set on the builder.Clears all of the authorizers in the builder.putAuthorizer
(String name, AuthorizerDefinition authorizer) Adds an authorizer.removeAuthorizer
(String name) Removes an authorizer by name.Methods inherited from class software.amazon.smithy.model.traits.AbstractTraitBuilder
getSourceLocation, sourceLocation
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
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
Adds an authorizer.- Parameters:
name
- Name of the authorizer to add.authorizer
- Authorizer definition.- Returns:
- Returns the builder.
-
authorizers
Replaces all of the authorizers with the given map.- Parameters:
authorizers
- Map of authorizer names to their definitions.- Returns:
- Returns the builder.
-
removeAuthorizer
Removes an authorizer by name.- Parameters:
name
- Name of the authorizer to remove.- Returns:
- Returns the builder.
-
clearAuthorizers
Clears all of the authorizers in the builder.- Returns:
- Returns the builder.
-