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 anAuthorizersTrait
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthorizersTrait.Builder
authorizers(java.util.Map<java.lang.String,AuthorizerDefinition> authorizers)
Replaces all of the authorizers with the given map.AuthorizersTrait
build()
Creates an immutable object that is created from the properties that have been set on the builder.AuthorizersTrait.Builder
clearAuthorizers()
Clears all of the authorizers in the builder.AuthorizersTrait.Builder
putAuthorizer(java.lang.String name, AuthorizerDefinition authorizer)
Adds an authorizer.AuthorizersTrait.Builder
removeAuthorizer(java.lang.String name)
Removes an authorizer by name.-
Methods inherited from class software.amazon.smithy.model.traits.AbstractTraitBuilder
getSourceLocation, sourceLocation
-
-
-
-
Method Detail
-
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(java.lang.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(java.util.Map<java.lang.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(java.lang.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.
-
-