scala.smithy.rules.EndpointTest.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kinesis4cats-smithy4s-client_3 Show documentation
Show all versions of kinesis4cats-smithy4s-client_3 Show documentation
Cats tooling for the Smithy4s Kinesis Client
package smithy.rules
import smithy4s.Document
import smithy4s.Hints
import smithy4s.Schema
import smithy4s.ShapeId
import smithy4s.ShapeTag
import smithy4s.schema.Schema.document
import smithy4s.schema.Schema.string
import smithy4s.schema.Schema.struct
/** Describes an endpoint test case for validation of an endpoint rule-set.
* @param documentation
* Documentation describing the test case.
* @param params
* Defines rule-set parameters and values to use for testing rules-engine.
* @param operationInputs
* Defines a set of service operation configurations used for testing the rules-engine.
* @param expect
* The expected outcome of the test case.
*/
final case class EndpointTest(expect: EndpointTestExpectation, documentation: Option[String] = None, params: Option[Document] = None, operationInputs: Option[List[OperationInput]] = None)
object EndpointTest extends ShapeTag.Companion[EndpointTest] {
val id: ShapeId = ShapeId("smithy.rules", "EndpointTest")
val hints: Hints = Hints(
smithy.api.Documentation("Describes an endpoint test case for validation of an endpoint rule-set."),
smithy.api.Unstable(),
smithy.api.Private(),
)
implicit val schema: Schema[EndpointTest] = struct(
EndpointTestExpectation.schema.required[EndpointTest]("expect", _.expect).addHints(smithy.api.Documentation("The expected outcome of the test case.")),
string.optional[EndpointTest]("documentation", _.documentation).addHints(smithy.api.Documentation("Documentation describing the test case.")),
document.optional[EndpointTest]("params", _.params).addHints(smithy.api.Documentation("Defines rule-set parameters and values to use for testing rules-engine.")),
OperationInputs.underlyingSchema.optional[EndpointTest]("operationInputs", _.operationInputs).addHints(smithy.api.Documentation("Defines a set of service operation configurations used for testing the rules-engine.")),
){
EndpointTest.apply
}.withId(id).addHints(hints)
}