From 5cc160c7fceac14d7d8622b585c73674150ed032 Mon Sep 17 00:00:00 2001 From: David Piggott Date: Tue, 25 Jul 2023 17:29:36 +0100 Subject: [PATCH 01/25] Wire up EC2 Query codec based on Query codec, plus compliance tests --- build.sbt | 16 +-- .../src/smithy4s/aws/AwsClient.scala | 4 + .../aws/internals/AwsEc2QueryCodecs.scala | 131 ++++++++++++++++++ .../compliancetests/AwsComplianceSuite.scala | 4 +- .../src/smithy4s/aws/AwsProtocol.scala | 12 +- 5 files changed, 154 insertions(+), 13 deletions(-) create mode 100644 modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala diff --git a/build.sbt b/build.sbt index 503c111c3..ec72af223 100644 --- a/build.sbt +++ b/build.sbt @@ -259,11 +259,10 @@ lazy val `aws-kernel` = projectMatrix genSmithy(Compile), Test / envVars ++= Map("TEST_VAR" -> "hello"), scalacOptions ++= Seq( - "-Wconf:msg=class AwsQuery in package (aws\\.)?protocols is deprecated:silent", - "-Wconf:msg=class RestXml in package aws.protocols is deprecated:silent", - "-Wconf:msg=value noErrorWrapping in class RestXml is deprecated:silent", - "-Wconf:msg=class Ec2Query in package aws.protocols is deprecated:silent", - "-Wconf:msg=class RestXml in package protocols is deprecated:silent" + "-Wconf:msg=class AwsQuery in package protocols is deprecated:silent", + "-Wconf:msg=class Ec2Query in package protocols is deprecated:silent", + "-Wconf:msg=class RestXml in package protocols is deprecated:silent", + "-Wconf:msg=value noErrorWrapping in class RestXml is deprecated:silent" ) ) .jvmPlatform(allJvmScalaVersions, jvmDimSettings) @@ -309,11 +308,10 @@ lazy val `aws-http4s` = projectMatrix ) }, scalacOptions ++= Seq( - "-Wconf:msg=class AwsQuery in package (aws\\.)?protocols is deprecated:silent", + "-Wconf:msg=class AwsQuery in package protocols is deprecated:silent", + "-Wconf:msg=class Ec2Query in package protocols is deprecated:silent", "-Wconf:msg=class RestXml in package protocols is deprecated:silent", - "-Wconf:msg=class RestXml in package aws.protocols is deprecated:silent", - "-Wconf:msg=value noErrorWrapping in class RestXml is deprecated:silent", - "-Wconf:msg=class Ec2Query in package aws.protocols is deprecated:silent" + "-Wconf:msg=value noErrorWrapping in class RestXml is deprecated:silent" ), Test / complianceTestDependencies := Seq( Dependencies.Alloy.`protocol-tests` diff --git a/modules/aws-http4s/src/smithy4s/aws/AwsClient.scala b/modules/aws-http4s/src/smithy4s/aws/AwsClient.scala index 2fef68d1b..fbb2a6660 100644 --- a/modules/aws-http4s/src/smithy4s/aws/AwsClient.scala +++ b/modules/aws-http4s/src/smithy4s/aws/AwsClient.scala @@ -23,6 +23,7 @@ import fs2.compression.Compression import smithy4s.http4s.kernel._ import smithy4s.aws.internals._ import _root_.aws.api.{Service => AwsService} +import smithy4s.aws.internals.AwsQueryCodecs object AwsClient { @@ -60,6 +61,9 @@ object AwsClient { awsEnv: AwsEnvironment[F] ): service.FunctorInterpreter[F] = { val clientCodecs: UnaryClientCodecs.Make[F] = awsProtocol match { + case AwsProtocol.AWS_EC2_QUERY(_) => + AwsEcsQueryCodecs.make[F](version = service.version) + case AwsProtocol.AWS_JSON_1_0(_) => AwsJsonCodecs.make[F]("application/x-amz-json-1.0") diff --git a/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala b/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala new file mode 100644 index 000000000..4a9f7032e --- /dev/null +++ b/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala @@ -0,0 +1,131 @@ +/* + * Copyright 2021-2022 Disney Streaming + * + * Licensed under the Tomorrow Open Source Technology License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://disneystreaming.github.io/TOST-1.0.txt + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package smithy4s +package aws +package internals + +import cats.effect.Concurrent +import cats.syntax.all._ +import fs2.compression.Compression +import smithy4s.Endpoint +import smithy4s.schema.CachedSchemaCompiler +import smithy4s.http._ +import smithy4s.http4s.kernel._ +import smithy4s.http.Metadata +import smithy4s.kinds.PolyFunction +import smithy4s.codecs.PayloadPath +import org.http4s.EntityEncoder +import _root_.aws.protocols.AwsQueryError + +private[aws] object AwsEcsQueryCodecs { + + def make[F[_]: Concurrent: Compression]( + version: String + ): UnaryClientCodecs.Make[F] = + new UnaryClientCodecs.Make[F] { + def apply[I, E, O, SI, SO]( + endpoint: Endpoint.Base[I, E, O, SI, SO] + ): UnaryClientCodecs[F, I, E, O] = { + val transformEncoders = + applyCompression[F](endpoint.hints, retainUserEncoding = false) + val requestEncoderCompilersWithCompression = transformEncoders( + requestEncoderCompilers[F]( + action = endpoint.id.name, + version = version + ) + ) + + val (xmlResponseDecoderCompilers, errorDecoderCompilers) = + AwsXmlCodecs.responseAndErrorDecoderCompilers[F] + val responseTag = endpoint.name + "Response" + val resultTag = endpoint.name + "Result" + val responseDecoderCompilers = + xmlResponseDecoderCompilers.contramapSchema( + smithy4s.schema.Schema.transformHintsLocallyK( + _ ++ smithy4s.Hints( + smithy4s.xml.internals.XmlStartingPath( + List(responseTag, resultTag) + ) + ) + ) + ) + // Takes the `@awsQueryError` trait into consideration to decide how to + // discriminate error responses. + val errorNameMapping: (String => String) = endpoint.errorable match { + case None => + identity[String] + + case Some(err) => + val mapping = err.error.alternatives.flatMap { alt => + val shapeName = alt.schema.shapeId.name + alt.hints.get(AwsQueryError).map(_.code).map(_ -> shapeName) + }.toMap + (errorCode: String) => mapping.getOrElse(errorCode, errorCode) + } + val errorDiscriminator = AwsErrorTypeDecoder + .fromResponse(errorDecoderCompilers) + .andThen(_.map(_.map { + case HttpDiscriminator.NameOnly(name) => + HttpDiscriminator.NameOnly(errorNameMapping(name)) + case other => other + })) + + val make = UnaryClientCodecs.Make[F]( + input = requestEncoderCompilersWithCompression, + output = responseDecoderCompilers, + error = errorDecoderCompilers, + errorDiscriminator = errorDiscriminator + ) + make.apply(endpoint) + } + } + + private def requestEncoderCompilers[F[_]: Concurrent]( + action: String, + version: String + ): CachedSchemaCompiler[RequestEncoder[F, *]] = { + val urlFormEntityEncoderCompilers = UrlForm.Encoder.mapK( + new PolyFunction[UrlForm.Encoder, EntityEncoder[F, *]] { + def apply[A](fa: UrlForm.Encoder[A]): EntityEncoder[F, A] = + urlFormEntityEncoder[F].contramap((a: A) => + UrlForm( + formData = UrlForm.FormData.MultipleValues( + values = Vector( + UrlForm.FormData.PathedValue(PayloadPath("Action"), action), + UrlForm.FormData.PathedValue(PayloadPath("Version"), version) + ) ++ fa.encode(a).formData.values + ) + ) + ) + } + ) + RequestEncoder.restSchemaCompiler[F]( + metadataEncoderCompiler = Metadata.AwsEncoder, + entityEncoderCompiler = urlFormEntityEncoderCompilers, + writeEmptyStructs = true + ) + } + + private def urlFormEntityEncoder[F[_]]: EntityEncoder[F, UrlForm] = + EntityEncoders.fromHttpMediaWriter( + HttpMediaTyped( + HttpMediaType("application/x-www-form-urlencoded"), + (_: Any, urlForm: UrlForm) => Blob(urlForm.render) + ) + ) + +} diff --git a/modules/aws-http4s/test/src/smithy4s/aws/compliancetests/AwsComplianceSuite.scala b/modules/aws-http4s/test/src/smithy4s/aws/compliancetests/AwsComplianceSuite.scala index de52b3145..ca1e25e95 100644 --- a/modules/aws-http4s/test/src/smithy4s/aws/compliancetests/AwsComplianceSuite.scala +++ b/modules/aws-http4s/test/src/smithy4s/aws/compliancetests/AwsComplianceSuite.scala @@ -57,12 +57,14 @@ object AwsComplianceSuite extends ProtocolComplianceSuite { } override def allTests(dsi: DynamicSchemaIndex): List[ComplianceTest[IO]] = - genClientTests(impl(AwsJson1_0), awsJson1_0)(dsi) ++ + genClientTests(impl(Ec2Query), awsEc2Query)(dsi) ++ + genClientTests(impl(AwsJson1_0), awsJson1_0)(dsi) ++ genClientTests(impl(AwsJson1_1), awsJson1_1)(dsi) ++ genClientTests(impl(AwsQuery), awsQuery)(dsi) ++ genClientTests(impl(RestJson1), restJson1)(dsi) ++ genClientTests(impl(RestXml), restXml)(dsi) + private val awsEc2Query = ShapeId("aws.protocoltests.ec2", "AwsEc2") private val awsJson1_0 = ShapeId("aws.protocoltests.json10", "JsonRpc10") private val awsJson1_1 = ShapeId("aws.protocoltests.json", "JsonProtocol") private val awsQuery = ShapeId("aws.protocoltests.query", "AwsQuery") diff --git a/modules/aws-kernel/src/smithy4s/aws/AwsProtocol.scala b/modules/aws-kernel/src/smithy4s/aws/AwsProtocol.scala index 333be3959..41179d989 100644 --- a/modules/aws-kernel/src/smithy4s/aws/AwsProtocol.scala +++ b/modules/aws-kernel/src/smithy4s/aws/AwsProtocol.scala @@ -16,7 +16,7 @@ package smithy4s.aws -import aws.protocols.{AwsJson1_0, AwsJson1_1, AwsQuery, RestJson1, RestXml} +import aws.protocols._ import smithy4s.Hints import smithy4s.ShapeTag @@ -28,8 +28,13 @@ private[aws] object AwsProtocol { def apply(hints: Hints): Option[AwsProtocol] = hints - .get(AwsJson1_0) - .map(AWS_JSON_1_0.apply) + .get(Ec2Query) + .map(AWS_EC2_QUERY.apply) + .orElse( + hints + .get(AwsJson1_0) + .map(AWS_JSON_1_0.apply) + ) .orElse( hints .get(AwsJson1_1) @@ -52,6 +57,7 @@ private[aws] object AwsProtocol { ) // See https://awslabs.github.io/smithy/1.0/spec/aws/aws-json-1_0-protocol.html#differences-between-awsjson1-0-and-awsjson1-1 + final case class AWS_EC2_QUERY(value: Ec2Query) extends AwsProtocol final case class AWS_JSON_1_0(value: AwsJson1_0) extends AwsProtocol final case class AWS_JSON_1_1(value: AwsJson1_1) extends AwsProtocol final case class AWS_QUERY(value: AwsQuery) extends AwsProtocol From 21b2f2fa6faed903afd8db63eb9254281b047a70 Mon Sep 17 00:00:00 2001 From: David Piggott Date: Tue, 25 Jul 2023 17:50:36 +0100 Subject: [PATCH 02/25] Fix output reading compliance Verified with ~aws-http4s/testOnly smithy4s.aws.AwsComplianceSuite -- -o *Response* --- .../aws/internals/AwsEc2QueryCodecs.scala | 21 ++++++++++--- .../aws/internals/AwsQueryCodecs.scala | 19 +++++++++--- .../smithy4s/aws/internals/AwsXmlCodecs.scala | 31 ++++++++----------- .../compliancetests/AwsComplianceSuite.scala | 23 +++++++------- 4 files changed, 56 insertions(+), 38 deletions(-) diff --git a/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala b/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala index 4a9f7032e..671b6fefe 100644 --- a/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala +++ b/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala @@ -49,20 +49,31 @@ private[aws] object AwsEcsQueryCodecs { ) ) - val (xmlResponseDecoderCompilers, errorDecoderCompilers) = - AwsXmlCodecs.responseAndErrorDecoderCompilers[F] val responseTag = endpoint.name + "Response" - val resultTag = endpoint.name + "Result" val responseDecoderCompilers = - xmlResponseDecoderCompilers.contramapSchema( + AwsXmlCodecs + .responseDecoderCompilers[F] + .contramapSchema( + smithy4s.schema.Schema.transformHintsLocallyK( + _ ++ smithy4s.Hints( + smithy4s.xml.internals.XmlStartingPath( + List(responseTag) + ) + ) + ) + ) + val errorDecoderCompilers = AwsXmlCodecs + .responseDecoderCompilers[F] + .contramapSchema( smithy4s.schema.Schema.transformHintsLocallyK( _ ++ smithy4s.Hints( smithy4s.xml.internals.XmlStartingPath( - List(responseTag, resultTag) + List("Response", "Errors", "Error") ) ) ) ) + // Takes the `@awsQueryError` trait into consideration to decide how to // discriminate error responses. val errorNameMapping: (String => String) = endpoint.errorable match { diff --git a/modules/aws-http4s/src/smithy4s/aws/internals/AwsQueryCodecs.scala b/modules/aws-http4s/src/smithy4s/aws/internals/AwsQueryCodecs.scala index 111b50508..8e59cd139 100644 --- a/modules/aws-http4s/src/smithy4s/aws/internals/AwsQueryCodecs.scala +++ b/modules/aws-http4s/src/smithy4s/aws/internals/AwsQueryCodecs.scala @@ -49,16 +49,27 @@ private[aws] object AwsQueryCodecs { ) ) - val (xmlResponseDecoderCompilers, errorDecoderCompilers) = - AwsXmlCodecs.responseAndErrorDecoderCompilers[F] val responseTag = endpoint.name + "Response" val resultTag = endpoint.name + "Result" val responseDecoderCompilers = - xmlResponseDecoderCompilers.contramapSchema( + AwsXmlCodecs + .responseDecoderCompilers[F] + .contramapSchema( + smithy4s.schema.Schema.transformHintsLocallyK( + _ ++ smithy4s.Hints( + smithy4s.xml.internals.XmlStartingPath( + List(responseTag, resultTag) + ) + ) + ) + ) + val errorDecoderCompilers = AwsXmlCodecs + .responseDecoderCompilers[F] + .contramapSchema( smithy4s.schema.Schema.transformHintsLocallyK( _ ++ smithy4s.Hints( smithy4s.xml.internals.XmlStartingPath( - List(responseTag, resultTag) + List("ErrorResponse", "Error") ) ) ) diff --git a/modules/aws-http4s/src/smithy4s/aws/internals/AwsXmlCodecs.scala b/modules/aws-http4s/src/smithy4s/aws/internals/AwsXmlCodecs.scala index ab15e5413..73c23d424 100644 --- a/modules/aws-http4s/src/smithy4s/aws/internals/AwsXmlCodecs.scala +++ b/modules/aws-http4s/src/smithy4s/aws/internals/AwsXmlCodecs.scala @@ -50,14 +50,21 @@ private[aws] object AwsXmlCodecs { requestEncoderCompilers[F] ) - val (responseDecoderCompilers, errorDecoderCompilers) = - responseAndErrorDecoderCompilers[F] + val errorDecoderCompilers = responseDecoderCompilers[F].contramapSchema( + smithy4s.schema.Schema.transformHintsLocallyK( + _ ++ smithy4s.Hints( + smithy4s.xml.internals.XmlStartingPath( + List("ErrorResponse", "Error") + ) + ) + ) + ) val errorDiscriminator = AwsErrorTypeDecoder.fromResponse(errorDecoderCompilers) val make = UnaryClientCodecs.Make[F]( input = requestEncoderCompilersWithCompression, - output = responseDecoderCompilers, + output = responseDecoderCompilers[F], error = errorDecoderCompilers, errorDiscriminator = errorDiscriminator ) @@ -89,10 +96,8 @@ private[aws] object AwsXmlCodecs { ) } - def responseAndErrorDecoderCompilers[F[_]: Concurrent]: ( - CachedSchemaCompiler[ResponseDecoder[F, *]], - CachedSchemaCompiler[ResponseDecoder[F, *]] - ) = { + def responseDecoderCompilers[F[_]: Concurrent] + : CachedSchemaCompiler[ResponseDecoder[F, *]] = { val stringAndBlobsEntityDecoderCompilers = smithy4s.http.StringAndBlobCodecs.ReaderCompiler.mapK( Covariant.liftPolyFunction[Option]( @@ -115,20 +120,10 @@ private[aws] object AwsXmlCodecs { stringAndBlobsEntityDecoderCompilers, xmlEntityDecoderCompilers ) - val responseDecoderCompilers = ResponseDecoder.restSchemaCompiler( + ResponseDecoder.restSchemaCompiler( metadataDecoderCompiler = Metadata.AwsDecoder, entityDecoderCompiler = entityDecoderCompilers ) - val errorDecoderCompilers = responseDecoderCompilers.contramapSchema( - smithy4s.schema.Schema.transformHintsLocallyK( - _ ++ smithy4s.Hints( - smithy4s.xml.internals.XmlStartingPath( - List("ErrorResponse", "Error") - ) - ) - ) - ) - (responseDecoderCompilers, errorDecoderCompilers) } private def xmlEntityEncoder[F[_]: Applicative] diff --git a/modules/aws-http4s/test/src/smithy4s/aws/compliancetests/AwsComplianceSuite.scala b/modules/aws-http4s/test/src/smithy4s/aws/compliancetests/AwsComplianceSuite.scala index ca1e25e95..10138663e 100644 --- a/modules/aws-http4s/test/src/smithy4s/aws/compliancetests/AwsComplianceSuite.scala +++ b/modules/aws-http4s/test/src/smithy4s/aws/compliancetests/AwsComplianceSuite.scala @@ -57,19 +57,20 @@ object AwsComplianceSuite extends ProtocolComplianceSuite { } override def allTests(dsi: DynamicSchemaIndex): List[ComplianceTest[IO]] = - genClientTests(impl(Ec2Query), awsEc2Query)(dsi) ++ - genClientTests(impl(AwsJson1_0), awsJson1_0)(dsi) ++ - genClientTests(impl(AwsJson1_1), awsJson1_1)(dsi) ++ - genClientTests(impl(AwsQuery), awsQuery)(dsi) ++ - genClientTests(impl(RestJson1), restJson1)(dsi) ++ - genClientTests(impl(RestXml), restXml)(dsi) + genClientTests(impl(Ec2Query), awsEc2Query)(dsi) + // ++ + // genClientTests(impl(AwsJson1_0), awsJson1_0)(dsi) ++ + // genClientTests(impl(AwsJson1_1), awsJson1_1)(dsi) ++ + // genClientTests(impl(AwsQuery), awsQuery)(dsi) ++ + // genClientTests(impl(RestJson1), restJson1)(dsi) ++ + // genClientTests(impl(RestXml), restXml)(dsi) private val awsEc2Query = ShapeId("aws.protocoltests.ec2", "AwsEc2") - private val awsJson1_0 = ShapeId("aws.protocoltests.json10", "JsonRpc10") - private val awsJson1_1 = ShapeId("aws.protocoltests.json", "JsonProtocol") - private val awsQuery = ShapeId("aws.protocoltests.query", "AwsQuery") - private val restJson1 = ShapeId("aws.protocoltests.restjson", "RestJson") - private val restXml = ShapeId("aws.protocoltests.restxml", "RestXml") + // private val awsJson1_0 = ShapeId("aws.protocoltests.json10", "JsonRpc10") + // private val awsJson1_1 = ShapeId("aws.protocoltests.json", "JsonProtocol") + // private val awsQuery = ShapeId("aws.protocoltests.query", "AwsQuery") + // private val restJson1 = ShapeId("aws.protocoltests.restjson", "RestJson") + // private val restXml = ShapeId("aws.protocoltests.restxml", "RestXml") private val modelDump = fileFromEnv("MODEL_DUMP") From e1d734a1a352503060fc177da197204796eace77 Mon Sep 17 00:00:00 2001 From: David Piggott Date: Tue, 25 Jul 2023 17:58:10 +0100 Subject: [PATCH 03/25] Ignore XmlFlattened --- .../aws/internals/AwsEc2QueryCodecs.scala | 33 +++++++++++-------- .../aws/internals/AwsQueryCodecs.scala | 29 ++++++++-------- modules/core/src/smithy4s/http/UrlForm.scala | 28 ++++++++++------ .../UrlFormDataEncoderSchemaVisitor.scala | 5 +-- 4 files changed, 57 insertions(+), 38 deletions(-) diff --git a/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala b/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala index 671b6fefe..6f1b623dc 100644 --- a/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala +++ b/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala @@ -109,21 +109,28 @@ private[aws] object AwsEcsQueryCodecs { action: String, version: String ): CachedSchemaCompiler[RequestEncoder[F, *]] = { - val urlFormEntityEncoderCompilers = UrlForm.Encoder.mapK( - new PolyFunction[UrlForm.Encoder, EntityEncoder[F, *]] { - def apply[A](fa: UrlForm.Encoder[A]): EntityEncoder[F, A] = - urlFormEntityEncoder[F].contramap((a: A) => - UrlForm( - formData = UrlForm.FormData.MultipleValues( - values = Vector( - UrlForm.FormData.PathedValue(PayloadPath("Action"), action), - UrlForm.FormData.PathedValue(PayloadPath("Version"), version) - ) ++ fa.encode(a).formData.values + val urlFormEntityEncoderCompilers = UrlForm + .Encoder( + // Per + // https://github.com/smithy-lang/smithy/blob/0d7a26d4880cdb7b3c21ba414c2642d93245b19e/smithy-aws-protocol-tests/model/ec2Query/main.smithy#L5. + ignoreXmlFlattened = true + ) + .mapK( + new PolyFunction[UrlForm.Encoder, EntityEncoder[F, *]] { + def apply[A](fa: UrlForm.Encoder[A]): EntityEncoder[F, A] = + urlFormEntityEncoder[F].contramap((a: A) => + UrlForm( + formData = UrlForm.FormData.MultipleValues( + values = Vector( + UrlForm.FormData.PathedValue(PayloadPath("Action"), action), + UrlForm.FormData + .PathedValue(PayloadPath("Version"), version) + ) ++ fa.encode(a).formData.values + ) ) ) - ) - } - ) + } + ) RequestEncoder.restSchemaCompiler[F]( metadataEncoderCompiler = Metadata.AwsEncoder, entityEncoderCompiler = urlFormEntityEncoderCompilers, diff --git a/modules/aws-http4s/src/smithy4s/aws/internals/AwsQueryCodecs.scala b/modules/aws-http4s/src/smithy4s/aws/internals/AwsQueryCodecs.scala index 8e59cd139..71f26f243 100644 --- a/modules/aws-http4s/src/smithy4s/aws/internals/AwsQueryCodecs.scala +++ b/modules/aws-http4s/src/smithy4s/aws/internals/AwsQueryCodecs.scala @@ -109,21 +109,24 @@ private[aws] object AwsQueryCodecs { action: String, version: String ): CachedSchemaCompiler[RequestEncoder[F, *]] = { - val urlFormEntityEncoderCompilers = UrlForm.Encoder.mapK( - new PolyFunction[UrlForm.Encoder, EntityEncoder[F, *]] { - def apply[A](fa: UrlForm.Encoder[A]): EntityEncoder[F, A] = - urlFormEntityEncoder[F].contramap((a: A) => - UrlForm( - formData = UrlForm.FormData.MultipleValues( - values = Vector( - UrlForm.FormData.PathedValue(PayloadPath("Action"), action), - UrlForm.FormData.PathedValue(PayloadPath("Version"), version) - ) ++ fa.encode(a).formData.values + val urlFormEntityEncoderCompilers = UrlForm + .Encoder() + .mapK( + new PolyFunction[UrlForm.Encoder, EntityEncoder[F, *]] { + def apply[A](fa: UrlForm.Encoder[A]): EntityEncoder[F, A] = + urlFormEntityEncoder[F].contramap((a: A) => + UrlForm( + formData = UrlForm.FormData.MultipleValues( + values = Vector( + UrlForm.FormData.PathedValue(PayloadPath("Action"), action), + UrlForm.FormData + .PathedValue(PayloadPath("Version"), version) + ) ++ fa.encode(a).formData.values + ) ) ) - ) - } - ) + } + ) RequestEncoder.restSchemaCompiler[F]( metadataEncoderCompiler = Metadata.AwsEncoder, entityEncoderCompiler = urlFormEntityEncoderCompilers, diff --git a/modules/core/src/smithy4s/http/UrlForm.scala b/modules/core/src/smithy4s/http/UrlForm.scala index 7a9e17fba..46ce44651 100644 --- a/modules/core/src/smithy4s/http/UrlForm.scala +++ b/modules/core/src/smithy4s/http/UrlForm.scala @@ -134,17 +134,25 @@ private[smithy4s] object UrlForm { trait Encoder[A] { def encode(a: A): UrlForm } - object Encoder extends CachedSchemaCompiler.Impl[Encoder] { - protected override type Aux[A] = UrlFormDataEncoder[A] - def fromSchema[A](schema: Schema[A], cache: Cache): Encoder[A] = { - val schemaVisitor = new UrlFormDataEncoderSchemaVisitor(cache) - val urlFormDataEncoder = schemaVisitor(schema) - (value: A) => - UrlForm( - UrlForm.FormData.MultipleValues( - urlFormDataEncoder.encode(value).toPathedValues + object Encoder { + def apply( + ignoreXmlFlattened: Boolean = false + ): CachedSchemaCompiler[Encoder] = new CachedSchemaCompiler.Impl[Encoder] { + protected override type Aux[A] = UrlFormDataEncoder[A] + override def fromSchema[A]( + schema: Schema[A], + cache: Cache + ): Encoder[A] = { + val schemaVisitor = + new UrlFormDataEncoderSchemaVisitor(cache, ignoreXmlFlattened) + val urlFormDataEncoder = schemaVisitor(schema) + (value: A) => + UrlForm( + UrlForm.FormData.MultipleValues( + urlFormDataEncoder.encode(value).toPathedValues + ) ) - ) + } } } } diff --git a/modules/core/src/smithy4s/http/internals/UrlFormDataEncoderSchemaVisitor.scala b/modules/core/src/smithy4s/http/internals/UrlFormDataEncoderSchemaVisitor.scala index 070c4f97c..036efddc5 100644 --- a/modules/core/src/smithy4s/http/internals/UrlFormDataEncoderSchemaVisitor.scala +++ b/modules/core/src/smithy4s/http/internals/UrlFormDataEncoderSchemaVisitor.scala @@ -24,7 +24,8 @@ import smithy4s.schema._ import smithy4s.codecs.PayloadPath private[smithy4s] class UrlFormDataEncoderSchemaVisitor( - val cache: CompilationCache[UrlFormDataEncoder] + val cache: CompilationCache[UrlFormDataEncoder], + ignoreXmlFlattened: Boolean ) extends SchemaVisitor.Cached[UrlFormDataEncoder] { compile => override def primitive[P]( @@ -50,7 +51,7 @@ private[smithy4s] class UrlFormDataEncoderSchemaVisitor( ): UrlFormDataEncoder[C[A]] = { val memberEncoder = compile(member) val maybeKey = - if (hints.has[XmlFlattened]) None + if (ignoreXmlFlattened || hints.has[XmlFlattened]) None else Option(getKey(member.hints, "member")) val skipEmpty = hints.toMap.contains(SkipEmpty.keyId) (collection: C[A]) => { From 8bb1d83cd0abffa4f7c1a961ae607cc6f2243957 Mon Sep 17 00:00:00 2001 From: David Piggott Date: Tue, 25 Jul 2023 18:34:07 +0100 Subject: [PATCH 04/25] WIP fixing remaining failures --- .../aws/internals/AwsEc2QueryCodecs.scala | 164 ++++++++++++------ .../aws/internals/AwsQueryCodecs.scala | 6 +- modules/core/src/smithy4s/http/UrlForm.scala | 33 ++-- 3 files changed, 134 insertions(+), 69 deletions(-) diff --git a/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala b/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala index 6f1b623dc..e8b1cb143 100644 --- a/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala +++ b/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala @@ -18,17 +18,15 @@ package smithy4s package aws package internals +import smithy.api.XmlName import cats.effect.Concurrent import cats.syntax.all._ import fs2.compression.Compression import smithy4s.Endpoint -import smithy4s.schema.CachedSchemaCompiler import smithy4s.http._ import smithy4s.http4s.kernel._ -import smithy4s.http.Metadata -import smithy4s.kinds.PolyFunction -import smithy4s.codecs.PayloadPath -import org.http4s.EntityEncoder +import smithy4s.schema._ +import _root_.aws.protocols.Ec2QueryName import _root_.aws.protocols.AwsQueryError private[aws] object AwsEcsQueryCodecs { @@ -37,16 +35,123 @@ private[aws] object AwsEcsQueryCodecs { version: String ): UnaryClientCodecs.Make[F] = new UnaryClientCodecs.Make[F] { + // TODO: Caching? + object foo extends SchemaVisitor.Default[Schema] { self => + override def default[A]: Schema[A] = ??? + override def apply[A](schema: Schema[A]): Schema[A] = + schema.hints.get(Ec2QueryName) match { + case Some(ec2QueryName) => + schema.addHints(XmlName(ec2QueryName.value)) + + case None => + schema.hints.get(XmlName) match { + case Some(xmlName) => + schema.addHints( + XmlName(xmlName.value.capitalize) + ) + + case _ => + schema match { + case s: Schema.CollectionSchema[_, _] => + s.copy( + member = self(s.member) + ) + + case m: Schema.MapSchema[_, _] => + m.copy( + key = self(m.key), + value = self(m.value) + ) + + case struct: Schema.StructSchema[_] => + struct.copy( + fields = struct.fields.map(field => + field.hints.get(Ec2QueryName) match { + case Some(ec2QueryName) => + def transformField[S, B]( + field: Field[S, B] + ): Field[S, B] = + field + .copy( + schema = self(field.schema) + ) + .addHints(XmlName(ec2QueryName.value)) + transformField(field) + case None => + def transformField[S, B]( + field: Field[S, B] + ): Field[S, B] = + field.hints.get(XmlName) match { + case Some(xmlName) => + field + .addHints( + XmlName(xmlName.value.capitalize) + ) + case _ => + println(s"transforming field ${field}") + field + .copy( + schema = self(field.schema) + ). + addHints( + XmlName(field.label.capitalize) + ) + } + transformField(field) + } + ) + ) + case union: Schema.UnionSchema[_] => + union.copy( + alternatives = union.alternatives.map(field => + field.addHints( + XmlName(field.label.capitalize) + ) + ) + ) + case _ => schema + } + } + } + } def apply[I, E, O, SI, SO]( endpoint: Endpoint.Base[I, E, O, SI, SO] ): UnaryClientCodecs[F, I, E, O] = { - val transformEncoders = - applyCompression[F](endpoint.hints, retainUserEncoding = false) - val requestEncoderCompilersWithCompression = transformEncoders( - requestEncoderCompilers[F]( + val requestEncoderCompilers = AwsQueryCodecs + .requestEncoderCompilers[F]( + ignoreXmlFlattened = true, action = endpoint.id.name, version = version ) + .contramapSchema( + foo + // smithy4s.schema.Schema.transformHintsTransitivelyK(hints => + // hints.get(Ec2QueryName) match { + // case Some(ec2QueryName) => + // hints ++ smithy4s.Hints( + // XmlName(ec2QueryName.value) + // ) + + // case None => + // hints.get(XmlName) match { + // case Some(xmlName) if !xmlName.value.isEmpty => + // hints ++ smithy4s.Hints( + // XmlName(xmlName.value.capitalize) + // ) + + // case _ => + // hints + // // ++ smithy4s.Hints( + // // XmlName(s"${Character.toUpperCase(xmlName.value.charAt(0))}${xmlName.value.substring(1)}") + // // ) + // } + // } + // ) + ) + val transformEncoders = + applyCompression[F](endpoint.hints, retainUserEncoding = false) + val requestEncoderCompilersWithCompression = transformEncoders( + requestEncoderCompilers ) val responseTag = endpoint.name + "Response" @@ -105,45 +210,4 @@ private[aws] object AwsEcsQueryCodecs { } } - private def requestEncoderCompilers[F[_]: Concurrent]( - action: String, - version: String - ): CachedSchemaCompiler[RequestEncoder[F, *]] = { - val urlFormEntityEncoderCompilers = UrlForm - .Encoder( - // Per - // https://github.com/smithy-lang/smithy/blob/0d7a26d4880cdb7b3c21ba414c2642d93245b19e/smithy-aws-protocol-tests/model/ec2Query/main.smithy#L5. - ignoreXmlFlattened = true - ) - .mapK( - new PolyFunction[UrlForm.Encoder, EntityEncoder[F, *]] { - def apply[A](fa: UrlForm.Encoder[A]): EntityEncoder[F, A] = - urlFormEntityEncoder[F].contramap((a: A) => - UrlForm( - formData = UrlForm.FormData.MultipleValues( - values = Vector( - UrlForm.FormData.PathedValue(PayloadPath("Action"), action), - UrlForm.FormData - .PathedValue(PayloadPath("Version"), version) - ) ++ fa.encode(a).formData.values - ) - ) - ) - } - ) - RequestEncoder.restSchemaCompiler[F]( - metadataEncoderCompiler = Metadata.AwsEncoder, - entityEncoderCompiler = urlFormEntityEncoderCompilers, - writeEmptyStructs = true - ) - } - - private def urlFormEntityEncoder[F[_]]: EntityEncoder[F, UrlForm] = - EntityEncoders.fromHttpMediaWriter( - HttpMediaTyped( - HttpMediaType("application/x-www-form-urlencoded"), - (_: Any, urlForm: UrlForm) => Blob(urlForm.render) - ) - ) - } diff --git a/modules/aws-http4s/src/smithy4s/aws/internals/AwsQueryCodecs.scala b/modules/aws-http4s/src/smithy4s/aws/internals/AwsQueryCodecs.scala index 71f26f243..b77fbd53f 100644 --- a/modules/aws-http4s/src/smithy4s/aws/internals/AwsQueryCodecs.scala +++ b/modules/aws-http4s/src/smithy4s/aws/internals/AwsQueryCodecs.scala @@ -44,6 +44,7 @@ private[aws] object AwsQueryCodecs { applyCompression[F](endpoint.hints, retainUserEncoding = false) val requestEncoderCompilersWithCompression = transformEncoders( requestEncoderCompilers[F]( + ignoreXmlFlattened = false, action = endpoint.id.name, version = version ) @@ -105,12 +106,13 @@ private[aws] object AwsQueryCodecs { } } - private def requestEncoderCompilers[F[_]: Concurrent]( + def requestEncoderCompilers[F[_]: Concurrent]( + ignoreXmlFlattened: Boolean, action: String, version: String ): CachedSchemaCompiler[RequestEncoder[F, *]] = { val urlFormEntityEncoderCompilers = UrlForm - .Encoder() + .Encoder(ignoreXmlFlattened) .mapK( new PolyFunction[UrlForm.Encoder, EntityEncoder[F, *]] { def apply[A](fa: UrlForm.Encoder[A]): EntityEncoder[F, A] = diff --git a/modules/core/src/smithy4s/http/UrlForm.scala b/modules/core/src/smithy4s/http/UrlForm.scala index 46ce44651..aeb68a1d4 100644 --- a/modules/core/src/smithy4s/http/UrlForm.scala +++ b/modules/core/src/smithy4s/http/UrlForm.scala @@ -135,24 +135,23 @@ private[smithy4s] object UrlForm { def encode(a: A): UrlForm } object Encoder { - def apply( - ignoreXmlFlattened: Boolean = false - ): CachedSchemaCompiler[Encoder] = new CachedSchemaCompiler.Impl[Encoder] { - protected override type Aux[A] = UrlFormDataEncoder[A] - override def fromSchema[A]( - schema: Schema[A], - cache: Cache - ): Encoder[A] = { - val schemaVisitor = - new UrlFormDataEncoderSchemaVisitor(cache, ignoreXmlFlattened) - val urlFormDataEncoder = schemaVisitor(schema) - (value: A) => - UrlForm( - UrlForm.FormData.MultipleValues( - urlFormDataEncoder.encode(value).toPathedValues + def apply(ignoreXmlFlattened: Boolean): CachedSchemaCompiler[Encoder] = + new CachedSchemaCompiler.Impl[Encoder] { + protected override type Aux[A] = UrlFormDataEncoder[A] + override def fromSchema[A]( + schema: Schema[A], + cache: Cache + ): Encoder[A] = { + val schemaVisitor = + new UrlFormDataEncoderSchemaVisitor(cache, ignoreXmlFlattened) + val urlFormDataEncoder = schemaVisitor(schema) + (value: A) => + UrlForm( + UrlForm.FormData.MultipleValues( + urlFormDataEncoder.encode(value).toPathedValues + ) ) - ) + } } - } } } From 83e9362aa3073db6ae46981d7ec402ed620c085d Mon Sep 17 00:00:00 2001 From: David Piggott Date: Thu, 27 Jul 2023 10:27:01 +0100 Subject: [PATCH 05/25] Fix remaining test failures using only the existing SchemaVisitor The previous approach was trying to transform member names as a pre-processing step. It could have worked but was getting unwieldy and hard to reason about, and still hadn't covered all cases. Much simpler to have the member name transformation happen conditionally within the existing encoder SchemaVisitor. --- .../aws/internals/AwsEc2QueryCodecs.scala | 119 +++--------------- .../aws/internals/AwsQueryCodecs.scala | 4 +- .../compliancetests/AwsComplianceSuite.scala | 23 ++-- .../UrlFormDataEncoderSchemaVisitorSpec.scala | 6 +- modules/core/src/smithy4s/http/UrlForm.scala | 4 +- .../UrlFormDataEncoderSchemaVisitor.scala | 7 +- 6 files changed, 44 insertions(+), 119 deletions(-) diff --git a/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala b/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala index e8b1cb143..760db45e5 100644 --- a/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala +++ b/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala @@ -25,7 +25,6 @@ import fs2.compression.Compression import smithy4s.Endpoint import smithy4s.http._ import smithy4s.http4s.kernel._ -import smithy4s.schema._ import _root_.aws.protocols.Ec2QueryName import _root_.aws.protocols.AwsQueryError @@ -35,118 +34,36 @@ private[aws] object AwsEcsQueryCodecs { version: String ): UnaryClientCodecs.Make[F] = new UnaryClientCodecs.Make[F] { - // TODO: Caching? - object foo extends SchemaVisitor.Default[Schema] { self => - override def default[A]: Schema[A] = ??? - override def apply[A](schema: Schema[A]): Schema[A] = - schema.hints.get(Ec2QueryName) match { - case Some(ec2QueryName) => - schema.addHints(XmlName(ec2QueryName.value)) - - case None => - schema.hints.get(XmlName) match { - case Some(xmlName) => - schema.addHints( - XmlName(xmlName.value.capitalize) - ) - - case _ => - schema match { - case s: Schema.CollectionSchema[_, _] => - s.copy( - member = self(s.member) - ) - - case m: Schema.MapSchema[_, _] => - m.copy( - key = self(m.key), - value = self(m.value) - ) - - case struct: Schema.StructSchema[_] => - struct.copy( - fields = struct.fields.map(field => - field.hints.get(Ec2QueryName) match { - case Some(ec2QueryName) => - def transformField[S, B]( - field: Field[S, B] - ): Field[S, B] = - field - .copy( - schema = self(field.schema) - ) - .addHints(XmlName(ec2QueryName.value)) - transformField(field) - case None => - def transformField[S, B]( - field: Field[S, B] - ): Field[S, B] = - field.hints.get(XmlName) match { - case Some(xmlName) => - field - .addHints( - XmlName(xmlName.value.capitalize) - ) - case _ => - println(s"transforming field ${field}") - field - .copy( - schema = self(field.schema) - ). - addHints( - XmlName(field.label.capitalize) - ) - } - transformField(field) - } - ) - ) - case union: Schema.UnionSchema[_] => - union.copy( - alternatives = union.alternatives.map(field => - field.addHints( - XmlName(field.label.capitalize) - ) - ) - ) - case _ => schema - } - } - } - } def apply[I, E, O, SI, SO]( endpoint: Endpoint.Base[I, E, O, SI, SO] ): UnaryClientCodecs[F, I, E, O] = { val requestEncoderCompilers = AwsQueryCodecs .requestEncoderCompilers[F]( ignoreXmlFlattened = true, + capitalizeStructAndUnionMemberNames = true, action = endpoint.id.name, version = version ) .contramapSchema( - foo - // smithy4s.schema.Schema.transformHintsTransitivelyK(hints => - // hints.get(Ec2QueryName) match { - // case Some(ec2QueryName) => - // hints ++ smithy4s.Hints( - // XmlName(ec2QueryName.value) - // ) + smithy4s.schema.Schema.transformHintsTransitivelyK(hints => + hints.get(Ec2QueryName) match { + case Some(ec2QueryName) => + hints.filterNot(_.keyId == XmlName.id) ++ smithy4s.Hints( + XmlName(ec2QueryName.value) + ) - // case None => - // hints.get(XmlName) match { - // case Some(xmlName) if !xmlName.value.isEmpty => - // hints ++ smithy4s.Hints( - // XmlName(xmlName.value.capitalize) - // ) + case None => + hints.get(XmlName) match { + case Some(xmlName) => + hints.filterNot(_.keyId == XmlName.id) ++ smithy4s.Hints( + XmlName(xmlName.value.capitalize) + ) - // case _ => - // hints - // // ++ smithy4s.Hints( - // // XmlName(s"${Character.toUpperCase(xmlName.value.charAt(0))}${xmlName.value.substring(1)}") - // // ) - // } - // } - // ) + case _ => + hints + } + } + ) ) val transformEncoders = applyCompression[F](endpoint.hints, retainUserEncoding = false) diff --git a/modules/aws-http4s/src/smithy4s/aws/internals/AwsQueryCodecs.scala b/modules/aws-http4s/src/smithy4s/aws/internals/AwsQueryCodecs.scala index b77fbd53f..b1adbc32e 100644 --- a/modules/aws-http4s/src/smithy4s/aws/internals/AwsQueryCodecs.scala +++ b/modules/aws-http4s/src/smithy4s/aws/internals/AwsQueryCodecs.scala @@ -45,6 +45,7 @@ private[aws] object AwsQueryCodecs { val requestEncoderCompilersWithCompression = transformEncoders( requestEncoderCompilers[F]( ignoreXmlFlattened = false, + capitalizeStructAndUnionMemberNames = false, action = endpoint.id.name, version = version ) @@ -108,11 +109,12 @@ private[aws] object AwsQueryCodecs { def requestEncoderCompilers[F[_]: Concurrent]( ignoreXmlFlattened: Boolean, + capitalizeStructAndUnionMemberNames: Boolean, action: String, version: String ): CachedSchemaCompiler[RequestEncoder[F, *]] = { val urlFormEntityEncoderCompilers = UrlForm - .Encoder(ignoreXmlFlattened) + .Encoder(ignoreXmlFlattened = ignoreXmlFlattened, capitalizeStructAndUnionMemberNames = capitalizeStructAndUnionMemberNames) .mapK( new PolyFunction[UrlForm.Encoder, EntityEncoder[F, *]] { def apply[A](fa: UrlForm.Encoder[A]): EntityEncoder[F, A] = diff --git a/modules/aws-http4s/test/src/smithy4s/aws/compliancetests/AwsComplianceSuite.scala b/modules/aws-http4s/test/src/smithy4s/aws/compliancetests/AwsComplianceSuite.scala index 10138663e..ca1e25e95 100644 --- a/modules/aws-http4s/test/src/smithy4s/aws/compliancetests/AwsComplianceSuite.scala +++ b/modules/aws-http4s/test/src/smithy4s/aws/compliancetests/AwsComplianceSuite.scala @@ -57,20 +57,19 @@ object AwsComplianceSuite extends ProtocolComplianceSuite { } override def allTests(dsi: DynamicSchemaIndex): List[ComplianceTest[IO]] = - genClientTests(impl(Ec2Query), awsEc2Query)(dsi) - // ++ - // genClientTests(impl(AwsJson1_0), awsJson1_0)(dsi) ++ - // genClientTests(impl(AwsJson1_1), awsJson1_1)(dsi) ++ - // genClientTests(impl(AwsQuery), awsQuery)(dsi) ++ - // genClientTests(impl(RestJson1), restJson1)(dsi) ++ - // genClientTests(impl(RestXml), restXml)(dsi) + genClientTests(impl(Ec2Query), awsEc2Query)(dsi) ++ + genClientTests(impl(AwsJson1_0), awsJson1_0)(dsi) ++ + genClientTests(impl(AwsJson1_1), awsJson1_1)(dsi) ++ + genClientTests(impl(AwsQuery), awsQuery)(dsi) ++ + genClientTests(impl(RestJson1), restJson1)(dsi) ++ + genClientTests(impl(RestXml), restXml)(dsi) private val awsEc2Query = ShapeId("aws.protocoltests.ec2", "AwsEc2") - // private val awsJson1_0 = ShapeId("aws.protocoltests.json10", "JsonRpc10") - // private val awsJson1_1 = ShapeId("aws.protocoltests.json", "JsonProtocol") - // private val awsQuery = ShapeId("aws.protocoltests.query", "AwsQuery") - // private val restJson1 = ShapeId("aws.protocoltests.restjson", "RestJson") - // private val restXml = ShapeId("aws.protocoltests.restxml", "RestXml") + private val awsJson1_0 = ShapeId("aws.protocoltests.json10", "JsonRpc10") + private val awsJson1_1 = ShapeId("aws.protocoltests.json", "JsonProtocol") + private val awsQuery = ShapeId("aws.protocoltests.query", "AwsQuery") + private val restJson1 = ShapeId("aws.protocoltests.restjson", "RestJson") + private val restXml = ShapeId("aws.protocoltests.restxml", "RestXml") private val modelDump = fileFromEnv("MODEL_DUMP") diff --git a/modules/bootstrapped/test/src/smithy4s/http/internals/UrlFormDataEncoderSchemaVisitorSpec.scala b/modules/bootstrapped/test/src/smithy4s/http/internals/UrlFormDataEncoderSchemaVisitorSpec.scala index 9ce3f83d1..711f0ba03 100644 --- a/modules/bootstrapped/test/src/smithy4s/http/internals/UrlFormDataEncoderSchemaVisitorSpec.scala +++ b/modules/bootstrapped/test/src/smithy4s/http/internals/UrlFormDataEncoderSchemaVisitorSpec.scala @@ -331,7 +331,11 @@ object UrlFormDataEncoderSchemaVisitorSpec extends SimpleIOSuite { loc: SourceLocation ): IO[Expectations] = { val cache = CompilationCache.make[UrlFormDataEncoder] - val schemaVisitor = new UrlFormDataEncoderSchemaVisitor(cache) + val schemaVisitor = new UrlFormDataEncoderSchemaVisitor( + cache, + ignoreXmlFlattened = false, + capitalizeStructAndUnionMemberNames = false + ) val encoder = schemaVisitor(schema) val formData = encoder.encode(value) val builder = new mutable.StringBuilder diff --git a/modules/core/src/smithy4s/http/UrlForm.scala b/modules/core/src/smithy4s/http/UrlForm.scala index aeb68a1d4..4effd683f 100644 --- a/modules/core/src/smithy4s/http/UrlForm.scala +++ b/modules/core/src/smithy4s/http/UrlForm.scala @@ -135,7 +135,7 @@ private[smithy4s] object UrlForm { def encode(a: A): UrlForm } object Encoder { - def apply(ignoreXmlFlattened: Boolean): CachedSchemaCompiler[Encoder] = + def apply(ignoreXmlFlattened: Boolean, capitalizeStructAndUnionMemberNames: Boolean): CachedSchemaCompiler[Encoder] = new CachedSchemaCompiler.Impl[Encoder] { protected override type Aux[A] = UrlFormDataEncoder[A] override def fromSchema[A]( @@ -143,7 +143,7 @@ private[smithy4s] object UrlForm { cache: Cache ): Encoder[A] = { val schemaVisitor = - new UrlFormDataEncoderSchemaVisitor(cache, ignoreXmlFlattened) + new UrlFormDataEncoderSchemaVisitor(cache, ignoreXmlFlattened, capitalizeStructAndUnionMemberNames) val urlFormDataEncoder = schemaVisitor(schema) (value: A) => UrlForm( diff --git a/modules/core/src/smithy4s/http/internals/UrlFormDataEncoderSchemaVisitor.scala b/modules/core/src/smithy4s/http/internals/UrlFormDataEncoderSchemaVisitor.scala index 036efddc5..417f7605d 100644 --- a/modules/core/src/smithy4s/http/internals/UrlFormDataEncoderSchemaVisitor.scala +++ b/modules/core/src/smithy4s/http/internals/UrlFormDataEncoderSchemaVisitor.scala @@ -25,7 +25,8 @@ import smithy4s.codecs.PayloadPath private[smithy4s] class UrlFormDataEncoderSchemaVisitor( val cache: CompilationCache[UrlFormDataEncoder], - ignoreXmlFlattened: Boolean + ignoreXmlFlattened: Boolean, + capitalizeStructAndUnionMemberNames: Boolean ) extends SchemaVisitor.Cached[UrlFormDataEncoder] { compile => override def primitive[P]( @@ -180,6 +181,8 @@ private[smithy4s] class UrlFormDataEncoderSchemaVisitor( .get(XmlName) .map(_.value) .map(PayloadPath.Segment(_)) - .getOrElse(default) + .getOrElse( + if (capitalizeStructAndUnionMemberNames) default.capitalize else default + ) } From 12811a967d0ad16747ced8fd490fdd8402638372 Mon Sep 17 00:00:00 2001 From: David Piggott Date: Thu, 27 Jul 2023 11:42:00 +0100 Subject: [PATCH 06/25] Suppress Scala 3 deprecation warnings too --- build.sbt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build.sbt b/build.sbt index ec72af223..29f5ac917 100644 --- a/build.sbt +++ b/build.sbt @@ -259,9 +259,9 @@ lazy val `aws-kernel` = projectMatrix genSmithy(Compile), Test / envVars ++= Map("TEST_VAR" -> "hello"), scalacOptions ++= Seq( - "-Wconf:msg=class AwsQuery in package protocols is deprecated:silent", - "-Wconf:msg=class Ec2Query in package protocols is deprecated:silent", - "-Wconf:msg=class RestXml in package protocols is deprecated:silent", + "-Wconf:msg=class AwsQuery in package (aws\\.)?protocols is deprecated:silent", + "-Wconf:msg=class Ec2Query in package (aws\\.)?protocols is deprecated:silent", + "-Wconf:msg=class RestXml in package (aws\\.)?protocols is deprecated:silent", "-Wconf:msg=value noErrorWrapping in class RestXml is deprecated:silent" ) ) @@ -308,9 +308,9 @@ lazy val `aws-http4s` = projectMatrix ) }, scalacOptions ++= Seq( - "-Wconf:msg=class AwsQuery in package protocols is deprecated:silent", - "-Wconf:msg=class Ec2Query in package protocols is deprecated:silent", - "-Wconf:msg=class RestXml in package protocols is deprecated:silent", + "-Wconf:msg=class AwsQuery in package (aws\\.)?protocols is deprecated:silent", + "-Wconf:msg=class Ec2Query in package (aws\\.)?protocols is deprecated:silent", + "-Wconf:msg=class RestXml in package (aws\\.)?protocols is deprecated:silent", "-Wconf:msg=value noErrorWrapping in class RestXml is deprecated:silent" ), Test / complianceTestDependencies := Seq( From ddb8737a42627cbf8c74edbaad57ae96c98559d3 Mon Sep 17 00:00:00 2001 From: David Piggott Date: Thu, 27 Jul 2023 12:37:18 +0100 Subject: [PATCH 07/25] Add comments explaining quirks of both query protocols Also refine hint transformer to work with member hints specifically, per the spec. --- .../aws/internals/AwsEc2QueryCodecs.scala | 28 +++++++++++++++---- .../aws/internals/AwsQueryCodecs.scala | 19 +++++++++++-- .../src/smithy4s/http/HttpRestSchema.scala | 6 +++- modules/core/src/smithy4s/http/UrlForm.scala | 11 ++++++-- .../UrlFormDataEncoderSchemaVisitor.scala | 5 +++- .../kernel/GzipRequestCompression.scala | 5 ++++ 6 files changed, 61 insertions(+), 13 deletions(-) diff --git a/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala b/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala index 760db45e5..923d5aa62 100644 --- a/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala +++ b/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala @@ -39,23 +39,35 @@ private[aws] object AwsEcsQueryCodecs { ): UnaryClientCodecs[F, I, E, O] = { val requestEncoderCompilers = AwsQueryCodecs .requestEncoderCompilers[F]( + // These are set to fulfil the requirements of + // https://smithy.io/2.0/aws/protocols/aws-ec2-query-protocol.html?highlight=ec2%20query%20protocol#query-key-resolution. + // without UrlFormDataEncoderSchemaVisitor having to have more aware + // than necessary of these protocol quirks (having it be aware of + // XmlName and XmlFlattened already feels like too much - perhaps in + // a future change UrlFormDataEncoderSchemaVisitor can work with + // better-named hints, and we can use this same transformation + // approach in AwsQueryCodecs to translate the AWS XML hints to + // those new hints). ignoreXmlFlattened = true, capitalizeStructAndUnionMemberNames = true, action = endpoint.id.name, version = version ) .contramapSchema( + // This pre-processing works in collaboration with the passing of + // the capitalizeStructAndUnionMemberNames flags to + // UrlFormDataEncoderSchemaVisitor. smithy4s.schema.Schema.transformHintsTransitivelyK(hints => - hints.get(Ec2QueryName) match { + hints.memberHints.get(Ec2QueryName) match { case Some(ec2QueryName) => - hints.filterNot(_.keyId == XmlName.id) ++ smithy4s.Hints( + hints.addMemberHints( XmlName(ec2QueryName.value) ) case None => - hints.get(XmlName) match { + hints.memberHints.get(XmlName) match { case Some(xmlName) => - hints.filterNot(_.keyId == XmlName.id) ++ smithy4s.Hints( + hints.addMemberHints( XmlName(xmlName.value.capitalize) ) @@ -65,8 +77,12 @@ private[aws] object AwsEcsQueryCodecs { } ) ) - val transformEncoders = - applyCompression[F](endpoint.hints, retainUserEncoding = false) + val transformEncoders = applyCompression[F]( + endpoint.hints, + // To fulfil the requirement of + // https://github.com/smithy-lang/smithy/blob/main/smithy-aws-protocol-tests/model/ec2Query/requestCompression.smithy#L152-L298. + retainUserEncoding = false + ) val requestEncoderCompilersWithCompression = transformEncoders( requestEncoderCompilers ) diff --git a/modules/aws-http4s/src/smithy4s/aws/internals/AwsQueryCodecs.scala b/modules/aws-http4s/src/smithy4s/aws/internals/AwsQueryCodecs.scala index b1adbc32e..99fdf0439 100644 --- a/modules/aws-http4s/src/smithy4s/aws/internals/AwsQueryCodecs.scala +++ b/modules/aws-http4s/src/smithy4s/aws/internals/AwsQueryCodecs.scala @@ -40,8 +40,12 @@ private[aws] object AwsQueryCodecs { def apply[I, E, O, SI, SO]( endpoint: Endpoint.Base[I, E, O, SI, SO] ): UnaryClientCodecs[F, I, E, O] = { - val transformEncoders = - applyCompression[F](endpoint.hints, retainUserEncoding = false) + val transformEncoders = applyCompression[F]( + endpoint.hints, + // To fulfil the requirement of + // https://github.com/smithy-lang/smithy/blob/main/smithy-aws-protocol-tests/model/awsQuery/requestCompression.smithy#L152-L298. + retainUserEncoding = false + ) val requestEncoderCompilersWithCompression = transformEncoders( requestEncoderCompilers[F]( ignoreXmlFlattened = false, @@ -114,7 +118,11 @@ private[aws] object AwsQueryCodecs { version: String ): CachedSchemaCompiler[RequestEncoder[F, *]] = { val urlFormEntityEncoderCompilers = UrlForm - .Encoder(ignoreXmlFlattened = ignoreXmlFlattened, capitalizeStructAndUnionMemberNames = capitalizeStructAndUnionMemberNames) + .Encoder( + ignoreXmlFlattened = ignoreXmlFlattened, + capitalizeStructAndUnionMemberNames = + capitalizeStructAndUnionMemberNames + ) .mapK( new PolyFunction[UrlForm.Encoder, EntityEncoder[F, *]] { def apply[A](fa: UrlForm.Encoder[A]): EntityEncoder[F, A] = @@ -134,6 +142,11 @@ private[aws] object AwsQueryCodecs { RequestEncoder.restSchemaCompiler[F]( metadataEncoderCompiler = Metadata.AwsEncoder, entityEncoderCompiler = urlFormEntityEncoderCompilers, + // We have to set this so that a body is produced even in the case where a + // top-level struct input is empty. If it wasn't then the contramap above + // wouldn't have the required effect because there would be no UrlForm to + // add Action and Version to (literally no UrlForm value - not just an + // empty one). writeEmptyStructs = true ) } diff --git a/modules/core/src/smithy4s/http/HttpRestSchema.scala b/modules/core/src/smithy4s/http/HttpRestSchema.scala index 30a04bbde..92f160a3d 100644 --- a/modules/core/src/smithy4s/http/HttpRestSchema.scala +++ b/modules/core/src/smithy4s/http/HttpRestSchema.scala @@ -54,6 +54,10 @@ object HttpRestSchema { def apply[A]( fullSchema: Schema[A], + // This is used by AwsQueryCodecs and AwsEc2QueryCodecs to ensure that + // body producer is retained even in the case where a top-level struct + // input is empty. They need that to happen so that a body is produced to + // which the Action and Version metadata can be added. writeEmptyStructs: Boolean ): HttpRestSchema[A] = { @@ -75,7 +79,7 @@ object HttpRestSchema { case NoMatch() => fullSchema match { case Schema.StructSchema(_, _, fields, make) - if !writeEmptyStructs && (fields.isEmpty) => + if !writeEmptyStructs && fields.isEmpty => Empty(make(IndexedSeq.empty)) case _ => OnlyBody(fullSchema) } diff --git a/modules/core/src/smithy4s/http/UrlForm.scala b/modules/core/src/smithy4s/http/UrlForm.scala index 4effd683f..04e029e68 100644 --- a/modules/core/src/smithy4s/http/UrlForm.scala +++ b/modules/core/src/smithy4s/http/UrlForm.scala @@ -135,7 +135,10 @@ private[smithy4s] object UrlForm { def encode(a: A): UrlForm } object Encoder { - def apply(ignoreXmlFlattened: Boolean, capitalizeStructAndUnionMemberNames: Boolean): CachedSchemaCompiler[Encoder] = + def apply( + ignoreXmlFlattened: Boolean, + capitalizeStructAndUnionMemberNames: Boolean + ): CachedSchemaCompiler[Encoder] = new CachedSchemaCompiler.Impl[Encoder] { protected override type Aux[A] = UrlFormDataEncoder[A] override def fromSchema[A]( @@ -143,7 +146,11 @@ private[smithy4s] object UrlForm { cache: Cache ): Encoder[A] = { val schemaVisitor = - new UrlFormDataEncoderSchemaVisitor(cache, ignoreXmlFlattened, capitalizeStructAndUnionMemberNames) + new UrlFormDataEncoderSchemaVisitor( + cache, + ignoreXmlFlattened, + capitalizeStructAndUnionMemberNames + ) val urlFormDataEncoder = schemaVisitor(schema) (value: A) => UrlForm( diff --git a/modules/core/src/smithy4s/http/internals/UrlFormDataEncoderSchemaVisitor.scala b/modules/core/src/smithy4s/http/internals/UrlFormDataEncoderSchemaVisitor.scala index 417f7605d..f397f93f5 100644 --- a/modules/core/src/smithy4s/http/internals/UrlFormDataEncoderSchemaVisitor.scala +++ b/modules/core/src/smithy4s/http/internals/UrlFormDataEncoderSchemaVisitor.scala @@ -25,6 +25,8 @@ import smithy4s.codecs.PayloadPath private[smithy4s] class UrlFormDataEncoderSchemaVisitor( val cache: CompilationCache[UrlFormDataEncoder], + // These are used by AwsEc2QueryCodecs to conform to the requirements of + // https://smithy.io/2.0/aws/protocols/aws-ec2-query-protocol.html?highlight=ec2%20query%20protocol#query-key-resolution. ignoreXmlFlattened: Boolean, capitalizeStructAndUnionMemberNames: Boolean ) extends SchemaVisitor.Cached[UrlFormDataEncoder] { compile => @@ -182,7 +184,8 @@ private[smithy4s] class UrlFormDataEncoderSchemaVisitor( .map(_.value) .map(PayloadPath.Segment(_)) .getOrElse( - if (capitalizeStructAndUnionMemberNames) default.capitalize else default + if (capitalizeStructAndUnionMemberNames) default.capitalize + else default ) } diff --git a/modules/http4s-kernel/src/smithy4s/http4s/kernel/GzipRequestCompression.scala b/modules/http4s-kernel/src/smithy4s/http4s/kernel/GzipRequestCompression.scala index c92d5029a..a0fd7530f 100644 --- a/modules/http4s-kernel/src/smithy4s/http4s/kernel/GzipRequestCompression.scala +++ b/modules/http4s-kernel/src/smithy4s/http4s/kernel/GzipRequestCompression.scala @@ -30,6 +30,11 @@ object GzipRequestCompression { val DefaultBufferSize = 32 * 1024 def apply[F[_]: Compression]( + // This is used by AwsQueryCodecs and AwsEc2QueryCodecs to conform to the + // requirements of + // https://github.com/smithy-lang/smithy/blob/main/smithy-aws-protocol-tests/model/awsQuery/requestCompression.smithy#L152-L298 + // and + // https://github.com/smithy-lang/smithy/blob/main/smithy-aws-protocol-tests/model/ec2Query/requestCompression.smithy#L152-L298. retainUserEncoding: Boolean, bufferSize: Int = DefaultBufferSize, level: DeflateParams.Level = DeflateParams.Level.DEFAULT From e7a826942ebc86f5a4da4a772576aa4e33f0d0eb Mon Sep 17 00:00:00 2001 From: David Piggott Date: Thu, 27 Jul 2023 12:49:48 +0100 Subject: [PATCH 08/25] Sort imports in all files touched by #1112 and this branch --- .../src/smithy4s/aws/AwsClient.scala | 6 ++-- .../smithy4s/aws/AwsCredentialsProvider.scala | 13 ++++---- .../aws/internals/AwsEc2QueryCodecs.scala | 6 ++-- .../aws/internals/AwsQueryCodecs.scala | 10 +++--- .../aws/internals/AwsSignatureClient.scala | 17 +++++----- .../smithy4s/aws/internals/AwsXmlCodecs.scala | 21 ++++++------- .../src/smithy4s/aws/internals/package.scala | 4 +-- .../compliancetests/AwsComplianceSuite.scala | 4 +-- .../UrlFormDataEncoderSchemaVisitorSpec.scala | 9 +++--- .../src/smithy4s/http/HttpRestSchema.scala | 10 +++--- modules/core/src/smithy4s/http/UrlForm.scala | 11 +++---- .../http/internals/UrlFormDataEncoder.scala | 2 +- .../UrlFormDataEncoderSchemaVisitor.scala | 5 +-- .../DocumentDecoderSchemaVisitor.scala | 14 ++++----- .../json/SchemaVisitorJCodecTests.scala | 31 +++++++++---------- modules/sandbox/src/Sandbox.scala | 5 ++- .../tests/ProtocolComplianceSuite.scala | 12 ++++--- 17 files changed, 91 insertions(+), 89 deletions(-) diff --git a/modules/aws-http4s/src/smithy4s/aws/AwsClient.scala b/modules/aws-http4s/src/smithy4s/aws/AwsClient.scala index fbb2a6660..fb6f55f34 100644 --- a/modules/aws-http4s/src/smithy4s/aws/AwsClient.scala +++ b/modules/aws-http4s/src/smithy4s/aws/AwsClient.scala @@ -16,14 +16,14 @@ package smithy4s.aws +import _root_.aws.api.{Service => AwsService} import cats.effect.Async import cats.effect.Resource import cats.syntax.all._ import fs2.compression.Compression -import smithy4s.http4s.kernel._ -import smithy4s.aws.internals._ -import _root_.aws.api.{Service => AwsService} import smithy4s.aws.internals.AwsQueryCodecs +import smithy4s.aws.internals._ +import smithy4s.http4s.kernel._ object AwsClient { diff --git a/modules/aws-http4s/src/smithy4s/aws/AwsCredentialsProvider.scala b/modules/aws-http4s/src/smithy4s/aws/AwsCredentialsProvider.scala index 85891dac2..d8a733bcb 100644 --- a/modules/aws-http4s/src/smithy4s/aws/AwsCredentialsProvider.scala +++ b/modules/aws-http4s/src/smithy4s/aws/AwsCredentialsProvider.scala @@ -18,20 +18,21 @@ package smithy4s.aws import cats.effect._ import cats.syntax.all._ +import fs2.io.file.Files +import org.http4s.EntityDecoder +import org.http4s.Uri +import org.http4s.client.Client +import org.http4s.syntax.all._ import smithy4s.aws.kernel.AWS_ACCESS_KEY_ID +import smithy4s.aws.kernel.AWS_PROFILE import smithy4s.aws.kernel.AWS_SECRET_ACCESS_KEY import smithy4s.aws.kernel.AWS_SESSION_TOKEN -import smithy4s.aws.kernel.AWS_PROFILE import smithy4s.aws.kernel.AwsInstanceMetadata import smithy4s.aws.kernel.AwsTemporaryCredentials import smithy4s.aws.kernel.SysEnv import smithy4s.http4s.kernel.EntityDecoders -import fs2.io.file.Files + import scala.concurrent.duration._ -import org.http4s.EntityDecoder -import org.http4s.client.Client -import org.http4s.syntax.all._ -import org.http4s.Uri object AwsCredentialsProvider { diff --git a/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala b/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala index 923d5aa62..b930a5ca0 100644 --- a/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala +++ b/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala @@ -18,15 +18,15 @@ package smithy4s package aws package internals -import smithy.api.XmlName +import _root_.aws.protocols.AwsQueryError +import _root_.aws.protocols.Ec2QueryName import cats.effect.Concurrent import cats.syntax.all._ import fs2.compression.Compression +import smithy.api.XmlName import smithy4s.Endpoint import smithy4s.http._ import smithy4s.http4s.kernel._ -import _root_.aws.protocols.Ec2QueryName -import _root_.aws.protocols.AwsQueryError private[aws] object AwsEcsQueryCodecs { diff --git a/modules/aws-http4s/src/smithy4s/aws/internals/AwsQueryCodecs.scala b/modules/aws-http4s/src/smithy4s/aws/internals/AwsQueryCodecs.scala index 99fdf0439..484fa1dfe 100644 --- a/modules/aws-http4s/src/smithy4s/aws/internals/AwsQueryCodecs.scala +++ b/modules/aws-http4s/src/smithy4s/aws/internals/AwsQueryCodecs.scala @@ -18,18 +18,18 @@ package smithy4s package aws package internals +import _root_.aws.protocols.AwsQueryError import cats.effect.Concurrent import cats.syntax.all._ import fs2.compression.Compression +import org.http4s.EntityEncoder import smithy4s.Endpoint -import smithy4s.schema.CachedSchemaCompiler +import smithy4s.codecs.PayloadPath +import smithy4s.http.Metadata import smithy4s.http._ import smithy4s.http4s.kernel._ -import smithy4s.http.Metadata import smithy4s.kinds.PolyFunction -import smithy4s.codecs.PayloadPath -import org.http4s.EntityEncoder -import _root_.aws.protocols.AwsQueryError +import smithy4s.schema.CachedSchemaCompiler private[aws] object AwsQueryCodecs { diff --git a/modules/aws-http4s/src/smithy4s/aws/internals/AwsSignatureClient.scala b/modules/aws-http4s/src/smithy4s/aws/internals/AwsSignatureClient.scala index 8ed313bbf..84ab1d06b 100644 --- a/modules/aws-http4s/src/smithy4s/aws/internals/AwsSignatureClient.scala +++ b/modules/aws-http4s/src/smithy4s/aws/internals/AwsSignatureClient.scala @@ -17,17 +17,18 @@ package smithy4s.aws package internals -import java.net.URLEncoder -import java.nio.charset.StandardCharsets -import smithy4s._ -import org.http4s._ -import org.http4s.client.Client -import cats.effect.Resource -import smithy4s.aws.kernel.AwsCrypto._ import cats.effect.Concurrent -import fs2.Chunk +import cats.effect.Resource import cats.syntax.all._ +import fs2.Chunk +import org.http4s._ +import org.http4s.client.Client import org.typelevel.ci.CIString +import smithy4s._ +import smithy4s.aws.kernel.AwsCrypto._ + +import java.net.URLEncoder +import java.nio.charset.StandardCharsets /** * A Client middleware that signs http requests before they are sent to AWS. diff --git a/modules/aws-http4s/src/smithy4s/aws/internals/AwsXmlCodecs.scala b/modules/aws-http4s/src/smithy4s/aws/internals/AwsXmlCodecs.scala index 73c23d424..49e4f57c8 100644 --- a/modules/aws-http4s/src/smithy4s/aws/internals/AwsXmlCodecs.scala +++ b/modules/aws-http4s/src/smithy4s/aws/internals/AwsXmlCodecs.scala @@ -18,25 +18,24 @@ package smithy4s package aws package internals +import cats.Applicative +import cats.data.EitherT import cats.effect.Concurrent import cats.syntax.all._ -import cats.Applicative import fs2.compression.Compression -import smithy4s.http4s.kernel._ -import smithy4s.Endpoint -import smithy4s.schema.CachedSchemaCompiler -import org.http4s.EntityDecoder -import smithy4s.xml.XmlDocument -import org.http4s.MediaRange import fs2.data.xml._ import fs2.data.xml.dom._ -import cats.data.EitherT -import smithy4s.kinds.PolyFunction +import org.http4s.EntityDecoder import org.http4s.EntityEncoder -import smithy4s.capability.Covariant - +import org.http4s.MediaRange import org.http4s.MediaType +import smithy4s.Endpoint +import smithy4s.capability.Covariant import smithy4s.http.Metadata +import smithy4s.http4s.kernel._ +import smithy4s.kinds.PolyFunction +import smithy4s.schema.CachedSchemaCompiler +import smithy4s.xml.XmlDocument private[aws] object AwsXmlCodecs { diff --git a/modules/aws-http4s/src/smithy4s/aws/internals/package.scala b/modules/aws-http4s/src/smithy4s/aws/internals/package.scala index fc0ddeda3..e7b88adec 100644 --- a/modules/aws-http4s/src/smithy4s/aws/internals/package.scala +++ b/modules/aws-http4s/src/smithy4s/aws/internals/package.scala @@ -16,10 +16,10 @@ package smithy4s.aws -import smithy4s.http4s.kernel.RequestEncoder import fs2.compression.Compression -import smithy4s.schema.CachedSchemaCompiler import smithy4s.Hints +import smithy4s.http4s.kernel.RequestEncoder +import smithy4s.schema.CachedSchemaCompiler package object internals { diff --git a/modules/aws-http4s/test/src/smithy4s/aws/compliancetests/AwsComplianceSuite.scala b/modules/aws-http4s/test/src/smithy4s/aws/compliancetests/AwsComplianceSuite.scala index ca1e25e95..213c01b73 100644 --- a/modules/aws-http4s/test/src/smithy4s/aws/compliancetests/AwsComplianceSuite.scala +++ b/modules/aws-http4s/test/src/smithy4s/aws/compliancetests/AwsComplianceSuite.scala @@ -18,11 +18,11 @@ package smithy4s.aws import aws.protocols._ import cats.effect.IO -import smithy4s.dynamic.DynamicSchemaIndex -import smithy4s.ShapeId import cats.syntax.all._ +import smithy4s.ShapeId import smithy4s.aws.AwsJson.impl import smithy4s.compliancetests._ +import smithy4s.dynamic.DynamicSchemaIndex import smithy4s.tests.ProtocolComplianceSuite object AwsComplianceSuite extends ProtocolComplianceSuite { diff --git a/modules/bootstrapped/test/src/smithy4s/http/internals/UrlFormDataEncoderSchemaVisitorSpec.scala b/modules/bootstrapped/test/src/smithy4s/http/internals/UrlFormDataEncoderSchemaVisitorSpec.scala index 711f0ba03..0e8abab14 100644 --- a/modules/bootstrapped/test/src/smithy4s/http/internals/UrlFormDataEncoderSchemaVisitorSpec.scala +++ b/modules/bootstrapped/test/src/smithy4s/http/internals/UrlFormDataEncoderSchemaVisitorSpec.scala @@ -20,15 +20,16 @@ package internals import cats.effect.IO import cats.syntax.all._ +import smithy.api.XmlFlattened +import smithy.api.XmlName import smithy4s.Blob import smithy4s.Hints -import smithy4s.schema.Schema -import scala.collection.mutable import smithy4s.schema.CompilationCache +import smithy4s.schema.Schema import smithy4s.schema.Schema._ import weaver._ -import smithy.api.XmlFlattened -import smithy.api.XmlName + +import scala.collection.mutable object UrlFormDataEncoderSchemaVisitorSpec extends SimpleIOSuite { diff --git a/modules/core/src/smithy4s/http/HttpRestSchema.scala b/modules/core/src/smithy4s/http/HttpRestSchema.scala index 92f160a3d..c0fe95dfc 100644 --- a/modules/core/src/smithy4s/http/HttpRestSchema.scala +++ b/modules/core/src/smithy4s/http/HttpRestSchema.scala @@ -17,15 +17,15 @@ package smithy4s package http -import smithy4s.PartialData import smithy.api.HttpPayload -import smithy4s.schema._ +import smithy4s.PartialData +import smithy4s.capability.Zipper +import smithy4s.codecs.Reader +import smithy4s.codecs.Writer import smithy4s.schema.SchemaPartition.NoMatch import smithy4s.schema.SchemaPartition.SplittingMatch import smithy4s.schema.SchemaPartition.TotalMatch -import smithy4s.codecs.Writer -import smithy4s.codecs.Reader -import smithy4s.capability.Zipper +import smithy4s.schema._ /** * This construct indicates how a schema is split between http metadata diff --git a/modules/core/src/smithy4s/http/UrlForm.scala b/modules/core/src/smithy4s/http/UrlForm.scala index 04e029e68..b07452888 100644 --- a/modules/core/src/smithy4s/http/UrlForm.scala +++ b/modules/core/src/smithy4s/http/UrlForm.scala @@ -17,18 +17,17 @@ package smithy4s package http -import java.net.URLEncoder -import java.nio.charset.StandardCharsets - import smithy4s.codecs.PayloadPath import smithy4s.codecs.PayloadPath.Segment -import scala.collection.mutable -import smithy4s.schema.CachedSchemaCompiler import smithy4s.http.internals.UrlFormDataEncoder import smithy4s.http.internals.UrlFormDataEncoderSchemaVisitor - +import smithy4s.schema.CachedSchemaCompiler import smithy4s.schema.Schema +import java.net.URLEncoder +import java.nio.charset.StandardCharsets +import scala.collection.mutable + private[smithy4s] final case class UrlForm( formData: UrlForm.FormData.MultipleValues ) { diff --git a/modules/core/src/smithy4s/http/internals/UrlFormDataEncoder.scala b/modules/core/src/smithy4s/http/internals/UrlFormDataEncoder.scala index ad34f1f04..23b3e28eb 100644 --- a/modules/core/src/smithy4s/http/internals/UrlFormDataEncoder.scala +++ b/modules/core/src/smithy4s/http/internals/UrlFormDataEncoder.scala @@ -19,8 +19,8 @@ package http package internals import smithy4s.capability.EncoderK -import smithy4s.http.UrlForm import smithy4s.codecs.PayloadPath +import smithy4s.http.UrlForm private[smithy4s] trait UrlFormDataEncoder[-A] { self => diff --git a/modules/core/src/smithy4s/http/internals/UrlFormDataEncoderSchemaVisitor.scala b/modules/core/src/smithy4s/http/internals/UrlFormDataEncoderSchemaVisitor.scala index f397f93f5..3c537d827 100644 --- a/modules/core/src/smithy4s/http/internals/UrlFormDataEncoderSchemaVisitor.scala +++ b/modules/core/src/smithy4s/http/internals/UrlFormDataEncoderSchemaVisitor.scala @@ -18,10 +18,11 @@ package smithy4s package http package internals -import smithy.api.{XmlFlattened, XmlName} +import smithy.api.XmlFlattened +import smithy.api.XmlName +import smithy4s.codecs.PayloadPath import smithy4s.http._ import smithy4s.schema._ -import smithy4s.codecs.PayloadPath private[smithy4s] class UrlFormDataEncoderSchemaVisitor( val cache: CompilationCache[UrlFormDataEncoder], diff --git a/modules/core/src/smithy4s/internals/DocumentDecoderSchemaVisitor.scala b/modules/core/src/smithy4s/internals/DocumentDecoderSchemaVisitor.scala index b47d47550..e5e7c577f 100644 --- a/modules/core/src/smithy4s/internals/DocumentDecoderSchemaVisitor.scala +++ b/modules/core/src/smithy4s/internals/DocumentDecoderSchemaVisitor.scala @@ -17,20 +17,20 @@ package smithy4s package internals -import java.util.Base64 -import java.util.UUID - +import alloy.Discriminated import smithy.api.JsonName import smithy.api.TimestampFormat import smithy.api.TimestampFormat.DATE_TIME import smithy.api.TimestampFormat.EPOCH_SECONDS import smithy.api.TimestampFormat.HTTP_DATE -import alloy.Discriminated -import smithy4s.codecs._ -import smithy4s.capability.Covariant import smithy4s.Document._ -import smithy4s.schema._ +import smithy4s.capability.Covariant +import smithy4s.codecs._ import smithy4s.schema.Primitive._ +import smithy4s.schema._ + +import java.util.Base64 +import java.util.UUID import scala.collection.immutable.ListMap trait DocumentDecoder[A] { self => diff --git a/modules/json/test/src/smithy4s/json/SchemaVisitorJCodecTests.scala b/modules/json/test/src/smithy4s/json/SchemaVisitorJCodecTests.scala index 1458f35d5..e18dcbfa6 100644 --- a/modules/json/test/src/smithy4s/json/SchemaVisitorJCodecTests.scala +++ b/modules/json/test/src/smithy4s/json/SchemaVisitorJCodecTests.scala @@ -17,30 +17,27 @@ package smithy4s package json +import alloy.Discriminated import com.github.plokhotnyuk.jsoniter_scala.core.{readFromString => _, _} +import munit.FunSuite +import smithy.api.Default import smithy.api.JsonName -import smithy4s.schema.Schema._ - import smithy4s.codecs.PayloadError import smithy4s.codecs.PayloadPath -import smithy4s.example.{ - CheckedOrUnchecked, - CheckedOrUnchecked2, - FaceCard, - Four, - One, - PayloadData, - RangeCheck, - TestBiggerUnion, - Three, - UntaggedUnion -} -import alloy.Discriminated +import smithy4s.example.CheckedOrUnchecked +import smithy4s.example.CheckedOrUnchecked2 +import smithy4s.example.FaceCard +import smithy4s.example.Four +import smithy4s.example.One +import smithy4s.example.PayloadData +import smithy4s.example.RangeCheck +import smithy4s.example.TestBiggerUnion +import smithy4s.example.Three +import smithy4s.example.UntaggedUnion +import smithy4s.schema.Schema._ import scala.collection.immutable.ListMap import scala.util.Try -import munit.FunSuite -import smithy.api.Default class SchemaVisitorJCodecTests() extends FunSuite { diff --git a/modules/sandbox/src/Sandbox.scala b/modules/sandbox/src/Sandbox.scala index 42be047d1..ac9ecbf80 100644 --- a/modules/sandbox/src/Sandbox.scala +++ b/modules/sandbox/src/Sandbox.scala @@ -14,12 +14,11 @@ * limitations under the License. */ -import smithy4s.aws._ import cats.effect._ +import com.amazonaws.cloudwatch._ import org.http4s.client.middleware._ import org.http4s.ember.client.EmberClientBuilder - -import com.amazonaws.cloudwatch._ +import smithy4s.aws._ object Main extends IOApp.Simple { diff --git a/modules/tests/src/smithy4s/tests/ProtocolComplianceSuite.scala b/modules/tests/src/smithy4s/tests/ProtocolComplianceSuite.scala index ce910f865..dfa92e437 100644 --- a/modules/tests/src/smithy4s/tests/ProtocolComplianceSuite.scala +++ b/modules/tests/src/smithy4s/tests/ProtocolComplianceSuite.scala @@ -19,15 +19,19 @@ package smithy4s.tests import cats.effect.IO import cats.effect.std.Env import cats.syntax.all._ +import fs2.Stream import fs2.io.file.Path -import smithy4s.{Blob, Document, Schema, ShapeId} +import smithy4s.Blob +import smithy4s.Document +import smithy4s.Schema +import smithy4s.ShapeId +import smithy4s.codecs._ import smithy4s.compliancetests._ import smithy4s.dynamic.DynamicSchemaIndex -import smithy4s.dynamic.model.Model import smithy4s.dynamic.DynamicSchemaIndex.load -import smithy4s.codecs._ +import smithy4s.dynamic.model.Model import weaver._ -import fs2.Stream + import java.util.regex.Pattern abstract class ProtocolComplianceSuite From 0522d130c230bb1a40ae02fecb94980f48beb5c9 Mon Sep 17 00:00:00 2001 From: David Piggott Date: Thu, 27 Jul 2023 13:08:48 +0100 Subject: [PATCH 09/25] WIP exercising ec2 protocol in sandbox Codegen is failing with a bunch of errors like this: ... ... ... [WARNING] com.amazonaws.ec2#ResourceType$prefix_list: The name `prefix_list` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58444:5 [WARNING] com.amazonaws.ec2#ResourceType$replace_root_volume_task: The name `replace_root_volume_task` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58445:5 [WARNING] com.amazonaws.ec2#ResourceType$reserved_instances: The name `reserved_instances` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58446:5 [WARNING] com.amazonaws.ec2#ResourceType$route_table: The name `route_table` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58447:5 [WARNING] com.amazonaws.ec2#ResourceType$security_group: The name `security_group` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58448:5 [WARNING] com.amazonaws.ec2#ResourceType$security_group_rule: The name `security_group_rule` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58449:5 [WARNING] com.amazonaws.ec2#ResourceType$snapshot: The name `snapshot` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58450:5 [WARNING] com.amazonaws.ec2#ResourceType$spot_fleet_request: The name `spot_fleet_request` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58451:5 [WARNING] com.amazonaws.ec2#ResourceType$spot_instances_request: The name `spot_instances_request` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58452:5 [WARNING] com.amazonaws.ec2#ResourceType$subnet: The name `subnet` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58453:5 [WARNING] com.amazonaws.ec2#ResourceType$subnet_cidr_reservation: The name `subnet_cidr_reservation` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58454:5 [WARNING] com.amazonaws.ec2#ResourceType$traffic_mirror_filter: The name `traffic_mirror_filter` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58455:5 [WARNING] com.amazonaws.ec2#ResourceType$traffic_mirror_filter_rule: The name `traffic_mirror_filter_rule` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58476:5 [WARNING] com.amazonaws.ec2#ResourceType$traffic_mirror_session: The name `traffic_mirror_session` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58456:5 [WARNING] com.amazonaws.ec2#ResourceType$traffic_mirror_target: The name `traffic_mirror_target` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58457:5 [WARNING] com.amazonaws.ec2#ResourceType$transit_gateway: The name `transit_gateway` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58458:5 [WARNING] com.amazonaws.ec2#ResourceType$transit_gateway_attachment: The name `transit_gateway_attachment` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58459:5 [WARNING] com.amazonaws.ec2#ResourceType$transit_gateway_connect_peer: The name `transit_gateway_connect_peer` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58460:5 [WARNING] com.amazonaws.ec2#ResourceType$transit_gateway_multicast_domain: The name `transit_gateway_multicast_domain` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58461:5 [WARNING] com.amazonaws.ec2#ResourceType$transit_gateway_policy_table: The name `transit_gateway_policy_table` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58462:5 [WARNING] com.amazonaws.ec2#ResourceType$transit_gateway_route_table: The name `transit_gateway_route_table` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58463:5 [WARNING] com.amazonaws.ec2#ResourceType$transit_gateway_route_table_announcement: The name `transit_gateway_route_table_announcement` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58464:5 [WARNING] com.amazonaws.ec2#ResourceType$verified_access_endpoint: The name `verified_access_endpoint` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58480:5 [WARNING] com.amazonaws.ec2#ResourceType$verified_access_group: The name `verified_access_group` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58479:5 [WARNING] com.amazonaws.ec2#ResourceType$verified_access_instance: The name `verified_access_instance` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58478:5 [WARNING] com.amazonaws.ec2#ResourceType$verified_access_policy: The name `verified_access_policy` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58481:5 [WARNING] com.amazonaws.ec2#ResourceType$verified_access_trust_provider: The name `verified_access_trust_provider` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58482:5 [WARNING] com.amazonaws.ec2#ResourceType$volume: The name `volume` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58465:5 [WARNING] com.amazonaws.ec2#ResourceType$vpc: The name `vpc` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58466:5 [WARNING] com.amazonaws.ec2#ResourceType$vpc_block_public_access_exclusion: The name `vpc_block_public_access_exclusion` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58484:5 [WARNING] com.amazonaws.ec2#ResourceType$vpc_endpoint: The name `vpc_endpoint` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58467:5 [WARNING] com.amazonaws.ec2#ResourceType$vpc_endpoint_connection: The name `vpc_endpoint_connection` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58468:5 [WARNING] com.amazonaws.ec2#ResourceType$vpc_endpoint_connection_device_type: The name `vpc_endpoint_connection_device_type` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58477:5 [WARNING] com.amazonaws.ec2#ResourceType$vpc_endpoint_service: The name `vpc_endpoint_service` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58469:5 [WARNING] com.amazonaws.ec2#ResourceType$vpc_endpoint_service_permission: The name `vpc_endpoint_service_permission` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58470:5 [WARNING] com.amazonaws.ec2#ResourceType$vpc_flow_log: The name `vpc_flow_log` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58474:5 [WARNING] com.amazonaws.ec2#ResourceType$vpc_peering_connection: The name `vpc_peering_connection` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58471:5 [WARNING] com.amazonaws.ec2#ResourceType$vpn_connection: The name `vpn_connection` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58472:5 [WARNING] com.amazonaws.ec2#ResourceType$vpn_connection_device_type: The name `vpn_connection_device_type` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58483:5 [WARNING] com.amazonaws.ec2#ResourceType$vpn_gateway: The name `vpn_gateway` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58473:5 [WARNING] com.amazonaws.ec2#ResultRange: Error validating @default trait: Value provided for `com.amazonaws.ec2#ResultRange` must be greater than or equal to 20, but found 0 | DefaultTrait.Target jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58491:1 [WARNING] com.amazonaws.ec2#RootDeviceType$ebs: The name `ebs` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58517:5 [WARNING] com.amazonaws.ec2#RootDeviceType$instance_store: The name `instance_store` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58518:5 [WARNING] com.amazonaws.ec2#RouteOrigin$CreateRoute: The name `CreateRoute` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58525:5 [WARNING] com.amazonaws.ec2#RouteOrigin$CreateRouteTable: The name `CreateRouteTable` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58524:5 [WARNING] com.amazonaws.ec2#RouteOrigin$EnableVgwRoutePropagation: The name `EnableVgwRoutePropagation` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58526:5 [WARNING] com.amazonaws.ec2#RouteState$active: The name `active` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58530:5 [WARNING] com.amazonaws.ec2#RouteState$blackhole: The name `blackhole` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58531:5 [WARNING] com.amazonaws.ec2#RouteTableAssociationStateCode$associated: The name `associated` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58538:5 [WARNING] com.amazonaws.ec2#RouteTableAssociationStateCode$associating: The name `associating` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58537:5 [WARNING] com.amazonaws.ec2#RouteTableAssociationStateCode$disassociated: The name `disassociated` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58540:5 [WARNING] com.amazonaws.ec2#RouteTableAssociationStateCode$disassociating: The name `disassociating` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58539:5 [WARNING] com.amazonaws.ec2#RouteTableAssociationStateCode$failed: The name `failed` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58541:5 [WARNING] com.amazonaws.ec2#RuleAction$allow: The name `allow` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58547:5 [WARNING] com.amazonaws.ec2#RuleAction$deny: The name `deny` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58548:5 [WARNING] com.amazonaws.ec2#SearchTransitGatewayMulticastGroupsRequest$MaxResults: Error validating @default trait: Value provided for `com.amazonaws.ec2#TransitGatewayMaxResults` must be greater than or equal to 5, but found 0 | DefaultTrait.Target jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:46791:44 [WARNING] com.amazonaws.ec2#SearchTransitGatewayRoutesRequest$MaxResults: Error validating @default trait: Value provided for `com.amazonaws.ec2#TransitGatewayMaxResults` must be greater than or equal to 5, but found 0 | DefaultTrait.Target jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:46870:44 [WARNING] com.amazonaws.ec2#SelfServicePortal$disabled: The name `disabled` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58569:5 [WARNING] com.amazonaws.ec2#SelfServicePortal$enabled: The name `enabled` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58568:5 [WARNING] com.amazonaws.ec2#ServiceConnectivityType$ipv4: The name `ipv4` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58576:5 [WARNING] com.amazonaws.ec2#ServiceConnectivityType$ipv6: The name `ipv6` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58577:5 [WARNING] com.amazonaws.ec2#ServiceState$Available: The name `Available` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58582:5 [WARNING] com.amazonaws.ec2#ServiceState$Deleted: The name `Deleted` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58584:5 [WARNING] com.amazonaws.ec2#ServiceState$Deleting: The name `Deleting` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58583:5 [WARNING] com.amazonaws.ec2#ServiceState$Failed: The name `Failed` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58585:5 [WARNING] com.amazonaws.ec2#ServiceState$Pending: The name `Pending` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58581:5 [WARNING] com.amazonaws.ec2#ServiceType$Gateway: The name `Gateway` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58590:5 [WARNING] com.amazonaws.ec2#ServiceType$GatewayLoadBalancer: The name `GatewayLoadBalancer` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58591:5 [WARNING] com.amazonaws.ec2#ServiceType$Interface: The name `Interface` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58589:5 [WARNING] com.amazonaws.ec2#ShutdownBehavior$stop: The name `stop` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58595:5 [WARNING] com.amazonaws.ec2#ShutdownBehavior$terminate: The name `terminate` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58596:5 [WARNING] com.amazonaws.ec2#SnapshotAttributeName$createVolumePermission: The name `createVolumePermission` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58601:5 [WARNING] com.amazonaws.ec2#SnapshotAttributeName$productCodes: The name `productCodes` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58600:5 [WARNING] com.amazonaws.ec2#SnapshotState$completed: The name `completed` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58608:5 [WARNING] com.amazonaws.ec2#SnapshotState$error: The name `error` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58609:5 [WARNING] com.amazonaws.ec2#SnapshotState$pending: The name `pending` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58607:5 [WARNING] com.amazonaws.ec2#SnapshotState$recoverable: The name `recoverable` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58610:5 [WARNING] com.amazonaws.ec2#SnapshotState$recovering: The name `recovering` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58611:5 [WARNING] com.amazonaws.ec2#SpotInstanceInterruptionBehavior$hibernate: The name `hibernate` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58625:5 [WARNING] com.amazonaws.ec2#SpotInstanceInterruptionBehavior$stop: The name `stop` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58626:5 [WARNING] com.amazonaws.ec2#SpotInstanceInterruptionBehavior$terminate: The name `terminate` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58627:5 [WARNING] com.amazonaws.ec2#SpotInstanceState$active: The name `active` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58634:5 [WARNING] com.amazonaws.ec2#SpotInstanceState$cancelled: The name `cancelled` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58636:5 [WARNING] com.amazonaws.ec2#SpotInstanceState$closed: The name `closed` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58635:5 [WARNING] com.amazonaws.ec2#SpotInstanceState$failed: The name `failed` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58637:5 [WARNING] com.amazonaws.ec2#SpotInstanceState$open: The name `open` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58633:5 [WARNING] com.amazonaws.ec2#SpotInstanceType$one_time: The name `one_time` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58641:5 [WARNING] com.amazonaws.ec2#SpotInstanceType$persistent: The name `persistent` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58642:5 [WARNING] com.amazonaws.ec2#SpotPlacementScoresMaxResults: Error validating @default trait: Value provided for `com.amazonaws.ec2#SpotPlacementScoresMaxResults` must be greater than or equal to 10, but found 0 | DefaultTrait.Target jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58645:1 [WARNING] com.amazonaws.ec2#SpotPlacementScoresTargetCapacity: Error validating @default trait: Value provided for `com.amazonaws.ec2#SpotPlacementScoresTargetCapacity` must be greater than or equal to 1, but found 0 | DefaultTrait.Target jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58652:1 [WARNING] com.amazonaws.ec2#SpreadLevel$host: The name `host` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58660:5 [WARNING] com.amazonaws.ec2#SpreadLevel$rack: The name `rack` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58661:5 [WARNING] com.amazonaws.ec2#State$Available: The name `Available` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58667:5 [WARNING] com.amazonaws.ec2#State$Deleted: The name `Deleted` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58669:5 [WARNING] com.amazonaws.ec2#State$Deleting: The name `Deleting` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58668:5 [WARNING] com.amazonaws.ec2#State$Expired: The name `Expired` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58672:5 [WARNING] com.amazonaws.ec2#State$Failed: The name `Failed` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58671:5 [WARNING] com.amazonaws.ec2#State$Pending: The name `Pending` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58666:5 [WARNING] com.amazonaws.ec2#State$PendingAcceptance: The name `PendingAcceptance` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58665:5 [WARNING] com.amazonaws.ec2#State$Rejected: The name `Rejected` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58670:5 [WARNING] com.amazonaws.ec2#StaticSourcesSupportValue$disable: The name `disable` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58677:5 [WARNING] com.amazonaws.ec2#StaticSourcesSupportValue$enable: The name `enable` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58676:5 [WARNING] com.amazonaws.ec2#StatisticType$p50: The name `p50` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58681:5 [WARNING] com.amazonaws.ec2#Status$inClassic: The name `inClassic` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58687:5 [WARNING] com.amazonaws.ec2#Status$inVpc: The name `inVpc` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58686:5 [WARNING] com.amazonaws.ec2#Status$moveInProgress: The name `moveInProgress` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58685:5 [WARNING] com.amazonaws.ec2#StatusName$reachability: The name `reachability` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58691:5 [WARNING] com.amazonaws.ec2#StatusType$failed: The name `failed` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58696:5 [WARNING] com.amazonaws.ec2#StatusType$initializing: The name `initializing` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58698:5 [WARNING] com.amazonaws.ec2#StatusType$insufficient_data: The name `insufficient_data` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58697:5 [WARNING] com.amazonaws.ec2#StatusType$passed: The name `passed` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58695:5 [WARNING] com.amazonaws.ec2#StorageTier$archive: The name `archive` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58702:5 [WARNING] com.amazonaws.ec2#StorageTier$standard: The name `standard` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58703:5 [WARNING] com.amazonaws.ec2#SubnetCidrBlockStateCode$associated: The name `associated` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58718:5 [WARNING] com.amazonaws.ec2#SubnetCidrBlockStateCode$associating: The name `associating` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58717:5 [WARNING] com.amazonaws.ec2#SubnetCidrBlockStateCode$disassociated: The name `disassociated` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58720:5 [WARNING] com.amazonaws.ec2#SubnetCidrBlockStateCode$disassociating: The name `disassociating` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58719:5 [WARNING] com.amazonaws.ec2#SubnetCidrBlockStateCode$failed: The name `failed` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58722:5 [WARNING] com.amazonaws.ec2#SubnetCidrBlockStateCode$failing: The name `failing` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58721:5 [WARNING] com.amazonaws.ec2#SubnetCidrReservationType$explicit: The name `explicit` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58729:5 [WARNING] com.amazonaws.ec2#SubnetCidrReservationType$prefix: The name `prefix` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58728:5 [WARNING] com.amazonaws.ec2#SubnetState$available: The name `available` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58736:5 [WARNING] com.amazonaws.ec2#SubnetState$pending: The name `pending` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58735:5 [WARNING] com.amazonaws.ec2#SummaryStatus$impaired: The name `impaired` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58741:5 [WARNING] com.amazonaws.ec2#SummaryStatus$initializing: The name `initializing` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58744:5 [WARNING] com.amazonaws.ec2#SummaryStatus$insufficient_data: The name `insufficient_data` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58742:5 [WARNING] com.amazonaws.ec2#SummaryStatus$not_applicable: The name `not_applicable` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58743:5 [WARNING] com.amazonaws.ec2#SummaryStatus$ok: The name `ok` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58740:5 [WARNING] com.amazonaws.ec2#TargetStorageTier$archive: The name `archive` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58756:5 [WARNING] com.amazonaws.ec2#Tenancy$dedicated: The name `dedicated` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58766:5 [WARNING] com.amazonaws.ec2#Tenancy$default: The name `default` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58765:5 [WARNING] com.amazonaws.ec2#Tenancy$host: The name `host` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58767:5 [WARNING] com.amazonaws.ec2#TieringOperationStatus$archival_completed: The name `archival_completed` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58774:5 [WARNING] com.amazonaws.ec2#TieringOperationStatus$archival_failed: The name `archival_failed` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58775:5 [WARNING] com.amazonaws.ec2#TieringOperationStatus$archival_in_progress: The name `archival_in_progress` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58773:5 [WARNING] com.amazonaws.ec2#TieringOperationStatus$permanent_restore_completed: The name `permanent_restore_completed` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58780:5 [WARNING] com.amazonaws.ec2#TieringOperationStatus$permanent_restore_failed: The name `permanent_restore_failed` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58781:5 [WARNING] com.amazonaws.ec2#TieringOperationStatus$permanent_restore_in_progress: The name `permanent_restore_in_progress` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58779:5 [WARNING] com.amazonaws.ec2#TieringOperationStatus$temporary_restore_completed: The name `temporary_restore_completed` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58777:5 [WARNING] com.amazonaws.ec2#TieringOperationStatus$temporary_restore_failed: The name `temporary_restore_failed` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58778:5 [WARNING] com.amazonaws.ec2#TieringOperationStatus$temporary_restore_in_progress: The name `temporary_restore_in_progress` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58776:5 [WARNING] com.amazonaws.ec2#TpmSupportValues$v2_0: The name `v2_0` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58789:5 [WARNING] com.amazonaws.ec2#TrafficDirection$egress: The name `egress` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58794:5 [WARNING] com.amazonaws.ec2#TrafficDirection$ingress: The name `ingress` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58793:5 [WARNING] com.amazonaws.ec2#TrafficMirrorFilterRuleField$description: The name `description` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58803:5 [WARNING] com.amazonaws.ec2#TrafficMirrorFilterRuleField$destination_port_range: The name `destination_port_range` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58800:5 [WARNING] com.amazonaws.ec2#TrafficMirrorFilterRuleField$protocol: The name `protocol` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58802:5 [WARNING] com.amazonaws.ec2#TrafficMirrorFilterRuleField$source_port_range: The name `source_port_range` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58801:5 [WARNING] com.amazonaws.ec2#TrafficMirrorNetworkService$amazon_dns: The name `amazon_dns` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58816:5 [WARNING] com.amazonaws.ec2#TrafficMirrorRuleAction$accept: The name `accept` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58820:5 [WARNING] com.amazonaws.ec2#TrafficMirrorRuleAction$reject: The name `reject` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58821:5 [WARNING] com.amazonaws.ec2#TrafficMirrorSessionField$description: The name `description` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58826:5 [WARNING] com.amazonaws.ec2#TrafficMirrorSessionField$packet_length: The name `packet_length` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58825:5 [WARNING] com.amazonaws.ec2#TrafficMirrorSessionField$virtual_network_id: The name `virtual_network_id` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58827:5 [WARNING] com.amazonaws.ec2#TrafficMirrorTargetType$gateway_load_balancer_endpoint: The name `gateway_load_balancer_endpoint` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58837:5 [WARNING] com.amazonaws.ec2#TrafficMirrorTargetType$network_interface: The name `network_interface` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58835:5 [WARNING] com.amazonaws.ec2#TrafficMirrorTargetType$network_load_balancer: The name `network_load_balancer` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58836:5 [WARNING] com.amazonaws.ec2#TrafficMirroringMaxResults: Error validating @default trait: Value provided for `com.amazonaws.ec2#TrafficMirroringMaxResults` must be greater than or equal to 5, but found 0 | DefaultTrait.Target jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58808:1 [WARNING] com.amazonaws.ec2#TransitGatewayAssociationState$associated: The name `associated` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58850:5 [WARNING] com.amazonaws.ec2#TransitGatewayAssociationState$associating: The name `associating` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58849:5 [WARNING] com.amazonaws.ec2#TransitGatewayAssociationState$disassociated: The name `disassociated` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58852:5 [WARNING] com.amazonaws.ec2#TransitGatewayAssociationState$disassociating: The name `disassociating` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58851:5 [WARNING] com.amazonaws.ec2#TransitGatewayAttachmentResourceType$connect: The name `connect` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58861:5 [WARNING] com.amazonaws.ec2#TransitGatewayAttachmentResourceType$direct_connect_gateway: The name `direct_connect_gateway` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58860:5 [WARNING] com.amazonaws.ec2#TransitGatewayAttachmentResourceType$peering: The name `peering` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58862:5 [WARNING] com.amazonaws.ec2#TransitGatewayAttachmentResourceType$tgw_peering: The name `tgw_peering` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58863:5 [WARNING] com.amazonaws.ec2#TransitGatewayAttachmentResourceType$vpc: The name `vpc` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58858:5 [WARNING] com.amazonaws.ec2#TransitGatewayAttachmentResourceType$vpn: The name `vpn` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58859:5 [WARNING] com.amazonaws.ec2#TransitGatewayAttachmentState$available: The name `available` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58872:5 [WARNING] com.amazonaws.ec2#TransitGatewayAttachmentState$deleted: The name `deleted` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58875:5 [WARNING] com.amazonaws.ec2#TransitGatewayAttachmentState$deleting: The name `deleting` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58874:5 [WARNING] com.amazonaws.ec2#TransitGatewayAttachmentState$failed: The name `failed` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58876:5 [WARNING] com.amazonaws.ec2#TransitGatewayAttachmentState$failing: The name `failing` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58879:5 [WARNING] com.amazonaws.ec2#TransitGatewayAttachmentState$initiating: The name `initiating` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58867:5 [WARNING] com.amazonaws.ec2#TransitGatewayAttachmentState$initiatingRequest: The name `initiatingRequest` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58868:5 [WARNING] com.amazonaws.ec2#TransitGatewayAttachmentState$modifying: The name `modifying` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58873:5 [WARNING] com.amazonaws.ec2#TransitGatewayAttachmentState$pending: The name `pending` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58871:5 [WARNING] com.amazonaws.ec2#TransitGatewayAttachmentState$pendingAcceptance: The name `pendingAcceptance` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58869:5 [WARNING] com.amazonaws.ec2#TransitGatewayAttachmentState$rejected: The name `rejected` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58877:5 [WARNING] com.amazonaws.ec2#TransitGatewayAttachmentState$rejecting: The name `rejecting` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58878:5 [WARNING] com.amazonaws.ec2#TransitGatewayAttachmentState$rollingBack: The name `rollingBack` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58870:5 [WARNING] com.amazonaws.ec2#TransitGatewayConnectPeerState$available: The name `available` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58886:5 [WARNING] com.amazonaws.ec2#TransitGatewayConnectPeerState$deleted: The name `deleted` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58888:5 [WARNING] com.amazonaws.ec2#TransitGatewayConnectPeerState$deleting: The name `deleting` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58887:5 [WARNING] com.amazonaws.ec2#TransitGatewayConnectPeerState$pending: The name `pending` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58885:5 [WARNING] com.amazonaws.ec2#TransitGatewayMaxResults: Error validating @default trait: Value provided for `com.amazonaws.ec2#TransitGatewayMaxResults` must be greater than or equal to 5, but found 0 | DefaultTrait.Target jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58893:1 [WARNING] com.amazonaws.ec2#TransitGatewayMulitcastDomainAssociationState$associated: The name `associated` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58903:5 [WARNING] com.amazonaws.ec2#TransitGatewayMulitcastDomainAssociationState$associating: The name `associating` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58902:5 [WARNING] com.amazonaws.ec2#TransitGatewayMulitcastDomainAssociationState$disassociated: The name `disassociated` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58905:5 [WARNING] com.amazonaws.ec2#TransitGatewayMulitcastDomainAssociationState$disassociating: The name `disassociating` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58904:5 [WARNING] com.amazonaws.ec2#TransitGatewayMulitcastDomainAssociationState$failed: The name `failed` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58907:5 [WARNING] com.amazonaws.ec2#TransitGatewayMulitcastDomainAssociationState$pendingAcceptance: The name `pendingAcceptance` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58901:5 [WARNING] com.amazonaws.ec2#TransitGatewayMulitcastDomainAssociationState$rejected: The name `rejected` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58906:5 [WARNING] com.amazonaws.ec2#TransitGatewayMulticastDomainState$available: The name `available` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58914:5 [WARNING] com.amazonaws.ec2#TransitGatewayMulticastDomainState$deleted: The name `deleted` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58916:5 [WARNING] com.amazonaws.ec2#TransitGatewayMulticastDomainState$deleting: The name `deleting` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58915:5 [WARNING] com.amazonaws.ec2#TransitGatewayMulticastDomainState$pending: The name `pending` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58913:5 [WARNING] com.amazonaws.ec2#TransitGatewayPolicyTableState$available: The name `available` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58923:5 [WARNING] com.amazonaws.ec2#TransitGatewayPolicyTableState$deleted: The name `deleted` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58925:5 [WARNING] com.amazonaws.ec2#TransitGatewayPolicyTableState$deleting: The name `deleting` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58924:5 [WARNING] com.amazonaws.ec2#TransitGatewayPolicyTableState$pending: The name `pending` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58922:5 [WARNING] com.amazonaws.ec2#TransitGatewayPrefixListReferenceState$available: The name `available` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58930:5 [WARNING] com.amazonaws.ec2#TransitGatewayPrefixListReferenceState$deleting: The name `deleting` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58932:5 [WARNING] com.amazonaws.ec2#TransitGatewayPrefixListReferenceState$modifying: The name `modifying` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58931:5 [WARNING] com.amazonaws.ec2#TransitGatewayPrefixListReferenceState$pending: The name `pending` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58929:5 [WARNING] com.amazonaws.ec2#TransitGatewayPropagationState$disabled: The name `disabled` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58939:5 [WARNING] com.amazonaws.ec2#TransitGatewayPropagationState$disabling: The name `disabling` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58938:5 [WARNING] com.amazonaws.ec2#TransitGatewayPropagationState$enabled: The name `enabled` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58937:5 [WARNING] com.amazonaws.ec2#TransitGatewayPropagationState$enabling: The name `enabling` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58936:5 [WARNING] com.amazonaws.ec2#TransitGatewayRouteState$active: The name `active` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58944:5 [WARNING] com.amazonaws.ec2#TransitGatewayRouteState$blackhole: The name `blackhole` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58945:5 [WARNING] com.amazonaws.ec2#TransitGatewayRouteState$deleted: The name `deleted` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58947:5 [WARNING] com.amazonaws.ec2#TransitGatewayRouteState$deleting: The name `deleting` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58946:5 [WARNING] com.amazonaws.ec2#TransitGatewayRouteState$pending: The name `pending` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58943:5 [WARNING] com.amazonaws.ec2#TransitGatewayRouteTableAnnouncementDirection$incoming: The name `incoming` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58952:5 [WARNING] com.amazonaws.ec2#TransitGatewayRouteTableAnnouncementDirection$outgoing: The name `outgoing` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58951:5 [WARNING] com.amazonaws.ec2#TransitGatewayRouteTableAnnouncementState$available: The name `available` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58958:5 [WARNING] com.amazonaws.ec2#TransitGatewayRouteTableAnnouncementState$deleted: The name `deleted` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58963:5 [WARNING] com.amazonaws.ec2#TransitGatewayRouteTableAnnouncementState$deleting: The name `deleting` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58962:5 [WARNING] com.amazonaws.ec2#TransitGatewayRouteTableAnnouncementState$failed: The name `failed` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58961:5 [WARNING] com.amazonaws.ec2#TransitGatewayRouteTableAnnouncementState$failing: The name `failing` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58960:5 [WARNING] com.amazonaws.ec2#TransitGatewayRouteTableAnnouncementState$pending: The name `pending` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58959:5 [WARNING] com.amazonaws.ec2#TransitGatewayRouteTableState$available: The name `available` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58970:5 [WARNING] com.amazonaws.ec2#TransitGatewayRouteTableState$deleted: The name `deleted` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58972:5 [WARNING] com.amazonaws.ec2#TransitGatewayRouteTableState$deleting: The name `deleting` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58971:5 [WARNING] com.amazonaws.ec2#TransitGatewayRouteTableState$pending: The name `pending` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58969:5 [WARNING] com.amazonaws.ec2#TransitGatewayRouteType$propagated: The name `propagated` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58977:5 [WARNING] com.amazonaws.ec2#TransitGatewayRouteType$static: The name `static` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58976:5 [WARNING] com.amazonaws.ec2#TransitGatewayState$available: The name `available` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58982:5 [WARNING] com.amazonaws.ec2#TransitGatewayState$deleted: The name `deleted` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58985:5 [WARNING] com.amazonaws.ec2#TransitGatewayState$deleting: The name `deleting` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58984:5 [WARNING] com.amazonaws.ec2#TransitGatewayState$modifying: The name `modifying` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58983:5 [WARNING] com.amazonaws.ec2#TransitGatewayState$pending: The name `pending` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58981:5 [WARNING] com.amazonaws.ec2#TransportProtocol$tcp: The name `tcp` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58989:5 [WARNING] com.amazonaws.ec2#TransportProtocol$udp: The name `udp` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58990:5 [WARNING] com.amazonaws.ec2#TrustProviderType$device: The name `device` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58997:5 [WARNING] com.amazonaws.ec2#TrustProviderType$user: The name `user` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:58996:5 [WARNING] com.amazonaws.ec2#TunnelInsideIpVersion$ipv4: The name `ipv4` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59001:5 [WARNING] com.amazonaws.ec2#TunnelInsideIpVersion$ipv6: The name `ipv6` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59002:5 [WARNING] com.amazonaws.ec2#UnassignPrivateNatGatewayAddressRequest$MaxDrainDurationSeconds: Error validating @default trait: Value provided for `com.amazonaws.ec2#DrainSeconds` must be greater than or equal to 1, but found 0 | DefaultTrait.Target jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:50825:45 [WARNING] com.amazonaws.ec2#UnlimitedSupportedInstanceFamily$t2: The name `t2` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59006:5 [WARNING] com.amazonaws.ec2#UnlimitedSupportedInstanceFamily$t3: The name `t3` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59007:5 [WARNING] com.amazonaws.ec2#UnlimitedSupportedInstanceFamily$t3a: The name `t3a` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59008:5 [WARNING] com.amazonaws.ec2#UnlimitedSupportedInstanceFamily$t4g: The name `t4g` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59009:5 [WARNING] com.amazonaws.ec2#UpdateSecurityGroupRuleDescriptionsEgress: This update style operation has top-level input members marked with the @default trait. It will be impossible to tell if the member was omitted or explicitly provided. Affected members: [DryRun] | DefaultValueInUpdate jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:8445:1 [WARNING] com.amazonaws.ec2#UpdateSecurityGroupRuleDescriptionsIngress: This update style operation has top-level input members marked with the @default trait. It will be impossible to tell if the member was omitted or explicitly provided. Affected members: [DryRun] | DefaultValueInUpdate jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:8454:1 [WARNING] com.amazonaws.ec2#UsageClassType$on_demand: The name `on_demand` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59021:5 [WARNING] com.amazonaws.ec2#UsageClassType$spot: The name `spot` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59020:5 [WARNING] com.amazonaws.ec2#UserTrustProviderType$iam_identity_center: The name `iam_identity_center` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59025:5 [WARNING] com.amazonaws.ec2#UserTrustProviderType$oidc: The name `oidc` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59026:5 [WARNING] com.amazonaws.ec2#VerifiedAccessEndpointAttachmentType$vpc: The name `vpc` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59032:5 [WARNING] com.amazonaws.ec2#VerifiedAccessEndpointEniOptions$Port: Error validating @default trait: Value provided for `com.amazonaws.ec2#VerifiedAccessEndpointPortNumber` must be greater than or equal to 1, but found 0 | DefaultTrait.Target jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:51231:46 [WARNING] com.amazonaws.ec2#VerifiedAccessEndpointLoadBalancerOptions$Port: Error validating @default trait: Value provided for `com.amazonaws.ec2#VerifiedAccessEndpointPortNumber` must be greater than or equal to 1, but found 0 | DefaultTrait.Target jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:51245:46 [WARNING] com.amazonaws.ec2#VerifiedAccessEndpointPortNumber: Error validating @default trait: Value provided for `com.amazonaws.ec2#VerifiedAccessEndpointPortNumber` must be greater than or equal to 1, but found 0 | DefaultTrait.Target jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59037:1 [WARNING] com.amazonaws.ec2#VerifiedAccessEndpointProtocol$http: The name `http` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59045:5 [WARNING] com.amazonaws.ec2#VerifiedAccessEndpointProtocol$https: The name `https` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59046:5 [WARNING] com.amazonaws.ec2#VerifiedAccessEndpointStatusCode$active: The name `active` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59051:5 [WARNING] com.amazonaws.ec2#VerifiedAccessEndpointStatusCode$deleted: The name `deleted` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59054:5 [WARNING] com.amazonaws.ec2#VerifiedAccessEndpointStatusCode$deleting: The name `deleting` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59053:5 [WARNING] com.amazonaws.ec2#VerifiedAccessEndpointStatusCode$pending: The name `pending` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59050:5 [WARNING] com.amazonaws.ec2#VerifiedAccessEndpointStatusCode$updating: The name `updating` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59052:5 [WARNING] com.amazonaws.ec2#VerifiedAccessEndpointType$load_balancer: The name `load_balancer` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59058:5 [WARNING] com.amazonaws.ec2#VerifiedAccessEndpointType$network_interface: The name `network_interface` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59059:5 [WARNING] com.amazonaws.ec2#VirtualizationType$hvm: The name `hvm` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59080:5 [WARNING] com.amazonaws.ec2#VirtualizationType$paravirtual: The name `paravirtual` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59081:5 [WARNING] com.amazonaws.ec2#VolumeAttachmentState$attached: The name `attached` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59086:5 [WARNING] com.amazonaws.ec2#VolumeAttachmentState$attaching: The name `attaching` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59085:5 [WARNING] com.amazonaws.ec2#VolumeAttachmentState$busy: The name `busy` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59089:5 [WARNING] com.amazonaws.ec2#VolumeAttachmentState$detached: The name `detached` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59088:5 [WARNING] com.amazonaws.ec2#VolumeAttachmentState$detaching: The name `detaching` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59087:5 [WARNING] com.amazonaws.ec2#VolumeAttributeName$autoEnableIO: The name `autoEnableIO` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59093:5 [WARNING] com.amazonaws.ec2#VolumeAttributeName$productCodes: The name `productCodes` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59094:5 [WARNING] com.amazonaws.ec2#VolumeModificationState$completed: The name `completed` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59104:5 [WARNING] com.amazonaws.ec2#VolumeModificationState$failed: The name `failed` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59105:5 [WARNING] com.amazonaws.ec2#VolumeModificationState$modifying: The name `modifying` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59102:5 [WARNING] com.amazonaws.ec2#VolumeModificationState$optimizing: The name `optimizing` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59103:5 [WARNING] com.amazonaws.ec2#VolumeState$available: The name `available` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59110:5 [WARNING] com.amazonaws.ec2#VolumeState$creating: The name `creating` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59109:5 [WARNING] com.amazonaws.ec2#VolumeState$deleted: The name `deleted` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59113:5 [WARNING] com.amazonaws.ec2#VolumeState$deleting: The name `deleting` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59112:5 [WARNING] com.amazonaws.ec2#VolumeState$error: The name `error` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59114:5 [WARNING] com.amazonaws.ec2#VolumeState$in_use: The name `in_use` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59111:5 [WARNING] com.amazonaws.ec2#VolumeStatusInfoStatus$impaired: The name `impaired` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59119:5 [WARNING] com.amazonaws.ec2#VolumeStatusInfoStatus$insufficient_data: The name `insufficient_data` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59120:5 [WARNING] com.amazonaws.ec2#VolumeStatusInfoStatus$ok: The name `ok` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59118:5 [WARNING] com.amazonaws.ec2#VolumeStatusName$io_enabled: The name `io_enabled` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59124:5 [WARNING] com.amazonaws.ec2#VolumeStatusName$io_performance: The name `io_performance` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59125:5 [WARNING] com.amazonaws.ec2#VolumeType$gp2: The name `gp2` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59132:5 [WARNING] com.amazonaws.ec2#VolumeType$gp3: The name `gp3` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59135:5 [WARNING] com.amazonaws.ec2#VolumeType$io1: The name `io1` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59130:5 [WARNING] com.amazonaws.ec2#VolumeType$io2: The name `io2` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59131:5 [WARNING] com.amazonaws.ec2#VolumeType$sc1: The name `sc1` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59133:5 [WARNING] com.amazonaws.ec2#VolumeType$st1: The name `st1` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59134:5 [WARNING] com.amazonaws.ec2#VolumeType$standard: The name `standard` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59129:5 [WARNING] com.amazonaws.ec2#VpcAttributeName$enableDnsHostnames: The name `enableDnsHostnames` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59140:5 [WARNING] com.amazonaws.ec2#VpcAttributeName$enableDnsSupport: The name `enableDnsSupport` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59139:5 [WARNING] com.amazonaws.ec2#VpcAttributeName$enableNetworkAddressUsageMetrics: The name `enableNetworkAddressUsageMetrics` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59141:5 [WARNING] com.amazonaws.ec2#VpcCidrBlockStateCode$associated: The name `associated` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59148:5 [WARNING] com.amazonaws.ec2#VpcCidrBlockStateCode$associating: The name `associating` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59147:5 [WARNING] com.amazonaws.ec2#VpcCidrBlockStateCode$disassociated: The name `disassociated` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59150:5 [WARNING] com.amazonaws.ec2#VpcCidrBlockStateCode$disassociating: The name `disassociating` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59149:5 [WARNING] com.amazonaws.ec2#VpcCidrBlockStateCode$failed: The name `failed` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59152:5 [WARNING] com.amazonaws.ec2#VpcCidrBlockStateCode$failing: The name `failing` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59151:5 [WARNING] com.amazonaws.ec2#VpcEndpointType$Gateway: The name `Gateway` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59161:5 [WARNING] com.amazonaws.ec2#VpcEndpointType$GatewayLoadBalancer: The name `GatewayLoadBalancer` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59162:5 [WARNING] com.amazonaws.ec2#VpcEndpointType$Interface: The name `Interface` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59160:5 [WARNING] com.amazonaws.ec2#VpcPeeringConnectionStateReasonCode$active: The name `active` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59176:5 [WARNING] com.amazonaws.ec2#VpcPeeringConnectionStateReasonCode$deleted: The name `deleted` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59177:5 [WARNING] com.amazonaws.ec2#VpcPeeringConnectionStateReasonCode$deleting: The name `deleting` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59182:5 [WARNING] com.amazonaws.ec2#VpcPeeringConnectionStateReasonCode$expired: The name `expired` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59180:5 [WARNING] com.amazonaws.ec2#VpcPeeringConnectionStateReasonCode$failed: The name `failed` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59179:5 [WARNING] com.amazonaws.ec2#VpcPeeringConnectionStateReasonCode$initiating_request: The name `initiating_request` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59174:5 [WARNING] com.amazonaws.ec2#VpcPeeringConnectionStateReasonCode$pending_acceptance: The name `pending_acceptance` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59175:5 [WARNING] com.amazonaws.ec2#VpcPeeringConnectionStateReasonCode$provisioning: The name `provisioning` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59181:5 [WARNING] com.amazonaws.ec2#VpcPeeringConnectionStateReasonCode$rejected: The name `rejected` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59178:5 [WARNING] com.amazonaws.ec2#VpcState$available: The name `available` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59187:5 [WARNING] com.amazonaws.ec2#VpcState$pending: The name `pending` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59186:5 [WARNING] com.amazonaws.ec2#VpcTenancy$default: The name `default` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59191:5 [WARNING] com.amazonaws.ec2#VpnEcmpSupportValue$disable: The name `disable` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59203:5 [WARNING] com.amazonaws.ec2#VpnEcmpSupportValue$enable: The name `enable` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59202:5 [WARNING] com.amazonaws.ec2#VpnProtocol$openvpn: The name `openvpn` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59209:5 [WARNING] com.amazonaws.ec2#VpnState$available: The name `available` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59214:5 [WARNING] com.amazonaws.ec2#VpnState$deleted: The name `deleted` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59216:5 [WARNING] com.amazonaws.ec2#VpnState$deleting: The name `deleting` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59215:5 [WARNING] com.amazonaws.ec2#VpnState$pending: The name `pending` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59213:5 [WARNING] com.amazonaws.ec2#VpnStaticRouteSource$Static: The name `Static` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59220:5 [WARNING] com.amazonaws.ec2#WeekDay$friday: The name `friday` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59229:5 [WARNING] com.amazonaws.ec2#WeekDay$monday: The name `monday` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59225:5 [WARNING] com.amazonaws.ec2#WeekDay$saturday: The name `saturday` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59230:5 [WARNING] com.amazonaws.ec2#WeekDay$sunday: The name `sunday` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59224:5 [WARNING] com.amazonaws.ec2#WeekDay$thursday: The name `thursday` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59228:5 [WARNING] com.amazonaws.ec2#WeekDay$tuesday: The name `tuesday` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59226:5 [WARNING] com.amazonaws.ec2#WeekDay$wednesday: The name `wednesday` does not match the recommended enum name format of beginning with an uppercase letter, followed by any number of uppercase letters, numbers, or underscores. | EnumShape jar:file:///Users/david.piggott/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/disneystreaming/smithy/aws-ec2-spec/2023.02.10/aws-ec2-spec-2023.02.10.jar!/META-INF/smithy/ec2.smithy:59227:5 at software.amazon.smithy.model.validation.ValidatedResult.validate(ValidatedResult.java:145) at software.amazon.smithy.model.validation.ValidatedResult.unwrap(ValidatedResult.java:132) at smithy4s.codegen.internals.ModelLoader$.load(ModelLoader.scala:121) at smithy4s.codegen.internals.CodegenImpl$.processSpecs(CodegenImpl.scala:40) at smithy4s.codegen.Codegen$.processSpecs(Codegen.scala:23) at smithy4s.codegen.cli.Main$.$anonfun$main$1(Main.scala:46) at smithy4s.codegen.cli.Main$.$anonfun$main$1$adapted(Main.scala:44) at scala.util.Either.map(Either.scala:382) at smithy4s.codegen.cli.Main$.main(Main.scala:44) at smithy4s.codegen.cli.Main.main(Main.scala) [error] [sandbox] (sandbox / Compile / managedSources) Nonzero exit code: 1 [error] Total time: 7 s, completed 27 Jul 2023, 13:08:47 --- build.sbt | 7 ++- .../aws/internals/AwsEc2QueryCodecs.scala | 2 +- modules/sandbox/src/Sandbox.scala | 49 +++++++++++++------ 3 files changed, 40 insertions(+), 18 deletions(-) diff --git a/build.sbt b/build.sbt index 29f5ac917..0d4b7ffb9 100644 --- a/build.sbt +++ b/build.sbt @@ -890,15 +890,18 @@ lazy val sandbox = projectMatrix .dependsOn(`aws-http4s`) .settings( Compile / allowedNamespaces := Seq( - "com.amazonaws.cloudwatch" + "com.amazonaws.cloudwatch", + "com.amazonaws.ec2" ), genSmithy(Compile), // Ignore deprecation warnings here - it's all generated code, anyway. scalacOptions ++= Seq( "-Wconf:cat=deprecation:silent" ) ++ scala3MigrationOption(scalaVersion.value), - smithy4sDependencies += + smithy4sDependencies ++= Seq( "com.disneystreaming.smithy" % "aws-cloudwatch-spec" % "2023.02.10", + "com.disneystreaming.smithy" % "aws-ec2-spec" % "2023.02.10" + ), libraryDependencies ++= Seq( Dependencies.Http4s.emberClient.value, Dependencies.slf4jNop diff --git a/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala b/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala index b930a5ca0..b84e56bb1 100644 --- a/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala +++ b/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala @@ -71,7 +71,7 @@ private[aws] object AwsEcsQueryCodecs { XmlName(xmlName.value.capitalize) ) - case _ => + case None => hints } } diff --git a/modules/sandbox/src/Sandbox.scala b/modules/sandbox/src/Sandbox.scala index ac9ecbf80..d8dff099a 100644 --- a/modules/sandbox/src/Sandbox.scala +++ b/modules/sandbox/src/Sandbox.scala @@ -16,6 +16,7 @@ import cats.effect._ import com.amazonaws.cloudwatch._ +import com.amazonaws.ec2._ import org.http4s.client.middleware._ import org.http4s.ember.client.EmberClientBuilder import smithy4s.aws._ @@ -24,7 +25,11 @@ object Main extends IOApp.Simple { type NextToken = String - override def run: IO[Unit] = cloudWatchClientResource.use(cloudWatchClient => + override def run: IO[Unit] = awsEnvironmentResource.use { awsEnvironment => + // Per + // https://disneystreaming.github.io/smithy4s/docs/protocols/aws/aws/#awsquery, + // CloudWatch is one of a few services that use the awsQuery protocol. + AwsClient(CloudWatch, awsEnvironment).use(cloudWatchClient => listAll[ListMetricsOutput, Metric]( listF = maybeNextToken => cloudWatchClient.listMetrics( @@ -38,11 +43,27 @@ object Main extends IOApp.Simple { ) .map(_.size) .flatMap(size => IO.println(s"Found $size metrics")) - ) + ) + // Per + // https://disneystreaming.github.io/smithy4s/docs/protocols/aws/aws/#ec2query, + // EC2 is the only service that use the ec2Query protocol. + AwsClient(EC2, awsEnvironment).use(ec2Client => + listAll[DescribeInstancesOutput, Metric]( + listF = maybeNextToken => + ec2Client.describeInstanceTypes( + nextToken = maybeNextToken + ), + accessResults = _.reservationSet.toList.flatten, + accessNextToken = _.nextToken + ) + .map(_.size) + .flatMap(size => IO.println(s"Found $size instance types")) + ) + } - private val cloudWatchClientResource: Resource[IO, CloudWatch[IO]] = + private val awsEnvironmentResource: Resource[IO, AwsEnvironment[IO]] = for { - httpClient <- EmberClientBuilder + client <- EmberClientBuilder .default[IO] .build .map( @@ -53,17 +74,15 @@ object Main extends IOApp.Simple { ) ) awsCredentialsProvider = new AwsCredentialsProvider[IO] - awsEnv = AwsEnvironment.make( - httpClient, - IO.pure(AwsRegion.US_EAST_1), - awsCredentialsProvider.defaultCredentialsFile.flatMap( - awsCredentialsProvider - .fromDisk(_, awsCredentialsProvider.getProfileFromEnv) - ), - IO.realTime.map(_.toSeconds).map(Timestamp(_, 0)) - ) - cloudWatch <- AwsClient(CloudWatch, awsEnv) - } yield cloudWatch + } yield AwsEnvironment.make( + client, + IO.pure(AwsRegion.US_EAST_1), + awsCredentialsProvider.defaultCredentialsFile.flatMap( + awsCredentialsProvider + .fromDisk(_, awsCredentialsProvider.getProfileFromEnv) + ), + IO.realTime.map(_.toSeconds).map(Timestamp(_, 0)) + ) // This is probably something that's gonna get reimplemented a lot in // user-land. Perhaps we could use pagination hints from the specs to avoid From 9735bf52cfb5b8a144efe87aac4b10e73935f91e Mon Sep 17 00:00:00 2001 From: David Piggott Date: Fri, 28 Jul 2023 14:17:37 +0100 Subject: [PATCH 10/25] Patch AwsStandardTypesTransformer to fix previous error Thanks Oli for the patch. Also fix Sandbox compile errors. Now to overcome this: sbt:root> ~sandbox/run [info] [sandbox] compiling 2995 Scala sources to /Users/david.piggott/Code/personal/disneystreaming/smithy4s/modules/sandbox/target/jvm-2.13/classes ... [error] [sandbox] /Users/david.piggott/Code/personal/disneystreaming/smithy4s/modules/sandbox/target/jvm-2.13/src_managed/main/com/amazonaws/ec2/CreateFlowLogsRequest.scala:108:104: possible missing interpolator: detected an interpolated expression [error] [sandbox] string.optional[CreateFlowLogsRequest]("LogFormat", _.logFormat).addHints(smithy.api.Documentation("

The fields to include in the flow log record. List the fields in the order in which\n they should appear. If you omit this parameter, the flow log is created using the\n default format. If you specify this parameter, you must include at least one\n field. For more information about the available fields, see Flow log\n records in the Amazon VPC User Guide or Transit Gateway Flow Log\n records in the Amazon Web Services Transit Gateway Guide.

\n

Specify the fields using the ${field-id} format, separated by spaces. For\n the CLI, surround this parameter value with single quotes on Linux or\n double quotes on Windows.

")), --- .../AwsStandardTypesTransformer.scala | 23 +++++++--- modules/sandbox/src/Sandbox.scala | 46 +++++++++---------- 2 files changed, 39 insertions(+), 30 deletions(-) diff --git a/modules/codegen/src/smithy4s/codegen/transformers/AwsStandardTypesTransformer.scala b/modules/codegen/src/smithy4s/codegen/transformers/AwsStandardTypesTransformer.scala index 63f4353cd..003dc3ce3 100644 --- a/modules/codegen/src/smithy4s/codegen/transformers/AwsStandardTypesTransformer.scala +++ b/modules/codegen/src/smithy4s/codegen/transformers/AwsStandardTypesTransformer.scala @@ -65,16 +65,20 @@ class AwsStandardTypesTransformer extends ProjectionTransformer { .map[Boolean](canReplace) .orElse(false) } - .map[Shape](shape => { + .map[Shape] { shape => val target = model.expectShape(shape.getTarget) val replacementShape = replaceWith(shape.getTarget) + // Member shapes can only carry the `@default` trait IF + // their container is a structures + val canCarryDefault = + model.expectShape(shape.getContainer()).isStructureShape() shape .toBuilder() .target(replacementShape) - .copyDefaultTrait(target) + .when(canCarryDefault)(_.copyDefaultTrait(target)) .build() - }) + } .orElse(shape) } @@ -105,11 +109,16 @@ object AwsStandardTypesTransformer { private[transformers] final implicit class MemberShapeBuilderOps( val builder: MemberShape.Builder ) extends AnyVal { - def copyDefaultTrait(shape: Shape): MemberShape.Builder = { + def when(condition: Boolean)( + mutation: MemberShape.Builder => MemberShape.Builder + ): MemberShape.Builder = + if (condition)(mutation(builder)) else builder + + def copyDefaultTrait( + shape: Shape + ): MemberShape.Builder = { val defaultTraitOpt = toOption(shape.getTrait(classOf[DefaultTrait])) - - defaultTraitOpt - .fold(builder)(builder.addTrait(_)) + defaultTraitOpt.fold(builder)(builder.addTrait(_)) } } diff --git a/modules/sandbox/src/Sandbox.scala b/modules/sandbox/src/Sandbox.scala index d8dff099a..a347ca711 100644 --- a/modules/sandbox/src/Sandbox.scala +++ b/modules/sandbox/src/Sandbox.scala @@ -30,34 +30,34 @@ object Main extends IOApp.Simple { // https://disneystreaming.github.io/smithy4s/docs/protocols/aws/aws/#awsquery, // CloudWatch is one of a few services that use the awsQuery protocol. AwsClient(CloudWatch, awsEnvironment).use(cloudWatchClient => - listAll[ListMetricsOutput, Metric]( - listF = maybeNextToken => - cloudWatchClient.listMetrics( - // This is just a simple way of reducing the size of the results while - // still exercising the pagination handler. - namespace = Some("AWS/S3"), - nextToken = maybeNextToken - ), - accessResults = _.metrics.toList.flatten, - accessNextToken = _.nextToken - ) - .map(_.size) - .flatMap(size => IO.println(s"Found $size metrics")) + listAll[ListMetricsOutput, Metric]( + listF = maybeNextToken => + cloudWatchClient.listMetrics( + // This is just a simple way of reducing the size of the results while + // still exercising the pagination handler. + namespace = Some("AWS/S3"), + nextToken = maybeNextToken + ), + accessResults = _.metrics.toList.flatten, + accessNextToken = _.nextToken + ) + .map(_.size) + .flatMap(size => IO.println(s"Found $size metrics")) ) // Per // https://disneystreaming.github.io/smithy4s/docs/protocols/aws/aws/#ec2query, // EC2 is the only service that use the ec2Query protocol. AwsClient(EC2, awsEnvironment).use(ec2Client => - listAll[DescribeInstancesOutput, Metric]( - listF = maybeNextToken => - ec2Client.describeInstanceTypes( - nextToken = maybeNextToken - ), - accessResults = _.reservationSet.toList.flatten, - accessNextToken = _.nextToken - ) - .map(_.size) - .flatMap(size => IO.println(s"Found $size instance types")) + listAll[DescribeInstanceTypesResult, InstanceTypeInfo]( + listF = maybeNextToken => + ec2Client.describeInstanceTypes( + nextToken = maybeNextToken + ), + accessResults = _.instanceTypes.toList.flatten, + accessNextToken = _.nextToken + ) + .map(_.size) + .flatMap(size => IO.println(s"Found $size instance types")) ) } From d34847ca7608a1ff0d4a7c9f0fafd48b2b8e3c57 Mon Sep 17 00:00:00 2001 From: David Piggott Date: Fri, 28 Jul 2023 14:43:40 +0100 Subject: [PATCH 11/25] Patch renderer to escape $ when rendering literal strings This fixes the error described in the previous commit message. --- .../src/smithy4s/codegen/internals/Renderer.scala | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/codegen/src/smithy4s/codegen/internals/Renderer.scala b/modules/codegen/src/smithy4s/codegen/internals/Renderer.scala index 6f4cc1d81..765549485 100644 --- a/modules/codegen/src/smithy4s/codegen/internals/Renderer.scala +++ b/modules/codegen/src/smithy4s/codegen/internals/Renderer.scala @@ -1460,7 +1460,13 @@ private[internals] class Renderer(compilationUnit: CompilationUnit) { self => // with unicode character escapes like "\uD83D" that can be parsed in the regex implementations on all platforms. // See https://github.com/disneystreaming/smithy4s/pull/499 .replace("\\\\u", "\\u") - - line"$str" + // If the string contains "$", the use of -Xlint:missing-interpolator when + // compiling the generated code will result in warnings. To prevent that we + // render any such strings as interpolated strings (even though that would + // otherwise be unecessary) so that we can render "$" as "$$", which get + // converted back to "$" during interpolation. + val escaped = if(str.contains('$')) s"s${str.replace("$", "$$")}" else str + + line"$escaped" } } From e9e111f26916d707584b22cf75ea4444ee8eaa47 Mon Sep 17 00:00:00 2001 From: David Piggott Date: Mon, 31 Jul 2023 15:04:18 +0100 Subject: [PATCH 12/25] Update generated code --- .../src/generated/com/amazonaws/dynamodb/TableName.scala | 2 +- .../src/generated/smithy4s/example/CheckedOrUnchecked.scala | 2 +- .../src/generated/smithy4s/example/CheckedOrUnchecked2.scala | 2 +- .../bootstrapped/src/generated/smithy4s/example/CityId.scala | 2 +- .../src/generated/smithy4s/example/UnicodeRegexString.scala | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/TableName.scala b/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/TableName.scala index 37989d2af..79fc679b1 100644 --- a/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/TableName.scala +++ b/modules/bootstrapped/src/generated/com/amazonaws/dynamodb/TableName.scala @@ -10,6 +10,6 @@ import smithy4s.schema.Schema.string object TableName extends Newtype[String] { val id: ShapeId = ShapeId("com.amazonaws.dynamodb", "TableName") val hints: Hints = Hints.empty - val underlyingSchema: Schema[String] = string.withId(id).addHints(hints).validated(smithy.api.Length(min = Some(3L), max = Some(255L))).validated(smithy.api.Pattern("^[a-zA-Z0-9_.-]+$")) + val underlyingSchema: Schema[String] = string.withId(id).addHints(hints).validated(smithy.api.Length(min = Some(3L), max = Some(255L))).validated(smithy.api.Pattern(s"^[a-zA-Z0-9_.-]+$$")) implicit val schema: Schema[TableName] = bijection(underlyingSchema, asBijection) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/CheckedOrUnchecked.scala b/modules/bootstrapped/src/generated/smithy4s/example/CheckedOrUnchecked.scala index ed52db722..4c3391d02 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/CheckedOrUnchecked.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/CheckedOrUnchecked.scala @@ -26,7 +26,7 @@ object CheckedOrUnchecked extends ShapeTag.Companion[CheckedOrUnchecked] { object CheckedCase { val hints: Hints = Hints.empty - val schema: Schema[CheckedCase] = bijection(string.addHints(hints).validated(smithy.api.Pattern("^\\w+$")), CheckedCase(_), _.checked) + val schema: Schema[CheckedCase] = bijection(string.addHints(hints).validated(smithy.api.Pattern(s"^\\w+$$")), CheckedCase(_), _.checked) val alt = schema.oneOf[CheckedOrUnchecked]("checked") } object RawCase { diff --git a/modules/bootstrapped/src/generated/smithy4s/example/CheckedOrUnchecked2.scala b/modules/bootstrapped/src/generated/smithy4s/example/CheckedOrUnchecked2.scala index 358df77af..af5f8f669 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/CheckedOrUnchecked2.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/CheckedOrUnchecked2.scala @@ -28,7 +28,7 @@ object CheckedOrUnchecked2 extends ShapeTag.Companion[CheckedOrUnchecked2] { object CheckedCase { val hints: Hints = Hints.empty - val schema: Schema[CheckedCase] = bijection(string.addHints(hints).validated(smithy.api.Pattern("^\\w+$")), CheckedCase(_), _.checked) + val schema: Schema[CheckedCase] = bijection(string.addHints(hints).validated(smithy.api.Pattern(s"^\\w+$$")), CheckedCase(_), _.checked) val alt = schema.oneOf[CheckedOrUnchecked2]("checked") } object RawCase { diff --git a/modules/bootstrapped/src/generated/smithy4s/example/CityId.scala b/modules/bootstrapped/src/generated/smithy4s/example/CityId.scala index 3029d9bf8..fa6d6b74d 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/CityId.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/CityId.scala @@ -10,6 +10,6 @@ import smithy4s.schema.Schema.string object CityId extends Newtype[String] { val id: ShapeId = ShapeId("smithy4s.example", "CityId") val hints: Hints = Hints.empty - val underlyingSchema: Schema[String] = string.withId(id).addHints(hints).validated(smithy.api.Pattern("^[A-Za-z0-9 ]+$")) + val underlyingSchema: Schema[String] = string.withId(id).addHints(hints).validated(smithy.api.Pattern(s"^[A-Za-z0-9 ]+$$")) implicit val schema: Schema[CityId] = bijection(underlyingSchema, asBijection) } diff --git a/modules/bootstrapped/src/generated/smithy4s/example/UnicodeRegexString.scala b/modules/bootstrapped/src/generated/smithy4s/example/UnicodeRegexString.scala index 4000ea388..27f704393 100644 --- a/modules/bootstrapped/src/generated/smithy4s/example/UnicodeRegexString.scala +++ b/modules/bootstrapped/src/generated/smithy4s/example/UnicodeRegexString.scala @@ -10,6 +10,6 @@ import smithy4s.schema.Schema.string object UnicodeRegexString extends Newtype[String] { val id: ShapeId = ShapeId("smithy4s.example", "UnicodeRegexString") val hints: Hints = Hints.empty - val underlyingSchema: Schema[String] = string.withId(id).addHints(hints).validated(smithy.api.Pattern("^\uD83D\uDE0E$")) + val underlyingSchema: Schema[String] = string.withId(id).addHints(hints).validated(smithy.api.Pattern(s"^\uD83D\uDE0E$$")) implicit val schema: Schema[UnicodeRegexString] = bijection(underlyingSchema, asBijection) } From 2074d3df180aa1b1aa1449a82e9ccc0886d84051 Mon Sep 17 00:00:00 2001 From: David Piggott Date: Fri, 28 Jul 2023 14:52:41 +0100 Subject: [PATCH 13/25] Add tests for Renderer patch --- .../smithy4s/codegen/internals/Renderer.scala | 2 +- .../codegen/internals/RendererSpec.scala | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/modules/codegen/src/smithy4s/codegen/internals/Renderer.scala b/modules/codegen/src/smithy4s/codegen/internals/Renderer.scala index 765549485..14cfd1535 100644 --- a/modules/codegen/src/smithy4s/codegen/internals/Renderer.scala +++ b/modules/codegen/src/smithy4s/codegen/internals/Renderer.scala @@ -1465,7 +1465,7 @@ private[internals] class Renderer(compilationUnit: CompilationUnit) { self => // render any such strings as interpolated strings (even though that would // otherwise be unecessary) so that we can render "$" as "$$", which get // converted back to "$" during interpolation. - val escaped = if(str.contains('$')) s"s${str.replace("$", "$$")}" else str + val escaped = if (str.contains('$')) s"s${str.replace("$", "$$")}" else str line"$escaped" } diff --git a/modules/codegen/test/src/smithy4s/codegen/internals/RendererSpec.scala b/modules/codegen/test/src/smithy4s/codegen/internals/RendererSpec.scala index d28f8d984..e2542b341 100644 --- a/modules/codegen/test/src/smithy4s/codegen/internals/RendererSpec.scala +++ b/modules/codegen/test/src/smithy4s/codegen/internals/RendererSpec.scala @@ -394,4 +394,36 @@ final class RendererSpec extends munit.FunSuite { assert(!contents.exists(_.contains("ServiceProduct"))) } + test( + "string literal not containing $ is rendered as an uninterpolated string" + ) { + val smithy = """ + |$version: "2.0" + | + |namespace smithy4s + | + |@documentation("foo bar") + |string MyString + |""".stripMargin + + val contents = generateScalaCode(smithy).values + + assert(contents.exists(_.contains("smithy.api.Documentation(\"foo bar\")"))) + } + test( + "string literal containing $ is rendered as an interpolated string with $ escaped as $$" + ) { + val smithy = """ + |$version: "2.0" + | + |namespace smithy4s + | + |@documentation("foo $bar") + |string MyString + |""".stripMargin + + val contents = generateScalaCode(smithy).values + + assert(contents.exists(_.contains("smithy.api.Documentation(s\"foo $$bar\")"))) + } } From 714159d72378ac3e874e72405a2b90f714c7b457 Mon Sep 17 00:00:00 2001 From: David Piggott Date: Fri, 28 Jul 2023 17:29:18 +0100 Subject: [PATCH 14/25] Make XmlDecoder aware of default hint on structure members Without this, Sandbox runs fail with the following: [error] HttpPayloadError(.DescribeInstancesResponse.reservationSet.item.0.instancesSet.item.0.placement.partitionNumber, expected = , message=Expected a single node with text content) This is because in https://raw.githubusercontent.com/aws/aws-sdk-js-v3/main/codegen/sdk-codegen/aws-models/ec2.json PartitionNumber members are defined like this: "PartitionNumber": { "target": "com.amazonaws.ec2#Integer", "traits": { "aws.protocols#ec2QueryName": "PartitionNumber", "smithy.api#clientOptional": {}, "smithy.api#default": 0, "smithy.api#documentation": "

The number of the partition the instance should launch in. Valid only if the placement\n group strategy is set to partition.

", "smithy.api#xmlName": "partitionNumber" } } --- modules/sandbox/src/Sandbox.scala | 11 +- .../smithy4s/xml/internals/XmlDecoder.scala | 119 +++++++++++------- .../internals/XmlDecoderSchemaVisitor.scala | 11 +- 3 files changed, 90 insertions(+), 51 deletions(-) diff --git a/modules/sandbox/src/Sandbox.scala b/modules/sandbox/src/Sandbox.scala index a347ca711..4a9a6425b 100644 --- a/modules/sandbox/src/Sandbox.scala +++ b/modules/sandbox/src/Sandbox.scala @@ -48,16 +48,17 @@ object Main extends IOApp.Simple { // https://disneystreaming.github.io/smithy4s/docs/protocols/aws/aws/#ec2query, // EC2 is the only service that use the ec2Query protocol. AwsClient(EC2, awsEnvironment).use(ec2Client => - listAll[DescribeInstanceTypesResult, InstanceTypeInfo]( + listAll[DescribeInstancesResult, Reservation]( listF = maybeNextToken => - ec2Client.describeInstanceTypes( + ec2Client.describeInstances( + maxResults = 100, nextToken = maybeNextToken ), - accessResults = _.instanceTypes.toList.flatten, + accessResults = _.reservations.toList.flatten, accessNextToken = _.nextToken ) .map(_.size) - .flatMap(size => IO.println(s"Found $size instance types")) + .flatMap(size => IO.println(s"Found $size instances")) ) } @@ -67,7 +68,7 @@ object Main extends IOApp.Simple { .default[IO] .build .map( - RequestLogger.colored( + Logger( logHeaders = true, logBody = true, logAction = Some(IO.println _) diff --git a/modules/xml/src/smithy4s/xml/internals/XmlDecoder.scala b/modules/xml/src/smithy4s/xml/internals/XmlDecoder.scala index c26b84e8d..79b87d0f0 100644 --- a/modules/xml/src/smithy4s/xml/internals/XmlDecoder.scala +++ b/modules/xml/src/smithy4s/xml/internals/XmlDecoder.scala @@ -64,6 +64,12 @@ private[smithy4s] trait XmlDecoder[A] { self => } } } + def withDefault(value: A): XmlDecoder[A] = new XmlDecoder[A] { + def decode(cursor: XmlCursor): Either[XmlDecodeError, A] = cursor match { + case NoNode(_) => Right(value) + case _ => self.decode(cursor) + } + } } private[smithy4s] object XmlDecoder { @@ -80,55 +86,82 @@ private[smithy4s] object XmlDecoder { */ def fromStringParser[A](expectedType: String, trim: Boolean)( f: String => Option[A] - ): XmlDecoder[A] = - new XmlDecoder[A] { - def decode(cursor: XmlCursor): Either[XmlDecodeError, A] = cursor match { - case SingleNode(history, node) => - node.children match { - case XmlDocument.XmlText(value) :: Nil => - f(if (trim) value.trim() else value).toRight( - XmlDecodeError( - history, - s"Could not extract $expectedType from $value" - ) - ) - case Nil => - f("").toRight( - XmlDecodeError( - history, - s"Could not extract $expectedType from empty string" - ) - ) - case _ => - Left( - XmlDecodeError( - history, - s"Expected a single node with text content" - ) - ) - } - case AttrNode(history, values) => - if (values.tail.nonEmpty) { - Left(XmlDecodeError(history, s"Expected a single text attribute")) - } else { - val value = values.head - f(value).toRight( - XmlDecodeError( - history, - s"Could not extract $expectedType from $value" - ) + ): XmlDecoder[A] = { + case RootNode(root) => + Left( + XmlDecodeError( + XPath.root, + s"Could not extract $expectedType from $root" + ) + ) + + case Nodes(history, nodes) => + Left( + XmlDecodeError( + history, + s"Could not extract $expectedType from $nodes" + ) + ) + + case NoNode(history) => + Left( + XmlDecodeError( + history, + s"Expected a single node with text content" + ) + ) + + case FailedNode(history) => + Left( + XmlDecodeError( + history, + s"Could not decode failed node" + ) + ) + + case SingleNode(history, node) => + node.children match { + case XmlDocument.XmlText(value) :: Nil => + f(if (trim) value.trim() else value).toRight( + XmlDecodeError( + history, + s"Could not extract $expectedType from $value" ) - } - case FailedNode(history) => - Left(XmlDecodeError(history, s"Could not decode failed node")) - case other => + ) + + case Nil => + f("").toRight( + XmlDecodeError( + history, + s"Could not extract $expectedType from empty string" + ) + ) + + case _ => Left( XmlDecodeError( - other.history, + history, s"Expected a single node with text content" ) ) } - } + case AttrNode(history, values) => + if (values.tail.nonEmpty) { + Left( + XmlDecodeError( + history, + s"Expected a single text attribute" + ) + ) + } else { + val value = values.head + f(value).toRight( + XmlDecodeError( + history, + s"Could not extract $expectedType from $value" + ) + ) + } + } } diff --git a/modules/xml/src/smithy4s/xml/internals/XmlDecoderSchemaVisitor.scala b/modules/xml/src/smithy4s/xml/internals/XmlDecoderSchemaVisitor.scala index 108e78c7e..842886266 100644 --- a/modules/xml/src/smithy4s/xml/internals/XmlDecoderSchemaVisitor.scala +++ b/modules/xml/src/smithy4s/xml/internals/XmlDecoderSchemaVisitor.scala @@ -28,6 +28,7 @@ import smithy4s.schema._ import XmlDocument.XmlQName +// TODO: Caching private[smithy4s] object XmlDecoderSchemaVisitor extends SchemaVisitor[XmlDecoder] with smithy4s.ScalaCompat { compile => @@ -126,11 +127,15 @@ private[smithy4s] object XmlDecoderSchemaVisitor make: IndexedSeq[Any] => S ): XmlDecoder[S] = { def fieldReader[A](field: Field[S, A]): XmlDecoder[A] = { + val decoderWithAnyDefaultValue = field.getDefaultValue match { + case None => compile(field.schema) + case Some(defaultValue) => + compile(field.schema).withDefault(defaultValue) + } val isAttribute = field.memberHints.has(XmlAttribute) val xmlName = getXmlName(field.memberHints, field.label) - if (isAttribute) compile(field.schema).attribute(xmlName) - else compile(field.schema).down(xmlName) - + if (isAttribute) decoderWithAnyDefaultValue.attribute(xmlName) + else decoderWithAnyDefaultValue.down(xmlName) } val readers = fields.map(fieldReader(_)) new XmlDecoder[S] { From cf76d613629e5ddc13ec054a7c3b432dcde59400 Mon Sep 17 00:00:00 2001 From: David Piggott Date: Mon, 31 Jul 2023 11:35:02 +0100 Subject: [PATCH 15/25] Add test for default XML struct value decoding --- .../test/src/smithy4s/xml/XmlCodecSpec.scala | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/modules/xml/test/src/smithy4s/xml/XmlCodecSpec.scala b/modules/xml/test/src/smithy4s/xml/XmlCodecSpec.scala index 38f4bb539..0c0c4d272 100644 --- a/modules/xml/test/src/smithy4s/xml/XmlCodecSpec.scala +++ b/modules/xml/test/src/smithy4s/xml/XmlCodecSpec.scala @@ -21,12 +21,14 @@ import cats.syntax.all._ import fs2._ import fs2.data.xml._ import fs2.data.xml.dom._ +import smithy.api.Default import smithy.api.XmlAttribute import smithy.api.XmlFlattened import smithy.api.XmlName import smithy4s.Blob -import smithy4s.ShapeId +import smithy4s.Document import smithy4s.Hints +import smithy4s.ShapeId import smithy4s.schema.Schema import smithy4s.schema.Schema._ import smithy4s.xml.internals.XmlCursor @@ -176,6 +178,32 @@ object XmlCodecSpec extends SimpleIOSuite { checkContent(xml, Foo("x", Some("y"))) } + test("struct: default value decoding") { + case class Foo(x: String, y: Option[String]) + object Foo { + implicit val schema: Schema[Foo] = { + val x = string.required[Foo]("x", _.x).addHints(Default(Document.fromString("bar"))) + val y = string.optional[Foo]("y", _.y).addHints(Default(Document.fromString("baz"))) + struct(x, y)(Foo.apply).n + } + } + + val xml = """| + |""".stripMargin + + parseDocument(xml) + .flatMap(decodeDocument[Foo](_)) + .attempt + .map { result => + expect.same( + result, + Right( + Foo("bar", Some("baz")) + ) + ) + } + } + test("struct: attributes") { case class Foo(x: String, y: Option[String]) object Foo { From 5eff02b6cd07b2c1c7ac032d592f9c7e6a17c005 Mon Sep 17 00:00:00 2001 From: David Piggott Date: Mon, 31 Jul 2023 11:59:45 +0100 Subject: [PATCH 16/25] Handle TODO re. caching --- .../xml/src/smithy4s/xml/XmlDocument.scala | 36 ++++++++++--------- .../internals/XmlDecoderSchemaVisitor.scala | 7 ++-- .../internals/XmlEncoderSchemaVisitor.scala | 7 ++-- .../test/src/smithy4s/xml/XmlCodecSpec.scala | 12 ++++--- 4 files changed, 34 insertions(+), 28 deletions(-) diff --git a/modules/xml/src/smithy4s/xml/XmlDocument.scala b/modules/xml/src/smithy4s/xml/XmlDocument.scala index c6f44de9d..bd442619e 100644 --- a/modules/xml/src/smithy4s/xml/XmlDocument.scala +++ b/modules/xml/src/smithy4s/xml/XmlDocument.scala @@ -30,7 +30,9 @@ import smithy.api.XmlName import smithy4s.ShapeId import smithy4s.schema.Schema import smithy4s.xml.internals.XmlCursor +import smithy4s.xml.internals.XmlDecoder import smithy4s.xml.internals.XmlDecoderSchemaVisitor +import smithy4s.xml.internals.XmlEncoder import smithy4s.xml.internals.XmlEncoderSchemaVisitor import smithy4s.schema.CachedSchemaCompiler @@ -107,15 +109,15 @@ object XmlDocument { } object Decoder extends CachedSchemaCompiler.Impl[Decoder] { + protected override type Aux[A] = XmlDecoder[A] def fromSchema[A](schema: Schema[A], cache: Cache): Decoder[A] = { val startingPath: List[XmlQName] = getStartingPath(schema) - new Decoder[A] { - val decoder = XmlDecoderSchemaVisitor(schema) - def decode(xmlDocument: XmlDocument): Either[XmlDecodeError, A] = { - val documentCursor = XmlCursor.fromDocument(xmlDocument) - val updatedCursor = startingPath.foldLeft(documentCursor)(_.down(_)) - decoder.decode(updatedCursor) - } + val schemaVisitor = new XmlDecoderSchemaVisitor(cache) + val xmlDecoder = schemaVisitor(schema) + (xmlDocument: XmlDocument) => { + val documentCursor = XmlCursor.fromDocument(xmlDocument) + val updatedCursor = startingPath.foldLeft(documentCursor)(_.down(_)) + xmlDecoder.decode(updatedCursor) } } } @@ -124,6 +126,7 @@ object XmlDocument { def encode(value: A): XmlDocument } object Encoder extends CachedSchemaCompiler.Impl[Encoder] { + protected override type Aux[A] = XmlEncoder[A] def fromSchema[A](schema: Schema[A], cache: Cache): Encoder[A] = { val rootName: XmlQName = getRootName(schema) val rootNamespace = @@ -137,16 +140,15 @@ object XmlDocument { } XmlAttr(qName, List(XmlText(ns.uri.value))) } - val xmlEncoder = XmlEncoderSchemaVisitor(schema) - new Encoder[A] { - def encode(value: A): XmlDocument = { - val (attributes, children) = - xmlEncoder.encode(value).partitionEither { - case attr @ XmlAttr(_, _) => Left(attr) - case other => Right(other) - } - XmlDocument(XmlElem(rootName, rootNamespace ++ attributes, children)) - } + val schemaVisitor = new XmlEncoderSchemaVisitor(cache) + val xmlEncoder = schemaVisitor(schema) + (value: A) => { + val (attributes, children) = + xmlEncoder.encode(value).partitionEither { + case attr @ XmlAttr(_, _) => Left(attr) + case other => Right(other) + } + XmlDocument(XmlElem(rootName, rootNamespace ++ attributes, children)) } } } diff --git a/modules/xml/src/smithy4s/xml/internals/XmlDecoderSchemaVisitor.scala b/modules/xml/src/smithy4s/xml/internals/XmlDecoderSchemaVisitor.scala index 842886266..c0fa19226 100644 --- a/modules/xml/src/smithy4s/xml/internals/XmlDecoderSchemaVisitor.scala +++ b/modules/xml/src/smithy4s/xml/internals/XmlDecoderSchemaVisitor.scala @@ -28,10 +28,11 @@ import smithy4s.schema._ import XmlDocument.XmlQName -// TODO: Caching -private[smithy4s] object XmlDecoderSchemaVisitor - extends SchemaVisitor[XmlDecoder] +private[smithy4s] class XmlDecoderSchemaVisitor( + val cache: CompilationCache[XmlDecoder] +) extends SchemaVisitor.Cached[XmlDecoder] with smithy4s.ScalaCompat { compile => + def primitive[P]( shapeId: ShapeId, hints: Hints, diff --git a/modules/xml/src/smithy4s/xml/internals/XmlEncoderSchemaVisitor.scala b/modules/xml/src/smithy4s/xml/internals/XmlEncoderSchemaVisitor.scala index 60771ff1b..74267d887 100644 --- a/modules/xml/src/smithy4s/xml/internals/XmlEncoderSchemaVisitor.scala +++ b/modules/xml/src/smithy4s/xml/internals/XmlEncoderSchemaVisitor.scala @@ -28,10 +28,9 @@ import smithy4s.{Schema => _, _} import XmlDocument._ import cats.kernel.Monoid -private[smithy4s] object XmlEncoderSchemaVisitor extends XmlEncoderSchemaVisitor - -private[smithy4s] abstract class XmlEncoderSchemaVisitor - extends SchemaVisitor[XmlEncoder] +private[smithy4s] class XmlEncoderSchemaVisitor( + val cache: CompilationCache[XmlEncoder] +) extends SchemaVisitor.Cached[XmlEncoder] with smithy4s.ScalaCompat { compile => def primitive[P]( diff --git a/modules/xml/test/src/smithy4s/xml/XmlCodecSpec.scala b/modules/xml/test/src/smithy4s/xml/XmlCodecSpec.scala index 0c0c4d272..f33153dca 100644 --- a/modules/xml/test/src/smithy4s/xml/XmlCodecSpec.scala +++ b/modules/xml/test/src/smithy4s/xml/XmlCodecSpec.scala @@ -29,9 +29,11 @@ import smithy4s.Blob import smithy4s.Document import smithy4s.Hints import smithy4s.ShapeId +import smithy4s.schema.CompilationCache import smithy4s.schema.Schema import smithy4s.schema.Schema._ import smithy4s.xml.internals.XmlCursor +import smithy4s.xml.internals.XmlDecoder import smithy4s.xml.internals.XmlDecoderSchemaVisitor import weaver._ @@ -563,7 +565,7 @@ object XmlCodecSpec extends SimpleIOSuite { } } - def checkContent[A: Schema](xmlString: String, expected: A)(implicit + private def checkContent[A: Schema](xmlString: String, expected: A)(implicit loc: SourceLocation ): IO[Expectations] = { parseDocument(xmlString).flatMap { document => @@ -589,7 +591,7 @@ object XmlCodecSpec extends SimpleIOSuite { } } - def checkDocument[A: Schema](xmlString: String, expected: A)(implicit + private def checkDocument[A: Schema](xmlString: String, expected: A)(implicit loc: SourceLocation ): IO[Expectations] = { parseDocument(xmlString) @@ -607,13 +609,15 @@ object XmlCodecSpec extends SimpleIOSuite { .liftTo[IO] } - def encodeDocument[A: Schema](value: A): XmlDocument = { + private def encodeDocument[A: Schema](value: A): XmlDocument = { val encoder = XmlDocument.Encoder.fromSchema(implicitly[Schema[A]]) encoder.encode(value) } private def decodeContent[A: Schema](document: XmlDocument): IO[A] = { - val decoder = implicitly[Schema[A]].compile(XmlDecoderSchemaVisitor) + val cache = CompilationCache.make[XmlDecoder] + val schemaVisitor = new XmlDecoderSchemaVisitor(cache) + val decoder = schemaVisitor(implicitly[Schema[A]]) val cursor = XmlCursor.SingleNode(XPath.root, document.root) decoder.decode(cursor).leftWiden[Throwable].liftTo[IO] } From 4534ec32d513bf76eedde89de68fb90065a7895c Mon Sep 17 00:00:00 2001 From: David Piggott Date: Mon, 31 Jul 2023 12:08:36 +0100 Subject: [PATCH 17/25] Switch to an EC2 API that doesn't return unknown enum values The EC2 spec in https://github.com/disneystreaming/aws-sdk-smithy-specs/releases/tag/v2023.02.10 doesn't contain some enum values that were retured in the describe instances response, and because at present smithy4s doesn't support open enums, decoding was failing. In time it should support open enums, but for now we can get a successful Sandbox run against the EC2 API by just using an endpoint that doesn't (at present) return unknown enum values. --- modules/sandbox/src/Sandbox.scala | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/sandbox/src/Sandbox.scala b/modules/sandbox/src/Sandbox.scala index 4a9a6425b..d3432b734 100644 --- a/modules/sandbox/src/Sandbox.scala +++ b/modules/sandbox/src/Sandbox.scala @@ -48,17 +48,17 @@ object Main extends IOApp.Simple { // https://disneystreaming.github.io/smithy4s/docs/protocols/aws/aws/#ec2query, // EC2 is the only service that use the ec2Query protocol. AwsClient(EC2, awsEnvironment).use(ec2Client => - listAll[DescribeInstancesResult, Reservation]( + listAll[DescribeInstanceStatusResult, InstanceStatus]( listF = maybeNextToken => - ec2Client.describeInstances( + ec2Client.describeInstanceStatus( maxResults = 100, nextToken = maybeNextToken ), - accessResults = _.reservations.toList.flatten, + accessResults = _.instanceStatuses.toList.flatten, accessNextToken = _.nextToken ) .map(_.size) - .flatMap(size => IO.println(s"Found $size instances")) + .flatMap(size => IO.println(s"Found $size instance statuses")) ) } @@ -68,7 +68,7 @@ object Main extends IOApp.Simple { .default[IO] .build .map( - Logger( + RequestLogger.colored( logHeaders = true, logBody = true, logAction = Some(IO.println _) From 1b9ea7ada416e64c1a5d1d9bb8bca74ea7ca82dd Mon Sep 17 00:00:00 2001 From: David Piggott Date: Mon, 31 Jul 2023 14:56:48 +0100 Subject: [PATCH 18/25] Scalafix --- .../codegen/src/smithy4s/codegen/internals/Renderer.scala | 6 +++--- .../codegen/transformers/AwsStandardTypesTransformer.scala | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/codegen/src/smithy4s/codegen/internals/Renderer.scala b/modules/codegen/src/smithy4s/codegen/internals/Renderer.scala index 14cfd1535..1bd3ae5e0 100644 --- a/modules/codegen/src/smithy4s/codegen/internals/Renderer.scala +++ b/modules/codegen/src/smithy4s/codegen/internals/Renderer.scala @@ -20,8 +20,11 @@ package internals import cats.data.NonEmptyList import cats.data.Reader import cats.syntax.all._ +import smithy4s.codegen.internals.EnumTag.IntEnum +import smithy4s.codegen.internals.EnumTag.StringEnum import smithy4s.codegen.internals.LineSegment._ import smithy4s.codegen.internals.Primitive.Nothing +import smithy4s.codegen.internals.Type.Nullable import smithy4s.codegen.internals.TypedNode._ import software.amazon.smithy.model.node.Node import software.amazon.smithy.model.node._ @@ -32,9 +35,6 @@ import scala.jdk.CollectionConverters._ import Line._ import LineSyntax.LineInterpolator import ToLines.lineToLines -import smithy4s.codegen.internals.EnumTag.IntEnum -import smithy4s.codegen.internals.EnumTag.StringEnum -import smithy4s.codegen.internals.Type.Nullable private[internals] object Renderer { diff --git a/modules/codegen/src/smithy4s/codegen/transformers/AwsStandardTypesTransformer.scala b/modules/codegen/src/smithy4s/codegen/transformers/AwsStandardTypesTransformer.scala index 003dc3ce3..35a85391a 100644 --- a/modules/codegen/src/smithy4s/codegen/transformers/AwsStandardTypesTransformer.scala +++ b/modules/codegen/src/smithy4s/codegen/transformers/AwsStandardTypesTransformer.scala @@ -17,10 +17,13 @@ package smithy4s.codegen.transformers import smithy4s.codegen.transformers.AwsStandardTypesTransformer.MemberShapeBuilderOps -import software.amazon.smithy.build.{ProjectionTransformer, TransformContext} +import software.amazon.smithy.build.ProjectionTransformer +import software.amazon.smithy.build.TransformContext import software.amazon.smithy.model.Model import software.amazon.smithy.model.shapes._ -import software.amazon.smithy.model.traits.{BoxTrait, DefaultTrait, Trait} +import software.amazon.smithy.model.traits.BoxTrait +import software.amazon.smithy.model.traits.DefaultTrait +import software.amazon.smithy.model.traits.Trait class AwsStandardTypesTransformer extends ProjectionTransformer { From 26713977fe50f1231853ed5bfcf4cbbd54715e3c Mon Sep 17 00:00:00 2001 From: David Piggott Date: Mon, 31 Jul 2023 15:30:00 +0100 Subject: [PATCH 19/25] Scalafmt --- .../src/smithy4s/codegen/internals/RendererSpec.scala | 4 +++- modules/xml/test/src/smithy4s/xml/XmlCodecSpec.scala | 10 +++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/codegen/test/src/smithy4s/codegen/internals/RendererSpec.scala b/modules/codegen/test/src/smithy4s/codegen/internals/RendererSpec.scala index e2542b341..f2cbc1392 100644 --- a/modules/codegen/test/src/smithy4s/codegen/internals/RendererSpec.scala +++ b/modules/codegen/test/src/smithy4s/codegen/internals/RendererSpec.scala @@ -424,6 +424,8 @@ final class RendererSpec extends munit.FunSuite { val contents = generateScalaCode(smithy).values - assert(contents.exists(_.contains("smithy.api.Documentation(s\"foo $$bar\")"))) + assert( + contents.exists(_.contains("smithy.api.Documentation(s\"foo $$bar\")")) + ) } } diff --git a/modules/xml/test/src/smithy4s/xml/XmlCodecSpec.scala b/modules/xml/test/src/smithy4s/xml/XmlCodecSpec.scala index f33153dca..8ebac99f1 100644 --- a/modules/xml/test/src/smithy4s/xml/XmlCodecSpec.scala +++ b/modules/xml/test/src/smithy4s/xml/XmlCodecSpec.scala @@ -184,8 +184,12 @@ object XmlCodecSpec extends SimpleIOSuite { case class Foo(x: String, y: Option[String]) object Foo { implicit val schema: Schema[Foo] = { - val x = string.required[Foo]("x", _.x).addHints(Default(Document.fromString("bar"))) - val y = string.optional[Foo]("y", _.y).addHints(Default(Document.fromString("baz"))) + val x = string + .required[Foo]("x", _.x) + .addHints(Default(Document.fromString("bar"))) + val y = string + .optional[Foo]("y", _.y) + .addHints(Default(Document.fromString("baz"))) struct(x, y)(Foo.apply).n } } @@ -200,7 +204,7 @@ object XmlCodecSpec extends SimpleIOSuite { expect.same( result, Right( - Foo("bar", Some("baz")) + Foo("bar", Some("baz")) ) ) } From 3dcd25a9b52beb19f0e1657526d4f118cb6640ed Mon Sep 17 00:00:00 2001 From: David Piggott Date: Tue, 1 Aug 2023 09:33:55 +0100 Subject: [PATCH 20/25] Update modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala Co-authored-by: David Francoeur --- .../src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala b/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala index b84e56bb1..3c10b1d9a 100644 --- a/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala +++ b/modules/aws-http4s/src/smithy4s/aws/internals/AwsEc2QueryCodecs.scala @@ -41,7 +41,7 @@ private[aws] object AwsEcsQueryCodecs { .requestEncoderCompilers[F]( // These are set to fulfil the requirements of // https://smithy.io/2.0/aws/protocols/aws-ec2-query-protocol.html?highlight=ec2%20query%20protocol#query-key-resolution. - // without UrlFormDataEncoderSchemaVisitor having to have more aware + // without UrlFormDataEncoderSchemaVisitor having to be more aware // than necessary of these protocol quirks (having it be aware of // XmlName and XmlFlattened already feels like too much - perhaps in // a future change UrlFormDataEncoderSchemaVisitor can work with From a934b54a251751b994af5eb7b5f681aa20f731de Mon Sep 17 00:00:00 2001 From: David Piggott Date: Tue, 1 Aug 2023 09:41:06 +0100 Subject: [PATCH 21/25] Fix and improve AwsProtocol doc links --- .../aws-kernel/src/smithy4s/aws/AwsProtocol.scala | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/aws-kernel/src/smithy4s/aws/AwsProtocol.scala b/modules/aws-kernel/src/smithy4s/aws/AwsProtocol.scala index 41179d989..ccccf753b 100644 --- a/modules/aws-kernel/src/smithy4s/aws/AwsProtocol.scala +++ b/modules/aws-kernel/src/smithy4s/aws/AwsProtocol.scala @@ -56,12 +56,22 @@ private[aws] object AwsProtocol { .map(AWS_REST_XML.apply) ) - // See https://awslabs.github.io/smithy/1.0/spec/aws/aws-json-1_0-protocol.html#differences-between-awsjson1-0-and-awsjson1-1 + // See https://smithy.io/2.0/aws/protocols/aws-ec2-query-protocol.html. final case class AWS_EC2_QUERY(value: Ec2Query) extends AwsProtocol + + // See https://smithy.io/2.0/aws/protocols/aws-json-1_0-protocol.html, + // https://smithy.io/2.0/aws/protocols/aws-json-1_1-protocol.html, and + // https://smithy.io/2.0/aws/protocols/aws-json-1_0-protocol.html#differences-between-awsjson1-0-and-awsjson1-1. final case class AWS_JSON_1_0(value: AwsJson1_0) extends AwsProtocol final case class AWS_JSON_1_1(value: AwsJson1_1) extends AwsProtocol + + // See https://smithy.io/2.0/aws/protocols/aws-query-protocol.html. final case class AWS_QUERY(value: AwsQuery) extends AwsProtocol + + // See https://smithy.io/2.0/aws/protocols/aws-restjson1-protocol.html. final case class AWS_REST_JSON_1(value: RestJson1) extends AwsProtocol + + // See https://smithy.io/2.0/aws/protocols/aws-restxml-protocol.html. final case class AWS_REST_XML(value: RestXml) extends AwsProtocol } From 2a22ca600d75334b92166ed9bef45793be4ffa5f Mon Sep 17 00:00:00 2001 From: David Piggott Date: Tue, 1 Aug 2023 14:34:58 +0100 Subject: [PATCH 22/25] Scalafmt --- modules/aws-kernel/src/smithy4s/aws/AwsProtocol.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/aws-kernel/src/smithy4s/aws/AwsProtocol.scala b/modules/aws-kernel/src/smithy4s/aws/AwsProtocol.scala index ccccf753b..2df7be01b 100644 --- a/modules/aws-kernel/src/smithy4s/aws/AwsProtocol.scala +++ b/modules/aws-kernel/src/smithy4s/aws/AwsProtocol.scala @@ -64,13 +64,13 @@ private[aws] object AwsProtocol { // https://smithy.io/2.0/aws/protocols/aws-json-1_0-protocol.html#differences-between-awsjson1-0-and-awsjson1-1. final case class AWS_JSON_1_0(value: AwsJson1_0) extends AwsProtocol final case class AWS_JSON_1_1(value: AwsJson1_1) extends AwsProtocol - + // See https://smithy.io/2.0/aws/protocols/aws-query-protocol.html. final case class AWS_QUERY(value: AwsQuery) extends AwsProtocol - + // See https://smithy.io/2.0/aws/protocols/aws-restjson1-protocol.html. final case class AWS_REST_JSON_1(value: RestJson1) extends AwsProtocol - + // See https://smithy.io/2.0/aws/protocols/aws-restxml-protocol.html. final case class AWS_REST_XML(value: RestXml) extends AwsProtocol From 8cc9d18195c700d5a361fd57e101867ac9274488 Mon Sep 17 00:00:00 2001 From: David Piggott Date: Wed, 2 Aug 2023 15:00:11 +0100 Subject: [PATCH 23/25] Fix merge error --- modules/sandbox/src/Sandbox.scala | 2 -- 1 file changed, 2 deletions(-) diff --git a/modules/sandbox/src/Sandbox.scala b/modules/sandbox/src/Sandbox.scala index d3432b734..92238be50 100644 --- a/modules/sandbox/src/Sandbox.scala +++ b/modules/sandbox/src/Sandbox.scala @@ -23,8 +23,6 @@ import smithy4s.aws._ object Main extends IOApp.Simple { - type NextToken = String - override def run: IO[Unit] = awsEnvironmentResource.use { awsEnvironment => // Per // https://disneystreaming.github.io/smithy4s/docs/protocols/aws/aws/#awsquery, From 36bdd0763f338c238b01b95c893e3c19cd3e8411 Mon Sep 17 00:00:00 2001 From: David Piggott Date: Wed, 2 Aug 2023 15:21:34 +0100 Subject: [PATCH 24/25] Really fix Sandbox error --- modules/sandbox/src/Sandbox.scala | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/sandbox/src/Sandbox.scala b/modules/sandbox/src/Sandbox.scala index 92238be50..0b1de6e5d 100644 --- a/modules/sandbox/src/Sandbox.scala +++ b/modules/sandbox/src/Sandbox.scala @@ -15,8 +15,8 @@ */ import cats.effect._ -import com.amazonaws.cloudwatch._ -import com.amazonaws.ec2._ +import com.amazonaws.cloudwatch +import com.amazonaws.ec2 import org.http4s.client.middleware._ import org.http4s.ember.client.EmberClientBuilder import smithy4s.aws._ @@ -27,8 +27,8 @@ object Main extends IOApp.Simple { // Per // https://disneystreaming.github.io/smithy4s/docs/protocols/aws/aws/#awsquery, // CloudWatch is one of a few services that use the awsQuery protocol. - AwsClient(CloudWatch, awsEnvironment).use(cloudWatchClient => - listAll[ListMetricsOutput, Metric]( + AwsClient(cloudwatch.CloudWatch, awsEnvironment).use(cloudWatchClient => + listAll[cloudwatch.NextToken, cloudwatch.ListMetricsOutput, cloudwatch.Metric]( listF = maybeNextToken => cloudWatchClient.listMetrics( // This is just a simple way of reducing the size of the results while @@ -45,8 +45,8 @@ object Main extends IOApp.Simple { // Per // https://disneystreaming.github.io/smithy4s/docs/protocols/aws/aws/#ec2query, // EC2 is the only service that use the ec2Query protocol. - AwsClient(EC2, awsEnvironment).use(ec2Client => - listAll[DescribeInstanceStatusResult, InstanceStatus]( + AwsClient(ec2.EC2, awsEnvironment).use(ec2Client => + listAll[String, ec2.DescribeInstanceStatusResult, ec2.InstanceStatus]( listF = maybeNextToken => ec2Client.describeInstanceStatus( maxResults = 100, @@ -87,7 +87,7 @@ object Main extends IOApp.Simple { // user-land. Perhaps we could use pagination hints from the specs to avoid // having to manually wire up the accessors, and to generate synthetic service // functions that handle pagination? - private def listAll[ListOutput, Result]( + private def listAll[NextToken, ListOutput, Result]( listF: Option[NextToken] => IO[ListOutput], accessResults: ListOutput => List[Result], accessNextToken: ListOutput => Option[NextToken], From 2f7dbf6bc72605e2b881eb0b9f95a1e8ee2cacf4 Mon Sep 17 00:00:00 2001 From: David Piggott Date: Wed, 2 Aug 2023 16:57:06 +0100 Subject: [PATCH 25/25] Scalafmt --- modules/sandbox/src/Sandbox.scala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/sandbox/src/Sandbox.scala b/modules/sandbox/src/Sandbox.scala index 0b1de6e5d..21add8077 100644 --- a/modules/sandbox/src/Sandbox.scala +++ b/modules/sandbox/src/Sandbox.scala @@ -28,7 +28,11 @@ object Main extends IOApp.Simple { // https://disneystreaming.github.io/smithy4s/docs/protocols/aws/aws/#awsquery, // CloudWatch is one of a few services that use the awsQuery protocol. AwsClient(cloudwatch.CloudWatch, awsEnvironment).use(cloudWatchClient => - listAll[cloudwatch.NextToken, cloudwatch.ListMetricsOutput, cloudwatch.Metric]( + listAll[ + cloudwatch.NextToken, + cloudwatch.ListMetricsOutput, + cloudwatch.Metric + ]( listF = maybeNextToken => cloudWatchClient.listMetrics( // This is just a simple way of reducing the size of the results while