Class Snippet.Builder

java.lang.Object
software.amazon.smithy.codegen.core.docs.Snippet.Builder
All Implemented Interfaces:
SmithyBuilder<Snippet>
Enclosing class:
Snippet

public static class Snippet.Builder extends Object implements SmithyBuilder<Snippet>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

      public Snippet 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<Snippet>
      Returns:
      an instance of T
    • targetId

      public Snippet.Builder targetId(String id)
      Sets the target id of the snippet.
      Parameters:
      id - The id to set as the target of the snippet.
      Returns:
      Returns the builder.
    • title

      public Snippet.Builder title(String title)
      Sets the title of the snippet.
      Parameters:
      title - The title to set for the snippet.
      Returns:
      Returns the builder.
    • protocol

      public Snippet.Builder protocol(ShapeId protocol)
      Sets the protocol of the snippet.

      To remove the protocol, set a null value.

      Parameters:
      protocol - The shape id of the protocol the snippet is tied to.
      Returns:
      Returns the builder.
    • files

      public Snippet.Builder files(Collection<SnippetFile> files)
      Sets the files that make up the snippet.
      Parameters:
      files - A list of files that make up the snippet.
      Returns:
      Returns the builder.
    • addFile

      public Snippet.Builder addFile(SnippetFile file)
      Adds a file to the snippet.
      Parameters:
      file - A file to add to the snippet.
      Returns:
      Returns the builder.