Enum Class ShapeType

java.lang.Object
java.lang.Enum<ShapeType>
software.amazon.smithy.model.shapes.ShapeType
All Implemented Interfaces:
Serializable, Comparable<ShapeType>, Constable

public enum ShapeType extends Enum<ShapeType>
An enumeration of the different types in a model.
  • Enum Constant Details

    • BLOB

      public static final ShapeType BLOB
    • BOOLEAN

      public static final ShapeType BOOLEAN
    • STRING

      public static final ShapeType STRING
    • TIMESTAMP

      public static final ShapeType TIMESTAMP
    • BYTE

      public static final ShapeType BYTE
    • SHORT

      public static final ShapeType SHORT
    • INTEGER

      public static final ShapeType INTEGER
    • LONG

      public static final ShapeType LONG
    • FLOAT

      public static final ShapeType FLOAT
    • DOCUMENT

      public static final ShapeType DOCUMENT
    • DOUBLE

      public static final ShapeType DOUBLE
    • BIG_DECIMAL

      public static final ShapeType BIG_DECIMAL
    • BIG_INTEGER

      public static final ShapeType BIG_INTEGER
    • ENUM

      public static final ShapeType ENUM
    • INT_ENUM

      public static final ShapeType INT_ENUM
    • LIST

      public static final ShapeType LIST
    • SET

      public static final ShapeType SET
    • MAP

      public static final ShapeType MAP
    • STRUCTURE

      public static final ShapeType STRUCTURE
    • UNION

      public static final ShapeType UNION
    • MEMBER

      public static final ShapeType MEMBER
    • SERVICE

      public static final ShapeType SERVICE
    • RESOURCE

      public static final ShapeType RESOURCE
    • OPERATION

      public static final ShapeType OPERATION
  • Method Details

    • values

      public static ShapeType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ShapeType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Overrides:
      toString in class Enum<ShapeType>
    • getShapeClass

      public Class<? extends Shape> getShapeClass()
      Gets the class that implements this shape type.
      Returns:
      Returns the shape class.
    • getCategory

      public ShapeType.Category getCategory()
      Returns the category of the shape type, as defined in the Smithy specification (one of SIMPLE, AGGREGATE, or SERVICE).
      Returns:
      Returns the category of the type.
    • isShapeType

      public boolean isShapeType(ShapeType other)
      Returns whether this shape type is equivalent to the given shape type, accounting for things like enums being considered specializations of strings.
      Parameters:
      other - The other shape type to compare against.
      Returns:
      Returns true if the shape types are equivalent.
    • fromString

      public static Optional<ShapeType> fromString(String text)
      Create a new Shape.Type from a string.
      Parameters:
      text - Text to convert into a Shape.Type
      Returns:
      Returns the Type in an Optional.
    • createBuilderForType

      public AbstractShapeBuilder<?,?> createBuilderForType()
      Creates a shape builder that corresponds to the shape type.
      Returns:
      Returns a shape builder corresponding to the type.