Class SymbolDependency.Builder

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

public static final class SymbolDependency.Builder extends Object implements SmithyBuilder<SymbolDependency>
Builds a SymbolDependency.
  • Method Details

    • build

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

      public SymbolDependency.Builder dependencyType(String dependencyType)
      Sets the type of dependency (for example, "dev", "optional", etc).

      Defaults to an empty string if not explicitly set.

      Parameters:
      dependencyType - Dependency type to set.
      Returns:
      Returns the builder.
    • packageName

      public SymbolDependency.Builder packageName(String packageName)
      Sets the package name of the dependency.
      Parameters:
      packageName - Package name to set.
      Returns:
      Returns the builder.
    • version

      public SymbolDependency.Builder version(String version)
      Sets the version string of the dependency.
      Parameters:
      version - Opaque version string to set.
      Returns:
      Returns the builder.
    • putProperty

      public SymbolDependency.Builder putProperty(String key, Object value)
      Sets a specific custom property.
      Parameters:
      key - Key to set.
      value - Value to set.
      Returns:
      Returns the builder.
    • removeProperty

      public SymbolDependency.Builder removeProperty(String key)
      Removes a specific custom property.
      Parameters:
      key - Key to remove.
      Returns:
      Returns the builder.
    • properties

      public SymbolDependency.Builder properties(Map<String,Object> properties)
      Replaces all of the custom properties.
      Parameters:
      properties - Custom properties to replace with.
      Returns:
      Returns the builder.