Skip to content

Commit 6f8d499

Browse files
authored
Merge pull request #1893 from kyri-petrou/codegen/explicit-struct-and-union-type-params
Add type params to `struct` and `union` in codegen schemas
2 parents 7b2e915 + b996cc6 commit 6f8d499

File tree

281 files changed

+312
-312
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

281 files changed

+312
-312
lines changed

modules/bootstrapped/src/generated/com/amazonaws/dynamodb/DescribeEndpointsResponse.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ object DescribeEndpointsResponse extends ShapeTag.Companion[DescribeEndpointsRes
1919
// constructor using the original order from the spec
2020
private def make(endpoints: List[Endpoint]): DescribeEndpointsResponse = DescribeEndpointsResponse(endpoints)
2121

22-
implicit val schema: Schema[DescribeEndpointsResponse] = struct(
22+
implicit val schema: Schema[DescribeEndpointsResponse] = struct[DescribeEndpointsResponse](
2323
Endpoints.underlyingSchema.required[DescribeEndpointsResponse]("Endpoints", _.endpoints).addHints(smithy.api.Documentation("<p>List of endpoints.</p>")),
2424
)(make).withId(id).addHints(hints)
2525
}

modules/bootstrapped/src/generated/com/amazonaws/dynamodb/DynamoDB.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ object DynamoDBOperation {
178178
}
179179
}
180180

