java.lang.Object
software.amazon.smithy.rulesengine.language.syntax.parameters.Parameter
All Implemented Interfaces:
FromSourceLocation, ToNode, ToSmithyBuilder<Parameter>

public final class Parameter extends Object implements ToSmithyBuilder<Parameter>, FromSourceLocation, ToNode
  • Field Details

  • Method Details

    • fromNode

      public static Parameter fromNode(StringNode name, ObjectNode node) throws RuleError
      Throws:
      RuleError
    • builder

      public static Parameter.Builder builder()
    • getBuiltIn

      public Optional<String> getBuiltIn()
    • getDefaultValue

      public Optional<Value> getDefaultValue()
    • getSourceLocation

      public SourceLocation getSourceLocation()
      Description copied from interface: FromSourceLocation
      Gets the source location of a value.
      Specified by:
      getSourceLocation in interface FromSourceLocation
      Returns:
      Returns the source location of the value.
    • getDeprecated

      public Optional<Parameter.Deprecated> getDeprecated()
    • isRequired

      public boolean isRequired()
    • getType

      public ParameterType getType()
    • toType

      public Type toType()
    • getName

      public Identifier getName()
    • isBuiltIn

      public boolean isBuiltIn()
    • getValue

      public Optional<Value> getValue()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toBuilder

      public Parameter.Builder toBuilder()
      Description copied from interface: ToSmithyBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToSmithyBuilder<Parameter>
      Returns:
      a builder for type T
    • template

      public String template()
    • toNode

      public Node toNode()
      Description copied from interface: ToNode
      Converts a value to a Node.
      Specified by:
      toNode in interface ToNode
      Returns:
      Returns the creates Node.
    • toExpression

      public Expression toExpression()
      Provides a reference to this parameter as an expression.
      Returns:
      the reference to the parameter.
    • equal

      public Function equal(boolean b)
      Provides a function comparing this parameter to a boolean value.
      Parameters:
      b - the boolean value to compare the parameter to.
      Returns:
      the BooleanEquals function comparing the parameter.
    • equal

      public Function equal(Expression expression)
      Provides a function comparing this parameter to expression.
      Parameters:
      expression - the expression.
      Returns:
      the BooleanEquals function comparing the parameter.
    • getDocumentation

      public Optional<String> getDocumentation()
    • getDefault

      public Optional<Value> getDefault()
      The default value for this Parameter.
      Returns:
      The value. This value must match the type of this parameter.