zio.blocks.smithy

Members list

Type members

Classlikes

final case class ApplyStatement(target: String, traits: List[TraitApplication])

Represents an apply statement that attaches traits to an existing shape.

Represents an apply statement that attaches traits to an existing shape.

In Smithy IDL, apply statements allow traits to be added to shapes defined elsewhere, e.g., apply MyShape @tag("foo").

Value parameters

target

the name of the shape to apply traits to

traits

the traits to apply

Attributes

Source
SmithyModel.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class BigDecimalShape(name: String, traits: List[TraitApplication] = ...) extends Shape

A bigDecimal shape representing an arbitrary-precision decimal number.

A bigDecimal shape representing an arbitrary-precision decimal number.

Value parameters

name

the shape name

traits

the traits applied to this shape

Attributes

Source
Shape.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Shape
class Object
trait Matchable
class Any
Show all
final case class BigIntegerShape(name: String, traits: List[TraitApplication] = ...) extends Shape

A bigInteger shape representing an arbitrarily large signed integer.

A bigInteger shape representing an arbitrarily large signed integer.

Value parameters

name

the shape name

traits

the traits applied to this shape

Attributes

Source
Shape.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Shape
class Object
trait Matchable
class Any
Show all
final case class BlobShape(name: String, traits: List[TraitApplication] = ...) extends Shape

A blob shape representing arbitrary binary data.

A blob shape representing arbitrary binary data.

Value parameters

name

the shape name

traits

the traits applied to this shape

Attributes

Source
Shape.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Shape
class Object
trait Matchable
class Any
Show all
final case class BooleanShape(name: String, traits: List[TraitApplication] = ...) extends Shape

A boolean shape representing true/false values.

A boolean shape representing true/false values.

Value parameters

name

the shape name

traits

the traits applied to this shape

Attributes

Source
Shape.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Shape
class Object
trait Matchable
class Any
Show all
case object BuildInfo

This object was generated by sbt-buildinfo.

This object was generated by sbt-buildinfo.

Attributes

Source
BuildInfo.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
BuildInfo.type
final case class ByteShape(name: String, traits: List[TraitApplication] = ...) extends Shape

A byte shape representing an 8-bit signed integer.

A byte shape representing an 8-bit signed integer.

Value parameters

name

the shape name

traits

the traits applied to this shape

Attributes

Source
Shape.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Shape
class Object
trait Matchable
class Any
Show all
final case class DocumentShape(name: String, traits: List[TraitApplication] = ...) extends Shape

A document shape representing protocol-agnostic open content.

A document shape representing protocol-agnostic open content.

Value parameters

name

the shape name

traits

the traits applied to this shape

Attributes

Source
Shape.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Shape
class Object
trait Matchable
class Any
Show all
final case class DoubleShape(name: String, traits: List[TraitApplication] = ...) extends Shape

A double shape representing a double-precision IEEE 754 floating point number.

A double shape representing a double-precision IEEE 754 floating point number.

Value parameters

name

the shape name

traits

the traits applied to this shape

Attributes

Source
Shape.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Shape
class Object
trait Matchable
class Any
Show all
final case class EnumMember(name: String, value: Option[String] = ..., traits: List[TraitApplication] = ...)

Defines a member of a string enum shape.

Defines a member of a string enum shape.

Value parameters

name

the enum member name

traits

the traits applied to this enum member

value

the optional string value (defaults to the member name if absent)

Attributes

Source
Shape.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class EnumShape(name: String, traits: List[TraitApplication] = ..., members: List[EnumMember] = ...) extends Shape

A string enum shape containing a fixed set of string values.

A string enum shape containing a fixed set of string values.

Value parameters

members

the enum members defining allowed values

name

the shape name

traits

the traits applied to this shape

Attributes

Source
Shape.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Shape
class Object
trait Matchable
class Any
Show all
final case class FloatShape(name: String, traits: List[TraitApplication] = ...) extends Shape

A float shape representing a single-precision IEEE 754 floating point number.

A float shape representing a single-precision IEEE 754 floating point number.

Value parameters

name

the shape name

traits

the traits applied to this shape

Attributes

Source
Shape.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Shape
class Object
trait Matchable
class Any
Show all
final case class IntEnumMember(name: String, value: Int, traits: List[TraitApplication] = ...)

Defines a member of an integer enum shape.

Defines a member of an integer enum shape.

Value parameters

name

the enum member name

traits

the traits applied to this enum member

value

the integer value for this member

Attributes

Source
Shape.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class IntEnumShape(name: String, traits: List[TraitApplication] = ..., members: List[IntEnumMember] = ...) extends Shape

An integer enum shape containing a fixed set of integer values.

An integer enum shape containing a fixed set of integer values.

Value parameters

members

the enum members defining allowed integer values

name

the shape name

traits

the traits applied to this shape

Attributes

Source
Shape.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Shape
class Object
trait Matchable
class Any
Show all
final case class IntegerShape(name: String, traits: List[TraitApplication] = ...) extends Shape