181-
implicit val schema: Schema[ListTablesError] = union(
181+
implicit val schema: Schema[ListTablesError] = union[ListTablesError](
182182
ListTablesError.InternalServerErrorCase.alt,
183183
ListTablesError.InvalidEndpointExceptionCase.alt,
184184
){

modules/bootstrapped/src/generated/com/amazonaws/dynamodb/Endpoint.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ object Endpoint extends ShapeTag.Companion[Endpoint] {
2727
// constructor using the original order from the spec
2828
private def make(address: String, cachePeriodInMinutes: Long): Endpoint = Endpoint(address, cachePeriodInMinutes)
2929

30-
implicit val schema: Schema[Endpoint] = struct(
30+
implicit val schema: Schema[Endpoint] = struct[Endpoint](
3131
string.required[Endpoint]("Address", _.address).addHints(smithy.api.Documentation("<p>IP address of the endpoint.</p>")),
3232
long.required[Endpoint]("CachePeriodInMinutes", _.cachePeriodInMinutes).addHints(smithy.api.Default(smithy4s.Document.fromLong(0)), smithy.api.Documentation("<p>Endpoint cache time to live (TTL) value.</p>")),
3333
)(make).withId(id).addHints(hints)

modules/bootstrapped/src/generated/com/amazonaws/dynamodb/InternalServerError.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ object InternalServerError extends ShapeTag.Companion[InternalServerError] {
2727
// constructor using the original order from the spec
2828
private def make(message: Option[ErrorMessage]): InternalServerError = InternalServerError(message)
2929

30-
implicit val schema: Schema[InternalServerError] = struct(
30+
implicit val schema: Schema[InternalServerError] = struct[InternalServerError](
3131
ErrorMessage.schema.optional[InternalServerError]("message", _.message).addHints(smithy.api.Documentation("<p>The server encountered an internal error trying to fulfill the request.</p>")),
3232
)(make).withId(id).addHints(hints)
3333
}

modules/bootstrapped/src/generated/com/amazonaws/dynamodb/InvalidEndpointException.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ object InvalidEndpointException extends ShapeTag.Companion[InvalidEndpointExcept
2323
// constructor using the original order from the spec
2424
private def make(message: Option[String]): InvalidEndpointException = InvalidEndpointException(message)
2525

26-
implicit val schema: Schema[InvalidEndpointException] = struct(
26+
implicit val schema: Schema[InvalidEndpointException] = struct[InvalidEndpointException](
2727
string.optional[InvalidEndpointException]("Message", _.message),
2828
)(make).withId(id).addHints(hints)
2929
}

modules/bootstrapped/src/generated/com/amazonaws/dynamodb/ListTablesInput.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ object ListTablesInput extends ShapeTag.Companion[ListTablesInput] {
2727
// constructor using the original order from the spec
2828
private def make(exclusiveStartTableName: Option[TableName], limit: Option[ListTablesInputLimit]): ListTablesInput = ListTablesInput(exclusiveStartTableName, limit)
2929

30-
implicit val schema: Schema[ListTablesInput] = struct(
30+
implicit val schema: Schema[ListTablesInput] = struct[ListTablesInput](
3131
TableName.schema.optional[ListTablesInput]("ExclusiveStartTableName", _.exclusiveStartTableName).addHints(smithy.api.Documentation("<p>The first table name that this operation will evaluate. Use the value that was returned for\n <code>LastEvaluatedTableName</code> in a previous operation, so that you can obtain the next page\n of results.</p>")),
3232
ListTablesInputLimit.schema.optional[ListTablesInput]("Limit", _.limit).addHints(smithy.api.Documentation("<p>A maximum number of table names to return. If this parameter is not specified, the limit is 100.</p>")),
3333
)(make).withId(id).addHints(hints)

modules/bootstrapped/src/generated/com/amazonaws/dynamodb/ListTablesOutput.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ object ListTablesOutput extends ShapeTag.Companion[ListTablesOutput] {
3232
// constructor using the original order from the spec
3333
private def make(tableNames: Option[List[TableName]], lastEvaluatedTableName: Option[TableName]): ListTablesOutput = ListTablesOutput(tableNames, lastEvaluatedTableName)
3434

35-
implicit val schema: Schema[ListTablesOutput] = struct(
35+
implicit val schema: Schema[ListTablesOutput] = struct[ListTablesOutput](
3636
TableNameList.underlyingSchema.optional[ListTablesOutput]("TableNames", _.tableNames).addHints(smithy.api.Documentation("<p>The names of the tables associated with the current account at the current endpoint. The maximum size of this array is 100.</p>\n <p>If <code>LastEvaluatedTableName</code> also appears in the output, you can use this value as the\n <code>ExclusiveStartTableName</code> parameter in a subsequent <code>ListTables</code> request and\n obtain the next page of results.</p>")),
3737
TableName.schema.optional[ListTablesOutput]("LastEvaluatedTableName", _.lastEvaluatedTableName).addHints(smithy.api.Documentation("<p>The name of the last table in the current page of results. Use this value as the\n <code>ExclusiveStartTableName</code> in a new request to obtain the next page of results, until\n all the table names are returned.</p>\n <p>If you do not receive a <code>LastEvaluatedTableName</code> value in the response, this means that\n there are no more table names to be retrieved.</p>")),
3838
)(make).withId(id).addHints(hints)

modules/bootstrapped/src/generated/smithy4s/benchmark/Attributes.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ object Attributes extends ShapeTag.Companion[Attributes] {
2121
// constructor using the original order from the spec
2222
private def make(user: String, public: Boolean, size: Long, creationDate: Timestamp, region: String, queryable: Option[Boolean], queryableLastChange: Option[Timestamp], blockPublicAccess: Option[Boolean], permissions: Option[List[Permission]], tags: Option[List[String]], backedUp: Option[Boolean], metadata: Option[List[Metadata]], encryption: Option[Encryption]): Attributes = Attributes(user, public, size, creationDate, region, queryable, queryableLastChange, blockPublicAccess, permissions, tags, backedUp, metadata, encryption)
2323

24-
implicit val schema: Schema[Attributes] = struct(
24+
implicit val schema: Schema[Attributes] = struct[Attributes](
2525
string.required[Attributes]("user", _.user),
2626
boolean.required[Attributes]("public", _.public),
2727
long.required[Attributes]("size", _.size),

modules/bootstrapped/src/generated/smithy4s/benchmark/CreateObjectInput.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ object CreateObjectInput extends ShapeTag.Companion[CreateObjectInput] {
1717
// constructor using the original order from the spec
1818
private def make(key: String, bucketName: String, payload: S3Object): CreateObjectInput = CreateObjectInput(key, bucketName, payload)
1919

20-
implicit val schema: Schema[CreateObjectInput] = struct(
20+
implicit val schema: Schema[CreateObjectInput] = struct[CreateObjectInput](
2121
string.required[CreateObjectInput]("key", _.key).addHints(smithy.api.HttpLabel()),
2222
string.required[CreateObjectInput]("bucketName", _.bucketName).addHints(smithy.api.HttpLabel()),
2323
S3Object.schema.required[CreateObjectInput]("payload", _.payload).addHints(smithy.api.HttpPayload()),

modules/bootstrapped/src/generated/smithy4s/benchmark/Creds.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ object Creds extends ShapeTag.Companion[Creds] {
1717
// constructor using the original order from the spec
1818
private def make(user: Option[String], key: Option[String]): Creds = Creds(user, key)
1919

20-
implicit val schema: Schema[Creds] = struct(
20+
implicit val schema: Schema[Creds] = struct[Creds](
2121
string.optional[Creds]("user", _.user),
2222
string.optional[Creds]("key", _.key),
2323
)(make).withId(id).addHints(hints)

0 commit comments

Comments
 (0)