smithy4s
Members list
Type members
Classlikes
A bijection is an association of two opposite functions A => B and B => A.
A bijection is an association of two opposite functions A => B and B => A.
A bijection MUST abide by the round-tripping property, namely, for all input A :
bijection.from(bijection(input)) == input
Attributes
- Companion:
- object
- Graph
- Supertypes
- trait A => Bclass Objecttrait Matchableclass Any
- Self type
Attributes
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Graph
- Supertypes
- trait Producttrait Equalstrait NoStackTraceclass Throwabletrait Serializableclass Objecttrait Matchableclass Any
A json-like free-form structure serving as a model for the Document datatype in smithy.
A json-like free-form structure serving as a model for the Document datatype in smithy.
Attributes
- Companion:
- object
- Graph
- Supertypes
- Known subtypes
A representation of a smithy operation.
A representation of a smithy operation.
Attributes
- E:
the error ADT of the operation (Nothing if N/A)
- I:
the input type of the operation (Unit if N/A)
- O:
the output of the operation (Unit if N/A)
- Op:
the GADT of all operations in a service
- SI:
the Streamed input of the operaton (Nothing if N/A)
- SO:
the Streamed output of the operaton (Nothing if N/A) This type carries references to the Schemas of the various types involved, allowing to compile corresponding codecs. Optionally, an endpoint can have an
Errorable
which allows for matching throwables against the errors the operation knows about (which form an ADT in the Scala representation) NB : SI an SO respectively are derived from the @streaming trait in smithy. If this trait is present in one on one of the members of Input/Output, the member is removed from the Scala representation, in order to avoid polluting datatypes that typically fit in memory with concerns of streaming (which can be encoded a great many ways, using a greatt many libraries)- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
Attributes
- Companion:
- object
- Graph
- Supertypes
- Known subtypes
- object Error.typeobject HttpApiKeyLocations.typeobject StructurallyExclusive.typeobject TimestampFormat.typeobject TraitChangeSeverity.typeobject TraitChangeType.typeobject AcceptorState.typeobject PathComparator.type
Attributes
- Companion:
- trait
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- Enumeration.type
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Known subtypes
- class Newtype[A]object Discriminated.typeobject UncheckedExamples.typeobject Auth.typeobject AuthTraitReference.typeobject Default.typeobject Documentation.typeobject Enum.typeobject EnumConstantBodyName.typeobject EnumValue.typeobject Examples.typeobject ExternalDocumentation.typeobject HttpError.typeobject HttpHeader.typeobject HttpPrefixHeaders.typeobject HttpQuery.typeobject JsonName.typeobject LocalMixinTrait.typeobject LocalMixinTraitList.typeobject MediaType.typeobject NonEmptyString.typeobject NonEmptyStringList.typeobject NonEmptyStringMap.typeobject Pattern.typeobject PrimitiveShort.typeobject References.typeobject ResourceIdentifier.typeobject Since.typeobject Suppress.typeobject Tags.typeobject Title.typeobject TraitDiffRules.typeobject TraitShapeId.typeobject TraitShapeIdList.typeobject XmlName.typeobject Acceptors.typeobject NonEmptyString.typeobject NonEmptyStringList.typeobject Waitable.typeobject WaiterDelay.typeobject WaiterName.typeobject HttpMediaType.typetrait Provider[Alg]trait Service[Alg]trait Reflective[Op]class ShapeIdtrait ShapeTag[A]trait Companion[A]object SimpleRestJson.typeobject UncheckedExample.typeobject Untagged.typeobject UuidFormat.typeobject AddedDefault.typeobject AuthDefinition.typeobject Box.typeobject ClientOptional.typeobject Cors.typeobject Deprecated.typeobject Endpoint.typeobject EnumDefinition.typeobject Error.typeobject EventHeader.typeobject EventPayload.typeobject Example.typeobject ExampleError.typeobject HostLabel.typeobject Http.typeobject HttpApiKeyAuth.typeobject HttpApiKeyLocations.typeobject HttpBasicAuth.typeobject HttpBearerAuth.typeobject HttpChecksumRequired.typeobject HttpDigestAuth.typeobject HttpLabel.typeobject HttpPayload.typeobject HttpQueryParams.typeobject HttpResponseCode.typeobject IdRef.typeobject IdempotencyToken.typeobject Idempotent.typeobject Input.typeobject Internal.typeobject Length.typeobject Mixin.typeobject NestedProperties.typeobject NoReplace.typeobject NotProperty.typeobject OptionalAuth.typeobject Output.typeobject Paginated.typeobject Private.typeobject Property.typeobject ProtocolDefinition.typeobject Range.typeobject Readonly.typeobject Recommended.typeobject Reference.typeobject Required.typeobject RequiresLength.typeobject Retryable.typeobject Sensitive.typeobject Sparse.typeobject Streaming.typeobject StructurallyExclusive.typeobject TimestampFormat.typeobject Trait.typeobject TraitChangeSeverity.typeobject TraitChangeType.typeobject TraitDiffRule.typeobject UniqueItems.typeobject Unit.typeobject UnitType.typeobject Unstable.typeobject XmlAttribute.typeobject XmlFlattened.typeobject XmlNamespace.typeobject Acceptor.typeobject AcceptorState.typeobject Matcher.typeobject PathComparator.typeobject PathMatcher.typeobject Waiter.typetrait Enumeration[E]object IntEnum.typeobject HttpBinding.typeobject DiscriminatedUnionMember.typeobject InputOutput.type
Attributes
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
A hint is an arbitrary piece of data that can be added to a schema, at the struct level, or at the field/member level.
A hint is an arbitrary piece of data that can be added to a schema, at the struct level, or at the field/member level.
You can think of it as an annotation that can communicate additional information to encoders/decoders (for instance, a change in a label, a regex pattern some string should abide by, a range, etc)
This Hints
interface is a container for hints.
Attributes
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Companion:
- object
- Graph
- Supertypes
- Known subtypes
- object Discriminated.typeobject UncheckedExamples.typeobject Auth.typeobject AuthTraitReference.typeobject Default.typeobject Documentation.typeobject Enum.typeobject EnumConstantBodyName.typeobject EnumValue.typeobject Examples.typeobject ExternalDocumentation.typeobject HttpError.typeobject HttpHeader.typeobject HttpPrefixHeaders.typeobject HttpQuery.typeobject JsonName.typeobject LocalMixinTrait.typeobject LocalMixinTraitList.typeobject MediaType.typeobject NonEmptyString.typeobject NonEmptyStringList.typeobject NonEmptyStringMap.typeobject Pattern.typeobject PrimitiveShort.typeobject References.typeobject ResourceIdentifier.typeobject Since.typeobject Suppress.typeobject Tags.typeobject Title.typeobject TraitDiffRules.typeobject TraitShapeId.typeobject TraitShapeIdList.typeobject XmlName.typeobject Acceptors.typeobject NonEmptyString.typeobject NonEmptyStringList.typeobject Waitable.typeobject WaiterDelay.typeobject WaiterName.typeobject HttpMediaType.type
- Self type
- Newtype[A]
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- NumericCompat.type
Attributes
- Companion:
- class
- Graph
- Supertypes
- trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
- PayloadPath.type
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
A type-refinement, associated to a runtime-representation of a constraint.
A type-refinement, associated to a runtime-representation of a constraint.
Represents the fact that you can go from A to B provided the value of tye A abides by a given Constraint.
Attributes
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
Attributes
- Companion:
- trait
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- Refinement.type
Given a constraint of type C, an RefinementProvider can produce a Refinement that allows to go from A to B.
Given a constraint of type C, an RefinementProvider can produce a Refinement that allows to go from A to B.
A RefinementProvider can be used as a typeclass.
Attributes
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
Attributes
- Companion:
- trait
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- RefinementProvider.type
Generic representation of a service, as a list of "endpoints" (mapping to smithy operations).
Generic representation of a service, as a list of "endpoints" (mapping to smithy operations).
This abstraction lets us retrieve all information necessary to the generic implementation of protocols, as well as transform implementations of finally-encoded interfaces into interpreters (polymorphic functions) that operate on initially-encoded GADTs.
Attributes
- Alg
: a finally-encoded interface (commonly called algebra) that works against an abstract "effect" that takes 5 type parameters: Input, Error, Output, StreamedInput, StreamedOutput
- Op
: an initially encoded version of the finally-encoded interface. Typically, a GADT that acts as a reification of the operations. Passing the reified versions around makes it drastically easier to implement logic generically, without involving metaprogramming.
- Companion:
- object
- Graph
- Supertypes
- Known subtypes
- trait Reflective[Op]
A tag that can be used as keys for higher-kinded maps
A tag that can be used as keys for higher-kinded maps
Attributes
- Companion:
- object
- Graph
- Supertypes
- Known subtypes
- trait Companion[A]object SimpleRestJson.typeobject UncheckedExample.typeobject Untagged.typeobject UuidFormat.typeobject AddedDefault.typeobject AuthDefinition.typeobject Box.typeobject ClientOptional.typeobject Cors.typeobject Deprecated.typeobject Endpoint.typeobject EnumDefinition.typeobject Error.typeobject EventHeader.typeobject EventPayload.typeobject Example.typeobject ExampleError.typeobject HostLabel.typeobject Http.typeobject HttpApiKeyAuth.typeobject HttpApiKeyLocations.typeobject HttpBasicAuth.typeobject HttpBearerAuth.typeobject HttpChecksumRequired.typeobject HttpDigestAuth.typeobject HttpLabel.typeobject HttpPayload.typeobject HttpQueryParams.typeobject HttpResponseCode.typeobject IdRef.typeobject IdempotencyToken.typeobject Idempotent.typeobject Input.typeobject Internal.typeobject Length.typeobject Mixin.typeobject NestedProperties.typeobject NoReplace.typeobject NotProperty.typeobject OptionalAuth.typeobject Output.typeobject Paginated.typeobject Private.typeobject Property.typeobject ProtocolDefinition.typeobject Range.typeobject Readonly.typeobject Recommended.typeobject Reference.typeobject Required.typeobject RequiresLength.typeobject Retryable.typeobject Sensitive.typeobject Sparse.typeobject Streaming.typeobject StructurallyExclusive.typeobject TimestampFormat.typeobject Trait.typeobject TraitChangeSeverity.typeobject TraitChangeType.typeobject TraitDiffRule.typeobject UniqueItems.typeobject Unit.typeobject UnitType.typeobject Unstable.typeobject XmlAttribute.typeobject XmlFlattened.typeobject XmlNamespace.typeobject Acceptor.typeobject AcceptorState.typeobject Matcher.typeobject PathComparator.typeobject PathMatcher.typeobject Waiter.typetrait Enumeration[E]object IntEnum.typeobject HttpBinding.typeobject DiscriminatedUnionMember.typeobject InputOutput.type
Attributes
- Companion:
- trait
- Graph
- Supertypes
- trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
- StreamingSchema.type
A surjection of a partial function A => Either[String, B] and a total function B => A.
A surjection of a partial function A => Either[String, B] and a total function B => A.
A surjection MUST abide by the round-tripping property, namely, for all input A that passes the validation function
surjection(input).map(surjection.from) == Right(input)
Attributes
- Companion:
- object
- Graph
- Supertypes
- Self type
Attributes
- Companion:
- trait
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- Surjection.type
Heterogenous function construct, allows to abstract over various kinds of functions whilst providing an homogenous user experience without the user having to manually lift functions from one kind to the other.
Heterogenous function construct, allows to abstract over various kinds of functions whilst providing an homogenous user experience without the user having to manually lift functions from one kind to the other.
// assuming Foo is a code-generated interface
val fooOption : Foo[Option] = ???
val toList = new smithy4s.PolyFunction[Option, List]{def apply[A](fa: Option[A]): List[A] = fa.toList}
val fooList : Foo[List] = foo.transform(toList)
It is possible to plug arbitrary transformations to mechanism, such as cats.arrow.FunctionK
Attributes
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Companion:
- trait
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- Transformation.type