Class SnippetConfig.Builder
java.lang.Object
software.amazon.smithy.codegen.core.docs.SnippetConfig.Builder
- All Implemented Interfaces:
SmithyBuilder<SnippetConfig>
- Enclosing class:
- SnippetConfig
public static final class SnippetConfig.Builder
extends Object
implements SmithyBuilder<SnippetConfig>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates an immutable object that is created from the properties that have been set on the builder.Merges in the snippets for a particular service.Merges new snippets into the snippet map.mergeSnippets(SnippetConfig snippetConfig) Sets the snippets for a particular service, erasing any existing values.Sets the snippet map, erasing any existing values.Sets the version of the config schema.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Description copied from interface:SmithyBuilderCreates an immutable object that is created from the properties that have been set on the builder.- Specified by:
buildin interfaceSmithyBuilder<SnippetConfig>- Returns:
- an instance of T
-
version
Sets the version of the config schema.- Parameters:
version- The version to set.- Returns:
- Returns the builder.
-
snippets
Sets the snippet map, erasing any existing values.- Parameters:
snippets- The snippets to set.- Returns:
- Returns the builder.
-
mergeSnippets
Merges new snippets into the snippet map.- Parameters:
snippets- The snippets to merge in.- Returns:
- Returns the builder.
-
mergeSnippets
-
putServiceSnippets
public SnippetConfig.Builder putServiceSnippets(ShapeId serviceId, Map<ShapeId, List<Snippet>> serviceSnippets) Sets the snippets for a particular service, erasing any existing values.- Parameters:
serviceId- The service to set the snippets for.serviceSnippets- The snippets to set in the service.- Returns:
- Returns the builder.
-
mergeServiceSnippets
public SnippetConfig.Builder mergeServiceSnippets(ShapeId serviceId, Map<ShapeId, List<Snippet>> serviceSnippets) Merges in the snippets for a particular service.- Parameters:
serviceId- The service to merge snippets for.serviceSnippets- The snippets to merge in.- Returns:
- Returns the builder.
-