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 Details

    • Builder

      public Builder()
  • Method Details

    • build

      public SnippetConfig build()
      Description copied from interface: SmithyBuilder
      Creates an immutable object that is created from the properties that have been set on the builder.
      Specified by:
      build in interface SmithyBuilder<SnippetConfig>
      Returns:
      an instance of T
    • version

      public SnippetConfig.Builder version(String version)
      Sets the version of the config schema.
      Parameters:
      version - The version to set.
      Returns:
      Returns the builder.
    • snippets

      public SnippetConfig.Builder snippets(Map<ShapeId,Map<ShapeId,List<Snippet>>> snippets)
      Sets the snippet map, erasing any existing values.
      Parameters:
      snippets - The snippets to set.
      Returns:
      Returns the builder.
    • mergeSnippets

      public SnippetConfig.Builder mergeSnippets(Map<ShapeId,Map<ShapeId,List<Snippet>>> snippets)
      Merges new snippets into the snippet map.
      Parameters:
      snippets - The snippets to merge in.
      Returns:
      Returns the builder.
    • mergeSnippets

      public SnippetConfig.Builder mergeSnippets(SnippetConfig snippetConfig)
    • 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.