An integer shape representing a 32-bit signed integer.

An integer shape representing a 32-bit signed integer.

Value parameters

name

the shape name

traits

the traits applied to this shape

Attributes

Source
Shape.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Shape
class Object
trait Matchable
class Any
Show all
final case class ListShape(name: String, traits: List[TraitApplication] = ..., member: MemberDefinition) extends Shape

A list shape representing an ordered homogeneous collection.

A list shape representing an ordered homogeneous collection.

Value parameters

member

the member definition specifying the element type

name

the shape name

traits

the traits applied to this shape

Attributes

Source
Shape.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Shape
class Object
trait Matchable
class Any
Show all
final case class LongShape(name: String, traits: List[TraitApplication] = ...) extends Shape

A long shape representing a 64-bit signed integer.

A long shape representing a 64-bit signed integer.

Value parameters

name

the shape name

traits

the traits applied to this shape

Attributes

Source
Shape.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Shape
class Object
trait Matchable
class Any
Show all
final case class MapShape(name: String, traits: List[TraitApplication] = ..., key: MemberDefinition, value: MemberDefinition) extends Shape

A map shape representing a collection of key-value pairs.

A map shape representing a collection of key-value pairs.

Value parameters

key

the member definition specifying the key type

name

the shape name

traits

the traits applied to this shape

value

the member definition specifying the value type

Attributes

Source
Shape.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Shape
class Object
trait Matchable
class Any
Show all
final case class MemberDefinition(name: String, target: ShapeId, traits: List[TraitApplication] = ...)

Defines a member within a shape (structure field, list element, map key/value, union variant).

Defines a member within a shape (structure field, list element, map key/value, union variant).

Value parameters

name

the member name

target

the ShapeId of the target type

traits

the traits applied to this member

Attributes

Source
Shape.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed trait NodeValue

Represents a JSON-like value that can appear in a Smithy node.

Represents a JSON-like value that can appear in a Smithy node.

NodeValue is a sealed trait that models all possible value types found in Smithy node structures: primitives (string, number, boolean, null) and collections (arrays and objects).

Attributes

Companion
object
Source
NodeValue.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Array
class Boolean
object Null
class Number
class Object
class String
Show all
object NodeValue

Attributes

Companion
trait
Source
NodeValue.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
NodeValue.type
final case class OperationShape(name: String, traits: List[TraitApplication] = ..., input: Option[ShapeId] = ..., output: Option[ShapeId] = ..., errors: List[ShapeId] = ...) extends Shape

An operation shape representing a single API operation.

An operation shape representing a single API operation.

Value parameters

errors

the ShapeIds of errors this operation can return

input

the optional ShapeId of the input structure

name

the shape name

output

the optional ShapeId of the output structure

traits

the traits applied to this shape

Attributes

Source
Shape.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Shape
class Object
trait Matchable
class Any
Show all
final case class ResourceShape(name: String, traits: List[TraitApplication] = ..., identifiers: Map[String, ShapeId] = ..., create: Option[ShapeId] = ..., read: Option[ShapeId] = ..., update: Option[ShapeId] = ..., delete: Option[ShapeId] = ..., list: Option[ShapeId] = ..., operations: List[ShapeId] = ..., collectionOperations: List[ShapeId] = ..., resources: List[ShapeId] = ...) extends Shape

A resource shape representing a RESTful resource with lifecycle operations.

A resource shape representing a RESTful resource with lifecycle operations.

Value parameters

collectionOperations

the ShapeIds of collection-level operations

create

the optional ShapeId of the create lifecycle operation

delete

the optional ShapeId of the delete lifecycle operation

identifiers

the resource identifiers mapping names to their target ShapeIds

list

the optional ShapeId of the list lifecycle operation

name

the shape name

operations

the ShapeIds of non-lifecycle operations bound to this resource

read

the optional ShapeId of the read lifecycle operation

resources

the ShapeIds of child resources

traits

the traits applied to this shape

update

the optional ShapeId of the update lifecycle operation

Attributes

Source
Shape.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Shape
class Object
trait Matchable
class Any
Show all
final case class ServiceShape(name: String, traits: List[TraitApplication] = ..., version: Option[String] = ..., operations: List[ShapeId] = ..., resources: List[ShapeId] = ..., errors: List[ShapeId] = ...) extends Shape

A service shape representing an API service entry point.

A service shape representing an API service entry point.

Value parameters

errors

the ShapeIds of common errors for the service

name

the shape name

operations

the ShapeIds of operations bound to this service

resources

the ShapeIds of resources bound to this service

traits

the traits applied to this shape

version

the optional version string for the service

Attributes

Source
Shape.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Shape
class Object
trait Matchable
class Any
Show all
sealed trait Shape

Represents a shape definition in a Smithy model.

Represents a shape definition in a Smithy model.

Every shape has a name and a list of traits applied to it. Subtypes represent the different shape categories defined by the Smithy specification: simple shapes, enum shapes, aggregate shapes, and service shapes.

