Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update GenerationContext with directed codegen related changes #1405

Merged
merged 3 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 44 additions & 44 deletions Sources/Services/AWSBedrockAgentRuntime/models/Models.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2760,17 +2760,17 @@ extension BedrockAgentRuntimeClientTypes.RetrieveAndGenerateInput: Swift.Codable
}
}

extension RetrieveAndGenerateInput: Swift.CustomDebugStringConvertible {
public var debugDescription: Swift.String {
"RetrieveAndGenerateInput(retrieveAndGenerateConfiguration: \(Swift.String(describing: retrieveAndGenerateConfiguration)), sessionConfiguration: \(Swift.String(describing: sessionConfiguration)), sessionId: \(Swift.String(describing: sessionId)), input: \"CONTENT_REDACTED\")"}
}

extension BedrockAgentRuntimeClientTypes.RetrieveAndGenerateInput: Swift.CustomDebugStringConvertible {
public var debugDescription: Swift.String {
"CONTENT_REDACTED"
}
}

extension RetrieveAndGenerateInput: Swift.CustomDebugStringConvertible {
public var debugDescription: Swift.String {
"RetrieveAndGenerateInput(retrieveAndGenerateConfiguration: \(Swift.String(describing: retrieveAndGenerateConfiguration)), sessionConfiguration: \(Swift.String(describing: sessionConfiguration)), sessionId: \(Swift.String(describing: sessionId)), input: \"CONTENT_REDACTED\")"}
}

extension RetrieveAndGenerateInput: Swift.Encodable {
enum CodingKeys: Swift.String, Swift.CodingKey {
case input
Expand Down Expand Up @@ -2803,6 +2803,23 @@ extension RetrieveAndGenerateInput {
}
}

extension BedrockAgentRuntimeClientTypes {
/// Contains the query made to the knowledge base.
public struct RetrieveAndGenerateInput: Swift.Equatable {
/// The query made to the knowledge base.
/// This member is required.
public var text: Swift.String?

public init(
text: Swift.String? = nil
)
{
self.text = text
}
}

}

public struct RetrieveAndGenerateInput: Swift.Equatable {
/// Contains the query made to the knowledge base.
/// This member is required.
Expand All @@ -2828,23 +2845,6 @@ public struct RetrieveAndGenerateInput: Swift.Equatable {
}
}

extension BedrockAgentRuntimeClientTypes {
/// Contains the query made to the knowledge base.
public struct RetrieveAndGenerateInput: Swift.Equatable {
/// The query made to the knowledge base.
/// This member is required.
public var text: Swift.String?

public init(
text: Swift.String? = nil
)
{
self.text = text
}
}

}

struct RetrieveAndGenerateInputBody: Swift.Equatable {
let sessionId: Swift.String?
let input: BedrockAgentRuntimeClientTypes.RetrieveAndGenerateInput?
Expand Down Expand Up @@ -2892,17 +2892,17 @@ extension BedrockAgentRuntimeClientTypes.RetrieveAndGenerateOutput: Swift.Codabl
}
}

extension RetrieveAndGenerateOutput: Swift.CustomDebugStringConvertible {
public var debugDescription: Swift.String {
"RetrieveAndGenerateOutput(citations: \(Swift.String(describing: citations)), sessionId: \(Swift.String(describing: sessionId)), output: \"CONTENT_REDACTED\")"}
}

extension BedrockAgentRuntimeClientTypes.RetrieveAndGenerateOutput: Swift.CustomDebugStringConvertible {
public var debugDescription: Swift.String {
"CONTENT_REDACTED"
}
}

extension RetrieveAndGenerateOutput: Swift.CustomDebugStringConvertible {
public var debugDescription: Swift.String {
"RetrieveAndGenerateOutput(citations: \(Swift.String(describing: citations)), sessionId: \(Swift.String(describing: sessionId)), output: \"CONTENT_REDACTED\")"}
}

