From 54a459ed4d9af2cb2d8e6fdcd96b72543bebb88a Mon Sep 17 00:00:00 2001 From: AWS SDK Swift Automation Date: Fri, 1 Nov 2024 18:54:52 +0000 Subject: [PATCH] chore: Updates version to 1.0.33 --- Package.version | 2 +- Package.version.next | 2 +- .../Sources/AWSBedrockAgent/Models.swift | 2 +- .../AWSDocDBElastic/DocDBElasticClient.swift | 215 ++++++++ .../Sources/AWSDocDBElastic/Models.swift | 510 +++++++++++++++--- .../Sources/AWSDocDBElastic/Paginators.swift | 30 ++ .../Sources/AWSTaxSettings/Models.swift | 383 ++++++++++++- .../Sources/AWSTaxSettings/Paginators.swift | 30 ++ .../AWSTaxSettings/TaxSettingsClient.swift | 242 ++++++++- 9 files changed, 1332 insertions(+), 84 deletions(-) diff --git a/Package.version b/Package.version index 08a69b59ed5..c1cf2f97ca7 100644 --- a/Package.version +++ b/Package.version @@ -1 +1 @@ -1.0.32 \ No newline at end of file +1.0.33 \ No newline at end of file diff --git a/Package.version.next b/Package.version.next index c1cf2f97ca7..64a736bed17 100644 --- a/Package.version.next +++ b/Package.version.next @@ -1 +1 @@ -1.0.33 \ No newline at end of file +1.0.34 \ No newline at end of file diff --git a/Sources/Services/AWSBedrockAgent/Sources/AWSBedrockAgent/Models.swift b/Sources/Services/AWSBedrockAgent/Sources/AWSBedrockAgent/Models.swift index 1ed394ff3e9..4279e36596f 100644 --- a/Sources/Services/AWSBedrockAgent/Sources/AWSBedrockAgent/Models.swift +++ b/Sources/Services/AWSBedrockAgent/Sources/AWSBedrockAgent/Models.swift @@ -6438,7 +6438,7 @@ extension BedrockAgentClientTypes { /// Contains details about the model used to create vector embeddings for the knowledge base. public struct VectorKnowledgeBaseConfiguration: Swift.Sendable { - /// The Amazon Resource Name (ARN) of the model used to create vector embeddings for the knowledge base. + /// The Amazon Resource Name (ARN) of the model or inference profile used to create vector embeddings for the knowledge base. /// This member is required. public var embeddingModelArn: Swift.String? /// The embeddings model configuration details for the vector model used in Knowledge Base. diff --git a/Sources/Services/AWSDocDBElastic/Sources/AWSDocDBElastic/DocDBElasticClient.swift b/Sources/Services/AWSDocDBElastic/Sources/AWSDocDBElastic/DocDBElasticClient.swift index 8cf353b3b7c..f37a8e3f204 100644 --- a/Sources/Services/AWSDocDBElastic/Sources/AWSDocDBElastic/DocDBElasticClient.swift +++ b/Sources/Services/AWSDocDBElastic/Sources/AWSDocDBElastic/DocDBElasticClient.swift @@ -194,6 +194,80 @@ extension DocDBElasticClient { } extension DocDBElasticClient { + /// Performs the `ApplyPendingMaintenanceAction` operation on the `ChimeraDbLionfishServiceLambda` service. + /// + /// The type of pending maintenance action to be applied to the resource. + /// + /// - Parameter ApplyPendingMaintenanceActionInput : [no documentation found] + /// + /// - Returns: `ApplyPendingMaintenanceActionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : An exception that occurs when there are not sufficient permissions to perform an action. + /// - `ConflictException` : There was an access conflict. + /// - `InternalServerException` : There was an internal server error. + /// - `ResourceNotFoundException` : The specified resource could not be located. + /// - `ThrottlingException` : ThrottlingException will be thrown when request was denied due to request throttling. + /// - `ValidationException` : A structure defining a validation exception. + public func applyPendingMaintenanceAction(input: ApplyPendingMaintenanceActionInput) async throws -> ApplyPendingMaintenanceActionOutput { + let context = Smithy.ContextBuilder() + .withMethod(value: .post) + .withServiceName(value: serviceName) + .withOperation(value: "applyPendingMaintenanceAction") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withAuthSchemes(value: config.authSchemes ?? []) + .withAuthSchemeResolver(value: config.authSchemeResolver) + .withUnsignedPayloadTrait(value: false) + .withSocketTimeout(value: config.httpClientConfiguration.socketTimeout) + .withIdentityResolver(value: config.bearerTokenIdentityResolver, schemeID: "smithy.api#httpBearerAuth") + .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4") + .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4a") + .withRegion(value: config.region) + .withSigningName(value: "docdb-elastic") + .withSigningRegion(value: config.signingRegion) + .build() + let builder = ClientRuntime.OrchestratorBuilder() + config.interceptorProviders.forEach { provider in + builder.interceptors.add(provider.create()) + } + config.httpInterceptorProviders.forEach { provider in + builder.interceptors.add(provider.create()) + } + builder.interceptors.add(ClientRuntime.URLPathMiddleware(ApplyPendingMaintenanceActionInput.urlPathProvider(_:))) + builder.interceptors.add(ClientRuntime.URLHostMiddleware()) + builder.interceptors.add(ClientRuntime.ContentTypeMiddleware(contentType: "application/json")) + builder.serialize(ClientRuntime.BodyMiddleware(rootNodeInfo: "", inputWritingClosure: ApplyPendingMaintenanceActionInput.write(value:to:))) + builder.interceptors.add(ClientRuntime.ContentLengthMiddleware()) + builder.deserialize(ClientRuntime.DeserializeMiddleware(ApplyPendingMaintenanceActionOutput.httpOutput(from:), ApplyPendingMaintenanceActionOutputError.httpError(from:))) + builder.interceptors.add(ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions)) + builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:)) + builder.applySigner(ClientRuntime.SignerMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + builder.applyEndpoint(AWSClientRuntime.EndpointResolverMiddleware(endpointResolverBlock: { [config] in try config.endpointResolver.resolve(params: $0) }, endpointParams: endpointParams)) + builder.interceptors.add(AWSClientRuntime.UserAgentMiddleware(serviceID: serviceName, version: "1.0", config: config)) + builder.selectAuthScheme(ClientRuntime.AuthSchemeMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkInvocationIdMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkRequestMiddleware(maxRetries: config.retryStrategyOptions.maxRetriesBase)) + var metricsAttributes = Smithy.Attributes() + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.service, value: "DocDBElastic") + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "ApplyPendingMaintenanceAction") + let op = builder.attributes(context) + .telemetry(ClientRuntime.OrchestratorTelemetry( + telemetryProvider: config.telemetryProvider, + metricsAttributes: metricsAttributes, + meterScope: serviceName, + tracerScope: serviceName + )) + .executeRequest(client) + .build() + return try await op.execute(input: input) + } + /// Performs the `CopyClusterSnapshot` operation on the `ChimeraDbLionfishServiceLambda` service. /// /// Copies a snapshot of an elastic cluster. @@ -701,6 +775,77 @@ extension DocDBElasticClient { return try await op.execute(input: input) } + /// Performs the `GetPendingMaintenanceAction` operation on the `ChimeraDbLionfishServiceLambda` service. + /// + /// Retrieves all maintenance actions that are pending. + /// + /// - Parameter GetPendingMaintenanceActionInput : [no documentation found] + /// + /// - Returns: `GetPendingMaintenanceActionOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : An exception that occurs when there are not sufficient permissions to perform an action. + /// - `ConflictException` : There was an access conflict. + /// - `InternalServerException` : There was an internal server error. + /// - `ResourceNotFoundException` : The specified resource could not be located. + /// - `ThrottlingException` : ThrottlingException will be thrown when request was denied due to request throttling. + /// - `ValidationException` : A structure defining a validation exception. + public func getPendingMaintenanceAction(input: GetPendingMaintenanceActionInput) async throws -> GetPendingMaintenanceActionOutput { + let context = Smithy.ContextBuilder() + .withMethod(value: .get) + .withServiceName(value: serviceName) + .withOperation(value: "getPendingMaintenanceAction") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withAuthSchemes(value: config.authSchemes ?? []) + .withAuthSchemeResolver(value: config.authSchemeResolver) + .withUnsignedPayloadTrait(value: false) + .withSocketTimeout(value: config.httpClientConfiguration.socketTimeout) + .withIdentityResolver(value: config.bearerTokenIdentityResolver, schemeID: "smithy.api#httpBearerAuth") + .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4") + .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4a") + .withRegion(value: config.region) + .withSigningName(value: "docdb-elastic") + .withSigningRegion(value: config.signingRegion) + .build() + let builder = ClientRuntime.OrchestratorBuilder() + config.interceptorProviders.forEach { provider in + builder.interceptors.add(provider.create()) + } + config.httpInterceptorProviders.forEach { provider in + builder.interceptors.add(provider.create()) + } + builder.interceptors.add(ClientRuntime.URLPathMiddleware(GetPendingMaintenanceActionInput.urlPathProvider(_:))) + builder.interceptors.add(ClientRuntime.URLHostMiddleware()) + builder.deserialize(ClientRuntime.DeserializeMiddleware(GetPendingMaintenanceActionOutput.httpOutput(from:), GetPendingMaintenanceActionOutputError.httpError(from:))) + builder.interceptors.add(ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions)) + builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:)) + builder.applySigner(ClientRuntime.SignerMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + builder.applyEndpoint(AWSClientRuntime.EndpointResolverMiddleware(endpointResolverBlock: { [config] in try config.endpointResolver.resolve(params: $0) }, endpointParams: endpointParams)) + builder.interceptors.add(AWSClientRuntime.UserAgentMiddleware(serviceID: serviceName, version: "1.0", config: config)) + builder.selectAuthScheme(ClientRuntime.AuthSchemeMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkInvocationIdMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkRequestMiddleware(maxRetries: config.retryStrategyOptions.maxRetriesBase)) + var metricsAttributes = Smithy.Attributes() + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.service, value: "DocDBElastic") + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "GetPendingMaintenanceAction") + let op = builder.attributes(context) + .telemetry(ClientRuntime.OrchestratorTelemetry( + telemetryProvider: config.telemetryProvider, + metricsAttributes: metricsAttributes, + meterScope: serviceName, + tracerScope: serviceName + )) + .executeRequest(client) + .build() + return try await op.execute(input: input) + } + /// Performs the `ListClusterSnapshots` operation on the `ChimeraDbLionfishServiceLambda` service. /// /// Returns information about snapshots for a specified elastic cluster. @@ -841,6 +986,76 @@ extension DocDBElasticClient { return try await op.execute(input: input) } + /// Performs the `ListPendingMaintenanceActions` operation on the `ChimeraDbLionfishServiceLambda` service. + /// + /// Retrieves a list of all maintenance actions that are pending. + /// + /// - Parameter ListPendingMaintenanceActionsInput : [no documentation found] + /// + /// - Returns: `ListPendingMaintenanceActionsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `AccessDeniedException` : An exception that occurs when there are not sufficient permissions to perform an action. + /// - `InternalServerException` : There was an internal server error. + /// - `ThrottlingException` : ThrottlingException will be thrown when request was denied due to request throttling. + /// - `ValidationException` : A structure defining a validation exception. + public func listPendingMaintenanceActions(input: ListPendingMaintenanceActionsInput) async throws -> ListPendingMaintenanceActionsOutput { + let context = Smithy.ContextBuilder() + .withMethod(value: .get) + .withServiceName(value: serviceName) + .withOperation(value: "listPendingMaintenanceActions") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withAuthSchemes(value: config.authSchemes ?? []) + .withAuthSchemeResolver(value: config.authSchemeResolver) + .withUnsignedPayloadTrait(value: false) + .withSocketTimeout(value: config.httpClientConfiguration.socketTimeout) + .withIdentityResolver(value: config.bearerTokenIdentityResolver, schemeID: "smithy.api#httpBearerAuth") + .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4") + .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4a") + .withRegion(value: config.region) + .withSigningName(value: "docdb-elastic") + .withSigningRegion(value: config.signingRegion) + .build() + let builder = ClientRuntime.OrchestratorBuilder() + config.interceptorProviders.forEach { provider in + builder.interceptors.add(provider.create()) + } + config.httpInterceptorProviders.forEach { provider in + builder.interceptors.add(provider.create()) + } + builder.interceptors.add(ClientRuntime.URLPathMiddleware(ListPendingMaintenanceActionsInput.urlPathProvider(_:))) + builder.interceptors.add(ClientRuntime.URLHostMiddleware()) + builder.serialize(ClientRuntime.QueryItemMiddleware(ListPendingMaintenanceActionsInput.queryItemProvider(_:))) + builder.deserialize(ClientRuntime.DeserializeMiddleware(ListPendingMaintenanceActionsOutput.httpOutput(from:), ListPendingMaintenanceActionsOutputError.httpError(from:))) + builder.interceptors.add(ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions)) + builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:)) + builder.applySigner(ClientRuntime.SignerMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + builder.applyEndpoint(AWSClientRuntime.EndpointResolverMiddleware(endpointResolverBlock: { [config] in try config.endpointResolver.resolve(params: $0) }, endpointParams: endpointParams)) + builder.interceptors.add(AWSClientRuntime.UserAgentMiddleware(serviceID: serviceName, version: "1.0", config: config)) + builder.selectAuthScheme(ClientRuntime.AuthSchemeMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkInvocationIdMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkRequestMiddleware(maxRetries: config.retryStrategyOptions.maxRetriesBase)) + var metricsAttributes = Smithy.Attributes() + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.service, value: "DocDBElastic") + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "ListPendingMaintenanceActions") + let op = builder.attributes(context) + .telemetry(ClientRuntime.OrchestratorTelemetry( + telemetryProvider: config.telemetryProvider, + metricsAttributes: metricsAttributes, + meterScope: serviceName, + tracerScope: serviceName + )) + .executeRequest(client) + .build() + return try await op.execute(input: input) + } + /// Performs the `ListTagsForResource` operation on the `ChimeraDbLionfishServiceLambda` service. /// /// Lists all tags on a elastic cluster resource diff --git a/Sources/Services/AWSDocDBElastic/Sources/AWSDocDBElastic/Models.swift b/Sources/Services/AWSDocDBElastic/Sources/AWSDocDBElastic/Models.swift index cc0f51e5d71..44354a49b5e 100644 --- a/Sources/Services/AWSDocDBElastic/Sources/AWSDocDBElastic/Models.swift +++ b/Sources/Services/AWSDocDBElastic/Sources/AWSDocDBElastic/Models.swift @@ -51,35 +51,6 @@ public struct AccessDeniedException: ClientRuntime.ModeledError, AWSClientRuntim } } -extension DocDBElasticClientTypes { - - public enum Auth: Swift.Sendable, Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { - case plainText - case secretArn - case sdkUnknown(Swift.String) - - public static var allCases: [Auth] { - return [ - .plainText, - .secretArn - ] - } - - public init?(rawValue: Swift.String) { - let value = Self.allCases.first(where: { $0.rawValue == rawValue }) - self = value ?? Self.sdkUnknown(rawValue) - } - - public var rawValue: Swift.String { - switch self { - case .plainText: return "PLAIN_TEXT" - case .secretArn: return "SECRET_ARN" - case let .sdkUnknown(s): return s - } - } - } -} - /// There was an access conflict. public struct ConflictException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { @@ -176,31 +147,6 @@ public struct ResourceNotFoundException: ClientRuntime.ModeledError, AWSClientRu } } -/// The service quota for the action was exceeded. -public struct ServiceQuotaExceededException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { - - public struct Properties { - /// This member is required. - public internal(set) var message: Swift.String? = nil - } - - public internal(set) var properties = Properties() - public static var typeName: Swift.String { "ServiceQuotaExceededException" } - public static var fault: ClientRuntime.ErrorFault { .client } - public static var isRetryable: Swift.Bool { false } - public static var isThrottling: Swift.Bool { false } - public internal(set) var httpResponse = SmithyHTTPAPI.HTTPResponse() - public internal(set) var message: Swift.String? - public internal(set) var requestID: Swift.String? - - public init( - message: Swift.String? = nil - ) - { - self.properties.message = message - } -} - /// ThrottlingException will be thrown when request was denied due to request throttling. public struct ThrottlingException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { @@ -322,6 +268,202 @@ public struct ValidationException: ClientRuntime.ModeledError, AWSClientRuntime. } } +extension DocDBElasticClientTypes { + + public enum OptInType: Swift.Sendable, Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { + case applyOn + case immediate + case nextMaintenance + case undoOptIn + case sdkUnknown(Swift.String) + + public static var allCases: [OptInType] { + return [ + .applyOn, + .immediate, + .nextMaintenance, + .undoOptIn + ] + } + + public init?(rawValue: Swift.String) { + let value = Self.allCases.first(where: { $0.rawValue == rawValue }) + self = value ?? Self.sdkUnknown(rawValue) + } + + public var rawValue: Swift.String { + switch self { + case .applyOn: return "APPLY_ON" + case .immediate: return "IMMEDIATE" + case .nextMaintenance: return "NEXT_MAINTENANCE" + case .undoOptIn: return "UNDO_OPT_IN" + case let .sdkUnknown(s): return s + } + } + } +} + +public struct ApplyPendingMaintenanceActionInput: Swift.Sendable { + /// The pending maintenance action to apply to the resource. Valid actions are: + /// + /// * ENGINE_UPDATE + /// + /// * ENGINE_UPGRADE + /// + /// * SECURITY_UPDATE + /// + /// * OS_UPDATE + /// + /// * MASTER_USER_PASSWORD_UPDATE + /// This member is required. + public var applyAction: Swift.String? + /// A specific date to apply the pending maintenance action. Required if opt-in-type is APPLY_ON. Format: yyyy/MM/dd HH:mm-yyyy/MM/dd HH:mm + public var applyOn: Swift.String? + /// A value that specifies the type of opt-in request, or undoes an opt-in request. An opt-in request of type IMMEDIATE can't be undone. + /// This member is required. + public var optInType: DocDBElasticClientTypes.OptInType? + /// The Amazon DocumentDB Amazon Resource Name (ARN) of the resource to which the pending maintenance action applies. + /// This member is required. + public var resourceArn: Swift.String? + + public init( + applyAction: Swift.String? = nil, + applyOn: Swift.String? = nil, + optInType: DocDBElasticClientTypes.OptInType? = nil, + resourceArn: Swift.String? = nil + ) + { + self.applyAction = applyAction + self.applyOn = applyOn + self.optInType = optInType + self.resourceArn = resourceArn + } +} + +extension DocDBElasticClientTypes { + + /// Retrieves the details of maintenance actions that are pending. + public struct PendingMaintenanceActionDetails: Swift.Sendable { + /// Displays the specific action of a pending maintenance action. + /// This member is required. + public var action: Swift.String? + /// Displays the date of the maintenance window when the action is applied. The maintenance action is applied to the resource during its first maintenance window after this date. If this date is specified, any NEXT_MAINTENANCEoptInType requests are ignored. + public var autoAppliedAfterDate: Swift.String? + /// Displays the effective date when the pending maintenance action is applied to the resource. + public var currentApplyDate: Swift.String? + /// Displays a description providing more detail about the maintenance action. + public var description: Swift.String? + /// Displays the date when the maintenance action is automatically applied. The maintenance action is applied to the resource on this date regardless of the maintenance window for the resource. If this date is specified, any IMMEDIATEoptInType requests are ignored. + public var forcedApplyDate: Swift.String? + /// Displays the type of optInType request that has been received for the resource. + public var optInStatus: Swift.String? + + public init( + action: Swift.String? = nil, + autoAppliedAfterDate: Swift.String? = nil, + currentApplyDate: Swift.String? = nil, + description: Swift.String? = nil, + forcedApplyDate: Swift.String? = nil, + optInStatus: Swift.String? = nil + ) + { + self.action = action + self.autoAppliedAfterDate = autoAppliedAfterDate + self.currentApplyDate = currentApplyDate + self.description = description + self.forcedApplyDate = forcedApplyDate + self.optInStatus = optInStatus + } + } +} + +extension DocDBElasticClientTypes { + + /// Provides information about a pending maintenance action for a resource. + public struct ResourcePendingMaintenanceAction: Swift.Sendable { + /// Provides information about a pending maintenance action for a resource. + public var pendingMaintenanceActionDetails: [DocDBElasticClientTypes.PendingMaintenanceActionDetails]? + /// The Amazon DocumentDB Amazon Resource Name (ARN) of the resource to which the pending maintenance action applies. + public var resourceArn: Swift.String? + + public init( + pendingMaintenanceActionDetails: [DocDBElasticClientTypes.PendingMaintenanceActionDetails]? = nil, + resourceArn: Swift.String? = nil + ) + { + self.pendingMaintenanceActionDetails = pendingMaintenanceActionDetails + self.resourceArn = resourceArn + } + } +} + +public struct ApplyPendingMaintenanceActionOutput: Swift.Sendable { + /// The output of the pending maintenance action being applied. + /// This member is required. + public var resourcePendingMaintenanceAction: DocDBElasticClientTypes.ResourcePendingMaintenanceAction? + + public init( + resourcePendingMaintenanceAction: DocDBElasticClientTypes.ResourcePendingMaintenanceAction? = nil + ) + { + self.resourcePendingMaintenanceAction = resourcePendingMaintenanceAction + } +} + +extension DocDBElasticClientTypes { + + public enum Auth: Swift.Sendable, Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { + case plainText + case secretArn + case sdkUnknown(Swift.String) + + public static var allCases: [Auth] { + return [ + .plainText, + .secretArn + ] + } + + public init?(rawValue: Swift.String) { + let value = Self.allCases.first(where: { $0.rawValue == rawValue }) + self = value ?? Self.sdkUnknown(rawValue) + } + + public var rawValue: Swift.String { + switch self { + case .plainText: return "PLAIN_TEXT" + case .secretArn: return "SECRET_ARN" + case let .sdkUnknown(s): return s + } + } + } +} + +/// The service quota for the action was exceeded. +public struct ServiceQuotaExceededException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error { + + public struct Properties { + /// This member is required. + public internal(set) var message: Swift.String? = nil + } + + public internal(set) var properties = Properties() + public static var typeName: Swift.String { "ServiceQuotaExceededException" } + public static var fault: ClientRuntime.ErrorFault { .client } + public static var isRetryable: Swift.Bool { false } + public static var isThrottling: Swift.Bool { false } + public internal(set) var httpResponse = SmithyHTTPAPI.HTTPResponse() + public internal(set) var message: Swift.String? + public internal(set) var requestID: Swift.String? + + public init( + message: Swift.String? = nil + ) + { + self.properties.message = message + } +} + public struct CopyClusterSnapshotInput: Swift.Sendable { /// Set to true to copy all tags from the source cluster snapshot to the target elastic cluster snapshot. The default is false. public var copyTags: Swift.Bool? @@ -397,6 +539,7 @@ extension DocDBElasticClientTypes { case copying case creating case deleting + case inaccessibleEncryptionCredentialsRecoverable case inaccessibleEncryptionCreds case inaccessibleSecretArn case inaccessibleVpcEndpoint @@ -404,6 +547,7 @@ extension DocDBElasticClientTypes { case invalidSecurityGroupId case invalidSubnetId case ipAddressLimitExceeded + case maintenance case merging case modifying case splitting @@ -420,6 +564,7 @@ extension DocDBElasticClientTypes { .copying, .creating, .deleting, + .inaccessibleEncryptionCredentialsRecoverable, .inaccessibleEncryptionCreds, .inaccessibleSecretArn, .inaccessibleVpcEndpoint, @@ -427,6 +572,7 @@ extension DocDBElasticClientTypes { .invalidSecurityGroupId, .invalidSubnetId, .ipAddressLimitExceeded, + .maintenance, .merging, .modifying, .splitting, @@ -449,6 +595,7 @@ extension DocDBElasticClientTypes { case .copying: return "COPYING" case .creating: return "CREATING" case .deleting: return "DELETING" + case .inaccessibleEncryptionCredentialsRecoverable: return "INACCESSIBLE_ENCRYPTION_CREDENTIALS_RECOVERABLE" case .inaccessibleEncryptionCreds: return "INACCESSIBLE_ENCRYPTION_CREDS" case .inaccessibleSecretArn: return "INACCESSIBLE_SECRET_ARN" case .inaccessibleVpcEndpoint: return "INACCESSIBLE_VPC_ENDPOINT" @@ -456,6 +603,7 @@ extension DocDBElasticClientTypes { case .invalidSecurityGroupId: return "INVALID_SECURITY_GROUP_ID" case .invalidSubnetId: return "INVALID_SUBNET_ID" case .ipAddressLimitExceeded: return "IP_ADDRESS_LIMIT_EXCEEDED" + case .maintenance: return "MAINTENANCE" case .merging: return "MERGING" case .modifying: return "MODIFYING" case .splitting: return "SPLITTING" @@ -923,6 +1071,32 @@ public struct GetClusterSnapshotOutput: Swift.Sendable { } } +public struct GetPendingMaintenanceActionInput: Swift.Sendable { + /// Retrieves pending maintenance actions for a specific Amazon Resource Name (ARN). + /// This member is required. + public var resourceArn: Swift.String? + + public init( + resourceArn: Swift.String? = nil + ) + { + self.resourceArn = resourceArn + } +} + +public struct GetPendingMaintenanceActionOutput: Swift.Sendable { + /// Provides information about a pending maintenance action for a resource. + /// This member is required. + public var resourcePendingMaintenanceAction: DocDBElasticClientTypes.ResourcePendingMaintenanceAction? + + public init( + resourcePendingMaintenanceAction: DocDBElasticClientTypes.ResourcePendingMaintenanceAction? = nil + ) + { + self.resourcePendingMaintenanceAction = resourcePendingMaintenanceAction + } +} + public struct ListClustersInput: Swift.Sendable { /// The maximum number of elastic cluster snapshot results to receive in the response. public var maxResults: Swift.Int? @@ -1063,6 +1237,39 @@ public struct ListClusterSnapshotsOutput: Swift.Sendable { } } +public struct ListPendingMaintenanceActionsInput: Swift.Sendable { + /// The maximum number of results to include in the response. If more records exist than the specified maxResults value, a pagination token (marker) is included in the response so that the remaining results can be retrieved. + public var maxResults: Swift.Int? + /// An optional pagination token provided by a previous request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by maxResults. + public var nextToken: Swift.String? + + public init( + maxResults: Swift.Int? = nil, + nextToken: Swift.String? = nil + ) + { + self.maxResults = maxResults + self.nextToken = nextToken + } +} + +public struct ListPendingMaintenanceActionsOutput: Swift.Sendable { + /// An optional pagination token provided by a previous request. If this parameter is displayed, the responses will include only records beyond the marker, up to the value specified by maxResults. + public var nextToken: Swift.String? + /// Provides information about a pending maintenance action for a resource. + /// This member is required. + public var resourcePendingMaintenanceActions: [DocDBElasticClientTypes.ResourcePendingMaintenanceAction]? + + public init( + nextToken: Swift.String? = nil, + resourcePendingMaintenanceActions: [DocDBElasticClientTypes.ResourcePendingMaintenanceAction]? = nil + ) + { + self.nextToken = nextToken + self.resourcePendingMaintenanceActions = resourcePendingMaintenanceActions + } +} + public struct ListTagsForResourceInput: Swift.Sendable { /// The ARN identifier of the elastic cluster resource. /// This member is required. @@ -1316,6 +1523,13 @@ public struct UpdateClusterOutput: Swift.Sendable { } } +extension ApplyPendingMaintenanceActionInput { + + static func urlPathProvider(_ value: ApplyPendingMaintenanceActionInput) -> Swift.String? { + return "/pending-action" + } +} + extension CopyClusterSnapshotInput { static func urlPathProvider(_ value: CopyClusterSnapshotInput) -> Swift.String? { @@ -1380,6 +1594,16 @@ extension GetClusterSnapshotInput { } } +extension GetPendingMaintenanceActionInput { + + static func urlPathProvider(_ value: GetPendingMaintenanceActionInput) -> Swift.String? { + guard let resourceArn = value.resourceArn else { + return nil + } + return "/pending-action/\(resourceArn.urlPercentEncoding())" + } +} + extension ListClustersInput { static func urlPathProvider(_ value: ListClustersInput) -> Swift.String? { @@ -1434,6 +1658,29 @@ extension ListClusterSnapshotsInput { } } +extension ListPendingMaintenanceActionsInput { + + static func urlPathProvider(_ value: ListPendingMaintenanceActionsInput) -> Swift.String? { + return "/pending-actions" + } +} + +extension ListPendingMaintenanceActionsInput { + + static func queryItemProvider(_ value: ListPendingMaintenanceActionsInput) throws -> [Smithy.URIQueryItem] { + var items = [Smithy.URIQueryItem]() + if let nextToken = value.nextToken { + let nextTokenQueryItem = Smithy.URIQueryItem(name: "nextToken".urlPercentEncoding(), value: Swift.String(nextToken).urlPercentEncoding()) + items.append(nextTokenQueryItem) + } + if let maxResults = value.maxResults { + let maxResultsQueryItem = Smithy.URIQueryItem(name: "maxResults".urlPercentEncoding(), value: Swift.String(maxResults).urlPercentEncoding()) + items.append(maxResultsQueryItem) + } + return items + } +} + extension ListTagsForResourceInput { static func urlPathProvider(_ value: ListTagsForResourceInput) -> Swift.String? { @@ -1520,6 +1767,17 @@ extension UpdateClusterInput { } } +extension ApplyPendingMaintenanceActionInput { + + static func write(value: ApplyPendingMaintenanceActionInput?, to writer: SmithyJSON.Writer) throws { + guard let value else { return } + try writer["applyAction"].write(value.applyAction) + try writer["applyOn"].write(value.applyOn) + try writer["optInType"].write(value.optInType) + try writer["resourceArn"].write(value.resourceArn) + } +} + extension CopyClusterSnapshotInput { static func write(value: CopyClusterSnapshotInput?, to writer: SmithyJSON.Writer) throws { @@ -1603,6 +1861,18 @@ extension UpdateClusterInput { } } +extension ApplyPendingMaintenanceActionOutput { + + static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> ApplyPendingMaintenanceActionOutput { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let reader = responseReader + var value = ApplyPendingMaintenanceActionOutput() + value.resourcePendingMaintenanceAction = try reader["resourcePendingMaintenanceAction"].readIfPresent(with: DocDBElasticClientTypes.ResourcePendingMaintenanceAction.read(from:)) + return value + } +} + extension CopyClusterSnapshotOutput { static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> CopyClusterSnapshotOutput { @@ -1687,6 +1957,18 @@ extension GetClusterSnapshotOutput { } } +extension GetPendingMaintenanceActionOutput { + + static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> GetPendingMaintenanceActionOutput { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let reader = responseReader + var value = GetPendingMaintenanceActionOutput() + value.resourcePendingMaintenanceAction = try reader["resourcePendingMaintenanceAction"].readIfPresent(with: DocDBElasticClientTypes.ResourcePendingMaintenanceAction.read(from:)) + return value + } +} + extension ListClustersOutput { static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> ListClustersOutput { @@ -1713,6 +1995,19 @@ extension ListClusterSnapshotsOutput { } } +extension ListPendingMaintenanceActionsOutput { + + static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> ListPendingMaintenanceActionsOutput { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let reader = responseReader + var value = ListPendingMaintenanceActionsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.resourcePendingMaintenanceActions = try reader["resourcePendingMaintenanceActions"].readListIfPresent(memberReadingClosure: DocDBElasticClientTypes.ResourcePendingMaintenanceAction.read(from:), memberNodeInfo: "member", isFlattened: false) ?? [] + return value + } +} + extension ListTagsForResourceOutput { static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> ListTagsForResourceOutput { @@ -1787,6 +2082,25 @@ extension UpdateClusterOutput { } } +enum ApplyPendingMaintenanceActionOutputError { + + static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let baseError = try AWSClientRuntime.RestJSONError(httpResponse: httpResponse, responseReader: responseReader, noErrorWrapping: false) + if let error = baseError.customError() { return error } + switch baseError.code { + case "AccessDeniedException": return try AccessDeniedException.makeError(baseError: baseError) + case "ConflictException": return try ConflictException.makeError(baseError: baseError) + case "InternalServerException": return try InternalServerException.makeError(baseError: baseError) + case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) + case "ThrottlingException": return try ThrottlingException.makeError(baseError: baseError) + case "ValidationException": return try ValidationException.makeError(baseError: baseError) + default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) + } + } +} + enum CopyClusterSnapshotOutputError { static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { @@ -1920,6 +2234,25 @@ enum GetClusterSnapshotOutputError { } } +enum GetPendingMaintenanceActionOutputError { + + static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let baseError = try AWSClientRuntime.RestJSONError(httpResponse: httpResponse, responseReader: responseReader, noErrorWrapping: false) + if let error = baseError.customError() { return error } + switch baseError.code { + case "AccessDeniedException": return try AccessDeniedException.makeError(baseError: baseError) + case "ConflictException": return try ConflictException.makeError(baseError: baseError) + case "InternalServerException": return try InternalServerException.makeError(baseError: baseError) + case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) + case "ThrottlingException": return try ThrottlingException.makeError(baseError: baseError) + case "ValidationException": return try ValidationException.makeError(baseError: baseError) + default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) + } + } +} + enum ListClustersOutputError { static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { @@ -1954,6 +2287,23 @@ enum ListClusterSnapshotsOutputError { } } +enum ListPendingMaintenanceActionsOutputError { + + static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let baseError = try AWSClientRuntime.RestJSONError(httpResponse: httpResponse, responseReader: responseReader, noErrorWrapping: false) + if let error = baseError.customError() { return error } + switch baseError.code { + case "AccessDeniedException": return try AccessDeniedException.makeError(baseError: baseError) + case "InternalServerException": return try InternalServerException.makeError(baseError: baseError) + case "ThrottlingException": return try ThrottlingException.makeError(baseError: baseError) + case "ValidationException": return try ValidationException.makeError(baseError: baseError) + default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) + } + } +} + enum ListTagsForResourceOutputError { static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { @@ -2095,19 +2445,6 @@ extension ConflictException { } } -extension ServiceQuotaExceededException { - - static func makeError(baseError: AWSClientRuntime.RestJSONError) throws -> ServiceQuotaExceededException { - let reader = baseError.errorBodyReader - var value = ServiceQuotaExceededException() - value.properties.message = try reader["message"].readIfPresent() ?? "" - value.httpResponse = baseError.httpResponse - value.requestID = baseError.requestID - value.message = baseError.message - return value - } -} - extension ResourceNotFoundException { static func makeError(baseError: AWSClientRuntime.RestJSONError) throws -> ResourceNotFoundException { @@ -2181,6 +2518,45 @@ extension AccessDeniedException { } } +extension ServiceQuotaExceededException { + + static func makeError(baseError: AWSClientRuntime.RestJSONError) throws -> ServiceQuotaExceededException { + let reader = baseError.errorBodyReader + var value = ServiceQuotaExceededException() + value.properties.message = try reader["message"].readIfPresent() ?? "" + value.httpResponse = baseError.httpResponse + value.requestID = baseError.requestID + value.message = baseError.message + return value + } +} + +extension DocDBElasticClientTypes.ResourcePendingMaintenanceAction { + + static func read(from reader: SmithyJSON.Reader) throws -> DocDBElasticClientTypes.ResourcePendingMaintenanceAction { + guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } + var value = DocDBElasticClientTypes.ResourcePendingMaintenanceAction() + value.resourceArn = try reader["resourceArn"].readIfPresent() + value.pendingMaintenanceActionDetails = try reader["pendingMaintenanceActionDetails"].readListIfPresent(memberReadingClosure: DocDBElasticClientTypes.PendingMaintenanceActionDetails.read(from:), memberNodeInfo: "member", isFlattened: false) + return value + } +} + +extension DocDBElasticClientTypes.PendingMaintenanceActionDetails { + + static func read(from reader: SmithyJSON.Reader) throws -> DocDBElasticClientTypes.PendingMaintenanceActionDetails { + guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } + var value = DocDBElasticClientTypes.PendingMaintenanceActionDetails() + value.action = try reader["action"].readIfPresent() ?? "" + value.autoAppliedAfterDate = try reader["autoAppliedAfterDate"].readIfPresent() + value.forcedApplyDate = try reader["forcedApplyDate"].readIfPresent() + value.optInStatus = try reader["optInStatus"].readIfPresent() + value.currentApplyDate = try reader["currentApplyDate"].readIfPresent() + value.description = try reader["description"].readIfPresent() + return value + } +} + extension DocDBElasticClientTypes.ClusterSnapshot { static func read(from reader: SmithyJSON.Reader) throws -> DocDBElasticClientTypes.ClusterSnapshot { diff --git a/Sources/Services/AWSDocDBElastic/Sources/AWSDocDBElastic/Paginators.swift b/Sources/Services/AWSDocDBElastic/Sources/AWSDocDBElastic/Paginators.swift index 89b435bad9b..e25eb985ab5 100644 --- a/Sources/Services/AWSDocDBElastic/Sources/AWSDocDBElastic/Paginators.swift +++ b/Sources/Services/AWSDocDBElastic/Sources/AWSDocDBElastic/Paginators.swift @@ -72,3 +72,33 @@ extension PaginatorSequence where OperationStackInput == ListClusterSnapshotsInp return try await self.asyncCompactMap { item in item.snapshots } } } +extension DocDBElasticClient { + /// Paginate over `[ListPendingMaintenanceActionsOutput]` results. + /// + /// When this operation is called, an `AsyncSequence` is created. AsyncSequences are lazy so no service + /// calls are made until the sequence is iterated over. This also means there is no guarantee that the request is valid + /// until then. If there are errors in your request, you will see the failures only after you start iterating. + /// - Parameters: + /// - input: A `[ListPendingMaintenanceActionsInput]` to start pagination + /// - Returns: An `AsyncSequence` that can iterate over `ListPendingMaintenanceActionsOutput` + public func listPendingMaintenanceActionsPaginated(input: ListPendingMaintenanceActionsInput) -> ClientRuntime.PaginatorSequence { + return ClientRuntime.PaginatorSequence(input: input, inputKey: \.nextToken, outputKey: \.nextToken, paginationFunction: self.listPendingMaintenanceActions(input:)) + } +} + +extension ListPendingMaintenanceActionsInput: ClientRuntime.PaginateToken { + public func usingPaginationToken(_ token: Swift.String) -> ListPendingMaintenanceActionsInput { + return ListPendingMaintenanceActionsInput( + maxResults: self.maxResults, + nextToken: token + )} +} + +extension PaginatorSequence where OperationStackInput == ListPendingMaintenanceActionsInput, OperationStackOutput == ListPendingMaintenanceActionsOutput { + /// This paginator transforms the `AsyncSequence` returned by `listPendingMaintenanceActionsPaginated` + /// to access the nested member `[DocDBElasticClientTypes.ResourcePendingMaintenanceAction]` + /// - Returns: `[DocDBElasticClientTypes.ResourcePendingMaintenanceAction]` + public func resourcePendingMaintenanceActions() async throws -> [DocDBElasticClientTypes.ResourcePendingMaintenanceAction] { + return try await self.asyncCompactMap { item in item.resourcePendingMaintenanceActions } + } +} diff --git a/Sources/Services/AWSTaxSettings/Sources/AWSTaxSettings/Models.swift b/Sources/Services/AWSTaxSettings/Sources/AWSTaxSettings/Models.swift index 69c36701e8d..dd0e7052cd0 100644 --- a/Sources/Services/AWSTaxSettings/Sources/AWSTaxSettings/Models.swift +++ b/Sources/Services/AWSTaxSettings/Sources/AWSTaxSettings/Models.swift @@ -46,7 +46,7 @@ extension TaxSettingsClientTypes { /// The postal code associated with the address. /// This member is required. public var postalCode: Swift.String? - /// The state, region, or province that the address is located. If this is required for tax settings, use the same name as shown on the Tax Settings page. + /// The state, region, or province that the address is located. This field is only required for Canada, India, United Arab Emirates, Romania, and Brazil (CPF). It is optional for all other countries. If this is required for tax settings, use the same name as shown on the Tax Settings page. public var stateOrRegion: Swift.String? public init( @@ -209,7 +209,7 @@ extension TaxSettingsClientTypes { public struct CanadaAdditionalInfo: Swift.Sendable { /// The Quebec Sales Tax ID number. Leave blank if you do not have a Quebec Sales Tax ID number. public var canadaQuebecSalesTaxNumber: Swift.String? - /// Manitoba Retail Sales Tax ID number. Customers purchasing Amazon Web Services for resale in Manitoba must provide a valid Retail Sales Tax ID number for Manitoba. Leave this blank if you do not have a Retail Sales Tax ID number in Manitoba or are not purchasing Amazon Web Services for resale. + /// Manitoba Retail Sales Tax ID number. Customers purchasing Amazon Web Services services for resale in Manitoba must provide a valid Retail Sales Tax ID number for Manitoba. Leave this blank if you do not have a Retail Sales Tax ID number in Manitoba or are not purchasing Amazon Web Services services for resale. public var canadaRetailSalesTaxNumber: Swift.String? /// The value for this parameter must be true if the provincialSalesTaxId value is provided for a TRN in British Columbia, Saskatchewan, or Manitoba provinces. To claim a provincial sales tax (PST) and retail sales tax (RST) reseller exemption, you must confirm that purchases from this account were made for resale. Otherwise, remove the PST or RST number from the provincialSalesTaxId parameter from your request. public var isResellerAccount: Swift.Bool? @@ -486,15 +486,22 @@ extension TaxSettingsClientTypes { /// Additional tax information associated with your TRN in Malaysia. public struct MalaysiaAdditionalInfo: Swift.Sendable { + /// The tax registration number (TRN) in Malaysia. For individual, you can specify the taxInformationNumber in MalaysiaAdditionalInfo with NRIC type, and a valid MyKad or NRIC number. For business, you must specify a businessRegistrationNumber in MalaysiaAdditionalInfo with a TIN type and tax identification number. For business resellers, you must specify a businessRegistrationNumber and taxInformationNumber in MalaysiaAdditionalInfo with a sales and service tax (SST) type and a valid SST number. For business resellers with service codes, you must specify businessRegistrationNumber, taxInformationNumber, and distinct serviceTaxCodes in MalaysiaAdditionalInfo with a SST type and valid sales and service tax (SST) number. By using this API operation, Amazon Web Services registers your self-declaration that you’re an authorized business reseller registered with the Royal Malaysia Customs Department (RMCD), and have a valid SST number. + public var businessRegistrationNumber: Swift.String? /// List of service tax codes for your TRN in Malaysia. - /// This member is required. public var serviceTaxCodes: [TaxSettingsClientTypes.MalaysiaServiceTaxCode]? + /// The tax information number in Malaysia. For individual, you can specify the taxInformationNumber in MalaysiaAdditionalInfo with NRIC type, and a valid MyKad or NRIC number. For business resellers, you must specify a businessRegistrationNumber and taxInformationNumber in MalaysiaAdditionalInfo with a sales and service tax (SST) type and a valid SST number. For business resellers with service codes, you must specify businessRegistrationNumber, taxInformationNumber, and distinct serviceTaxCodes in MalaysiaAdditionalInfo with a SST type and valid sales and service tax (SST) number. By using this API operation, Amazon Web Services registers your self-declaration that you’re an authorized business reseller registered with the Royal Malaysia Customs Department (RMCD), and have a valid SST number. + public var taxInformationNumber: Swift.String? public init( - serviceTaxCodes: [TaxSettingsClientTypes.MalaysiaServiceTaxCode]? = nil + businessRegistrationNumber: Swift.String? = nil, + serviceTaxCodes: [TaxSettingsClientTypes.MalaysiaServiceTaxCode]? = [], + taxInformationNumber: Swift.String? = nil ) { + self.businessRegistrationNumber = businessRegistrationNumber self.serviceTaxCodes = serviceTaxCodes + self.taxInformationNumber = taxInformationNumber } } } @@ -883,7 +890,9 @@ extension TaxSettingsClientTypes { case cnpj case cpf case gst + case nric case sst + case tin case vat case sdkUnknown(Swift.String) @@ -892,7 +901,9 @@ extension TaxSettingsClientTypes { .cnpj, .cpf, .gst, + .nric, .sst, + .tin, .vat ] } @@ -907,7 +918,9 @@ extension TaxSettingsClientTypes { case .cnpj: return "CNPJ" case .cpf: return "CPF" case .gst: return "GST" + case .nric: return "NRIC" case .sst: return "SST" + case .tin: return "TIN" case .vat: return "VAT" case let .sdkUnknown(s): return s } @@ -1603,6 +1616,24 @@ extension ResourceNotFoundException: Swift.CustomDebugStringConvertible { "ResourceNotFoundException(errorCode: \(Swift.String(describing: properties.errorCode)), message: \"CONTENT_REDACTED\")"} } +public struct DeleteSupplementalTaxRegistrationInput: Swift.Sendable { + /// The unique authority Id for the supplemental TRN information that needs to be deleted. + /// This member is required. + public var authorityId: Swift.String? + + public init( + authorityId: Swift.String? = nil + ) + { + self.authorityId = authorityId + } +} + +public struct DeleteSupplementalTaxRegistrationOutput: Swift.Sendable { + + public init() { } +} + public struct DeleteTaxRegistrationInput: Swift.Sendable { /// Unique account identifier for the TRN information that needs to be deleted. If this isn't passed, the account ID corresponding to the credentials of the API caller will be used for this parameter. public var accountId: Swift.String? @@ -1759,6 +1790,118 @@ public struct GetTaxRegistrationDocumentOutput: Swift.Sendable { } } +public struct ListSupplementalTaxRegistrationsInput: Swift.Sendable { + /// The number of taxRegistrations results you want in one response. + public var maxResults: Swift.Int? + /// The token to retrieve the next set of results. + public var nextToken: Swift.String? + + public init( + maxResults: Swift.Int? = nil, + nextToken: Swift.String? = nil + ) + { + self.maxResults = maxResults + self.nextToken = nextToken + } +} + +extension TaxSettingsClientTypes { + + public enum SupplementalTaxRegistrationType: Swift.Sendable, Swift.Equatable, Swift.RawRepresentable, Swift.CaseIterable, Swift.Hashable { + case vat + case sdkUnknown(Swift.String) + + public static var allCases: [SupplementalTaxRegistrationType] { + return [ + .vat + ] + } + + public init?(rawValue: Swift.String) { + let value = Self.allCases.first(where: { $0.rawValue == rawValue }) + self = value ?? Self.sdkUnknown(rawValue) + } + + public var rawValue: Swift.String { + switch self { + case .vat: return "VAT" + case let .sdkUnknown(s): return s + } + } + } +} + +extension TaxSettingsClientTypes { + + /// Supplemental TRN details. + public struct SupplementalTaxRegistration: Swift.Sendable { + /// The details of the address associated with the TRN information. + /// This member is required. + public var address: TaxSettingsClientTypes.Address? + /// Unique authority ID for the supplemental TRN. + /// This member is required. + public var authorityId: Swift.String? + /// The legal name associated with your TRN registration. + /// This member is required. + public var legalName: Swift.String? + /// The supplemental TRN unique identifier. + /// This member is required. + public var registrationId: Swift.String? + /// Type of supplemental TRN. Currently, this can only be VAT. + /// This member is required. + public var registrationType: TaxSettingsClientTypes.SupplementalTaxRegistrationType? + /// The status of your TRN. + /// This member is required. + public var status: TaxSettingsClientTypes.TaxRegistrationStatus? + + public init( + address: TaxSettingsClientTypes.Address? = nil, + authorityId: Swift.String? = nil, + legalName: Swift.String? = nil, + registrationId: Swift.String? = nil, + registrationType: TaxSettingsClientTypes.SupplementalTaxRegistrationType? = nil, + status: TaxSettingsClientTypes.TaxRegistrationStatus? = nil + ) + { + self.address = address + self.authorityId = authorityId + self.legalName = legalName + self.registrationId = registrationId + self.registrationType = registrationType + self.status = status + } + } +} + +extension TaxSettingsClientTypes.SupplementalTaxRegistration: Swift.CustomDebugStringConvertible { + public var debugDescription: Swift.String { + "CONTENT_REDACTED" + } +} + +public struct ListSupplementalTaxRegistrationsOutput: Swift.Sendable { + /// The token to retrieve the next set of results. + public var nextToken: Swift.String? + /// The list of supplemental tax registrations. + /// This member is required. + public var taxRegistrations: [TaxSettingsClientTypes.SupplementalTaxRegistration]? + + public init( + nextToken: Swift.String? = nil, + taxRegistrations: [TaxSettingsClientTypes.SupplementalTaxRegistration]? = nil + ) + { + self.nextToken = nextToken + self.taxRegistrations = taxRegistrations + } +} + +extension ListSupplementalTaxRegistrationsOutput: Swift.CustomDebugStringConvertible { + public var debugDescription: Swift.String { + "ListSupplementalTaxRegistrationsOutput(nextToken: \(Swift.String(describing: nextToken)), taxRegistrations: \"CONTENT_REDACTED\")"} +} + public struct ListTaxRegistrationsInput: Swift.Sendable { /// Number of accountDetails results you want in one response. public var maxResults: Swift.Int? @@ -1797,6 +1940,80 @@ extension ListTaxRegistrationsOutput: Swift.CustomDebugStringConvertible { "ListTaxRegistrationsOutput(nextToken: \(Swift.String(describing: nextToken)), accountDetails: \"CONTENT_REDACTED\")"} } +extension TaxSettingsClientTypes { + + /// The supplemental TRN information to provide when adding or updating a supplemental TRN. + public struct SupplementalTaxRegistrationEntry: Swift.Sendable { + /// The details of the address associated with the TRN information. + /// This member is required. + public var address: TaxSettingsClientTypes.Address? + /// The legal name associated with your TRN registration. + /// This member is required. + public var legalName: Swift.String? + /// The supplemental TRN unique identifier. + /// This member is required. + public var registrationId: Swift.String? + /// Type of supplemental TRN. Currently, this can only be VAT. + /// This member is required. + public var registrationType: TaxSettingsClientTypes.SupplementalTaxRegistrationType? + + public init( + address: TaxSettingsClientTypes.Address? = nil, + legalName: Swift.String? = nil, + registrationId: Swift.String? = nil, + registrationType: TaxSettingsClientTypes.SupplementalTaxRegistrationType? = nil + ) + { + self.address = address + self.legalName = legalName + self.registrationId = registrationId + self.registrationType = registrationType + } + } +} + +extension TaxSettingsClientTypes.SupplementalTaxRegistrationEntry: Swift.CustomDebugStringConvertible { + public var debugDescription: Swift.String { + "CONTENT_REDACTED" + } +} + +public struct PutSupplementalTaxRegistrationInput: Swift.Sendable { + /// The supplemental TRN information that will be stored for the caller account ID. + /// This member is required. + public var taxRegistrationEntry: TaxSettingsClientTypes.SupplementalTaxRegistrationEntry? + + public init( + taxRegistrationEntry: TaxSettingsClientTypes.SupplementalTaxRegistrationEntry? = nil + ) + { + self.taxRegistrationEntry = taxRegistrationEntry + } +} + +extension PutSupplementalTaxRegistrationInput: Swift.CustomDebugStringConvertible { + public var debugDescription: Swift.String { + "PutSupplementalTaxRegistrationInput(taxRegistrationEntry: \"CONTENT_REDACTED\")"} +} + +public struct PutSupplementalTaxRegistrationOutput: Swift.Sendable { + /// Unique authority ID for the supplemental TRN information that was stored. + /// This member is required. + public var authorityId: Swift.String? + /// The status of the supplemental TRN stored in the system after processing. Based on the validation occurring on the TRN, the status can be Verified, Pending, Rejected, or Deleted. + /// This member is required. + public var status: TaxSettingsClientTypes.TaxRegistrationStatus? + + public init( + authorityId: Swift.String? = nil, + status: TaxSettingsClientTypes.TaxRegistrationStatus? = nil + ) + { + self.authorityId = authorityId + self.status = status + } +} + public struct PutTaxRegistrationInput: Swift.Sendable { /// Your unique account identifier. public var accountId: Swift.String? @@ -1845,6 +2062,13 @@ extension BatchPutTaxRegistrationInput { } } +extension DeleteSupplementalTaxRegistrationInput { + + static func urlPathProvider(_ value: DeleteSupplementalTaxRegistrationInput) -> Swift.String? { + return "/DeleteSupplementalTaxRegistration" + } +} + extension DeleteTaxRegistrationInput { static func urlPathProvider(_ value: DeleteTaxRegistrationInput) -> Swift.String? { @@ -1866,6 +2090,13 @@ extension GetTaxRegistrationDocumentInput { } } +extension ListSupplementalTaxRegistrationsInput { + + static func urlPathProvider(_ value: ListSupplementalTaxRegistrationsInput) -> Swift.String? { + return "/ListSupplementalTaxRegistrations" + } +} + extension ListTaxRegistrationsInput { static func urlPathProvider(_ value: ListTaxRegistrationsInput) -> Swift.String? { @@ -1873,6 +2104,13 @@ extension ListTaxRegistrationsInput { } } +extension PutSupplementalTaxRegistrationInput { + + static func urlPathProvider(_ value: PutSupplementalTaxRegistrationInput) -> Swift.String? { + return "/PutSupplementalTaxRegistration" + } +} + extension PutTaxRegistrationInput { static func urlPathProvider(_ value: PutTaxRegistrationInput) -> Swift.String? { @@ -1897,6 +2135,14 @@ extension BatchPutTaxRegistrationInput { } } +extension DeleteSupplementalTaxRegistrationInput { + + static func write(value: DeleteSupplementalTaxRegistrationInput?, to writer: SmithyJSON.Writer) throws { + guard let value else { return } + try writer["authorityId"].write(value.authorityId) + } +} + extension DeleteTaxRegistrationInput { static func write(value: DeleteTaxRegistrationInput?, to writer: SmithyJSON.Writer) throws { @@ -1922,6 +2168,15 @@ extension GetTaxRegistrationDocumentInput { } } +extension ListSupplementalTaxRegistrationsInput { + + static func write(value: ListSupplementalTaxRegistrationsInput?, to writer: SmithyJSON.Writer) throws { + guard let value else { return } + try writer["maxResults"].write(value.maxResults) + try writer["nextToken"].write(value.nextToken) + } +} + extension ListTaxRegistrationsInput { static func write(value: ListTaxRegistrationsInput?, to writer: SmithyJSON.Writer) throws { @@ -1931,6 +2186,14 @@ extension ListTaxRegistrationsInput { } } +extension PutSupplementalTaxRegistrationInput { + + static func write(value: PutSupplementalTaxRegistrationInput?, to writer: SmithyJSON.Writer) throws { + guard let value else { return } + try writer["taxRegistrationEntry"].write(value.taxRegistrationEntry, with: TaxSettingsClientTypes.SupplementalTaxRegistrationEntry.write(value:to:)) + } +} + extension PutTaxRegistrationInput { static func write(value: PutTaxRegistrationInput?, to writer: SmithyJSON.Writer) throws { @@ -1965,6 +2228,13 @@ extension BatchPutTaxRegistrationOutput { } } +extension DeleteSupplementalTaxRegistrationOutput { + + static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> DeleteSupplementalTaxRegistrationOutput { + return DeleteSupplementalTaxRegistrationOutput() + } +} + extension DeleteTaxRegistrationOutput { static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> DeleteTaxRegistrationOutput { @@ -1996,6 +2266,19 @@ extension GetTaxRegistrationDocumentOutput { } } +extension ListSupplementalTaxRegistrationsOutput { + + static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> ListSupplementalTaxRegistrationsOutput { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let reader = responseReader + var value = ListSupplementalTaxRegistrationsOutput() + value.nextToken = try reader["nextToken"].readIfPresent() + value.taxRegistrations = try reader["taxRegistrations"].readListIfPresent(memberReadingClosure: TaxSettingsClientTypes.SupplementalTaxRegistration.read(from:), memberNodeInfo: "member", isFlattened: false) ?? [] + return value + } +} + extension ListTaxRegistrationsOutput { static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> ListTaxRegistrationsOutput { @@ -2009,6 +2292,19 @@ extension ListTaxRegistrationsOutput { } } +extension PutSupplementalTaxRegistrationOutput { + + static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> PutSupplementalTaxRegistrationOutput { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let reader = responseReader + var value = PutSupplementalTaxRegistrationOutput() + value.authorityId = try reader["authorityId"].readIfPresent() ?? "" + value.status = try reader["status"].readIfPresent() ?? .sdkUnknown("") + return value + } +} + extension PutTaxRegistrationOutput { static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> PutTaxRegistrationOutput { @@ -2053,6 +2349,23 @@ enum BatchPutTaxRegistrationOutputError { } } +enum DeleteSupplementalTaxRegistrationOutputError { + + static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let baseError = try AWSClientRuntime.RestJSONError(httpResponse: httpResponse, responseReader: responseReader, noErrorWrapping: false) + if let error = baseError.customError() { return error } + switch baseError.code { + case "ConflictException": return try ConflictException.makeError(baseError: baseError) + case "InternalServerException": return try InternalServerException.makeError(baseError: baseError) + case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) + case "ValidationException": return try ValidationException.makeError(baseError: baseError) + default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) + } + } +} + enum DeleteTaxRegistrationOutputError { static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { @@ -2101,6 +2414,22 @@ enum GetTaxRegistrationDocumentOutputError { } } +enum ListSupplementalTaxRegistrationsOutputError { + + static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let baseError = try AWSClientRuntime.RestJSONError(httpResponse: httpResponse, responseReader: responseReader, noErrorWrapping: false) + if let error = baseError.customError() { return error } + switch baseError.code { + case "InternalServerException": return try InternalServerException.makeError(baseError: baseError) + case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) + case "ValidationException": return try ValidationException.makeError(baseError: baseError) + default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) + } + } +} + enum ListTaxRegistrationsOutputError { static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { @@ -2117,6 +2446,22 @@ enum ListTaxRegistrationsOutputError { } } +enum PutSupplementalTaxRegistrationOutputError { + + static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { + let data = try await httpResponse.data() + let responseReader = try SmithyJSON.Reader.from(data: data) + let baseError = try AWSClientRuntime.RestJSONError(httpResponse: httpResponse, responseReader: responseReader, noErrorWrapping: false) + if let error = baseError.customError() { return error } + switch baseError.code { + case "ConflictException": return try ConflictException.makeError(baseError: baseError) + case "InternalServerException": return try InternalServerException.makeError(baseError: baseError) + case "ValidationException": return try ValidationException.makeError(baseError: baseError) + default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) + } + } +} + enum PutTaxRegistrationOutputError { static func httpError(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> Swift.Error { @@ -2532,13 +2877,17 @@ extension TaxSettingsClientTypes.MalaysiaAdditionalInfo { static func write(value: TaxSettingsClientTypes.MalaysiaAdditionalInfo?, to writer: SmithyJSON.Writer) throws { guard let value else { return } + try writer["businessRegistrationNumber"].write(value.businessRegistrationNumber) try writer["serviceTaxCodes"].writeList(value.serviceTaxCodes, memberWritingClosure: SmithyReadWrite.WritingClosureBox().write(value:to:), memberNodeInfo: "member", isFlattened: false) + try writer["taxInformationNumber"].write(value.taxInformationNumber) } static func read(from reader: SmithyJSON.Reader) throws -> TaxSettingsClientTypes.MalaysiaAdditionalInfo { guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } var value = TaxSettingsClientTypes.MalaysiaAdditionalInfo() value.serviceTaxCodes = try reader["serviceTaxCodes"].readListIfPresent(memberReadingClosure: SmithyReadWrite.ReadingClosureBox().read(from:), memberNodeInfo: "member", isFlattened: false) ?? [] + value.taxInformationNumber = try reader["taxInformationNumber"].readIfPresent() + value.businessRegistrationNumber = try reader["businessRegistrationNumber"].readIfPresent() return value } } @@ -2560,6 +2909,21 @@ extension TaxSettingsClientTypes.TaxDocumentMetadata { } } +extension TaxSettingsClientTypes.SupplementalTaxRegistration { + + static func read(from reader: SmithyJSON.Reader) throws -> TaxSettingsClientTypes.SupplementalTaxRegistration { + guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } + var value = TaxSettingsClientTypes.SupplementalTaxRegistration() + value.registrationId = try reader["registrationId"].readIfPresent() ?? "" + value.registrationType = try reader["registrationType"].readIfPresent() ?? .sdkUnknown("") + value.legalName = try reader["legalName"].readIfPresent() ?? "" + value.address = try reader["address"].readIfPresent(with: TaxSettingsClientTypes.Address.read(from:)) + value.authorityId = try reader["authorityId"].readIfPresent() ?? "" + value.status = try reader["status"].readIfPresent() ?? .sdkUnknown("") + return value + } +} + extension TaxSettingsClientTypes.AccountDetails { static func read(from reader: SmithyJSON.Reader) throws -> TaxSettingsClientTypes.AccountDetails { @@ -2708,4 +3072,15 @@ extension TaxSettingsClientTypes.DestinationS3Location { } } +extension TaxSettingsClientTypes.SupplementalTaxRegistrationEntry { + + static func write(value: TaxSettingsClientTypes.SupplementalTaxRegistrationEntry?, to writer: SmithyJSON.Writer) throws { + guard let value else { return } + try writer["address"].write(value.address, with: TaxSettingsClientTypes.Address.write(value:to:)) + try writer["legalName"].write(value.legalName) + try writer["registrationId"].write(value.registrationId) + try writer["registrationType"].write(value.registrationType) + } +} + public enum TaxSettingsClientTypes {} diff --git a/Sources/Services/AWSTaxSettings/Sources/AWSTaxSettings/Paginators.swift b/Sources/Services/AWSTaxSettings/Sources/AWSTaxSettings/Paginators.swift index 8ec2b64dd2b..2c29ab7a76a 100644 --- a/Sources/Services/AWSTaxSettings/Sources/AWSTaxSettings/Paginators.swift +++ b/Sources/Services/AWSTaxSettings/Sources/AWSTaxSettings/Paginators.swift @@ -10,6 +10,36 @@ import protocol ClientRuntime.PaginateToken import struct ClientRuntime.PaginatorSequence +extension TaxSettingsClient { + /// Paginate over `[ListSupplementalTaxRegistrationsOutput]` results. + /// + /// When this operation is called, an `AsyncSequence` is created. AsyncSequences are lazy so no service + /// calls are made until the sequence is iterated over. This also means there is no guarantee that the request is valid + /// until then. If there are errors in your request, you will see the failures only after you start iterating. + /// - Parameters: + /// - input: A `[ListSupplementalTaxRegistrationsInput]` to start pagination + /// - Returns: An `AsyncSequence` that can iterate over `ListSupplementalTaxRegistrationsOutput` + public func listSupplementalTaxRegistrationsPaginated(input: ListSupplementalTaxRegistrationsInput) -> ClientRuntime.PaginatorSequence { + return ClientRuntime.PaginatorSequence(input: input, inputKey: \.nextToken, outputKey: \.nextToken, paginationFunction: self.listSupplementalTaxRegistrations(input:)) + } +} + +extension ListSupplementalTaxRegistrationsInput: ClientRuntime.PaginateToken { + public func usingPaginationToken(_ token: Swift.String) -> ListSupplementalTaxRegistrationsInput { + return ListSupplementalTaxRegistrationsInput( + maxResults: self.maxResults, + nextToken: token + )} +} + +extension PaginatorSequence where OperationStackInput == ListSupplementalTaxRegistrationsInput, OperationStackOutput == ListSupplementalTaxRegistrationsOutput { + /// This paginator transforms the `AsyncSequence` returned by `listSupplementalTaxRegistrationsPaginated` + /// to access the nested member `[TaxSettingsClientTypes.SupplementalTaxRegistration]` + /// - Returns: `[TaxSettingsClientTypes.SupplementalTaxRegistration]` + public func taxRegistrations() async throws -> [TaxSettingsClientTypes.SupplementalTaxRegistration] { + return try await self.asyncCompactMap { item in item.taxRegistrations } + } +} extension TaxSettingsClient { /// Paginate over `[ListTaxRegistrationsOutput]` results. /// diff --git a/Sources/Services/AWSTaxSettings/Sources/AWSTaxSettings/TaxSettingsClient.swift b/Sources/Services/AWSTaxSettings/Sources/AWSTaxSettings/TaxSettingsClient.swift index b016c240642..2ad4868dd53 100644 --- a/Sources/Services/AWSTaxSettings/Sources/AWSTaxSettings/TaxSettingsClient.swift +++ b/Sources/Services/AWSTaxSettings/Sources/AWSTaxSettings/TaxSettingsClient.swift @@ -291,15 +291,19 @@ extension TaxSettingsClient { /// /// Malaysia /// - /// * If you use this operation to set a tax registration number (TRN) in Malaysia, only resellers with a valid sales and service tax (SST) number are required to provide tax registration information. + /// * The sector valid values are Business and Individual. /// - /// * By using this API operation to set a TRN in Malaysia, Amazon Web Services will regard you as self-declaring that you're an authorized business reseller registered with the Royal Malaysia Customs Department (RMCD) and have a valid SST number. + /// * RegistrationType valid values are NRIC for individual, and TIN and sales and service tax (SST) for Business. /// - /// * Amazon Web Services reserves the right to seek additional information and/or take other actions to support your self-declaration as appropriate. + /// * For individual, you can specify the taxInformationNumber in MalaysiaAdditionalInfo with NRIC type, and a valid MyKad or NRIC number. + /// + /// * For business, you must specify a businessRegistrationNumber in MalaysiaAdditionalInfo with a TIN type and tax identification number. /// - /// * If you're not a reseller of Amazon Web Services, we don't recommend that you use this operation to set the TRN in Malaysia. + /// * For business resellers, you must specify a businessRegistrationNumber and taxInformationNumber in MalaysiaAdditionalInfo with a sales and service tax (SST) type and a valid SST number. /// - /// * Only use this API operation to upload the TRNs for accounts through which you're reselling Amazon Web Services. + /// * For business resellers with service codes, you must specify businessRegistrationNumber, taxInformationNumber, and distinct serviceTaxCodes in MalaysiaAdditionalInfo with a SST type and valid sales and service tax (SST) number. By using this API operation, Amazon Web Services registers your self-declaration that you’re an authorized business reseller registered with the Royal Malaysia Customs Department (RMCD), and have a valid SST number. + /// + /// * Amazon Web Services reserves the right to seek additional information and/or take other actions to support your self-declaration as appropriate. /// /// * Amazon Web Services is currently registered under the following service tax codes. You must include at least one of the service tax codes in the service tax code strings to declare yourself as an authorized registered business reseller. Taxable service and service tax codes: Consultancy - 9907061674 Training or coaching service - 9907071685 IT service - 9907101676 Digital services and electronic medium - 9907121690 /// @@ -423,6 +427,78 @@ extension TaxSettingsClient { return try await op.execute(input: input) } + /// Performs the `DeleteSupplementalTaxRegistration` operation on the `TaxSettings` service. + /// + /// Deletes a supplemental tax registration for a single account. + /// + /// - Parameter DeleteSupplementalTaxRegistrationInput : [no documentation found] + /// + /// - Returns: `DeleteSupplementalTaxRegistrationOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `ConflictException` : The exception when the input is creating conflict with the given state. + /// - `InternalServerException` : The exception thrown when an unexpected error occurs when processing a request. + /// - `ResourceNotFoundException` : The exception thrown when the input doesn't have a resource associated to it. + /// - `ValidationException` : The exception when the input doesn't pass validation for at least one of the input parameters. + public func deleteSupplementalTaxRegistration(input: DeleteSupplementalTaxRegistrationInput) async throws -> DeleteSupplementalTaxRegistrationOutput { + let context = Smithy.ContextBuilder() + .withMethod(value: .post) + .withServiceName(value: serviceName) + .withOperation(value: "deleteSupplementalTaxRegistration") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withAuthSchemes(value: config.authSchemes ?? []) + .withAuthSchemeResolver(value: config.authSchemeResolver) + .withUnsignedPayloadTrait(value: false) + .withSocketTimeout(value: config.httpClientConfiguration.socketTimeout) + .withIdentityResolver(value: config.bearerTokenIdentityResolver, schemeID: "smithy.api#httpBearerAuth") + .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4") + .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4a") + .withRegion(value: config.region) + .withSigningName(value: "tax") + .withSigningRegion(value: config.signingRegion) + .build() + let builder = ClientRuntime.OrchestratorBuilder() + config.interceptorProviders.forEach { provider in + builder.interceptors.add(provider.create()) + } + config.httpInterceptorProviders.forEach { provider in + builder.interceptors.add(provider.create()) + } + builder.interceptors.add(ClientRuntime.URLPathMiddleware(DeleteSupplementalTaxRegistrationInput.urlPathProvider(_:))) + builder.interceptors.add(ClientRuntime.URLHostMiddleware()) + builder.interceptors.add(ClientRuntime.ContentTypeMiddleware(contentType: "application/json")) + builder.serialize(ClientRuntime.BodyMiddleware(rootNodeInfo: "", inputWritingClosure: DeleteSupplementalTaxRegistrationInput.write(value:to:))) + builder.interceptors.add(ClientRuntime.ContentLengthMiddleware()) + builder.deserialize(ClientRuntime.DeserializeMiddleware(DeleteSupplementalTaxRegistrationOutput.httpOutput(from:), DeleteSupplementalTaxRegistrationOutputError.httpError(from:))) + builder.interceptors.add(ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions)) + builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:)) + builder.applySigner(ClientRuntime.SignerMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + builder.applyEndpoint(AWSClientRuntime.EndpointResolverMiddleware(endpointResolverBlock: { [config] in try config.endpointResolver.resolve(params: $0) }, endpointParams: endpointParams)) + builder.interceptors.add(AWSClientRuntime.UserAgentMiddleware(serviceID: serviceName, version: "1.0", config: config)) + builder.selectAuthScheme(ClientRuntime.AuthSchemeMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkInvocationIdMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkRequestMiddleware(maxRetries: config.retryStrategyOptions.maxRetriesBase)) + var metricsAttributes = Smithy.Attributes() + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.service, value: "TaxSettings") + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "DeleteSupplementalTaxRegistration") + let op = builder.attributes(context) + .telemetry(ClientRuntime.OrchestratorTelemetry( + telemetryProvider: config.telemetryProvider, + metricsAttributes: metricsAttributes, + meterScope: serviceName, + tracerScope: serviceName + )) + .executeRequest(client) + .build() + return try await op.execute(input: input) + } + /// Performs the `DeleteTaxRegistration` operation on the `TaxSettings` service. /// /// Deletes tax registration for a single account. This API operation can't be used to delete your tax registration in Brazil. Use the [Payment preferences](https://console.aws.amazon.com/billing/home#/paymentpreferences/paymentmethods) page in the Billing and Cost Management console instead. @@ -636,6 +712,77 @@ extension TaxSettingsClient { return try await op.execute(input: input) } + /// Performs the `ListSupplementalTaxRegistrations` operation on the `TaxSettings` service. + /// + /// Retrieves supplemental tax registrations for a single account. + /// + /// - Parameter ListSupplementalTaxRegistrationsInput : [no documentation found] + /// + /// - Returns: `ListSupplementalTaxRegistrationsOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `InternalServerException` : The exception thrown when an unexpected error occurs when processing a request. + /// - `ResourceNotFoundException` : The exception thrown when the input doesn't have a resource associated to it. + /// - `ValidationException` : The exception when the input doesn't pass validation for at least one of the input parameters. + public func listSupplementalTaxRegistrations(input: ListSupplementalTaxRegistrationsInput) async throws -> ListSupplementalTaxRegistrationsOutput { + let context = Smithy.ContextBuilder() + .withMethod(value: .post) + .withServiceName(value: serviceName) + .withOperation(value: "listSupplementalTaxRegistrations") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withAuthSchemes(value: config.authSchemes ?? []) + .withAuthSchemeResolver(value: config.authSchemeResolver) + .withUnsignedPayloadTrait(value: false) + .withSocketTimeout(value: config.httpClientConfiguration.socketTimeout) + .withIdentityResolver(value: config.bearerTokenIdentityResolver, schemeID: "smithy.api#httpBearerAuth") + .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4") + .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4a") + .withRegion(value: config.region) + .withSigningName(value: "tax") + .withSigningRegion(value: config.signingRegion) + .build() + let builder = ClientRuntime.OrchestratorBuilder() + config.interceptorProviders.forEach { provider in + builder.interceptors.add(provider.create()) + } + config.httpInterceptorProviders.forEach { provider in + builder.interceptors.add(provider.create()) + } + builder.interceptors.add(ClientRuntime.URLPathMiddleware(ListSupplementalTaxRegistrationsInput.urlPathProvider(_:))) + builder.interceptors.add(ClientRuntime.URLHostMiddleware()) + builder.interceptors.add(ClientRuntime.ContentTypeMiddleware(contentType: "application/json")) + builder.serialize(ClientRuntime.BodyMiddleware(rootNodeInfo: "", inputWritingClosure: ListSupplementalTaxRegistrationsInput.write(value:to:))) + builder.interceptors.add(ClientRuntime.ContentLengthMiddleware()) + builder.deserialize(ClientRuntime.DeserializeMiddleware(ListSupplementalTaxRegistrationsOutput.httpOutput(from:), ListSupplementalTaxRegistrationsOutputError.httpError(from:))) + builder.interceptors.add(ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions)) + builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:)) + builder.applySigner(ClientRuntime.SignerMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + builder.applyEndpoint(AWSClientRuntime.EndpointResolverMiddleware(endpointResolverBlock: { [config] in try config.endpointResolver.resolve(params: $0) }, endpointParams: endpointParams)) + builder.interceptors.add(AWSClientRuntime.UserAgentMiddleware(serviceID: serviceName, version: "1.0", config: config)) + builder.selectAuthScheme(ClientRuntime.AuthSchemeMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkInvocationIdMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkRequestMiddleware(maxRetries: config.retryStrategyOptions.maxRetriesBase)) + var metricsAttributes = Smithy.Attributes() + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.service, value: "TaxSettings") + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "ListSupplementalTaxRegistrations") + let op = builder.attributes(context) + .telemetry(ClientRuntime.OrchestratorTelemetry( + telemetryProvider: config.telemetryProvider, + metricsAttributes: metricsAttributes, + meterScope: serviceName, + tracerScope: serviceName + )) + .executeRequest(client) + .build() + return try await op.execute(input: input) + } + /// Performs the `ListTaxRegistrations` operation on the `TaxSettings` service. /// /// Retrieves the tax registration of accounts listed in a consolidated billing family. This can be used to retrieve up to 100 accounts' tax registrations in one call (default 50). @@ -707,6 +854,77 @@ extension TaxSettingsClient { return try await op.execute(input: input) } + /// Performs the `PutSupplementalTaxRegistration` operation on the `TaxSettings` service. + /// + /// Stores supplemental tax registration for a single account. + /// + /// - Parameter PutSupplementalTaxRegistrationInput : [no documentation found] + /// + /// - Returns: `PutSupplementalTaxRegistrationOutput` : [no documentation found] + /// + /// - Throws: One of the exceptions listed below __Possible Exceptions__. + /// + /// __Possible Exceptions:__ + /// - `ConflictException` : The exception when the input is creating conflict with the given state. + /// - `InternalServerException` : The exception thrown when an unexpected error occurs when processing a request. + /// - `ValidationException` : The exception when the input doesn't pass validation for at least one of the input parameters. + public func putSupplementalTaxRegistration(input: PutSupplementalTaxRegistrationInput) async throws -> PutSupplementalTaxRegistrationOutput { + let context = Smithy.ContextBuilder() + .withMethod(value: .post) + .withServiceName(value: serviceName) + .withOperation(value: "putSupplementalTaxRegistration") + .withIdempotencyTokenGenerator(value: config.idempotencyTokenGenerator) + .withLogger(value: config.logger) + .withPartitionID(value: config.partitionID) + .withAuthSchemes(value: config.authSchemes ?? []) + .withAuthSchemeResolver(value: config.authSchemeResolver) + .withUnsignedPayloadTrait(value: false) + .withSocketTimeout(value: config.httpClientConfiguration.socketTimeout) + .withIdentityResolver(value: config.bearerTokenIdentityResolver, schemeID: "smithy.api#httpBearerAuth") + .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4") + .withIdentityResolver(value: config.awsCredentialIdentityResolver, schemeID: "aws.auth#sigv4a") + .withRegion(value: config.region) + .withSigningName(value: "tax") + .withSigningRegion(value: config.signingRegion) + .build() + let builder = ClientRuntime.OrchestratorBuilder() + config.interceptorProviders.forEach { provider in + builder.interceptors.add(provider.create()) + } + config.httpInterceptorProviders.forEach { provider in + builder.interceptors.add(provider.create()) + } + builder.interceptors.add(ClientRuntime.URLPathMiddleware(PutSupplementalTaxRegistrationInput.urlPathProvider(_:))) + builder.interceptors.add(ClientRuntime.URLHostMiddleware()) + builder.interceptors.add(ClientRuntime.ContentTypeMiddleware(contentType: "application/json")) + builder.serialize(ClientRuntime.BodyMiddleware(rootNodeInfo: "", inputWritingClosure: PutSupplementalTaxRegistrationInput.write(value:to:))) + builder.interceptors.add(ClientRuntime.ContentLengthMiddleware()) + builder.deserialize(ClientRuntime.DeserializeMiddleware(PutSupplementalTaxRegistrationOutput.httpOutput(from:), PutSupplementalTaxRegistrationOutputError.httpError(from:))) + builder.interceptors.add(ClientRuntime.LoggerMiddleware(clientLogMode: config.clientLogMode)) + builder.retryStrategy(SmithyRetries.DefaultRetryStrategy(options: config.retryStrategyOptions)) + builder.retryErrorInfoProvider(AWSClientRuntime.AWSRetryErrorInfoProvider.errorInfo(for:)) + builder.applySigner(ClientRuntime.SignerMiddleware()) + let endpointParams = EndpointParams(endpoint: config.endpoint, region: config.region, useDualStack: config.useDualStack ?? false, useFIPS: config.useFIPS ?? false) + builder.applyEndpoint(AWSClientRuntime.EndpointResolverMiddleware(endpointResolverBlock: { [config] in try config.endpointResolver.resolve(params: $0) }, endpointParams: endpointParams)) + builder.interceptors.add(AWSClientRuntime.UserAgentMiddleware(serviceID: serviceName, version: "1.0", config: config)) + builder.selectAuthScheme(ClientRuntime.AuthSchemeMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkInvocationIdMiddleware()) + builder.interceptors.add(AWSClientRuntime.AmzSdkRequestMiddleware(maxRetries: config.retryStrategyOptions.maxRetriesBase)) + var metricsAttributes = Smithy.Attributes() + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.service, value: "TaxSettings") + metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "PutSupplementalTaxRegistration") + let op = builder.attributes(context) + .telemetry(ClientRuntime.OrchestratorTelemetry( + telemetryProvider: config.telemetryProvider, + metricsAttributes: metricsAttributes, + meterScope: serviceName, + tracerScope: serviceName + )) + .executeRequest(client) + .build() + return try await op.execute(input: input) + } + /// Performs the `PutTaxRegistration` operation on the `TaxSettings` service. /// /// Adds or updates tax registration for a single account. You can't set a TRN if there's a pending TRN. You'll need to delete the pending TRN first. To call this API operation for specific countries, see the following country-specific requirements. Bangladesh @@ -735,15 +953,19 @@ extension TaxSettingsClient { /// /// Malaysia /// - /// * If you use this operation to set a tax registration number (TRN) in Malaysia, only resellers with a valid sales and service tax (SST) number are required to provide tax registration information. + /// * The sector valid values are Business and Individual. /// - /// * By using this API operation to set a TRN in Malaysia, Amazon Web Services will regard you as self-declaring that you're an authorized business reseller registered with the Royal Malaysia Customs Department (RMCD) and have a valid SST number. + /// * RegistrationType valid values are NRIC for individual, and TIN and sales and service tax (SST) for Business. /// - /// * Amazon Web Services reserves the right to seek additional information and/or take other actions to support your self-declaration as appropriate. + /// * For individual, you can specify the taxInformationNumber in MalaysiaAdditionalInfo with NRIC type, and a valid MyKad or NRIC number. + /// + /// * For business, you must specify a businessRegistrationNumber in MalaysiaAdditionalInfo with a TIN type and tax identification number. /// - /// * If you're not a reseller of Amazon Web Services, we don't recommend that you use this operation to set the TRN in Malaysia. + /// * For business resellers, you must specify a businessRegistrationNumber and taxInformationNumber in MalaysiaAdditionalInfo with a sales and service tax (SST) type and a valid SST number. /// - /// * Only use this API operation to upload the TRNs for accounts through which you're reselling Amazon Web Services. + /// * For business resellers with service codes, you must specify businessRegistrationNumber, taxInformationNumber, and distinct serviceTaxCodes in MalaysiaAdditionalInfo with a SST type and valid sales and service tax (SST) number. By using this API operation, Amazon Web Services registers your self-declaration that you’re an authorized business reseller registered with the Royal Malaysia Customs Department (RMCD), and have a valid SST number. + /// + /// * Amazon Web Services reserves the right to seek additional information and/or take other actions to support your self-declaration as appropriate. /// /// * Amazon Web Services is currently registered under the following service tax codes. You must include at least one of the service tax codes in the service tax code strings to declare yourself as an authorized registered business reseller. Taxable service and service tax codes: Consultancy - 9907061674 Training or coaching service - 9907071685 IT service - 9907101676 Digital services and electronic medium - 9907121690 ///