Attributes

Source
Shape.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
final case class ShapeDefinition(name: String, shape: Shape)

Represents a named shape within a Smithy model.

Represents a named shape within a Smithy model.

A ShapeDefinition pairs a shape name with its Shape definition, allowing shapes to be organized and referenced within a model.

Value parameters

name

the shape name (e.g., "User", "Order")

shape

the Shape definition for this named shape

Attributes

Source
SmithyModel.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ShapeId

Attributes

Companion
class
Source
ShapeId.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
ShapeId.type
final case class ShapeId(namespace: String, name: String) extends ShapeRef

Represents an absolute reference to a Smithy shape.

Represents an absolute reference to a Smithy shape.

A ShapeId consists of a namespace and a name. It can optionally reference a specific member of a shape via the Member subtype.

Value parameters

name

the shape name (e.g., "MyShape")

namespace

the namespace part (e.g., "com.example")

Attributes

Companion
object
Source
ShapeId.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait ShapeRef
class Object
trait Matchable
class Any
Show all
sealed trait ShapeRef

Represents a reference to a Smithy shape (either absolute or member).

Represents a reference to a Smithy shape (either absolute or member).

This sealed trait provides a common type for both ShapeId and ShapeId.Member, enabling cross-Scala-version compatibility without using Scala 3 union types.

Attributes

Source
ShapeId.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Member
class ShapeId
final case class ShortShape(name: String, traits: List[TraitApplication] = ...) extends Shape

A short shape representing a 16-bit signed integer.

A short shape representing a 16-bit signed integer.

Value parameters

name

the shape name

traits

the traits applied to this shape

Attributes

Source
Shape.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Shape
class Object
trait Matchable
class Any
Show all
sealed trait SmithyError

Error type for Smithy parsing and processing.

Error type for Smithy parsing and processing.

Value parameters

column

column number where the error occurred (1-indexed)

line

line number where the error occurred (1-indexed)

message

descriptive error message

source

optional source content (e.g., the Smithy input that caused the error)

Attributes

Companion
object
Source
SmithyError.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class ParseError
object SmithyError

Attributes

Companion
trait
Source
SmithyError.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class SmithyModel(version: String, namespace: String, useStatements: List[ShapeId], metadata: Map[String, NodeValue], shapes: List[ShapeDefinition], applyStatements: List[ApplyStatement] = ...)

Represents a top-level Smithy model.

Represents a top-level Smithy model.

A SmithyModel contains all the shapes, metadata, and configuration for a Smithy API definition. It includes the model version, target namespace, use statements, metadata key-value pairs, a list of shape definitions, and apply statements that attach traits to shapes.

Value parameters

applyStatements

list of apply statements that attach traits to shapes

metadata

map of metadata key-value pairs for the model

namespace

the namespace for all shapes in this model (e.g., "com.example.api")

shapes

list of shape definitions in the model

useStatements

list of ShapeIds imported via use statements

version

the Smithy specification version (e.g., "2.0")

Attributes

Companion
object
Source
SmithyModel.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object SmithyModel

Attributes

Companion
class
Source
SmithyModel.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class StringShape(name: String, traits: List[TraitApplication] = ...) extends Shape

A string shape representing UTF-8 text.

A string shape representing UTF-8 text.

Value parameters

name

the shape name

traits

the traits applied to this shape

Attributes

Source
Shape.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Shape
class Object
trait Matchable
class Any
Show all
final case class StructureShape(name: String, traits: List[TraitApplication] = ..., members: List[MemberDefinition] = ...) extends Shape

A structure shape representing a fixed set of named, heterogeneous members.

A structure shape representing a fixed set of named, heterogeneous members.

Value parameters

members

the member definitions

name

the shape name

traits

the traits applied to this shape

Attributes

Source
Shape.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Shape
class Object
trait Matchable
class Any
Show all
final case class TimestampShape(name: String, traits: List[TraitApplication] = ...) extends Shape

A timestamp shape representing a point in time.

A timestamp shape representing a point in time.

Value parameters

name

the shape name

traits

the traits applied to this shape

Attributes

Source
Shape.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Shape
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Source
TraitApplication.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class TraitApplication(id: ShapeId, value: Option[NodeValue])

Represents a trait applied to a shape in Smithy.

Represents a trait applied to a shape in Smithy.

A TraitApplication is the pairing of a trait ID (which identifies the trait) with an optional value (which provides configuration for the trait).

Value parameters

id

the ShapeId of the trait (e.g., "smithy.api#required")

value

the optional NodeValue configuration for this trait

Attributes

Companion
object
Source
TraitApplication.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class UnionShape(name: String, traits: List[TraitApplication] = ..., members: List[MemberDefinition] = ...) extends Shape

A union shape representing a tagged union of named members.

A union shape representing a tagged union of named members.

Value parameters

members

the member definitions (exactly one is set at any time)

name

the shape name

traits

the traits applied to this shape

Attributes

Source
Shape.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Shape
class Object
trait Matchable
class Any
Show all