extension RetrieveAndGenerateOutput: ClientRuntime.HttpResponseBinding {
public init(httpResponse: ClientRuntime.HttpResponse, decoder: ClientRuntime.ResponseDecoder? = nil) async throws {
if let data = try await httpResponse.body.readData(),
Expand All @@ -2919,6 +2919,23 @@ extension RetrieveAndGenerateOutput: ClientRuntime.HttpResponseBinding {
}
}

extension BedrockAgentRuntimeClientTypes {
/// Contains the response generated from querying the knowledge base.
public struct RetrieveAndGenerateOutput: Swift.Equatable {
/// The response generated from querying the knowledge base.
/// This member is required.
public var text: Swift.String?

public init(
text: Swift.String? = nil
)
{
self.text = text
}
}

}

public struct RetrieveAndGenerateOutput: Swift.Equatable {
/// A list of segments of the generated response that are based on sources in the knowledge base, alongside information about the sources.
public var citations: [BedrockAgentRuntimeClientTypes.Citation]?
Expand All @@ -2941,23 +2958,6 @@ public struct RetrieveAndGenerateOutput: Swift.Equatable {
}
}

extension BedrockAgentRuntimeClientTypes {
/// Contains the response generated from querying the knowledge base.
public struct RetrieveAndGenerateOutput: Swift.Equatable {
/// The response generated from querying the knowledge base.
/// This member is required.
public var text: Swift.String?

public init(
text: Swift.String? = nil
)
{
self.text = text
}
}

}

struct RetrieveAndGenerateOutputBody: Swift.Equatable {
let sessionId: Swift.String?
let output: BedrockAgentRuntimeClientTypes.RetrieveAndGenerateOutput?
Expand Down
26 changes: 13 additions & 13 deletions Sources/Services/AWSElasticTranscoder/models/Models.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1050,19 +1050,6 @@ extension CreateJobOutput: ClientRuntime.HttpResponseBinding {
}
}

/// The CreateJobResponse structure.
public struct CreateJobOutput: Swift.Equatable {
/// A section of the response body that provides information about the job that is created.
public var job: ElasticTranscoderClientTypes.Job?

public init(
job: ElasticTranscoderClientTypes.Job? = nil
)
{
self.job = job
}
}

extension ElasticTranscoderClientTypes {
/// The CreateJobOutput structure.
public struct CreateJobOutput: Swift.Equatable {
Expand Down Expand Up @@ -1136,6 +1123,19 @@ extension ElasticTranscoderClientTypes {

}

/// The CreateJobResponse structure.
public struct CreateJobOutput: Swift.Equatable {
/// A section of the response body that provides information about the job that is created.
public var job: ElasticTranscoderClientTypes.Job?

public init(
job: ElasticTranscoderClientTypes.Job? = nil
)
{
self.job = job
}
}

struct CreateJobOutputBody: Swift.Equatable {
let job: ElasticTranscoderClientTypes.Job?
}
Expand Down
66 changes: 33 additions & 33 deletions Sources/Services/AWSGlacier/models/Models.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1560,6 +1560,39 @@ extension DescribeVaultOutput: ClientRuntime.HttpResponseBinding {
}
}

/// Contains the Amazon S3 Glacier response to your request.
public struct DescribeVaultOutput: Swift.Equatable {
/// The Universal Coordinated Time (UTC) date when the vault was created. This value should be a string in the ISO 8601 date format, for example 2012-03-20T17:03:43.221Z.
public var creationDate: Swift.String?
/// The Universal Coordinated Time (UTC) date when Amazon S3 Glacier completed the last vault inventory. This value should be a string in the ISO 8601 date format, for example 2012-03-20T17:03:43.221Z.
public var lastInventoryDate: Swift.String?
/// The number of archives in the vault as of the last inventory date. This field will return null if an inventory has not yet run on the vault, for example if you just created the vault.
public var numberOfArchives: Swift.Int
/// Total size, in bytes, of the archives in the vault as of the last inventory date. This field will return null if an inventory has not yet run on the vault, for example if you just created the vault.
public var sizeInBytes: Swift.Int
/// The Amazon Resource Name (ARN) of the vault.
public var vaultARN: Swift.String?
/// The name of the vault.
public var vaultName: Swift.String?

public init(
creationDate: Swift.String? = nil,
lastInventoryDate: Swift.String? = nil,
numberOfArchives: Swift.Int = 0,
sizeInBytes: Swift.Int = 0,
vaultARN: Swift.String? = nil,
vaultName: Swift.String? = nil
)
{
self.creationDate = creationDate
self.lastInventoryDate = lastInventoryDate
self.numberOfArchives = numberOfArchives
self.sizeInBytes = sizeInBytes
self.vaultARN = vaultARN
self.vaultName = vaultName
}
}

extension GlacierClientTypes {
/// Contains the Amazon S3 Glacier response to your request.
public struct DescribeVaultOutput: Swift.Equatable {
Expand Down Expand Up @@ -1596,39 +1629,6 @@ extension GlacierClientTypes {

}

/// Contains the Amazon S3 Glacier response to your request.
public struct DescribeVaultOutput: Swift.Equatable {
/// The Universal Coordinated Time (UTC) date when the vault was created. This value should be a string in the ISO 8601 date format, for example 2012-03-20T17:03:43.221Z.
public var creationDate: Swift.String?
/// The Universal Coordinated Time (UTC) date when Amazon S3 Glacier completed the last vault inventory. This value should be a string in the ISO 8601 date format, for example 2012-03-20T17:03:43.221Z.
public var lastInventoryDate: Swift.String?
/// The number of archives in the vault as of the last inventory date. This field will return null if an inventory has not yet run on the vault, for example if you just created the vault.
public var numberOfArchives: Swift.Int
/// Total size, in bytes, of the archives in the vault as of the last inventory date. This field will return null if an inventory has not yet run on the vault, for example if you just created the vault.
public var sizeInBytes: Swift.Int
/// The Amazon Resource Name (ARN) of the vault.
public var vaultARN: Swift.String?
/// The name of the vault.
public var vaultName: Swift.String?

public init(
creationDate: Swift.String? = nil,
lastInventoryDate: Swift.String? = nil,
numberOfArchives: Swift.Int = 0,
sizeInBytes: Swift.Int = 0,
vaultARN: Swift.String? = nil,
vaultName: Swift.String? = nil
)
{
self.creationDate = creationDate
self.lastInventoryDate = lastInventoryDate
self.numberOfArchives = numberOfArchives
self.sizeInBytes = sizeInBytes
self.vaultARN = vaultARN
self.vaultName = vaultName
}
}

struct DescribeVaultOutputBody: Swift.Equatable {
let vaultARN: Swift.String?
let vaultName: Swift.String?
Expand Down
32 changes: 16 additions & 16 deletions Sources/Services/AWSRoute53RecoveryReadiness/models/Models.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3561,22 +3561,6 @@ extension ListRulesOutput: ClientRuntime.HttpResponseBinding {
}
}

public struct ListRulesOutput: Swift.Equatable {
/// The token that identifies which batch of results you want to see.
public var nextToken: Swift.String?
/// A list of readiness rules for a specific resource type.
public var rules: [Route53RecoveryReadinessClientTypes.ListRulesOutput]?

public init(
nextToken: Swift.String? = nil,
rules: [Route53RecoveryReadinessClientTypes.ListRulesOutput]? = nil
)
{
self.nextToken = nextToken
self.rules = rules
}
}

extension Route53RecoveryReadinessClientTypes {
/// Readiness rule information, including the resource type, rule ID, and rule description.
public struct ListRulesOutput: Swift.Equatable {
Expand Down Expand Up @@ -3604,6 +3588,22 @@ extension Route53RecoveryReadinessClientTypes {

}

public struct ListRulesOutput: Swift.Equatable {
/// The token that identifies which batch of results you want to see.
public var nextToken: Swift.String?
/// A list of readiness rules for a specific resource type.
public var rules: [Route53RecoveryReadinessClientTypes.ListRulesOutput]?

public init(
nextToken: Swift.String? = nil,
rules: [Route53RecoveryReadinessClientTypes.ListRulesOutput]? = nil
)
{
self.nextToken = nextToken
self.rules = rules
}
}

struct ListRulesOutputBody: Swift.Equatable {
let nextToken: Swift.String?
let rules: [Route53RecoveryReadinessClientTypes.ListRulesOutput]?
Expand Down
44 changes: 22 additions & 22 deletions Sources/Services/AWSS3Control/models/Models.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11824,6 +11824,28 @@ extension PutMultiRegionAccessPointPolicyInput {
}
}

extension S3ControlClientTypes {
/// A container for the information associated with a [PutMultiRegionAccessPoint](https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_PutMultiRegionAccessPoint.html) request.
public struct PutMultiRegionAccessPointPolicyInput: Swift.Equatable {
/// The name of the Multi-Region Access Point associated with the request.
/// This member is required.
public var name: Swift.String?
/// The policy details for the PutMultiRegionAccessPoint request.
/// This member is required.
public var policy: Swift.String?

public init(
name: Swift.String? = nil,
policy: Swift.String? = nil
)
{
self.name = name
self.policy = policy
}
}

}

public struct PutMultiRegionAccessPointPolicyInput: Swift.Equatable {
/// The Amazon Web Services account ID for the owner of the Multi-Region Access Point.
/// This member is required.
Expand All @@ -11847,28 +11869,6 @@ public struct PutMultiRegionAccessPointPolicyInput: Swift.Equatable {
}
}

extension S3ControlClientTypes {
/// A container for the information associated with a [PutMultiRegionAccessPoint](https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_PutMultiRegionAccessPoint.html) request.
public struct PutMultiRegionAccessPointPolicyInput: Swift.Equatable {
/// The name of the Multi-Region Access Point associated with the request.
/// This member is required.
public var name: Swift.String?
/// The policy details for the PutMultiRegionAccessPoint request.
/// This member is required.
public var policy: Swift.String?

public init(
name: Swift.String? = nil,
policy: Swift.String? = nil
)
{
self.name = name
self.policy = policy
}
}

}

extension PutMultiRegionAccessPointPolicyOutput {

static var httpBinding: ClientRuntime.HTTPResponseOutputBinding<PutMultiRegionAccessPointPolicyOutput, SmithyXML.Reader> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import software.amazon.smithy.swift.codegen.ClientRuntimeTypes.Middleware.NoopHa
import software.amazon.smithy.swift.codegen.FoundationTypes
import software.amazon.smithy.swift.codegen.SwiftDelegator
import software.amazon.smithy.swift.codegen.SwiftWriter
import software.amazon.smithy.swift.codegen.core.CodegenContext
import software.amazon.smithy.swift.codegen.core.SwiftCodegenContext
import software.amazon.smithy.swift.codegen.core.toProtocolGenerationContext
import software.amazon.smithy.swift.codegen.integration.ProtocolGenerator
import software.amazon.smithy.swift.codegen.integration.SwiftIntegration
Expand All @@ -29,7 +29,7 @@ data class PresignableOperation(
)

class PresignerGenerator : SwiftIntegration {
override fun writeAdditionalFiles(ctx: CodegenContext, protoCtx: ProtocolGenerator.GenerationContext, delegator: SwiftDelegator) {
override fun writeAdditionalFiles(ctx: SwiftCodegenContext, protoCtx: ProtocolGenerator.GenerationContext, delegator: SwiftDelegator) {
val service = ctx.model.expectShape<ServiceShape>(ctx.settings.service)

if (!SigV4Utils.isSupportedAuthentication(ctx.model, service)) return
Expand Down Expand Up @@ -66,7 +66,7 @@ class PresignerGenerator : SwiftIntegration {

private fun renderPresigner(
writer: SwiftWriter,
ctx: CodegenContext,
ctx: SwiftCodegenContext,
delegator: SwiftDelegator,
op: OperationShape,
inputType: String,
Expand Down
Loading
Loading