diff --git a/Package.swift b/Package.swift index 8341e2ae263..b896d8b7a07 100644 --- a/Package.swift +++ b/Package.swift @@ -202,8 +202,6 @@ let serviceTargets: [String] = [ "AWSInternetMonitor", "AWSInvoicing", "AWSIoT", - "AWSIoT1ClickDevicesService", - "AWSIoT1ClickProjects", "AWSIoTAnalytics", "AWSIoTDataPlane", "AWSIoTEvents", diff --git a/Sources/Core/AWSSDKForSwift/Documentation.docc/AWSSDKForSwift.md b/Sources/Core/AWSSDKForSwift/Documentation.docc/AWSSDKForSwift.md index 1f4c892b255..6fc58ac613e 100644 --- a/Sources/Core/AWSSDKForSwift/Documentation.docc/AWSSDKForSwift.md +++ b/Sources/Core/AWSSDKForSwift/Documentation.docc/AWSSDKForSwift.md @@ -435,10 +435,6 @@ This SDK is open-source. Code is available on Github [here](https://github.com/ [AWSIoT](../../../../../swift/api/awsiot/latest) -[AWSIoT1ClickDevicesService](../../../../../swift/api/awsiot1clickdevicesservice/latest) - -[AWSIoT1ClickProjects](../../../../../swift/api/awsiot1clickprojects/latest) - [AWSIoTAnalytics](../../../../../swift/api/awsiotanalytics/latest) [AWSIoTDataPlane](../../../../../swift/api/awsiotdataplane/latest) diff --git a/Sources/Services/AWSIoT1ClickDevicesService/Package.swift.txt b/Sources/Services/AWSIoT1ClickDevicesService/Package.swift.txt deleted file mode 100644 index d18147b610e..00000000000 --- a/Sources/Services/AWSIoT1ClickDevicesService/Package.swift.txt +++ /dev/null @@ -1,96 +0,0 @@ -// swift-tools-version: 5.9.0 - -import PackageDescription - -let package = Package( - name: "AWSIoT1ClickDevicesService", - platforms: [ - .macOS(.v10_15), .iOS(.v13) - ], - products: [ - .library(name: "AWSIoT1ClickDevicesService", targets: ["AWSIoT1ClickDevicesService"]) - ], - dependencies: [ - .package( - id: "aws-sdk-swift.AWSClientRuntime", - exact: "0.0.1" - ), - .package( - id: "aws-sdk-swift.AWSSDKHTTPAuth", - exact: "0.0.1" - ), - .package( - url: "https://github.com/smithy-lang/smithy-swift", - exact: "0.0.1" - ), - ], - targets: [ - .target( - name: "AWSIoT1ClickDevicesService", - dependencies: [ - .product( - name: "AWSClientRuntime", - package: "aws-sdk-swift.AWSClientRuntime" - ), - .product( - name: "AWSSDKHTTPAuth", - package: "aws-sdk-swift.AWSSDKHTTPAuth" - ), - .product( - name: "SmithyHTTPAuthAPI", - package: "smithy-swift" - ), - .product( - name: "Smithy", - package: "smithy-swift" - ), - .product( - name: "ClientRuntime", - package: "smithy-swift" - ), - .product( - name: "SmithyHTTPAPI", - package: "smithy-swift" - ), - .product( - name: "SmithyIdentity", - package: "smithy-swift" - ), - .product( - name: "SmithyRetriesAPI", - package: "smithy-swift" - ), - .product( - name: "SmithyRetries", - package: "smithy-swift" - ), - .product( - name: "SmithyJSON", - package: "smithy-swift" - ), - .product( - name: "SmithyReadWrite", - package: "smithy-swift" - ), - .product( - name: "SmithyTimestamps", - package: "smithy-swift" - ), - .product( - name: "SmithyTestUtil", - package: "smithy-swift" - ), - ] - ), - .testTarget( - name: "AWSIoT1ClickDevicesServiceTests", - dependencies: [ - "AWSIoT1ClickDevicesService", - .product( - name: "SmithyTestUtil", - package: "smithy-swift" - ), - ] - ) - ] -) diff --git a/Sources/Services/AWSIoT1ClickDevicesService/Sources/AWSIoT1ClickDevicesService/AuthSchemeResolver.swift b/Sources/Services/AWSIoT1ClickDevicesService/Sources/AWSIoT1ClickDevicesService/AuthSchemeResolver.swift deleted file mode 100644 index 8296f65f72f..00000000000 --- a/Sources/Services/AWSIoT1ClickDevicesService/Sources/AWSIoT1ClickDevicesService/AuthSchemeResolver.swift +++ /dev/null @@ -1,56 +0,0 @@ -// -// Copyright Amazon.com Inc. or its affiliates. -// All Rights Reserved. -// -// SPDX-License-Identifier: Apache-2.0 -// - -// Code generated by smithy-swift-codegen. DO NOT EDIT! - -import class Smithy.Context -import enum Smithy.ClientError -import enum SmithyHTTPAuthAPI.SigningPropertyKeys -import protocol SmithyHTTPAuthAPI.AuthSchemeResolver -import protocol SmithyHTTPAuthAPI.AuthSchemeResolverParameters -import struct SmithyHTTPAuthAPI.AuthOption - -public struct IoT1ClickDevicesServiceAuthSchemeResolverParameters: SmithyHTTPAuthAPI.AuthSchemeResolverParameters { - public let operation: Swift.String - // Region is used for SigV4 auth scheme - public let region: Swift.String? -} - -public protocol IoT1ClickDevicesServiceAuthSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver { - // Intentionally empty. - // This is the parent protocol that all auth scheme resolver implementations of - // the service IoT1ClickDevicesService must conform to. -} - -public struct DefaultIoT1ClickDevicesServiceAuthSchemeResolver: IoT1ClickDevicesServiceAuthSchemeResolver { - - public func resolveAuthScheme(params: SmithyHTTPAuthAPI.AuthSchemeResolverParameters) throws -> [SmithyHTTPAuthAPI.AuthOption] { - var validAuthOptions = [SmithyHTTPAuthAPI.AuthOption]() - guard let serviceParams = params as? IoT1ClickDevicesServiceAuthSchemeResolverParameters else { - throw Smithy.ClientError.authError("Service specific auth scheme parameters type must be passed to auth scheme resolver.") - } - switch serviceParams.operation { - default: - var sigV4Option = SmithyHTTPAuthAPI.AuthOption(schemeID: "aws.auth#sigv4") - sigV4Option.signingProperties.set(key: SmithyHTTPAuthAPI.SigningPropertyKeys.signingName, value: "iot1click") - guard let region = serviceParams.region else { - throw Smithy.ClientError.authError("Missing region in auth scheme parameters for SigV4 auth scheme.") - } - sigV4Option.signingProperties.set(key: SmithyHTTPAuthAPI.SigningPropertyKeys.signingRegion, value: region) - validAuthOptions.append(sigV4Option) - } - return validAuthOptions - } - - public func constructParameters(context: Smithy.Context) throws -> SmithyHTTPAuthAPI.AuthSchemeResolverParameters { - guard let opName = context.getOperation() else { - throw Smithy.ClientError.dataNotFound("Operation name not configured in middleware context for auth scheme resolver params construction.") - } - let opRegion = context.getRegion() - return IoT1ClickDevicesServiceAuthSchemeResolverParameters(operation: opName, region: opRegion) - } -} diff --git a/Sources/Services/AWSIoT1ClickDevicesService/Sources/AWSIoT1ClickDevicesService/Endpoints.swift b/Sources/Services/AWSIoT1ClickDevicesService/Sources/AWSIoT1ClickDevicesService/Endpoints.swift deleted file mode 100644 index 5e1072a8b42..00000000000 --- a/Sources/Services/AWSIoT1ClickDevicesService/Sources/AWSIoT1ClickDevicesService/Endpoints.swift +++ /dev/null @@ -1,73 +0,0 @@ -// -// Copyright Amazon.com Inc. or its affiliates. -// All Rights Reserved. -// -// SPDX-License-Identifier: Apache-2.0 -// - -// Code generated by smithy-swift-codegen. DO NOT EDIT! - -import class ClientRuntime.EndpointsRequestContext -import let AWSClientRuntime.awsPartitionJSON -import protocol ClientRuntime.EndpointsRequestContextProviding -import struct ClientRuntime.DefaultEndpointResolver -import struct ClientRuntime.StaticEndpointResolver -import struct SmithyHTTPAPI.Endpoint - -public struct EndpointParams { - /// Override the endpoint used to send this request - public let endpoint: Swift.String? - /// The AWS region used to dispatch the request. - public let region: Swift.String? - /// When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error. - public let useDualStack: Swift.Bool - /// When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error. - public let useFIPS: Swift.Bool - - public init( - endpoint: Swift.String? = nil, - region: Swift.String? = nil, - useDualStack: Swift.Bool = false, - useFIPS: Swift.Bool = false - ) - { - self.endpoint = endpoint - self.region = region - self.useDualStack = useDualStack - self.useFIPS = useFIPS - } -} - -extension EndpointParams: ClientRuntime.EndpointsRequestContextProviding { - - public var context: ClientRuntime.EndpointsRequestContext { - get throws { - let context = try ClientRuntime.EndpointsRequestContext() - try context.add(name: "Endpoint", value: self.endpoint) - try context.add(name: "Region", value: self.region) - try context.add(name: "UseDualStack", value: self.useDualStack) - try context.add(name: "UseFIPS", value: self.useFIPS) - return context - } - } -} - -public protocol EndpointResolver { - func resolve(params: EndpointParams) throws -> SmithyHTTPAPI.Endpoint -} - -typealias DefaultEndpointResolver = ClientRuntime.DefaultEndpointResolver - -extension DefaultEndpointResolver { - private static let ruleSet = "{\"version\":\"1.0\",\"parameters\":{\"Region\":{\"builtIn\":\"AWS::Region\",\"required\":false,\"documentation\":\"The AWS region used to dispatch the request.\",\"type\":\"String\"},\"UseDualStack\":{\"builtIn\":\"AWS::UseDualStack\",\"required\":true,\"default\":false,\"documentation\":\"When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.\",\"type\":\"Boolean\"},\"UseFIPS\":{\"builtIn\":\"AWS::UseFIPS\",\"required\":true,\"default\":false,\"documentation\":\"When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.\",\"type\":\"Boolean\"},\"Endpoint\":{\"builtIn\":\"SDK::Endpoint\",\"required\":false,\"documentation\":\"Override the endpoint used to send this request\",\"type\":\"String\"}},\"rules\":[{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Endpoint\"}]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]}],\"error\":\"Invalid Configuration: FIPS and custom endpoint are not supported\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"error\":\"Invalid Configuration: Dualstack and custom endpoint are not supported\",\"type\":\"error\"},{\"conditions\":[],\"endpoint\":{\"url\":{\"ref\":\"Endpoint\"},\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Region\"}]}],\"rules\":[{\"conditions\":[{\"fn\":\"aws.partition\",\"argv\":[{\"ref\":\"Region\"}],\"assign\":\"PartitionResult\"}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[true,{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsFIPS\"]}]},{\"fn\":\"booleanEquals\",\"argv\":[true,{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsDualStack\"]}]}],\"rules\":[{\"conditions\":[],\"endpoint\":{\"url\":\"https://devices.iot1click-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"FIPS and DualStack are enabled, but this partition does not support one or both\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsFIPS\"]},true]}],\"rules\":[{\"conditions\":[],\"endpoint\":{\"url\":\"https://devices.iot1click-fips.{Region}.{PartitionResult#dnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"FIPS is enabled but this partition does not support FIPS\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[true,{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsDualStack\"]}]}],\"rules\":[{\"conditions\":[],\"endpoint\":{\"url\":\"https://devices.iot1click.{Region}.{PartitionResult#dualStackDnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"DualStack is enabled but this partition does not support DualStack\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"endpoint\":{\"url\":\"https://devices.iot1click.{Region}.{PartitionResult#dnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid Configuration: Missing Region\",\"type\":\"error\"}]}" - - init() throws { - try self.init(partitions: AWSClientRuntime.awsPartitionJSON, ruleSet: Self.ruleSet) - } -} - -extension DefaultEndpointResolver: EndpointResolver {} - -typealias StaticEndpointResolver = ClientRuntime.StaticEndpointResolver - -extension StaticEndpointResolver: EndpointResolver {} diff --git a/Sources/Services/AWSIoT1ClickDevicesService/Sources/AWSIoT1ClickDevicesService/IoT1ClickDevicesClient.swift b/Sources/Services/AWSIoT1ClickDevicesService/Sources/AWSIoT1ClickDevicesService/IoT1ClickDevicesClient.swift deleted file mode 100644 index 8581004741a..00000000000 --- a/Sources/Services/AWSIoT1ClickDevicesService/Sources/AWSIoT1ClickDevicesService/IoT1ClickDevicesClient.swift +++ /dev/null @@ -1,1238 +0,0 @@ -// -// Copyright Amazon.com Inc. or its affiliates. -// All Rights Reserved. -// -// SPDX-License-Identifier: Apache-2.0 -// - -// Code generated by smithy-swift-codegen. DO NOT EDIT! - -import Foundation -import class AWSClientRuntime.AWSClientConfigDefaultsProvider -import class AWSClientRuntime.AmzSdkRequestMiddleware -import class AWSClientRuntime.DefaultAWSClientPlugin -import class ClientRuntime.ClientBuilder -import class ClientRuntime.DefaultClientPlugin -import class ClientRuntime.HttpClientConfiguration -import class ClientRuntime.OrchestratorBuilder -import class ClientRuntime.OrchestratorTelemetry -import class ClientRuntime.SdkHttpClient -import class Smithy.ContextBuilder -import class SmithyHTTPAPI.HTTPRequest -import class SmithyHTTPAPI.HTTPResponse -@_spi(SmithyReadWrite) import class SmithyJSON.Writer -import enum AWSClientRuntime.AWSRetryErrorInfoProvider -import enum AWSClientRuntime.AWSRetryMode -import enum ClientRuntime.ClientLogMode -import enum ClientRuntime.DefaultTelemetry -import enum ClientRuntime.OrchestratorMetricsAttributesKeys -import protocol AWSClientRuntime.AWSDefaultClientConfiguration -import protocol AWSClientRuntime.AWSRegionClientConfiguration -import protocol ClientRuntime.Client -import protocol ClientRuntime.DefaultClientConfiguration -import protocol ClientRuntime.DefaultHttpClientConfiguration -import protocol ClientRuntime.HttpInterceptorProvider -import protocol ClientRuntime.IdempotencyTokenGenerator -import protocol ClientRuntime.InterceptorProvider -import protocol ClientRuntime.TelemetryProvider -import protocol Smithy.LogAgent -import protocol SmithyHTTPAPI.HTTPClient -import protocol SmithyHTTPAuthAPI.AuthSchemeResolver -import protocol SmithyIdentity.AWSCredentialIdentityResolver -import protocol SmithyIdentity.BearerTokenIdentityResolver -@_spi(SmithyReadWrite) import protocol SmithyReadWrite.SmithyWriter -import struct AWSClientRuntime.AmzSdkInvocationIdMiddleware -import struct AWSClientRuntime.EndpointResolverMiddleware -import struct AWSClientRuntime.UserAgentMiddleware -import struct AWSSDKHTTPAuth.SigV4AuthScheme -import struct ClientRuntime.AuthSchemeMiddleware -@_spi(SmithyReadWrite) import struct ClientRuntime.BodyMiddleware -import struct ClientRuntime.ContentLengthMiddleware -import struct ClientRuntime.ContentTypeMiddleware -@_spi(SmithyReadWrite) import struct ClientRuntime.DeserializeMiddleware -import struct ClientRuntime.LoggerMiddleware -import struct ClientRuntime.QueryItemMiddleware -import struct ClientRuntime.SignerMiddleware -import struct ClientRuntime.URLHostMiddleware -import struct ClientRuntime.URLPathMiddleware -import struct Smithy.Attributes -import struct SmithyIdentity.BearerTokenIdentity -import struct SmithyIdentity.StaticBearerTokenIdentityResolver -import struct SmithyRetries.DefaultRetryStrategy -import struct SmithyRetriesAPI.RetryStrategyOptions -import typealias SmithyHTTPAuthAPI.AuthSchemes - -public class IoT1ClickDevicesClient: ClientRuntime.Client { - public static let clientName = "IoT1ClickDevicesClient" - public static let version = "1.0.72" - let client: ClientRuntime.SdkHttpClient - let config: IoT1ClickDevicesClient.IoT1ClickDevicesClientConfiguration - let serviceName = "IoT 1Click Devices" - - public required init(config: IoT1ClickDevicesClient.IoT1ClickDevicesClientConfiguration) { - client = ClientRuntime.SdkHttpClient(engine: config.httpClientEngine, config: config.httpClientConfiguration) - self.config = config - } - - public convenience init(region: Swift.String) throws { - let config = try IoT1ClickDevicesClient.IoT1ClickDevicesClientConfiguration(region: region) - self.init(config: config) - } - - public convenience required init() async throws { - let config = try await IoT1ClickDevicesClient.IoT1ClickDevicesClientConfiguration() - self.init(config: config) - } -} - -extension IoT1ClickDevicesClient { - - public class IoT1ClickDevicesClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { - public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - - private init( - _ useFIPS: Swift.Bool?, - _ useDualStack: Swift.Bool?, - _ appID: Swift.String?, - _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, - _ awsRetryMode: AWSClientRuntime.AWSRetryMode, - _ maxAttempts: Swift.Int?, - _ region: Swift.String?, - _ signingRegion: Swift.String?, - _ endpointResolver: EndpointResolver, - _ telemetryProvider: ClientRuntime.TelemetryProvider, - _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, - _ clientLogMode: ClientRuntime.ClientLogMode, - _ endpoint: Swift.String?, - _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, - _ httpClientEngine: SmithyHTTPAPI.HTTPClient, - _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, - _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, - _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, - _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, - _ interceptorProviders: [ClientRuntime.InterceptorProvider], - _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - ) { - self.useFIPS = useFIPS - self.useDualStack = useDualStack - self.appID = appID - self.awsCredentialIdentityResolver = awsCredentialIdentityResolver - self.awsRetryMode = awsRetryMode - self.maxAttempts = maxAttempts - self.region = region - self.signingRegion = signingRegion - self.endpointResolver = endpointResolver - self.telemetryProvider = telemetryProvider - self.retryStrategyOptions = retryStrategyOptions - self.clientLogMode = clientLogMode - self.endpoint = endpoint - self.idempotencyTokenGenerator = idempotencyTokenGenerator - self.httpClientEngine = httpClientEngine - self.httpClientConfiguration = httpClientConfiguration - self.authSchemes = authSchemes - self.authSchemeResolver = authSchemeResolver - self.bearerTokenIdentityResolver = bearerTokenIdentityResolver - self.interceptorProviders = interceptorProviders - self.httpInterceptorProviders = httpInterceptorProviders - self.logger = telemetryProvider.loggerProvider.getLogger(name: IoT1ClickDevicesClient.clientName) - } - - public convenience init( - useFIPS: Swift.Bool? = nil, - useDualStack: Swift.Bool? = nil, - appID: Swift.String? = nil, - awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, - awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, - maxAttempts: Swift.Int? = nil, - region: Swift.String? = nil, - signingRegion: Swift.String? = nil, - endpointResolver: EndpointResolver? = nil, - telemetryProvider: ClientRuntime.TelemetryProvider? = nil, - retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, - clientLogMode: ClientRuntime.ClientLogMode? = nil, - endpoint: Swift.String? = nil, - idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, - httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, - httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, - authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, - authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, - bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, - interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, - httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil - ) throws { - self.init( - useFIPS, - useDualStack, - try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), - try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), - try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), - maxAttempts, - region, - signingRegion, - try endpointResolver ?? DefaultEndpointResolver(), - telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, - try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), - clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), - endpoint, - idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), - httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), - httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), - authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], - authSchemeResolver ?? DefaultIoT1ClickDevicesServiceAuthSchemeResolver(), - bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), - interceptorProviders ?? [], - httpInterceptorProviders ?? [] - ) - } - - public convenience init( - useFIPS: Swift.Bool? = nil, - useDualStack: Swift.Bool? = nil, - appID: Swift.String? = nil, - awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, - awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, - maxAttempts: Swift.Int? = nil, - region: Swift.String? = nil, - signingRegion: Swift.String? = nil, - endpointResolver: EndpointResolver? = nil, - telemetryProvider: ClientRuntime.TelemetryProvider? = nil, - retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, - clientLogMode: ClientRuntime.ClientLogMode? = nil, - endpoint: Swift.String? = nil, - idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, - httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, - httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, - authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, - authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, - bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, - interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, - httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil - ) async throws { - self.init( - useFIPS, - useDualStack, - try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), - try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), - try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), - maxAttempts, - try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), - try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), - try endpointResolver ?? DefaultEndpointResolver(), - telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, - try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), - clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), - endpoint, - idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), - httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), - httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), - authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], - authSchemeResolver ?? DefaultIoT1ClickDevicesServiceAuthSchemeResolver(), - bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), - interceptorProviders ?? [], - httpInterceptorProviders ?? [] - ) - } - - public convenience required init() async throws { - try await self.init( - useFIPS: nil, - useDualStack: nil, - appID: nil, - awsCredentialIdentityResolver: nil, - awsRetryMode: nil, - maxAttempts: nil, - region: nil, - signingRegion: nil, - endpointResolver: nil, - telemetryProvider: nil, - retryStrategyOptions: nil, - clientLogMode: nil, - endpoint: nil, - idempotencyTokenGenerator: nil, - httpClientEngine: nil, - httpClientConfiguration: nil, - authSchemes: nil, - authSchemeResolver: nil, - bearerTokenIdentityResolver: nil, - interceptorProviders: nil, - httpInterceptorProviders: nil - ) - } - - public convenience init(region: Swift.String) throws { - self.init( - nil, - nil, - try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), - try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), - try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), - nil, - region, - region, - try DefaultEndpointResolver(), - ClientRuntime.DefaultTelemetry.provider, - try AWSClientConfigDefaultsProvider.retryStrategyOptions(), - AWSClientConfigDefaultsProvider.clientLogMode(), - nil, - AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), - AWSClientConfigDefaultsProvider.httpClientEngine(), - AWSClientConfigDefaultsProvider.httpClientConfiguration(), - [AWSSDKHTTPAuth.SigV4AuthScheme()], - DefaultIoT1ClickDevicesServiceAuthSchemeResolver(), - SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), - [], - [] - ) - } - - public var partitionID: String? { - return "\(IoT1ClickDevicesClient.clientName) - \(region ?? "")" - } - - public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { - self.interceptorProviders.append(provider) - } - - public func addInterceptorProvider(_ provider: ClientRuntime.HttpInterceptorProvider) { - self.httpInterceptorProviders.append(provider) - } - - } - - public static func builder() -> ClientRuntime.ClientBuilder { - return ClientRuntime.ClientBuilder(defaultPlugins: [ - ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), - DefaultAWSAuthSchemePlugin() - ]) - } -} - -extension IoT1ClickDevicesClient { - /// Performs the `ClaimDevicesByClaimCode` operation on the `IoT1ClickDevicesService` service. - /// - /// Adds device(s) to your account (i.e., claim one or more devices) if and only if you received a claim code with the device(s). - /// - /// - Parameter ClaimDevicesByClaimCodeInput : [no documentation found] - /// - /// - Returns: `ClaimDevicesByClaimCodeOutput` : [no documentation found] - /// - /// - Throws: One of the exceptions listed below __Possible Exceptions__. - /// - /// __Possible Exceptions:__ - /// - `ForbiddenException` : [no documentation found] - /// - `InternalFailureException` : [no documentation found] - /// - `InvalidRequestException` : [no documentation found] - public func claimDevicesByClaimCode(input: ClaimDevicesByClaimCodeInput) async throws -> ClaimDevicesByClaimCodeOutput { - let context = Smithy.ContextBuilder() - .withMethod(value: .put) - .withServiceName(value: serviceName) - .withOperation(value: "claimDevicesByClaimCode") - .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: "iot1click") - .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(ClaimDevicesByClaimCodeInput.urlPathProvider(_:))) - builder.interceptors.add(ClientRuntime.URLHostMiddleware()) - builder.deserialize(ClientRuntime.DeserializeMiddleware(ClaimDevicesByClaimCodeOutput.httpOutput(from:), ClaimDevicesByClaimCodeOutputError.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: IoT1ClickDevicesClient.version, 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: "IoT1ClickDevices") - metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "ClaimDevicesByClaimCode") - 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 `DescribeDevice` operation on the `IoT1ClickDevicesService` service. - /// - /// Given a device ID, returns a DescribeDeviceResponse object describing the details of the device. - /// - /// - Parameter DescribeDeviceInput : [no documentation found] - /// - /// - Returns: `DescribeDeviceOutput` : [no documentation found] - /// - /// - Throws: One of the exceptions listed below __Possible Exceptions__. - /// - /// __Possible Exceptions:__ - /// - `InternalFailureException` : [no documentation found] - /// - `InvalidRequestException` : [no documentation found] - /// - `ResourceNotFoundException` : [no documentation found] - public func describeDevice(input: DescribeDeviceInput) async throws -> DescribeDeviceOutput { - let context = Smithy.ContextBuilder() - .withMethod(value: .get) - .withServiceName(value: serviceName) - .withOperation(value: "describeDevice") - .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: "iot1click") - .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(DescribeDeviceInput.urlPathProvider(_:))) - builder.interceptors.add(ClientRuntime.URLHostMiddleware()) - builder.deserialize(ClientRuntime.DeserializeMiddleware(DescribeDeviceOutput.httpOutput(from:), DescribeDeviceOutputError.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: IoT1ClickDevicesClient.version, 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: "IoT1ClickDevices") - metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "DescribeDevice") - 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 `FinalizeDeviceClaim` operation on the `IoT1ClickDevicesService` service. - /// - /// Given a device ID, finalizes the claim request for the associated device. Claiming a device consists of initiating a claim, then publishing a device event, and finalizing the claim. For a device of type button, a device event can be published by simply clicking the device. - /// - /// - Parameter FinalizeDeviceClaimInput : [no documentation found] - /// - /// - Returns: `FinalizeDeviceClaimOutput` : [no documentation found] - /// - /// - Throws: One of the exceptions listed below __Possible Exceptions__. - /// - /// __Possible Exceptions:__ - /// - `InternalFailureException` : [no documentation found] - /// - `InvalidRequestException` : [no documentation found] - /// - `PreconditionFailedException` : [no documentation found] - /// - `ResourceConflictException` : [no documentation found] - /// - `ResourceNotFoundException` : [no documentation found] - public func finalizeDeviceClaim(input: FinalizeDeviceClaimInput) async throws -> FinalizeDeviceClaimOutput { - let context = Smithy.ContextBuilder() - .withMethod(value: .put) - .withServiceName(value: serviceName) - .withOperation(value: "finalizeDeviceClaim") - .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: "iot1click") - .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(FinalizeDeviceClaimInput.urlPathProvider(_:))) - builder.interceptors.add(ClientRuntime.URLHostMiddleware()) - builder.interceptors.add(ClientRuntime.ContentTypeMiddleware(contentType: "application/json")) - builder.serialize(ClientRuntime.BodyMiddleware(rootNodeInfo: "", inputWritingClosure: FinalizeDeviceClaimInput.write(value:to:))) - builder.interceptors.add(ClientRuntime.ContentLengthMiddleware()) - builder.deserialize(ClientRuntime.DeserializeMiddleware(FinalizeDeviceClaimOutput.httpOutput(from:), FinalizeDeviceClaimOutputError.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: IoT1ClickDevicesClient.version, 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: "IoT1ClickDevices") - metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "FinalizeDeviceClaim") - 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 `GetDeviceMethods` operation on the `IoT1ClickDevicesService` service. - /// - /// Given a device ID, returns the invokable methods associated with the device. - /// - /// - Parameter GetDeviceMethodsInput : [no documentation found] - /// - /// - Returns: `GetDeviceMethodsOutput` : [no documentation found] - /// - /// - Throws: One of the exceptions listed below __Possible Exceptions__. - /// - /// __Possible Exceptions:__ - /// - `InternalFailureException` : [no documentation found] - /// - `InvalidRequestException` : [no documentation found] - /// - `ResourceNotFoundException` : [no documentation found] - public func getDeviceMethods(input: GetDeviceMethodsInput) async throws -> GetDeviceMethodsOutput { - let context = Smithy.ContextBuilder() - .withMethod(value: .get) - .withServiceName(value: serviceName) - .withOperation(value: "getDeviceMethods") - .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: "iot1click") - .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(GetDeviceMethodsInput.urlPathProvider(_:))) - builder.interceptors.add(ClientRuntime.URLHostMiddleware()) - builder.deserialize(ClientRuntime.DeserializeMiddleware(GetDeviceMethodsOutput.httpOutput(from:), GetDeviceMethodsOutputError.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: IoT1ClickDevicesClient.version, 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: "IoT1ClickDevices") - metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "GetDeviceMethods") - 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 `InitiateDeviceClaim` operation on the `IoT1ClickDevicesService` service. - /// - /// Given a device ID, initiates a claim request for the associated device. Claiming a device consists of initiating a claim, then publishing a device event, and finalizing the claim. For a device of type button, a device event can be published by simply clicking the device. - /// - /// - Parameter InitiateDeviceClaimInput : [no documentation found] - /// - /// - Returns: `InitiateDeviceClaimOutput` : [no documentation found] - /// - /// - Throws: One of the exceptions listed below __Possible Exceptions__. - /// - /// __Possible Exceptions:__ - /// - `InternalFailureException` : [no documentation found] - /// - `InvalidRequestException` : [no documentation found] - /// - `ResourceConflictException` : [no documentation found] - /// - `ResourceNotFoundException` : [no documentation found] - public func initiateDeviceClaim(input: InitiateDeviceClaimInput) async throws -> InitiateDeviceClaimOutput { - let context = Smithy.ContextBuilder() - .withMethod(value: .put) - .withServiceName(value: serviceName) - .withOperation(value: "initiateDeviceClaim") - .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: "iot1click") - .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(InitiateDeviceClaimInput.urlPathProvider(_:))) - builder.interceptors.add(ClientRuntime.URLHostMiddleware()) - builder.deserialize(ClientRuntime.DeserializeMiddleware(InitiateDeviceClaimOutput.httpOutput(from:), InitiateDeviceClaimOutputError.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: IoT1ClickDevicesClient.version, 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: "IoT1ClickDevices") - metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "InitiateDeviceClaim") - 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 `InvokeDeviceMethod` operation on the `IoT1ClickDevicesService` service. - /// - /// Given a device ID, issues a request to invoke a named device method (with possible parameters). See the "Example POST" code snippet below. - /// - /// - Parameter InvokeDeviceMethodInput : [no documentation found] - /// - /// - Returns: `InvokeDeviceMethodOutput` : [no documentation found] - /// - /// - Throws: One of the exceptions listed below __Possible Exceptions__. - /// - /// __Possible Exceptions:__ - /// - `InternalFailureException` : [no documentation found] - /// - `InvalidRequestException` : [no documentation found] - /// - `PreconditionFailedException` : [no documentation found] - /// - `RangeNotSatisfiableException` : [no documentation found] - /// - `ResourceConflictException` : [no documentation found] - /// - `ResourceNotFoundException` : [no documentation found] - public func invokeDeviceMethod(input: InvokeDeviceMethodInput) async throws -> InvokeDeviceMethodOutput { - let context = Smithy.ContextBuilder() - .withMethod(value: .post) - .withServiceName(value: serviceName) - .withOperation(value: "invokeDeviceMethod") - .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: "iot1click") - .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(InvokeDeviceMethodInput.urlPathProvider(_:))) - builder.interceptors.add(ClientRuntime.URLHostMiddleware()) - builder.interceptors.add(ClientRuntime.ContentTypeMiddleware(contentType: "application/json")) - builder.serialize(ClientRuntime.BodyMiddleware(rootNodeInfo: "", inputWritingClosure: InvokeDeviceMethodInput.write(value:to:))) - builder.interceptors.add(ClientRuntime.ContentLengthMiddleware()) - builder.deserialize(ClientRuntime.DeserializeMiddleware(InvokeDeviceMethodOutput.httpOutput(from:), InvokeDeviceMethodOutputError.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: IoT1ClickDevicesClient.version, 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: "IoT1ClickDevices") - metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "InvokeDeviceMethod") - 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 `ListDeviceEvents` operation on the `IoT1ClickDevicesService` service. - /// - /// Using a device ID, returns a DeviceEventsResponse object containing an array of events for the device. - /// - /// - Parameter ListDeviceEventsInput : [no documentation found] - /// - /// - Returns: `ListDeviceEventsOutput` : [no documentation found] - /// - /// - Throws: One of the exceptions listed below __Possible Exceptions__. - /// - /// __Possible Exceptions:__ - /// - `InternalFailureException` : [no documentation found] - /// - `InvalidRequestException` : [no documentation found] - /// - `RangeNotSatisfiableException` : [no documentation found] - /// - `ResourceNotFoundException` : [no documentation found] - public func listDeviceEvents(input: ListDeviceEventsInput) async throws -> ListDeviceEventsOutput { - let context = Smithy.ContextBuilder() - .withMethod(value: .get) - .withServiceName(value: serviceName) - .withOperation(value: "listDeviceEvents") - .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: "iot1click") - .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(ListDeviceEventsInput.urlPathProvider(_:))) - builder.interceptors.add(ClientRuntime.URLHostMiddleware()) - builder.serialize(ClientRuntime.QueryItemMiddleware(ListDeviceEventsInput.queryItemProvider(_:))) - builder.deserialize(ClientRuntime.DeserializeMiddleware(ListDeviceEventsOutput.httpOutput(from:), ListDeviceEventsOutputError.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: IoT1ClickDevicesClient.version, 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: "IoT1ClickDevices") - metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "ListDeviceEvents") - 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 `ListDevices` operation on the `IoT1ClickDevicesService` service. - /// - /// Lists the 1-Click compatible devices associated with your AWS account. - /// - /// - Parameter ListDevicesInput : [no documentation found] - /// - /// - Returns: `ListDevicesOutput` : [no documentation found] - /// - /// - Throws: One of the exceptions listed below __Possible Exceptions__. - /// - /// __Possible Exceptions:__ - /// - `InternalFailureException` : [no documentation found] - /// - `InvalidRequestException` : [no documentation found] - /// - `RangeNotSatisfiableException` : [no documentation found] - public func listDevices(input: ListDevicesInput) async throws -> ListDevicesOutput { - let context = Smithy.ContextBuilder() - .withMethod(value: .get) - .withServiceName(value: serviceName) - .withOperation(value: "listDevices") - .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: "iot1click") - .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(ListDevicesInput.urlPathProvider(_:))) - builder.interceptors.add(ClientRuntime.URLHostMiddleware()) - builder.serialize(ClientRuntime.QueryItemMiddleware(ListDevicesInput.queryItemProvider(_:))) - builder.deserialize(ClientRuntime.DeserializeMiddleware(ListDevicesOutput.httpOutput(from:), ListDevicesOutputError.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: IoT1ClickDevicesClient.version, 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: "IoT1ClickDevices") - metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "ListDevices") - 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 `IoT1ClickDevicesService` service. - /// - /// Lists the tags associated with the specified resource ARN. - /// - /// - Parameter ListTagsForResourceInput : [no documentation found] - /// - /// - Returns: `ListTagsForResourceOutput` : [no documentation found] - /// - /// - Throws: One of the exceptions listed below __Possible Exceptions__. - /// - /// __Possible Exceptions:__ - /// - `InternalFailureException` : [no documentation found] - /// - `ResourceNotFoundException` : [no documentation found] - public func listTagsForResource(input: ListTagsForResourceInput) async throws -> ListTagsForResourceOutput { - let context = Smithy.ContextBuilder() - .withMethod(value: .get) - .withServiceName(value: serviceName) - .withOperation(value: "listTagsForResource") - .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: "iot1click") - .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(ListTagsForResourceInput.urlPathProvider(_:))) - builder.interceptors.add(ClientRuntime.URLHostMiddleware()) - builder.deserialize(ClientRuntime.DeserializeMiddleware(ListTagsForResourceOutput.httpOutput(from:), ListTagsForResourceOutputError.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: IoT1ClickDevicesClient.version, 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: "IoT1ClickDevices") - metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "ListTagsForResource") - 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 `TagResource` operation on the `IoT1ClickDevicesService` service. - /// - /// Adds or updates the tags associated with the resource ARN. See [AWS IoT 1-Click Service Limits](https://docs.aws.amazon.com/iot-1-click/latest/developerguide/1click-appendix.html#1click-limits) for the maximum number of tags allowed per resource. - /// - /// - Parameter TagResourceInput : [no documentation found] - /// - /// - Returns: `TagResourceOutput` : [no documentation found] - /// - /// - Throws: One of the exceptions listed below __Possible Exceptions__. - /// - /// __Possible Exceptions:__ - /// - `InternalFailureException` : [no documentation found] - /// - `InvalidRequestException` : [no documentation found] - /// - `ResourceNotFoundException` : [no documentation found] - public func tagResource(input: TagResourceInput) async throws -> TagResourceOutput { - let context = Smithy.ContextBuilder() - .withMethod(value: .post) - .withServiceName(value: serviceName) - .withOperation(value: "tagResource") - .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: "iot1click") - .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(TagResourceInput.urlPathProvider(_:))) - builder.interceptors.add(ClientRuntime.URLHostMiddleware()) - builder.interceptors.add(ClientRuntime.ContentTypeMiddleware(contentType: "application/json")) - builder.serialize(ClientRuntime.BodyMiddleware(rootNodeInfo: "", inputWritingClosure: TagResourceInput.write(value:to:))) - builder.interceptors.add(ClientRuntime.ContentLengthMiddleware()) - builder.deserialize(ClientRuntime.DeserializeMiddleware(TagResourceOutput.httpOutput(from:), TagResourceOutputError.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: IoT1ClickDevicesClient.version, 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: "IoT1ClickDevices") - metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "TagResource") - 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 `UnclaimDevice` operation on the `IoT1ClickDevicesService` service. - /// - /// Disassociates a device from your AWS account using its device ID. - /// - /// - Parameter UnclaimDeviceInput : [no documentation found] - /// - /// - Returns: `UnclaimDeviceOutput` : [no documentation found] - /// - /// - Throws: One of the exceptions listed below __Possible Exceptions__. - /// - /// __Possible Exceptions:__ - /// - `InternalFailureException` : [no documentation found] - /// - `InvalidRequestException` : [no documentation found] - /// - `ResourceNotFoundException` : [no documentation found] - public func unclaimDevice(input: UnclaimDeviceInput) async throws -> UnclaimDeviceOutput { - let context = Smithy.ContextBuilder() - .withMethod(value: .put) - .withServiceName(value: serviceName) - .withOperation(value: "unclaimDevice") - .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: "iot1click") - .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(UnclaimDeviceInput.urlPathProvider(_:))) - builder.interceptors.add(ClientRuntime.URLHostMiddleware()) - builder.deserialize(ClientRuntime.DeserializeMiddleware(UnclaimDeviceOutput.httpOutput(from:), UnclaimDeviceOutputError.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: IoT1ClickDevicesClient.version, 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: "IoT1ClickDevices") - metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "UnclaimDevice") - 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 `UntagResource` operation on the `IoT1ClickDevicesService` service. - /// - /// Using tag keys, deletes the tags (key/value pairs) associated with the specified resource ARN. - /// - /// - Parameter UntagResourceInput : [no documentation found] - /// - /// - Returns: `UntagResourceOutput` : [no documentation found] - /// - /// - Throws: One of the exceptions listed below __Possible Exceptions__. - /// - /// __Possible Exceptions:__ - /// - `InternalFailureException` : [no documentation found] - /// - `InvalidRequestException` : [no documentation found] - /// - `ResourceNotFoundException` : [no documentation found] - public func untagResource(input: UntagResourceInput) async throws -> UntagResourceOutput { - let context = Smithy.ContextBuilder() - .withMethod(value: .delete) - .withServiceName(value: serviceName) - .withOperation(value: "untagResource") - .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: "iot1click") - .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(UntagResourceInput.urlPathProvider(_:))) - builder.interceptors.add(ClientRuntime.URLHostMiddleware()) - builder.serialize(ClientRuntime.QueryItemMiddleware(UntagResourceInput.queryItemProvider(_:))) - builder.deserialize(ClientRuntime.DeserializeMiddleware(UntagResourceOutput.httpOutput(from:), UntagResourceOutputError.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: IoT1ClickDevicesClient.version, 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: "IoT1ClickDevices") - metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "UntagResource") - 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 `UpdateDeviceState` operation on the `IoT1ClickDevicesService` service. - /// - /// Using a Boolean value (true or false), this operation enables or disables the device given a device ID. - /// - /// - Parameter UpdateDeviceStateInput : [no documentation found] - /// - /// - Returns: `UpdateDeviceStateOutput` : [no documentation found] - /// - /// - Throws: One of the exceptions listed below __Possible Exceptions__. - /// - /// __Possible Exceptions:__ - /// - `InternalFailureException` : [no documentation found] - /// - `InvalidRequestException` : [no documentation found] - /// - `ResourceNotFoundException` : [no documentation found] - public func updateDeviceState(input: UpdateDeviceStateInput) async throws -> UpdateDeviceStateOutput { - let context = Smithy.ContextBuilder() - .withMethod(value: .put) - .withServiceName(value: serviceName) - .withOperation(value: "updateDeviceState") - .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: "iot1click") - .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(UpdateDeviceStateInput.urlPathProvider(_:))) - builder.interceptors.add(ClientRuntime.URLHostMiddleware()) - builder.interceptors.add(ClientRuntime.ContentTypeMiddleware(contentType: "application/json")) - builder.serialize(ClientRuntime.BodyMiddleware(rootNodeInfo: "", inputWritingClosure: UpdateDeviceStateInput.write(value:to:))) - builder.interceptors.add(ClientRuntime.ContentLengthMiddleware()) - builder.deserialize(ClientRuntime.DeserializeMiddleware(UpdateDeviceStateOutput.httpOutput(from:), UpdateDeviceStateOutputError.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: IoT1ClickDevicesClient.version, 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: "IoT1ClickDevices") - metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "UpdateDeviceState") - 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) - } - -} diff --git a/Sources/Services/AWSIoT1ClickDevicesService/Sources/AWSIoT1ClickDevicesService/Models.swift b/Sources/Services/AWSIoT1ClickDevicesService/Sources/AWSIoT1ClickDevicesService/Models.swift deleted file mode 100644 index 16b85a65408..00000000000 --- a/Sources/Services/AWSIoT1ClickDevicesService/Sources/AWSIoT1ClickDevicesService/Models.swift +++ /dev/null @@ -1,1446 +0,0 @@ -// -// Copyright Amazon.com Inc. or its affiliates. -// All Rights Reserved. -// -// SPDX-License-Identifier: Apache-2.0 -// - -// Code generated by smithy-swift-codegen. DO NOT EDIT! - -@_spi(SmithyReadWrite) import ClientRuntime -import Foundation -import class SmithyHTTPAPI.HTTPResponse -@_spi(SmithyReadWrite) import class SmithyJSON.Reader -@_spi(SmithyReadWrite) import class SmithyJSON.Writer -import enum ClientRuntime.ErrorFault -import enum Smithy.ClientError -import enum SmithyReadWrite.ReaderError -@_spi(SmithyReadWrite) import enum SmithyReadWrite.ReadingClosures -@_spi(SmithyReadWrite) import enum SmithyReadWrite.WritingClosures -import protocol AWSClientRuntime.AWSServiceError -import protocol ClientRuntime.HTTPError -import protocol ClientRuntime.ModeledError -@_spi(SmithyReadWrite) import protocol SmithyReadWrite.SmithyReader -@_spi(SmithyReadWrite) import protocol SmithyReadWrite.SmithyWriter -@_spi(SmithyReadWrite) import struct AWSClientRuntime.RestJSONError -@_spi(UnknownAWSHTTPServiceError) import struct AWSClientRuntime.UnknownAWSHTTPServiceError -import struct Smithy.URIQueryItem -@_spi(SmithyTimestamps) import struct SmithyTimestamps.TimestampFormatter - - -public struct TagResourceOutput: Swift.Sendable { - - public init() { } -} - -public struct UntagResourceOutput: Swift.Sendable { - - public init() { } -} - -extension IoT1ClickDevicesClientTypes { - - public struct DeviceDescription: Swift.Sendable { - /// The ARN of the device. - public var arn: Swift.String? - /// An array of zero or more elements of DeviceAttribute objects providing user specified device attributes. - public var attributes: [Swift.String: Swift.String]? - /// The unique identifier of the device. - public var deviceId: Swift.String? - /// A Boolean value indicating whether or not the device is enabled. - public var enabled: Swift.Bool? - /// A value between 0 and 1 inclusive, representing the fraction of life remaining for the device. - public var remainingLife: Swift.Double? - /// The tags currently associated with the AWS IoT 1-Click device. - public var tags: [Swift.String: Swift.String]? - /// The type of the device, such as "button". - public var type: Swift.String? - - public init( - arn: Swift.String? = nil, - attributes: [Swift.String: Swift.String]? = nil, - deviceId: Swift.String? = nil, - enabled: Swift.Bool? = nil, - remainingLife: Swift.Double? = nil, - tags: [Swift.String: Swift.String]? = nil, - type: Swift.String? = nil - ) - { - self.arn = arn - self.attributes = attributes - self.deviceId = deviceId - self.enabled = enabled - self.remainingLife = remainingLife - self.tags = tags - self.type = type - } - } -} - -extension IoT1ClickDevicesClientTypes { - - public struct Attributes: Swift.Sendable { - - public init() { } - } -} - -extension IoT1ClickDevicesClientTypes { - - public struct Device: Swift.Sendable { - /// The user specified attributes associated with the device for an event. - public var attributes: IoT1ClickDevicesClientTypes.Attributes? - /// The unique identifier of the device. - public var deviceId: Swift.String? - /// The device type, such as "button". - public var type: Swift.String? - - public init( - attributes: IoT1ClickDevicesClientTypes.Attributes? = nil, - deviceId: Swift.String? = nil, - type: Swift.String? = nil - ) - { - self.attributes = attributes - self.deviceId = deviceId - self.type = type - } - } -} - -extension IoT1ClickDevicesClientTypes { - - public struct DeviceEvent: Swift.Sendable { - /// An object representing the device associated with the event. - public var device: IoT1ClickDevicesClientTypes.Device? - /// A serialized JSON object representing the device-type specific event. - public var stdEvent: Swift.String? - - public init( - device: IoT1ClickDevicesClientTypes.Device? = nil, - stdEvent: Swift.String? = nil - ) - { - self.device = device - self.stdEvent = stdEvent - } - } -} - -extension IoT1ClickDevicesClientTypes { - - public struct DeviceMethod: Swift.Sendable { - /// The type of the device, such as "button". - public var deviceType: Swift.String? - /// The name of the method applicable to the deviceType. - public var methodName: Swift.String? - - public init( - deviceType: Swift.String? = nil, - methodName: Swift.String? = nil - ) - { - self.deviceType = deviceType - self.methodName = methodName - } - } -} - -public struct ForbiddenException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error, Swift.Sendable { - - public struct Properties: Swift.Sendable { - /// 403 - public internal(set) var code: Swift.String? = nil - /// The 403 error message returned by the web server. - public internal(set) var message: Swift.String? = nil - } - - public internal(set) var properties = Properties() - public static var typeName: Swift.String { "ForbiddenException" } - 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( - code: Swift.String? = nil, - message: Swift.String? = nil - ) - { - self.properties.code = code - self.properties.message = message - } -} - -public struct InternalFailureException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error, Swift.Sendable { - - public struct Properties: Swift.Sendable { - /// 500 - public internal(set) var code: Swift.String? = nil - /// The 500 error message returned by the web server. - public internal(set) var message: Swift.String? = nil - } - - public internal(set) var properties = Properties() - public static var typeName: Swift.String { "InternalFailureException" } - public static var fault: ClientRuntime.ErrorFault { .server } - 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( - code: Swift.String? = nil, - message: Swift.String? = nil - ) - { - self.properties.code = code - self.properties.message = message - } -} - -public struct InvalidRequestException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error, Swift.Sendable { - - public struct Properties: Swift.Sendable { - /// 400 - public internal(set) var code: Swift.String? = nil - /// The 400 error message returned by the web server. - public internal(set) var message: Swift.String? = nil - } - - public internal(set) var properties = Properties() - public static var typeName: Swift.String { "InvalidRequestException" } - 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( - code: Swift.String? = nil, - message: Swift.String? = nil - ) - { - self.properties.code = code - self.properties.message = message - } -} - -public struct ClaimDevicesByClaimCodeInput: Swift.Sendable { - /// The claim code, starting with "C-", as provided by the device manufacturer. - /// This member is required. - public var claimCode: Swift.String? - - public init( - claimCode: Swift.String? = nil - ) - { - self.claimCode = claimCode - } -} - -public struct ClaimDevicesByClaimCodeOutput: Swift.Sendable { - /// The claim code provided by the device manufacturer. - public var claimCode: Swift.String? - /// The total number of devices associated with the claim code that has been processed in the claim request. - public var total: Swift.Int? - - public init( - claimCode: Swift.String? = nil, - total: Swift.Int? = nil - ) - { - self.claimCode = claimCode - self.total = total - } -} - -public struct ResourceNotFoundException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error, Swift.Sendable { - - public struct Properties: Swift.Sendable { - /// 404 - public internal(set) var code: Swift.String? = nil - /// The requested device could not be found. - public internal(set) var message: Swift.String? = nil - } - - public internal(set) var properties = Properties() - public static var typeName: Swift.String { "ResourceNotFoundException" } - 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( - code: Swift.String? = nil, - message: Swift.String? = nil - ) - { - self.properties.code = code - self.properties.message = message - } -} - -public struct DescribeDeviceInput: Swift.Sendable { - /// The unique identifier of the device. - /// This member is required. - public var deviceId: Swift.String? - - public init( - deviceId: Swift.String? = nil - ) - { - self.deviceId = deviceId - } -} - -public struct DescribeDeviceOutput: Swift.Sendable { - /// Device details. - public var deviceDescription: IoT1ClickDevicesClientTypes.DeviceDescription? - - public init( - deviceDescription: IoT1ClickDevicesClientTypes.DeviceDescription? = nil - ) - { - self.deviceDescription = deviceDescription - } -} - -public struct PreconditionFailedException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error, Swift.Sendable { - - public struct Properties: Swift.Sendable { - /// 412 - public internal(set) var code: Swift.String? = nil - /// An error message explaining the error or its remedy. - public internal(set) var message: Swift.String? = nil - } - - public internal(set) var properties = Properties() - public static var typeName: Swift.String { "PreconditionFailedException" } - 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( - code: Swift.String? = nil, - message: Swift.String? = nil - ) - { - self.properties.code = code - self.properties.message = message - } -} - -public struct ResourceConflictException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error, Swift.Sendable { - - public struct Properties: Swift.Sendable { - /// 409 - public internal(set) var code: Swift.String? = nil - /// An error message explaining the error or its remedy. - public internal(set) var message: Swift.String? = nil - } - - public internal(set) var properties = Properties() - public static var typeName: Swift.String { "ResourceConflictException" } - 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( - code: Swift.String? = nil, - message: Swift.String? = nil - ) - { - self.properties.code = code - self.properties.message = message - } -} - -public struct FinalizeDeviceClaimInput: Swift.Sendable { - /// The unique identifier of the device. - /// This member is required. - public var deviceId: Swift.String? - /// A collection of key/value pairs defining the resource tags. For example, { "tags": {"key1": "value1", "key2": "value2"} }. For more information, see [AWS Tagging Strategies](https://aws.amazon.com/answers/account-management/aws-tagging-strategies/). - public var tags: [Swift.String: Swift.String]? - - public init( - deviceId: Swift.String? = nil, - tags: [Swift.String: Swift.String]? = nil - ) - { - self.deviceId = deviceId - self.tags = tags - } -} - -public struct FinalizeDeviceClaimOutput: Swift.Sendable { - /// The device's final claim state. - public var state: Swift.String? - - public init( - state: Swift.String? = nil - ) - { - self.state = state - } -} - -public struct GetDeviceMethodsInput: Swift.Sendable { - /// The unique identifier of the device. - /// This member is required. - public var deviceId: Swift.String? - - public init( - deviceId: Swift.String? = nil - ) - { - self.deviceId = deviceId - } -} - -public struct GetDeviceMethodsOutput: Swift.Sendable { - /// List of available device APIs. - public var deviceMethods: [IoT1ClickDevicesClientTypes.DeviceMethod]? - - public init( - deviceMethods: [IoT1ClickDevicesClientTypes.DeviceMethod]? = nil - ) - { - self.deviceMethods = deviceMethods - } -} - -public struct InitiateDeviceClaimInput: Swift.Sendable { - /// The unique identifier of the device. - /// This member is required. - public var deviceId: Swift.String? - - public init( - deviceId: Swift.String? = nil - ) - { - self.deviceId = deviceId - } -} - -public struct InitiateDeviceClaimOutput: Swift.Sendable { - /// The device's final claim state. - public var state: Swift.String? - - public init( - state: Swift.String? = nil - ) - { - self.state = state - } -} - -public struct RangeNotSatisfiableException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error, Swift.Sendable { - - public struct Properties: Swift.Sendable { - /// 416 - public internal(set) var code: Swift.String? = nil - /// The requested number of results specified by nextToken cannot be satisfied. - public internal(set) var message: Swift.String? = nil - } - - public internal(set) var properties = Properties() - public static var typeName: Swift.String { "RangeNotSatisfiableException" } - 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( - code: Swift.String? = nil, - message: Swift.String? = nil - ) - { - self.properties.code = code - self.properties.message = message - } -} - -public struct InvokeDeviceMethodInput: Swift.Sendable { - /// The unique identifier of the device. - /// This member is required. - public var deviceId: Swift.String? - /// The device method to invoke. - public var deviceMethod: IoT1ClickDevicesClientTypes.DeviceMethod? - /// A JSON encoded string containing the device method request parameters. - public var deviceMethodParameters: Swift.String? - - public init( - deviceId: Swift.String? = nil, - deviceMethod: IoT1ClickDevicesClientTypes.DeviceMethod? = nil, - deviceMethodParameters: Swift.String? = nil - ) - { - self.deviceId = deviceId - self.deviceMethod = deviceMethod - self.deviceMethodParameters = deviceMethodParameters - } -} - -public struct InvokeDeviceMethodOutput: Swift.Sendable { - /// A JSON encoded string containing the device method response. - public var deviceMethodResponse: Swift.String? - - public init( - deviceMethodResponse: Swift.String? = nil - ) - { - self.deviceMethodResponse = deviceMethodResponse - } -} - -public struct ListDeviceEventsInput: Swift.Sendable { - /// The unique identifier of the device. - /// This member is required. - public var deviceId: Swift.String? - /// The start date for the device event query, in ISO8061 format. For example, 2018-03-28T15:45:12.880Z - /// This member is required. - public var fromTimeStamp: Foundation.Date? - /// The maximum number of results to return per request. If not set, a default value of 100 is used. - public var maxResults: Swift.Int? - /// The token to retrieve the next set of results. - public var nextToken: Swift.String? - /// The end date for the device event query, in ISO8061 format. For example, 2018-03-28T15:45:12.880Z - /// This member is required. - public var toTimeStamp: Foundation.Date? - - public init( - deviceId: Swift.String? = nil, - fromTimeStamp: Foundation.Date? = nil, - maxResults: Swift.Int? = nil, - nextToken: Swift.String? = nil, - toTimeStamp: Foundation.Date? = nil - ) - { - self.deviceId = deviceId - self.fromTimeStamp = fromTimeStamp - self.maxResults = maxResults - self.nextToken = nextToken - self.toTimeStamp = toTimeStamp - } -} - -public struct ListDeviceEventsOutput: Swift.Sendable { - /// An array of zero or more elements describing the event(s) associated with the device. - public var events: [IoT1ClickDevicesClientTypes.DeviceEvent]? - /// The token to retrieve the next set of results. - public var nextToken: Swift.String? - - public init( - events: [IoT1ClickDevicesClientTypes.DeviceEvent]? = nil, - nextToken: Swift.String? = nil - ) - { - self.events = events - self.nextToken = nextToken - } -} - -public struct ListDevicesInput: Swift.Sendable { - /// The type of the device, such as "button". - public var deviceType: Swift.String? - /// The maximum number of results to return per request. If not set, a default value of 100 is used. - public var maxResults: Swift.Int? - /// The token to retrieve the next set of results. - public var nextToken: Swift.String? - - public init( - deviceType: Swift.String? = nil, - maxResults: Swift.Int? = nil, - nextToken: Swift.String? = nil - ) - { - self.deviceType = deviceType - self.maxResults = maxResults - self.nextToken = nextToken - } -} - -public struct ListDevicesOutput: Swift.Sendable { - /// A list of devices. - public var devices: [IoT1ClickDevicesClientTypes.DeviceDescription]? - /// The token to retrieve the next set of results. - public var nextToken: Swift.String? - - public init( - devices: [IoT1ClickDevicesClientTypes.DeviceDescription]? = nil, - nextToken: Swift.String? = nil - ) - { - self.devices = devices - self.nextToken = nextToken - } -} - -public struct ListTagsForResourceInput: Swift.Sendable { - /// The ARN of the resource. - /// This member is required. - public var resourceArn: Swift.String? - - public init( - resourceArn: Swift.String? = nil - ) - { - self.resourceArn = resourceArn - } -} - -public struct ListTagsForResourceOutput: Swift.Sendable { - /// A collection of key/value pairs defining the resource tags. For example, { "tags": {"key1": "value1", "key2": "value2"} }. For more information, see [AWS Tagging Strategies](https://aws.amazon.com/answers/account-management/aws-tagging-strategies/). - public var tags: [Swift.String: Swift.String]? - - public init( - tags: [Swift.String: Swift.String]? = nil - ) - { - self.tags = tags - } -} - -public struct TagResourceInput: Swift.Sendable { - /// The ARN of the resource. - /// This member is required. - public var resourceArn: Swift.String? - /// A collection of key/value pairs defining the resource tags. For example, { "tags": {"key1": "value1", "key2": "value2"} }. For more information, see [AWS Tagging Strategies](https://aws.amazon.com/answers/account-management/aws-tagging-strategies/). - /// This member is required. - public var tags: [Swift.String: Swift.String]? - - public init( - resourceArn: Swift.String? = nil, - tags: [Swift.String: Swift.String]? = nil - ) - { - self.resourceArn = resourceArn - self.tags = tags - } -} - -public struct UnclaimDeviceInput: Swift.Sendable { - /// The unique identifier of the device. - /// This member is required. - public var deviceId: Swift.String? - - public init( - deviceId: Swift.String? = nil - ) - { - self.deviceId = deviceId - } -} - -public struct UnclaimDeviceOutput: Swift.Sendable { - /// The device's final claim state. - public var state: Swift.String? - - public init( - state: Swift.String? = nil - ) - { - self.state = state - } -} - -public struct UntagResourceInput: Swift.Sendable { - /// The ARN of the resource. - /// This member is required. - public var resourceArn: Swift.String? - /// A collections of tag keys. For example, {"key1","key2"} - /// This member is required. - public var tagKeys: [Swift.String]? - - public init( - resourceArn: Swift.String? = nil, - tagKeys: [Swift.String]? = nil - ) - { - self.resourceArn = resourceArn - self.tagKeys = tagKeys - } -} - -public struct UpdateDeviceStateInput: Swift.Sendable { - /// The unique identifier of the device. - /// This member is required. - public var deviceId: Swift.String? - /// If true, the device is enabled. If false, the device is disabled. - public var enabled: Swift.Bool? - - public init( - deviceId: Swift.String? = nil, - enabled: Swift.Bool? = nil - ) - { - self.deviceId = deviceId - self.enabled = enabled - } -} - -public struct UpdateDeviceStateOutput: Swift.Sendable { - - public init() { } -} - -extension ClaimDevicesByClaimCodeInput { - - static func urlPathProvider(_ value: ClaimDevicesByClaimCodeInput) -> Swift.String? { - guard let claimCode = value.claimCode else { - return nil - } - return "/claims/\(claimCode.urlPercentEncoding())" - } -} - -extension DescribeDeviceInput { - - static func urlPathProvider(_ value: DescribeDeviceInput) -> Swift.String? { - guard let deviceId = value.deviceId else { - return nil - } - return "/devices/\(deviceId.urlPercentEncoding())" - } -} - -extension FinalizeDeviceClaimInput { - - static func urlPathProvider(_ value: FinalizeDeviceClaimInput) -> Swift.String? { - guard let deviceId = value.deviceId else { - return nil - } - return "/devices/\(deviceId.urlPercentEncoding())/finalize-claim" - } -} - -extension GetDeviceMethodsInput { - - static func urlPathProvider(_ value: GetDeviceMethodsInput) -> Swift.String? { - guard let deviceId = value.deviceId else { - return nil - } - return "/devices/\(deviceId.urlPercentEncoding())/methods" - } -} - -extension InitiateDeviceClaimInput { - - static func urlPathProvider(_ value: InitiateDeviceClaimInput) -> Swift.String? { - guard let deviceId = value.deviceId else { - return nil - } - return "/devices/\(deviceId.urlPercentEncoding())/initiate-claim" - } -} - -extension InvokeDeviceMethodInput { - - static func urlPathProvider(_ value: InvokeDeviceMethodInput) -> Swift.String? { - guard let deviceId = value.deviceId else { - return nil - } - return "/devices/\(deviceId.urlPercentEncoding())/methods" - } -} - -extension ListDeviceEventsInput { - - static func urlPathProvider(_ value: ListDeviceEventsInput) -> Swift.String? { - guard let deviceId = value.deviceId else { - return nil - } - return "/devices/\(deviceId.urlPercentEncoding())/events" - } -} - -extension ListDeviceEventsInput { - - static func queryItemProvider(_ value: ListDeviceEventsInput) throws -> [Smithy.URIQueryItem] { - var items = [Smithy.URIQueryItem]() - guard let toTimeStamp = value.toTimeStamp else { - let message = "Creating a URL Query Item failed. toTimeStamp is required and must not be nil." - throw Smithy.ClientError.unknownError(message) - } - let toTimeStampQueryItem = Smithy.URIQueryItem(name: "toTimeStamp".urlPercentEncoding(), value: Swift.String(SmithyTimestamps.TimestampFormatter(format: .dateTime).string(from: toTimeStamp)).urlPercentEncoding()) - items.append(toTimeStampQueryItem) - 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) - } - guard let fromTimeStamp = value.fromTimeStamp else { - let message = "Creating a URL Query Item failed. fromTimeStamp is required and must not be nil." - throw Smithy.ClientError.unknownError(message) - } - let fromTimeStampQueryItem = Smithy.URIQueryItem(name: "fromTimeStamp".urlPercentEncoding(), value: Swift.String(SmithyTimestamps.TimestampFormatter(format: .dateTime).string(from: fromTimeStamp)).urlPercentEncoding()) - items.append(fromTimeStampQueryItem) - return items - } -} - -extension ListDevicesInput { - - static func urlPathProvider(_ value: ListDevicesInput) -> Swift.String? { - return "/devices" - } -} - -extension ListDevicesInput { - - static func queryItemProvider(_ value: ListDevicesInput) throws -> [Smithy.URIQueryItem] { - var items = [Smithy.URIQueryItem]() - if let deviceType = value.deviceType { - let deviceTypeQueryItem = Smithy.URIQueryItem(name: "deviceType".urlPercentEncoding(), value: Swift.String(deviceType).urlPercentEncoding()) - items.append(deviceTypeQueryItem) - } - 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? { - guard let resourceArn = value.resourceArn else { - return nil - } - return "/tags/\(resourceArn.urlPercentEncoding())" - } -} - -extension TagResourceInput { - - static func urlPathProvider(_ value: TagResourceInput) -> Swift.String? { - guard let resourceArn = value.resourceArn else { - return nil - } - return "/tags/\(resourceArn.urlPercentEncoding())" - } -} - -extension UnclaimDeviceInput { - - static func urlPathProvider(_ value: UnclaimDeviceInput) -> Swift.String? { - guard let deviceId = value.deviceId else { - return nil - } - return "/devices/\(deviceId.urlPercentEncoding())/unclaim" - } -} - -extension UntagResourceInput { - - static func urlPathProvider(_ value: UntagResourceInput) -> Swift.String? { - guard let resourceArn = value.resourceArn else { - return nil - } - return "/tags/\(resourceArn.urlPercentEncoding())" - } -} - -extension UntagResourceInput { - - static func queryItemProvider(_ value: UntagResourceInput) throws -> [Smithy.URIQueryItem] { - var items = [Smithy.URIQueryItem]() - guard let tagKeys = value.tagKeys else { - let message = "Creating a URL Query Item failed. tagKeys is required and must not be nil." - throw Smithy.ClientError.unknownError(message) - } - tagKeys.forEach { queryItemValue in - let queryItem = Smithy.URIQueryItem(name: "tagKeys".urlPercentEncoding(), value: Swift.String(queryItemValue).urlPercentEncoding()) - items.append(queryItem) - } - return items - } -} - -extension UpdateDeviceStateInput { - - static func urlPathProvider(_ value: UpdateDeviceStateInput) -> Swift.String? { - guard let deviceId = value.deviceId else { - return nil - } - return "/devices/\(deviceId.urlPercentEncoding())/state" - } -} - -extension FinalizeDeviceClaimInput { - - static func write(value: FinalizeDeviceClaimInput?, to writer: SmithyJSON.Writer) throws { - guard let value else { return } - try writer["tags"].writeMap(value.tags, valueWritingClosure: SmithyReadWrite.WritingClosures.writeString(value:to:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) - } -} - -extension InvokeDeviceMethodInput { - - static func write(value: InvokeDeviceMethodInput?, to writer: SmithyJSON.Writer) throws { - guard let value else { return } - try writer["deviceMethod"].write(value.deviceMethod, with: IoT1ClickDevicesClientTypes.DeviceMethod.write(value:to:)) - try writer["deviceMethodParameters"].write(value.deviceMethodParameters) - } -} - -extension TagResourceInput { - - static func write(value: TagResourceInput?, to writer: SmithyJSON.Writer) throws { - guard let value else { return } - try writer["tags"].writeMap(value.tags, valueWritingClosure: SmithyReadWrite.WritingClosures.writeString(value:to:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) - } -} - -extension UpdateDeviceStateInput { - - static func write(value: UpdateDeviceStateInput?, to writer: SmithyJSON.Writer) throws { - guard let value else { return } - try writer["enabled"].write(value.enabled) - } -} - -extension ClaimDevicesByClaimCodeOutput { - - static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> ClaimDevicesByClaimCodeOutput { - let data = try await httpResponse.data() - let responseReader = try SmithyJSON.Reader.from(data: data) - let reader = responseReader - var value = ClaimDevicesByClaimCodeOutput() - value.claimCode = try reader["claimCode"].readIfPresent() - value.total = try reader["total"].readIfPresent() - return value - } -} - -extension DescribeDeviceOutput { - - static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> DescribeDeviceOutput { - let data = try await httpResponse.data() - let responseReader = try SmithyJSON.Reader.from(data: data) - let reader = responseReader - var value = DescribeDeviceOutput() - value.deviceDescription = try reader["deviceDescription"].readIfPresent(with: IoT1ClickDevicesClientTypes.DeviceDescription.read(from:)) - return value - } -} - -extension FinalizeDeviceClaimOutput { - - static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> FinalizeDeviceClaimOutput { - let data = try await httpResponse.data() - let responseReader = try SmithyJSON.Reader.from(data: data) - let reader = responseReader - var value = FinalizeDeviceClaimOutput() - value.state = try reader["state"].readIfPresent() - return value - } -} - -extension GetDeviceMethodsOutput { - - static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> GetDeviceMethodsOutput { - let data = try await httpResponse.data() - let responseReader = try SmithyJSON.Reader.from(data: data) - let reader = responseReader - var value = GetDeviceMethodsOutput() - value.deviceMethods = try reader["deviceMethods"].readListIfPresent(memberReadingClosure: IoT1ClickDevicesClientTypes.DeviceMethod.read(from:), memberNodeInfo: "member", isFlattened: false) - return value - } -} - -extension InitiateDeviceClaimOutput { - - static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> InitiateDeviceClaimOutput { - let data = try await httpResponse.data() - let responseReader = try SmithyJSON.Reader.from(data: data) - let reader = responseReader - var value = InitiateDeviceClaimOutput() - value.state = try reader["state"].readIfPresent() - return value - } -} - -extension InvokeDeviceMethodOutput { - - static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> InvokeDeviceMethodOutput { - let data = try await httpResponse.data() - let responseReader = try SmithyJSON.Reader.from(data: data) - let reader = responseReader - var value = InvokeDeviceMethodOutput() - value.deviceMethodResponse = try reader["deviceMethodResponse"].readIfPresent() - return value - } -} - -extension ListDeviceEventsOutput { - - static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> ListDeviceEventsOutput { - let data = try await httpResponse.data() - let responseReader = try SmithyJSON.Reader.from(data: data) - let reader = responseReader - var value = ListDeviceEventsOutput() - value.events = try reader["events"].readListIfPresent(memberReadingClosure: IoT1ClickDevicesClientTypes.DeviceEvent.read(from:), memberNodeInfo: "member", isFlattened: false) - value.nextToken = try reader["nextToken"].readIfPresent() - return value - } -} - -extension ListDevicesOutput { - - static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> ListDevicesOutput { - let data = try await httpResponse.data() - let responseReader = try SmithyJSON.Reader.from(data: data) - let reader = responseReader - var value = ListDevicesOutput() - value.devices = try reader["devices"].readListIfPresent(memberReadingClosure: IoT1ClickDevicesClientTypes.DeviceDescription.read(from:), memberNodeInfo: "member", isFlattened: false) - value.nextToken = try reader["nextToken"].readIfPresent() - return value - } -} - -extension ListTagsForResourceOutput { - - static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> ListTagsForResourceOutput { - let data = try await httpResponse.data() - let responseReader = try SmithyJSON.Reader.from(data: data) - let reader = responseReader - var value = ListTagsForResourceOutput() - value.tags = try reader["tags"].readMapIfPresent(valueReadingClosure: SmithyReadWrite.ReadingClosures.readString(from:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) - return value - } -} - -extension TagResourceOutput { - - static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> TagResourceOutput { - return TagResourceOutput() - } -} - -extension UnclaimDeviceOutput { - - static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> UnclaimDeviceOutput { - let data = try await httpResponse.data() - let responseReader = try SmithyJSON.Reader.from(data: data) - let reader = responseReader - var value = UnclaimDeviceOutput() - value.state = try reader["state"].readIfPresent() - return value - } -} - -extension UntagResourceOutput { - - static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> UntagResourceOutput { - return UntagResourceOutput() - } -} - -extension UpdateDeviceStateOutput { - - static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> UpdateDeviceStateOutput { - return UpdateDeviceStateOutput() - } -} - -enum ClaimDevicesByClaimCodeOutputError { - - 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 "ForbiddenException": return try ForbiddenException.makeError(baseError: baseError) - case "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) - case "InvalidRequestException": return try InvalidRequestException.makeError(baseError: baseError) - default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) - } - } -} - -enum DescribeDeviceOutputError { - - 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 "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) - case "InvalidRequestException": return try InvalidRequestException.makeError(baseError: baseError) - case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) - default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) - } - } -} - -enum FinalizeDeviceClaimOutputError { - - 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 "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) - case "InvalidRequestException": return try InvalidRequestException.makeError(baseError: baseError) - case "PreconditionFailedException": return try PreconditionFailedException.makeError(baseError: baseError) - case "ResourceConflictException": return try ResourceConflictException.makeError(baseError: baseError) - case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) - default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) - } - } -} - -enum GetDeviceMethodsOutputError { - - 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 "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) - case "InvalidRequestException": return try InvalidRequestException.makeError(baseError: baseError) - case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) - default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) - } - } -} - -enum InitiateDeviceClaimOutputError { - - 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 "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) - case "InvalidRequestException": return try InvalidRequestException.makeError(baseError: baseError) - case "ResourceConflictException": return try ResourceConflictException.makeError(baseError: baseError) - case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) - default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) - } - } -} - -enum InvokeDeviceMethodOutputError { - - 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 "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) - case "InvalidRequestException": return try InvalidRequestException.makeError(baseError: baseError) - case "PreconditionFailedException": return try PreconditionFailedException.makeError(baseError: baseError) - case "RangeNotSatisfiableException": return try RangeNotSatisfiableException.makeError(baseError: baseError) - case "ResourceConflictException": return try ResourceConflictException.makeError(baseError: baseError) - case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) - default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) - } - } -} - -enum ListDeviceEventsOutputError { - - 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 "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) - case "InvalidRequestException": return try InvalidRequestException.makeError(baseError: baseError) - case "RangeNotSatisfiableException": return try RangeNotSatisfiableException.makeError(baseError: baseError) - case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) - default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) - } - } -} - -enum ListDevicesOutputError { - - 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 "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) - case "InvalidRequestException": return try InvalidRequestException.makeError(baseError: baseError) - case "RangeNotSatisfiableException": return try RangeNotSatisfiableException.makeError(baseError: baseError) - default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) - } - } -} - -enum ListTagsForResourceOutputError { - - 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 "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) - case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) - default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) - } - } -} - -enum TagResourceOutputError { - - 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 "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) - case "InvalidRequestException": return try InvalidRequestException.makeError(baseError: baseError) - case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) - default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) - } - } -} - -enum UnclaimDeviceOutputError { - - 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 "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) - case "InvalidRequestException": return try InvalidRequestException.makeError(baseError: baseError) - case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) - default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) - } - } -} - -enum UntagResourceOutputError { - - 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 "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) - case "InvalidRequestException": return try InvalidRequestException.makeError(baseError: baseError) - case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) - default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) - } - } -} - -enum UpdateDeviceStateOutputError { - - 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 "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) - case "InvalidRequestException": return try InvalidRequestException.makeError(baseError: baseError) - case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) - default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) - } - } -} - -extension InvalidRequestException { - - static func makeError(baseError: AWSClientRuntime.RestJSONError) throws -> InvalidRequestException { - let reader = baseError.errorBodyReader - var value = InvalidRequestException() - value.properties.code = try reader["code"].readIfPresent() - value.properties.message = try reader["message"].readIfPresent() - value.httpResponse = baseError.httpResponse - value.requestID = baseError.requestID - value.message = baseError.message - return value - } -} - -extension InternalFailureException { - - static func makeError(baseError: AWSClientRuntime.RestJSONError) throws -> InternalFailureException { - let reader = baseError.errorBodyReader - var value = InternalFailureException() - value.properties.code = try reader["code"].readIfPresent() - value.properties.message = try reader["message"].readIfPresent() - value.httpResponse = baseError.httpResponse - value.requestID = baseError.requestID - value.message = baseError.message - return value - } -} - -extension ForbiddenException { - - static func makeError(baseError: AWSClientRuntime.RestJSONError) throws -> ForbiddenException { - let reader = baseError.errorBodyReader - var value = ForbiddenException() - value.properties.code = try reader["code"].readIfPresent() - 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 { - let reader = baseError.errorBodyReader - var value = ResourceNotFoundException() - value.properties.code = try reader["code"].readIfPresent() - value.properties.message = try reader["message"].readIfPresent() - value.httpResponse = baseError.httpResponse - value.requestID = baseError.requestID - value.message = baseError.message - return value - } -} - -extension ResourceConflictException { - - static func makeError(baseError: AWSClientRuntime.RestJSONError) throws -> ResourceConflictException { - let reader = baseError.errorBodyReader - var value = ResourceConflictException() - value.properties.code = try reader["code"].readIfPresent() - value.properties.message = try reader["message"].readIfPresent() - value.httpResponse = baseError.httpResponse - value.requestID = baseError.requestID - value.message = baseError.message - return value - } -} - -extension PreconditionFailedException { - - static func makeError(baseError: AWSClientRuntime.RestJSONError) throws -> PreconditionFailedException { - let reader = baseError.errorBodyReader - var value = PreconditionFailedException() - value.properties.code = try reader["code"].readIfPresent() - value.properties.message = try reader["message"].readIfPresent() - value.httpResponse = baseError.httpResponse - value.requestID = baseError.requestID - value.message = baseError.message - return value - } -} - -extension RangeNotSatisfiableException { - - static func makeError(baseError: AWSClientRuntime.RestJSONError) throws -> RangeNotSatisfiableException { - let reader = baseError.errorBodyReader - var value = RangeNotSatisfiableException() - value.properties.code = try reader["code"].readIfPresent() - value.properties.message = try reader["message"].readIfPresent() - value.httpResponse = baseError.httpResponse - value.requestID = baseError.requestID - value.message = baseError.message - return value - } -} - -extension IoT1ClickDevicesClientTypes.DeviceDescription { - - static func read(from reader: SmithyJSON.Reader) throws -> IoT1ClickDevicesClientTypes.DeviceDescription { - guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } - var value = IoT1ClickDevicesClientTypes.DeviceDescription() - value.arn = try reader["arn"].readIfPresent() - value.attributes = try reader["attributes"].readMapIfPresent(valueReadingClosure: SmithyReadWrite.ReadingClosures.readString(from:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) - value.deviceId = try reader["deviceId"].readIfPresent() - value.enabled = try reader["enabled"].readIfPresent() - value.remainingLife = try reader["remainingLife"].readIfPresent() - value.type = try reader["type"].readIfPresent() - value.tags = try reader["tags"].readMapIfPresent(valueReadingClosure: SmithyReadWrite.ReadingClosures.readString(from:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) - return value - } -} - -extension IoT1ClickDevicesClientTypes.DeviceMethod { - - static func write(value: IoT1ClickDevicesClientTypes.DeviceMethod?, to writer: SmithyJSON.Writer) throws { - guard let value else { return } - try writer["deviceType"].write(value.deviceType) - try writer["methodName"].write(value.methodName) - } - - static func read(from reader: SmithyJSON.Reader) throws -> IoT1ClickDevicesClientTypes.DeviceMethod { - guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } - var value = IoT1ClickDevicesClientTypes.DeviceMethod() - value.deviceType = try reader["deviceType"].readIfPresent() - value.methodName = try reader["methodName"].readIfPresent() - return value - } -} - -extension IoT1ClickDevicesClientTypes.DeviceEvent { - - static func read(from reader: SmithyJSON.Reader) throws -> IoT1ClickDevicesClientTypes.DeviceEvent { - guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } - var value = IoT1ClickDevicesClientTypes.DeviceEvent() - value.device = try reader["device"].readIfPresent(with: IoT1ClickDevicesClientTypes.Device.read(from:)) - value.stdEvent = try reader["stdEvent"].readIfPresent() - return value - } -} - -extension IoT1ClickDevicesClientTypes.Device { - - static func read(from reader: SmithyJSON.Reader) throws -> IoT1ClickDevicesClientTypes.Device { - guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } - var value = IoT1ClickDevicesClientTypes.Device() - value.attributes = try reader["attributes"].readIfPresent(with: IoT1ClickDevicesClientTypes.Attributes.read(from:)) - value.deviceId = try reader["deviceId"].readIfPresent() - value.type = try reader["type"].readIfPresent() - return value - } -} - -extension IoT1ClickDevicesClientTypes.Attributes { - - static func read(from reader: SmithyJSON.Reader) throws -> IoT1ClickDevicesClientTypes.Attributes { - guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } - return IoT1ClickDevicesClientTypes.Attributes() - } -} - -public enum IoT1ClickDevicesClientTypes {} diff --git a/Sources/Services/AWSIoT1ClickDevicesService/Sources/AWSIoT1ClickDevicesService/Plugins.swift b/Sources/Services/AWSIoT1ClickDevicesService/Sources/AWSIoT1ClickDevicesService/Plugins.swift deleted file mode 100644 index 541ecf1c0f5..00000000000 --- a/Sources/Services/AWSIoT1ClickDevicesService/Sources/AWSIoT1ClickDevicesService/Plugins.swift +++ /dev/null @@ -1,82 +0,0 @@ -// -// Copyright Amazon.com Inc. or its affiliates. -// All Rights Reserved. -// -// SPDX-License-Identifier: Apache-2.0 -// - -// Code generated by smithy-swift-codegen. DO NOT EDIT! - -import class AWSClientRuntime.AWSClientConfigDefaultsProvider -import protocol ClientRuntime.ClientConfiguration -import protocol ClientRuntime.Plugin -import protocol SmithyHTTPAuthAPI.AuthSchemeResolver -import protocol SmithyIdentity.AWSCredentialIdentityResolver -import protocol SmithyIdentity.BearerTokenIdentityResolver -import struct AWSSDKHTTPAuth.SigV4AuthScheme -import struct SmithyIdentity.BearerTokenIdentity -import struct SmithyIdentity.StaticBearerTokenIdentityResolver -import typealias SmithyHTTPAuthAPI.AuthSchemes - -public class IoT1ClickDevicesClientEndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if let config = clientConfiguration as? IoT1ClickDevicesClient.IoT1ClickDevicesClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - -public class DefaultAWSAuthSchemePlugin: ClientRuntime.Plugin { - - public init() {} - - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if let config = clientConfiguration as? IoT1ClickDevicesClient.IoT1ClickDevicesClientConfiguration { - config.authSchemeResolver = DefaultIoT1ClickDevicesServiceAuthSchemeResolver() - config.authSchemes = [AWSSDKHTTPAuth.SigV4AuthScheme()] - config.awsCredentialIdentityResolver = try AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() - config.bearerTokenIdentityResolver = SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")) - } - } -} - -public class IoT1ClickDevicesClientAuthSchemePlugin: ClientRuntime.Plugin { - private var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - private var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? - private var awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? - private var bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? - - public init(authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: IoT1ClickDevicesServiceAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil) { - self.authSchemeResolver = authSchemeResolver - self.authSchemes = authSchemes - self.awsCredentialIdentityResolver = awsCredentialIdentityResolver - self.bearerTokenIdentityResolver = bearerTokenIdentityResolver - } - - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if let config = clientConfiguration as? IoT1ClickDevicesClient.IoT1ClickDevicesClientConfiguration { - if (self.authSchemes != nil) { - config.authSchemes = self.authSchemes - } - if (self.authSchemeResolver != nil) { - config.authSchemeResolver = self.authSchemeResolver! - } - if (self.awsCredentialIdentityResolver != nil) { - config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! - } - if (self.bearerTokenIdentityResolver != nil) { - config.bearerTokenIdentityResolver = self.bearerTokenIdentityResolver! - } - } - } -} diff --git a/Sources/Services/AWSIoT1ClickDevicesService/Tests/AWSIoT1ClickDevicesServiceTests/EndpointResolverTest.swift b/Sources/Services/AWSIoT1ClickDevicesService/Tests/AWSIoT1ClickDevicesServiceTests/EndpointResolverTest.swift deleted file mode 100644 index 76c98e220d0..00000000000 --- a/Sources/Services/AWSIoT1ClickDevicesService/Tests/AWSIoT1ClickDevicesServiceTests/EndpointResolverTest.swift +++ /dev/null @@ -1,516 +0,0 @@ -// -// Copyright Amazon.com Inc. or its affiliates. -// All Rights Reserved. -// -// SPDX-License-Identifier: Apache-2.0 -// - -// Code generated by smithy-swift-codegen. DO NOT EDIT! - -@testable import AWSIoT1ClickDevicesService -import XCTest -import enum ClientRuntime.EndpointError -import enum SmithyTestUtil.TestInitializer -import struct SmithyHTTPAPI.Endpoint -import struct SmithyHTTPAPI.Headers - -class EndpointResolverTest: XCTestCase { - - override class func setUp() { - SmithyTestUtil.TestInitializer.initialize() - } - - /// For region us-east-1 with FIPS enabled and DualStack enabled - func testResolve1() throws { - let endpointParams = EndpointParams( - region: "us-east-1", - useDualStack: true, - useFIPS: true - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://devices.iot1click-fips.us-east-1.api.aws", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region us-east-1 with FIPS enabled and DualStack disabled - func testResolve2() throws { - let endpointParams = EndpointParams( - region: "us-east-1", - useDualStack: false, - useFIPS: true - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://devices.iot1click-fips.us-east-1.amazonaws.com", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region us-east-1 with FIPS disabled and DualStack enabled - func testResolve3() throws { - let endpointParams = EndpointParams( - region: "us-east-1", - useDualStack: true, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://devices.iot1click.us-east-1.api.aws", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region us-east-1 with FIPS disabled and DualStack disabled - func testResolve4() throws { - let endpointParams = EndpointParams( - region: "us-east-1", - useDualStack: false, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://devices.iot1click.us-east-1.amazonaws.com", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region cn-north-1 with FIPS enabled and DualStack enabled - func testResolve5() throws { - let endpointParams = EndpointParams( - region: "cn-north-1", - useDualStack: true, - useFIPS: true - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://devices.iot1click-fips.cn-north-1.api.amazonwebservices.com.cn", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region cn-north-1 with FIPS enabled and DualStack disabled - func testResolve6() throws { - let endpointParams = EndpointParams( - region: "cn-north-1", - useDualStack: false, - useFIPS: true - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://devices.iot1click-fips.cn-north-1.amazonaws.com.cn", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region cn-north-1 with FIPS disabled and DualStack enabled - func testResolve7() throws { - let endpointParams = EndpointParams( - region: "cn-north-1", - useDualStack: true, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://devices.iot1click.cn-north-1.api.amazonwebservices.com.cn", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region cn-north-1 with FIPS disabled and DualStack disabled - func testResolve8() throws { - let endpointParams = EndpointParams( - region: "cn-north-1", - useDualStack: false, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://devices.iot1click.cn-north-1.amazonaws.com.cn", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region us-gov-east-1 with FIPS enabled and DualStack enabled - func testResolve9() throws { - let endpointParams = EndpointParams( - region: "us-gov-east-1", - useDualStack: true, - useFIPS: true - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://devices.iot1click-fips.us-gov-east-1.api.aws", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region us-gov-east-1 with FIPS enabled and DualStack disabled - func testResolve10() throws { - let endpointParams = EndpointParams( - region: "us-gov-east-1", - useDualStack: false, - useFIPS: true - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://devices.iot1click-fips.us-gov-east-1.amazonaws.com", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region us-gov-east-1 with FIPS disabled and DualStack enabled - func testResolve11() throws { - let endpointParams = EndpointParams( - region: "us-gov-east-1", - useDualStack: true, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://devices.iot1click.us-gov-east-1.api.aws", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region us-gov-east-1 with FIPS disabled and DualStack disabled - func testResolve12() throws { - let endpointParams = EndpointParams( - region: "us-gov-east-1", - useDualStack: false, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://devices.iot1click.us-gov-east-1.amazonaws.com", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region us-iso-east-1 with FIPS enabled and DualStack enabled - func testResolve13() throws { - let endpointParams = EndpointParams( - region: "us-iso-east-1", - useDualStack: true, - useFIPS: true - ) - let resolver = try DefaultEndpointResolver() - - XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in - switch error { - case ClientRuntime.EndpointError.unresolved(let message): - XCTAssertEqual("FIPS and DualStack are enabled, but this partition does not support one or both", message) - default: - XCTFail() - } - } - } - - /// For region us-iso-east-1 with FIPS enabled and DualStack disabled - func testResolve14() throws { - let endpointParams = EndpointParams( - region: "us-iso-east-1", - useDualStack: false, - useFIPS: true - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://devices.iot1click-fips.us-iso-east-1.c2s.ic.gov", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region us-iso-east-1 with FIPS disabled and DualStack enabled - func testResolve15() throws { - let endpointParams = EndpointParams( - region: "us-iso-east-1", - useDualStack: true, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in - switch error { - case ClientRuntime.EndpointError.unresolved(let message): - XCTAssertEqual("DualStack is enabled but this partition does not support DualStack", message) - default: - XCTFail() - } - } - } - - /// For region us-iso-east-1 with FIPS disabled and DualStack disabled - func testResolve16() throws { - let endpointParams = EndpointParams( - region: "us-iso-east-1", - useDualStack: false, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://devices.iot1click.us-iso-east-1.c2s.ic.gov", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region us-isob-east-1 with FIPS enabled and DualStack enabled - func testResolve17() throws { - let endpointParams = EndpointParams( - region: "us-isob-east-1", - useDualStack: true, - useFIPS: true - ) - let resolver = try DefaultEndpointResolver() - - XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in - switch error { - case ClientRuntime.EndpointError.unresolved(let message): - XCTAssertEqual("FIPS and DualStack are enabled, but this partition does not support one or both", message) - default: - XCTFail() - } - } - } - - /// For region us-isob-east-1 with FIPS enabled and DualStack disabled - func testResolve18() throws { - let endpointParams = EndpointParams( - region: "us-isob-east-1", - useDualStack: false, - useFIPS: true - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://devices.iot1click-fips.us-isob-east-1.sc2s.sgov.gov", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region us-isob-east-1 with FIPS disabled and DualStack enabled - func testResolve19() throws { - let endpointParams = EndpointParams( - region: "us-isob-east-1", - useDualStack: true, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in - switch error { - case ClientRuntime.EndpointError.unresolved(let message): - XCTAssertEqual("DualStack is enabled but this partition does not support DualStack", message) - default: - XCTFail() - } - } - } - - /// For region us-isob-east-1 with FIPS disabled and DualStack disabled - func testResolve20() throws { - let endpointParams = EndpointParams( - region: "us-isob-east-1", - useDualStack: false, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://devices.iot1click.us-isob-east-1.sc2s.sgov.gov", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For custom endpoint with region set and fips disabled and dualstack disabled - func testResolve21() throws { - let endpointParams = EndpointParams( - endpoint: "https://example.com", - region: "us-east-1", - useDualStack: false, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://example.com", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For custom endpoint with region not set and fips disabled and dualstack disabled - func testResolve22() throws { - let endpointParams = EndpointParams( - endpoint: "https://example.com", - useDualStack: false, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://example.com", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For custom endpoint with fips enabled and dualstack disabled - func testResolve23() throws { - let endpointParams = EndpointParams( - endpoint: "https://example.com", - region: "us-east-1", - useDualStack: false, - useFIPS: true - ) - let resolver = try DefaultEndpointResolver() - - XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in - switch error { - case ClientRuntime.EndpointError.unresolved(let message): - XCTAssertEqual("Invalid Configuration: FIPS and custom endpoint are not supported", message) - default: - XCTFail() - } - } - } - - /// For custom endpoint with fips disabled and dualstack enabled - func testResolve24() throws { - let endpointParams = EndpointParams( - endpoint: "https://example.com", - region: "us-east-1", - useDualStack: true, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in - switch error { - case ClientRuntime.EndpointError.unresolved(let message): - XCTAssertEqual("Invalid Configuration: Dualstack and custom endpoint are not supported", message) - default: - XCTFail() - } - } - } - - /// Missing region - func testResolve25() throws { - let endpointParams = EndpointParams( - ) - let resolver = try DefaultEndpointResolver() - - XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in - switch error { - case ClientRuntime.EndpointError.unresolved(let message): - XCTAssertEqual("Invalid Configuration: Missing Region", message) - default: - XCTFail() - } - } - } - -} diff --git a/Sources/Services/AWSIoT1ClickProjects/Package.swift.txt b/Sources/Services/AWSIoT1ClickProjects/Package.swift.txt deleted file mode 100644 index 24b670f6022..00000000000 --- a/Sources/Services/AWSIoT1ClickProjects/Package.swift.txt +++ /dev/null @@ -1,96 +0,0 @@ -// swift-tools-version: 5.9.0 - -import PackageDescription - -let package = Package( - name: "AWSIoT1ClickProjects", - platforms: [ - .macOS(.v10_15), .iOS(.v13) - ], - products: [ - .library(name: "AWSIoT1ClickProjects", targets: ["AWSIoT1ClickProjects"]) - ], - dependencies: [ - .package( - id: "aws-sdk-swift.AWSClientRuntime", - exact: "0.0.1" - ), - .package( - id: "aws-sdk-swift.AWSSDKHTTPAuth", - exact: "0.0.1" - ), - .package( - url: "https://github.com/smithy-lang/smithy-swift", - exact: "0.0.1" - ), - ], - targets: [ - .target( - name: "AWSIoT1ClickProjects", - dependencies: [ - .product( - name: "AWSClientRuntime", - package: "aws-sdk-swift.AWSClientRuntime" - ), - .product( - name: "AWSSDKHTTPAuth", - package: "aws-sdk-swift.AWSSDKHTTPAuth" - ), - .product( - name: "SmithyHTTPAuthAPI", - package: "smithy-swift" - ), - .product( - name: "Smithy", - package: "smithy-swift" - ), - .product( - name: "ClientRuntime", - package: "smithy-swift" - ), - .product( - name: "SmithyHTTPAPI", - package: "smithy-swift" - ), - .product( - name: "SmithyIdentity", - package: "smithy-swift" - ), - .product( - name: "SmithyRetriesAPI", - package: "smithy-swift" - ), - .product( - name: "SmithyJSON", - package: "smithy-swift" - ), - .product( - name: "SmithyReadWrite", - package: "smithy-swift" - ), - .product( - name: "SmithyRetries", - package: "smithy-swift" - ), - .product( - name: "SmithyTimestamps", - package: "smithy-swift" - ), - .product( - name: "SmithyTestUtil", - package: "smithy-swift" - ), - ] - ), - .testTarget( - name: "AWSIoT1ClickProjectsTests", - dependencies: [ - "AWSIoT1ClickProjects", - .product( - name: "SmithyTestUtil", - package: "smithy-swift" - ), - ] - ) - ] -) diff --git a/Sources/Services/AWSIoT1ClickProjects/Sources/AWSIoT1ClickProjects/AuthSchemeResolver.swift b/Sources/Services/AWSIoT1ClickProjects/Sources/AWSIoT1ClickProjects/AuthSchemeResolver.swift deleted file mode 100644 index 34235d8c84a..00000000000 --- a/Sources/Services/AWSIoT1ClickProjects/Sources/AWSIoT1ClickProjects/AuthSchemeResolver.swift +++ /dev/null @@ -1,56 +0,0 @@ -// -// Copyright Amazon.com Inc. or its affiliates. -// All Rights Reserved. -// -// SPDX-License-Identifier: Apache-2.0 -// - -// Code generated by smithy-swift-codegen. DO NOT EDIT! - -import class Smithy.Context -import enum Smithy.ClientError -import enum SmithyHTTPAuthAPI.SigningPropertyKeys -import protocol SmithyHTTPAuthAPI.AuthSchemeResolver -import protocol SmithyHTTPAuthAPI.AuthSchemeResolverParameters -import struct SmithyHTTPAuthAPI.AuthOption - -public struct IoT1ClickProjectsAuthSchemeResolverParameters: SmithyHTTPAuthAPI.AuthSchemeResolverParameters { - public let operation: Swift.String - // Region is used for SigV4 auth scheme - public let region: Swift.String? -} - -public protocol IoT1ClickProjectsAuthSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver { - // Intentionally empty. - // This is the parent protocol that all auth scheme resolver implementations of - // the service IoT1ClickProjects must conform to. -} - -public struct DefaultIoT1ClickProjectsAuthSchemeResolver: IoT1ClickProjectsAuthSchemeResolver { - - public func resolveAuthScheme(params: SmithyHTTPAuthAPI.AuthSchemeResolverParameters) throws -> [SmithyHTTPAuthAPI.AuthOption] { - var validAuthOptions = [SmithyHTTPAuthAPI.AuthOption]() - guard let serviceParams = params as? IoT1ClickProjectsAuthSchemeResolverParameters else { - throw Smithy.ClientError.authError("Service specific auth scheme parameters type must be passed to auth scheme resolver.") - } - switch serviceParams.operation { - default: - var sigV4Option = SmithyHTTPAuthAPI.AuthOption(schemeID: "aws.auth#sigv4") - sigV4Option.signingProperties.set(key: SmithyHTTPAuthAPI.SigningPropertyKeys.signingName, value: "iot1click") - guard let region = serviceParams.region else { - throw Smithy.ClientError.authError("Missing region in auth scheme parameters for SigV4 auth scheme.") - } - sigV4Option.signingProperties.set(key: SmithyHTTPAuthAPI.SigningPropertyKeys.signingRegion, value: region) - validAuthOptions.append(sigV4Option) - } - return validAuthOptions - } - - public func constructParameters(context: Smithy.Context) throws -> SmithyHTTPAuthAPI.AuthSchemeResolverParameters { - guard let opName = context.getOperation() else { - throw Smithy.ClientError.dataNotFound("Operation name not configured in middleware context for auth scheme resolver params construction.") - } - let opRegion = context.getRegion() - return IoT1ClickProjectsAuthSchemeResolverParameters(operation: opName, region: opRegion) - } -} diff --git a/Sources/Services/AWSIoT1ClickProjects/Sources/AWSIoT1ClickProjects/Endpoints.swift b/Sources/Services/AWSIoT1ClickProjects/Sources/AWSIoT1ClickProjects/Endpoints.swift deleted file mode 100644 index 987d6d88503..00000000000 --- a/Sources/Services/AWSIoT1ClickProjects/Sources/AWSIoT1ClickProjects/Endpoints.swift +++ /dev/null @@ -1,73 +0,0 @@ -// -// Copyright Amazon.com Inc. or its affiliates. -// All Rights Reserved. -// -// SPDX-License-Identifier: Apache-2.0 -// - -// Code generated by smithy-swift-codegen. DO NOT EDIT! - -import class ClientRuntime.EndpointsRequestContext -import let AWSClientRuntime.awsPartitionJSON -import protocol ClientRuntime.EndpointsRequestContextProviding -import struct ClientRuntime.DefaultEndpointResolver -import struct ClientRuntime.StaticEndpointResolver -import struct SmithyHTTPAPI.Endpoint - -public struct EndpointParams { - /// Override the endpoint used to send this request - public let endpoint: Swift.String? - /// The AWS region used to dispatch the request. - public let region: Swift.String? - /// When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error. - public let useDualStack: Swift.Bool - /// When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error. - public let useFIPS: Swift.Bool - - public init( - endpoint: Swift.String? = nil, - region: Swift.String? = nil, - useDualStack: Swift.Bool = false, - useFIPS: Swift.Bool = false - ) - { - self.endpoint = endpoint - self.region = region - self.useDualStack = useDualStack - self.useFIPS = useFIPS - } -} - -extension EndpointParams: ClientRuntime.EndpointsRequestContextProviding { - - public var context: ClientRuntime.EndpointsRequestContext { - get throws { - let context = try ClientRuntime.EndpointsRequestContext() - try context.add(name: "Endpoint", value: self.endpoint) - try context.add(name: "Region", value: self.region) - try context.add(name: "UseDualStack", value: self.useDualStack) - try context.add(name: "UseFIPS", value: self.useFIPS) - return context - } - } -} - -public protocol EndpointResolver { - func resolve(params: EndpointParams) throws -> SmithyHTTPAPI.Endpoint -} - -typealias DefaultEndpointResolver = ClientRuntime.DefaultEndpointResolver - -extension DefaultEndpointResolver { - private static let ruleSet = "{\"version\":\"1.0\",\"parameters\":{\"Region\":{\"builtIn\":\"AWS::Region\",\"required\":false,\"documentation\":\"The AWS region used to dispatch the request.\",\"type\":\"String\"},\"UseDualStack\":{\"builtIn\":\"AWS::UseDualStack\",\"required\":true,\"default\":false,\"documentation\":\"When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.\",\"type\":\"Boolean\"},\"UseFIPS\":{\"builtIn\":\"AWS::UseFIPS\",\"required\":true,\"default\":false,\"documentation\":\"When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.\",\"type\":\"Boolean\"},\"Endpoint\":{\"builtIn\":\"SDK::Endpoint\",\"required\":false,\"documentation\":\"Override the endpoint used to send this request\",\"type\":\"String\"}},\"rules\":[{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Endpoint\"}]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]}],\"error\":\"Invalid Configuration: FIPS and custom endpoint are not supported\",\"type\":\"error\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"error\":\"Invalid Configuration: Dualstack and custom endpoint are not supported\",\"type\":\"error\"},{\"conditions\":[],\"endpoint\":{\"url\":{\"ref\":\"Endpoint\"},\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"isSet\",\"argv\":[{\"ref\":\"Region\"}]}],\"rules\":[{\"conditions\":[{\"fn\":\"aws.partition\",\"argv\":[{\"ref\":\"Region\"}],\"assign\":\"PartitionResult\"}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]},{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[true,{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsFIPS\"]}]},{\"fn\":\"booleanEquals\",\"argv\":[true,{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsDualStack\"]}]}],\"rules\":[{\"conditions\":[],\"endpoint\":{\"url\":\"https://projects.iot1click-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"FIPS and DualStack are enabled, but this partition does not support one or both\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseFIPS\"},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsFIPS\"]},true]}],\"rules\":[{\"conditions\":[],\"endpoint\":{\"url\":\"https://projects.iot1click-fips.{Region}.{PartitionResult#dnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"FIPS is enabled but this partition does not support FIPS\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[{\"ref\":\"UseDualStack\"},true]}],\"rules\":[{\"conditions\":[{\"fn\":\"booleanEquals\",\"argv\":[true,{\"fn\":\"getAttr\",\"argv\":[{\"ref\":\"PartitionResult\"},\"supportsDualStack\"]}]}],\"rules\":[{\"conditions\":[],\"endpoint\":{\"url\":\"https://projects.iot1click.{Region}.{PartitionResult#dualStackDnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"DualStack is enabled but this partition does not support DualStack\",\"type\":\"error\"}],\"type\":\"tree\"},{\"conditions\":[],\"endpoint\":{\"url\":\"https://projects.iot1click.{Region}.{PartitionResult#dnsSuffix}\",\"properties\":{},\"headers\":{}},\"type\":\"endpoint\"}],\"type\":\"tree\"}],\"type\":\"tree\"},{\"conditions\":[],\"error\":\"Invalid Configuration: Missing Region\",\"type\":\"error\"}]}" - - init() throws { - try self.init(partitions: AWSClientRuntime.awsPartitionJSON, ruleSet: Self.ruleSet) - } -} - -extension DefaultEndpointResolver: EndpointResolver {} - -typealias StaticEndpointResolver = ClientRuntime.StaticEndpointResolver - -extension StaticEndpointResolver: EndpointResolver {} diff --git a/Sources/Services/AWSIoT1ClickProjects/Sources/AWSIoT1ClickProjects/IoT1ClickProjectsClient.swift b/Sources/Services/AWSIoT1ClickProjects/Sources/AWSIoT1ClickProjects/IoT1ClickProjectsClient.swift deleted file mode 100644 index 4e441989323..00000000000 --- a/Sources/Services/AWSIoT1ClickProjects/Sources/AWSIoT1ClickProjects/IoT1ClickProjectsClient.swift +++ /dev/null @@ -1,1447 +0,0 @@ -// -// Copyright Amazon.com Inc. or its affiliates. -// All Rights Reserved. -// -// SPDX-License-Identifier: Apache-2.0 -// - -// Code generated by smithy-swift-codegen. DO NOT EDIT! - -import class AWSClientRuntime.AWSClientConfigDefaultsProvider -import class AWSClientRuntime.AmzSdkRequestMiddleware -import class AWSClientRuntime.DefaultAWSClientPlugin -import class ClientRuntime.ClientBuilder -import class ClientRuntime.DefaultClientPlugin -import class ClientRuntime.HttpClientConfiguration -import class ClientRuntime.OrchestratorBuilder -import class ClientRuntime.OrchestratorTelemetry -import class ClientRuntime.SdkHttpClient -import class Smithy.ContextBuilder -import class SmithyHTTPAPI.HTTPRequest -import class SmithyHTTPAPI.HTTPResponse -@_spi(SmithyReadWrite) import class SmithyJSON.Writer -import enum AWSClientRuntime.AWSRetryErrorInfoProvider -import enum AWSClientRuntime.AWSRetryMode -import enum ClientRuntime.ClientLogMode -import enum ClientRuntime.DefaultTelemetry -import enum ClientRuntime.OrchestratorMetricsAttributesKeys -import protocol AWSClientRuntime.AWSDefaultClientConfiguration -import protocol AWSClientRuntime.AWSRegionClientConfiguration -import protocol ClientRuntime.Client -import protocol ClientRuntime.DefaultClientConfiguration -import protocol ClientRuntime.DefaultHttpClientConfiguration -import protocol ClientRuntime.HttpInterceptorProvider -import protocol ClientRuntime.IdempotencyTokenGenerator -import protocol ClientRuntime.InterceptorProvider -import protocol ClientRuntime.TelemetryProvider -import protocol Smithy.LogAgent -import protocol SmithyHTTPAPI.HTTPClient -import protocol SmithyHTTPAuthAPI.AuthSchemeResolver -import protocol SmithyIdentity.AWSCredentialIdentityResolver -import protocol SmithyIdentity.BearerTokenIdentityResolver -@_spi(SmithyReadWrite) import protocol SmithyReadWrite.SmithyWriter -import struct AWSClientRuntime.AmzSdkInvocationIdMiddleware -import struct AWSClientRuntime.EndpointResolverMiddleware -import struct AWSClientRuntime.UserAgentMiddleware -import struct AWSSDKHTTPAuth.SigV4AuthScheme -import struct ClientRuntime.AuthSchemeMiddleware -@_spi(SmithyReadWrite) import struct ClientRuntime.BodyMiddleware -import struct ClientRuntime.ContentLengthMiddleware -import struct ClientRuntime.ContentTypeMiddleware -@_spi(SmithyReadWrite) import struct ClientRuntime.DeserializeMiddleware -import struct ClientRuntime.LoggerMiddleware -import struct ClientRuntime.QueryItemMiddleware -import struct ClientRuntime.SignerMiddleware -import struct ClientRuntime.URLHostMiddleware -import struct ClientRuntime.URLPathMiddleware -import struct Smithy.Attributes -import struct SmithyIdentity.BearerTokenIdentity -import struct SmithyIdentity.StaticBearerTokenIdentityResolver -import struct SmithyRetries.DefaultRetryStrategy -import struct SmithyRetriesAPI.RetryStrategyOptions -import typealias SmithyHTTPAuthAPI.AuthSchemes - -public class IoT1ClickProjectsClient: ClientRuntime.Client { - public static let clientName = "IoT1ClickProjectsClient" - public static let version = "1.0.72" - let client: ClientRuntime.SdkHttpClient - let config: IoT1ClickProjectsClient.IoT1ClickProjectsClientConfiguration - let serviceName = "IoT 1Click Projects" - - public required init(config: IoT1ClickProjectsClient.IoT1ClickProjectsClientConfiguration) { - client = ClientRuntime.SdkHttpClient(engine: config.httpClientEngine, config: config.httpClientConfiguration) - self.config = config - } - - public convenience init(region: Swift.String) throws { - let config = try IoT1ClickProjectsClient.IoT1ClickProjectsClientConfiguration(region: region) - self.init(config: config) - } - - public convenience required init() async throws { - let config = try await IoT1ClickProjectsClient.IoT1ClickProjectsClientConfiguration() - self.init(config: config) - } -} - -extension IoT1ClickProjectsClient { - - public class IoT1ClickProjectsClientConfiguration: AWSClientRuntime.AWSDefaultClientConfiguration & AWSClientRuntime.AWSRegionClientConfiguration & ClientRuntime.DefaultClientConfiguration & ClientRuntime.DefaultHttpClientConfiguration { - public var useFIPS: Swift.Bool? - public var useDualStack: Swift.Bool? - public var appID: Swift.String? - public var awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver - public var awsRetryMode: AWSClientRuntime.AWSRetryMode - public var maxAttempts: Swift.Int? - public var region: Swift.String? - public var signingRegion: Swift.String? - public var endpointResolver: EndpointResolver - public var telemetryProvider: ClientRuntime.TelemetryProvider - public var retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions - public var clientLogMode: ClientRuntime.ClientLogMode - public var endpoint: Swift.String? - public var idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator - public var httpClientEngine: SmithyHTTPAPI.HTTPClient - public var httpClientConfiguration: ClientRuntime.HttpClientConfiguration - public var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - public var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver - public var bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver - public private(set) var interceptorProviders: [ClientRuntime.InterceptorProvider] - public private(set) var httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - internal let logger: Smithy.LogAgent - - private init( - _ useFIPS: Swift.Bool?, - _ useDualStack: Swift.Bool?, - _ appID: Swift.String?, - _ awsCredentialIdentityResolver: any SmithyIdentity.AWSCredentialIdentityResolver, - _ awsRetryMode: AWSClientRuntime.AWSRetryMode, - _ maxAttempts: Swift.Int?, - _ region: Swift.String?, - _ signingRegion: Swift.String?, - _ endpointResolver: EndpointResolver, - _ telemetryProvider: ClientRuntime.TelemetryProvider, - _ retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions, - _ clientLogMode: ClientRuntime.ClientLogMode, - _ endpoint: Swift.String?, - _ idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator, - _ httpClientEngine: SmithyHTTPAPI.HTTPClient, - _ httpClientConfiguration: ClientRuntime.HttpClientConfiguration, - _ authSchemes: SmithyHTTPAuthAPI.AuthSchemes?, - _ authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver, - _ bearerTokenIdentityResolver: any SmithyIdentity.BearerTokenIdentityResolver, - _ interceptorProviders: [ClientRuntime.InterceptorProvider], - _ httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider] - ) { - self.useFIPS = useFIPS - self.useDualStack = useDualStack - self.appID = appID - self.awsCredentialIdentityResolver = awsCredentialIdentityResolver - self.awsRetryMode = awsRetryMode - self.maxAttempts = maxAttempts - self.region = region - self.signingRegion = signingRegion - self.endpointResolver = endpointResolver - self.telemetryProvider = telemetryProvider - self.retryStrategyOptions = retryStrategyOptions - self.clientLogMode = clientLogMode - self.endpoint = endpoint - self.idempotencyTokenGenerator = idempotencyTokenGenerator - self.httpClientEngine = httpClientEngine - self.httpClientConfiguration = httpClientConfiguration - self.authSchemes = authSchemes - self.authSchemeResolver = authSchemeResolver - self.bearerTokenIdentityResolver = bearerTokenIdentityResolver - self.interceptorProviders = interceptorProviders - self.httpInterceptorProviders = httpInterceptorProviders - self.logger = telemetryProvider.loggerProvider.getLogger(name: IoT1ClickProjectsClient.clientName) - } - - public convenience init( - useFIPS: Swift.Bool? = nil, - useDualStack: Swift.Bool? = nil, - appID: Swift.String? = nil, - awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, - awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, - maxAttempts: Swift.Int? = nil, - region: Swift.String? = nil, - signingRegion: Swift.String? = nil, - endpointResolver: EndpointResolver? = nil, - telemetryProvider: ClientRuntime.TelemetryProvider? = nil, - retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, - clientLogMode: ClientRuntime.ClientLogMode? = nil, - endpoint: Swift.String? = nil, - idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, - httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, - httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, - authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, - authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, - bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, - interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, - httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil - ) throws { - self.init( - useFIPS, - useDualStack, - try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), - try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), - try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), - maxAttempts, - region, - signingRegion, - try endpointResolver ?? DefaultEndpointResolver(), - telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, - try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), - clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), - endpoint, - idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), - httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), - httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), - authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], - authSchemeResolver ?? DefaultIoT1ClickProjectsAuthSchemeResolver(), - bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), - interceptorProviders ?? [], - httpInterceptorProviders ?? [] - ) - } - - public convenience init( - useFIPS: Swift.Bool? = nil, - useDualStack: Swift.Bool? = nil, - appID: Swift.String? = nil, - awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, - awsRetryMode: AWSClientRuntime.AWSRetryMode? = nil, - maxAttempts: Swift.Int? = nil, - region: Swift.String? = nil, - signingRegion: Swift.String? = nil, - endpointResolver: EndpointResolver? = nil, - telemetryProvider: ClientRuntime.TelemetryProvider? = nil, - retryStrategyOptions: SmithyRetriesAPI.RetryStrategyOptions? = nil, - clientLogMode: ClientRuntime.ClientLogMode? = nil, - endpoint: Swift.String? = nil, - idempotencyTokenGenerator: ClientRuntime.IdempotencyTokenGenerator? = nil, - httpClientEngine: SmithyHTTPAPI.HTTPClient? = nil, - httpClientConfiguration: ClientRuntime.HttpClientConfiguration? = nil, - authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, - authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? = nil, - bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil, - interceptorProviders: [ClientRuntime.InterceptorProvider]? = nil, - httpInterceptorProviders: [ClientRuntime.HttpInterceptorProvider]? = nil - ) async throws { - self.init( - useFIPS, - useDualStack, - try appID ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), - try awsCredentialIdentityResolver ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(awsCredentialIdentityResolver), - try awsRetryMode ?? AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), - maxAttempts, - try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), - try await AWSClientRuntime.AWSClientConfigDefaultsProvider.region(region), - try endpointResolver ?? DefaultEndpointResolver(), - telemetryProvider ?? ClientRuntime.DefaultTelemetry.provider, - try retryStrategyOptions ?? AWSClientConfigDefaultsProvider.retryStrategyOptions(awsRetryMode, maxAttempts), - clientLogMode ?? AWSClientConfigDefaultsProvider.clientLogMode(), - endpoint, - idempotencyTokenGenerator ?? AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), - httpClientEngine ?? AWSClientConfigDefaultsProvider.httpClientEngine(), - httpClientConfiguration ?? AWSClientConfigDefaultsProvider.httpClientConfiguration(), - authSchemes ?? [AWSSDKHTTPAuth.SigV4AuthScheme()], - authSchemeResolver ?? DefaultIoT1ClickProjectsAuthSchemeResolver(), - bearerTokenIdentityResolver ?? SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), - interceptorProviders ?? [], - httpInterceptorProviders ?? [] - ) - } - - public convenience required init() async throws { - try await self.init( - useFIPS: nil, - useDualStack: nil, - appID: nil, - awsCredentialIdentityResolver: nil, - awsRetryMode: nil, - maxAttempts: nil, - region: nil, - signingRegion: nil, - endpointResolver: nil, - telemetryProvider: nil, - retryStrategyOptions: nil, - clientLogMode: nil, - endpoint: nil, - idempotencyTokenGenerator: nil, - httpClientEngine: nil, - httpClientConfiguration: nil, - authSchemes: nil, - authSchemeResolver: nil, - bearerTokenIdentityResolver: nil, - interceptorProviders: nil, - httpInterceptorProviders: nil - ) - } - - public convenience init(region: Swift.String) throws { - self.init( - nil, - nil, - try AWSClientRuntime.AWSClientConfigDefaultsProvider.appID(), - try AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver(), - try AWSClientRuntime.AWSClientConfigDefaultsProvider.retryMode(), - nil, - region, - region, - try DefaultEndpointResolver(), - ClientRuntime.DefaultTelemetry.provider, - try AWSClientConfigDefaultsProvider.retryStrategyOptions(), - AWSClientConfigDefaultsProvider.clientLogMode(), - nil, - AWSClientConfigDefaultsProvider.idempotencyTokenGenerator(), - AWSClientConfigDefaultsProvider.httpClientEngine(), - AWSClientConfigDefaultsProvider.httpClientConfiguration(), - [AWSSDKHTTPAuth.SigV4AuthScheme()], - DefaultIoT1ClickProjectsAuthSchemeResolver(), - SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")), - [], - [] - ) - } - - public var partitionID: String? { - return "\(IoT1ClickProjectsClient.clientName) - \(region ?? "")" - } - - public func addInterceptorProvider(_ provider: ClientRuntime.InterceptorProvider) { - self.interceptorProviders.append(provider) - } - - public func addInterceptorProvider(_ provider: ClientRuntime.HttpInterceptorProvider) { - self.httpInterceptorProviders.append(provider) - } - - } - - public static func builder() -> ClientRuntime.ClientBuilder { - return ClientRuntime.ClientBuilder(defaultPlugins: [ - ClientRuntime.DefaultClientPlugin(), - AWSClientRuntime.DefaultAWSClientPlugin(clientName: self.clientName), - DefaultAWSAuthSchemePlugin() - ]) - } -} - -extension IoT1ClickProjectsClient { - /// Performs the `AssociateDeviceWithPlacement` operation on the `AWSIoT1ClickProjects` service. - /// - /// Associates a physical device with a placement. - /// - /// - Parameter AssociateDeviceWithPlacementInput : [no documentation found] - /// - /// - Returns: `AssociateDeviceWithPlacementOutput` : [no documentation found] - /// - /// - Throws: One of the exceptions listed below __Possible Exceptions__. - /// - /// __Possible Exceptions:__ - /// - `InternalFailureException` : - /// - `InvalidRequestException` : - /// - `ResourceConflictException` : - /// - `ResourceNotFoundException` : - public func associateDeviceWithPlacement(input: AssociateDeviceWithPlacementInput) async throws -> AssociateDeviceWithPlacementOutput { - let context = Smithy.ContextBuilder() - .withMethod(value: .put) - .withServiceName(value: serviceName) - .withOperation(value: "associateDeviceWithPlacement") - .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: "iot1click") - .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(AssociateDeviceWithPlacementInput.urlPathProvider(_:))) - builder.interceptors.add(ClientRuntime.URLHostMiddleware()) - builder.interceptors.add(ClientRuntime.ContentTypeMiddleware(contentType: "application/json")) - builder.serialize(ClientRuntime.BodyMiddleware(rootNodeInfo: "", inputWritingClosure: AssociateDeviceWithPlacementInput.write(value:to:))) - builder.interceptors.add(ClientRuntime.ContentLengthMiddleware()) - builder.deserialize(ClientRuntime.DeserializeMiddleware(AssociateDeviceWithPlacementOutput.httpOutput(from:), AssociateDeviceWithPlacementOutputError.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: IoT1ClickProjectsClient.version, 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: "IoT1ClickProjects") - metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "AssociateDeviceWithPlacement") - 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 `CreatePlacement` operation on the `AWSIoT1ClickProjects` service. - /// - /// Creates an empty placement. - /// - /// - Parameter CreatePlacementInput : [no documentation found] - /// - /// - Returns: `CreatePlacementOutput` : [no documentation found] - /// - /// - Throws: One of the exceptions listed below __Possible Exceptions__. - /// - /// __Possible Exceptions:__ - /// - `InternalFailureException` : - /// - `InvalidRequestException` : - /// - `ResourceConflictException` : - /// - `ResourceNotFoundException` : - public func createPlacement(input: CreatePlacementInput) async throws -> CreatePlacementOutput { - let context = Smithy.ContextBuilder() - .withMethod(value: .post) - .withServiceName(value: serviceName) - .withOperation(value: "createPlacement") - .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: "iot1click") - .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(CreatePlacementInput.urlPathProvider(_:))) - builder.interceptors.add(ClientRuntime.URLHostMiddleware()) - builder.interceptors.add(ClientRuntime.ContentTypeMiddleware(contentType: "application/json")) - builder.serialize(ClientRuntime.BodyMiddleware(rootNodeInfo: "", inputWritingClosure: CreatePlacementInput.write(value:to:))) - builder.interceptors.add(ClientRuntime.ContentLengthMiddleware()) - builder.deserialize(ClientRuntime.DeserializeMiddleware(CreatePlacementOutput.httpOutput(from:), CreatePlacementOutputError.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: IoT1ClickProjectsClient.version, 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: "IoT1ClickProjects") - metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "CreatePlacement") - 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 `CreateProject` operation on the `AWSIoT1ClickProjects` service. - /// - /// Creates an empty project with a placement template. A project contains zero or more placements that adhere to the placement template defined in the project. - /// - /// - Parameter CreateProjectInput : [no documentation found] - /// - /// - Returns: `CreateProjectOutput` : [no documentation found] - /// - /// - Throws: One of the exceptions listed below __Possible Exceptions__. - /// - /// __Possible Exceptions:__ - /// - `InternalFailureException` : - /// - `InvalidRequestException` : - /// - `ResourceConflictException` : - public func createProject(input: CreateProjectInput) async throws -> CreateProjectOutput { - let context = Smithy.ContextBuilder() - .withMethod(value: .post) - .withServiceName(value: serviceName) - .withOperation(value: "createProject") - .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: "iot1click") - .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(CreateProjectInput.urlPathProvider(_:))) - builder.interceptors.add(ClientRuntime.URLHostMiddleware()) - builder.interceptors.add(ClientRuntime.ContentTypeMiddleware(contentType: "application/json")) - builder.serialize(ClientRuntime.BodyMiddleware(rootNodeInfo: "", inputWritingClosure: CreateProjectInput.write(value:to:))) - builder.interceptors.add(ClientRuntime.ContentLengthMiddleware()) - builder.deserialize(ClientRuntime.DeserializeMiddleware(CreateProjectOutput.httpOutput(from:), CreateProjectOutputError.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: IoT1ClickProjectsClient.version, 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: "IoT1ClickProjects") - metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "CreateProject") - 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 `DeletePlacement` operation on the `AWSIoT1ClickProjects` service. - /// - /// Deletes a placement. To delete a placement, it must not have any devices associated with it. When you delete a placement, all associated data becomes irretrievable. - /// - /// - Parameter DeletePlacementInput : [no documentation found] - /// - /// - Returns: `DeletePlacementOutput` : [no documentation found] - /// - /// - Throws: One of the exceptions listed below __Possible Exceptions__. - /// - /// __Possible Exceptions:__ - /// - `InternalFailureException` : - /// - `InvalidRequestException` : - /// - `ResourceNotFoundException` : - /// - `TooManyRequestsException` : - public func deletePlacement(input: DeletePlacementInput) async throws -> DeletePlacementOutput { - let context = Smithy.ContextBuilder() - .withMethod(value: .delete) - .withServiceName(value: serviceName) - .withOperation(value: "deletePlacement") - .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: "iot1click") - .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(DeletePlacementInput.urlPathProvider(_:))) - builder.interceptors.add(ClientRuntime.URLHostMiddleware()) - builder.deserialize(ClientRuntime.DeserializeMiddleware(DeletePlacementOutput.httpOutput(from:), DeletePlacementOutputError.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: IoT1ClickProjectsClient.version, 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: "IoT1ClickProjects") - metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "DeletePlacement") - 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 `DeleteProject` operation on the `AWSIoT1ClickProjects` service. - /// - /// Deletes a project. To delete a project, it must not have any placements associated with it. When you delete a project, all associated data becomes irretrievable. - /// - /// - Parameter DeleteProjectInput : [no documentation found] - /// - /// - Returns: `DeleteProjectOutput` : [no documentation found] - /// - /// - Throws: One of the exceptions listed below __Possible Exceptions__. - /// - /// __Possible Exceptions:__ - /// - `InternalFailureException` : - /// - `InvalidRequestException` : - /// - `ResourceNotFoundException` : - /// - `TooManyRequestsException` : - public func deleteProject(input: DeleteProjectInput) async throws -> DeleteProjectOutput { - let context = Smithy.ContextBuilder() - .withMethod(value: .delete) - .withServiceName(value: serviceName) - .withOperation(value: "deleteProject") - .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: "iot1click") - .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(DeleteProjectInput.urlPathProvider(_:))) - builder.interceptors.add(ClientRuntime.URLHostMiddleware()) - builder.deserialize(ClientRuntime.DeserializeMiddleware(DeleteProjectOutput.httpOutput(from:), DeleteProjectOutputError.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: IoT1ClickProjectsClient.version, 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: "IoT1ClickProjects") - metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "DeleteProject") - 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 `DescribePlacement` operation on the `AWSIoT1ClickProjects` service. - /// - /// Describes a placement in a project. - /// - /// - Parameter DescribePlacementInput : [no documentation found] - /// - /// - Returns: `DescribePlacementOutput` : [no documentation found] - /// - /// - Throws: One of the exceptions listed below __Possible Exceptions__. - /// - /// __Possible Exceptions:__ - /// - `InternalFailureException` : - /// - `InvalidRequestException` : - /// - `ResourceNotFoundException` : - public func describePlacement(input: DescribePlacementInput) async throws -> DescribePlacementOutput { - let context = Smithy.ContextBuilder() - .withMethod(value: .get) - .withServiceName(value: serviceName) - .withOperation(value: "describePlacement") - .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: "iot1click") - .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(DescribePlacementInput.urlPathProvider(_:))) - builder.interceptors.add(ClientRuntime.URLHostMiddleware()) - builder.deserialize(ClientRuntime.DeserializeMiddleware(DescribePlacementOutput.httpOutput(from:), DescribePlacementOutputError.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: IoT1ClickProjectsClient.version, 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: "IoT1ClickProjects") - metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "DescribePlacement") - 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 `DescribeProject` operation on the `AWSIoT1ClickProjects` service. - /// - /// Returns an object describing a project. - /// - /// - Parameter DescribeProjectInput : [no documentation found] - /// - /// - Returns: `DescribeProjectOutput` : [no documentation found] - /// - /// - Throws: One of the exceptions listed below __Possible Exceptions__. - /// - /// __Possible Exceptions:__ - /// - `InternalFailureException` : - /// - `InvalidRequestException` : - /// - `ResourceNotFoundException` : - public func describeProject(input: DescribeProjectInput) async throws -> DescribeProjectOutput { - let context = Smithy.ContextBuilder() - .withMethod(value: .get) - .withServiceName(value: serviceName) - .withOperation(value: "describeProject") - .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: "iot1click") - .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(DescribeProjectInput.urlPathProvider(_:))) - builder.interceptors.add(ClientRuntime.URLHostMiddleware()) - builder.deserialize(ClientRuntime.DeserializeMiddleware(DescribeProjectOutput.httpOutput(from:), DescribeProjectOutputError.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: IoT1ClickProjectsClient.version, 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: "IoT1ClickProjects") - metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "DescribeProject") - 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 `DisassociateDeviceFromPlacement` operation on the `AWSIoT1ClickProjects` service. - /// - /// Removes a physical device from a placement. - /// - /// - Parameter DisassociateDeviceFromPlacementInput : [no documentation found] - /// - /// - Returns: `DisassociateDeviceFromPlacementOutput` : [no documentation found] - /// - /// - Throws: One of the exceptions listed below __Possible Exceptions__. - /// - /// __Possible Exceptions:__ - /// - `InternalFailureException` : - /// - `InvalidRequestException` : - /// - `ResourceNotFoundException` : - /// - `TooManyRequestsException` : - public func disassociateDeviceFromPlacement(input: DisassociateDeviceFromPlacementInput) async throws -> DisassociateDeviceFromPlacementOutput { - let context = Smithy.ContextBuilder() - .withMethod(value: .delete) - .withServiceName(value: serviceName) - .withOperation(value: "disassociateDeviceFromPlacement") - .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: "iot1click") - .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(DisassociateDeviceFromPlacementInput.urlPathProvider(_:))) - builder.interceptors.add(ClientRuntime.URLHostMiddleware()) - builder.deserialize(ClientRuntime.DeserializeMiddleware(DisassociateDeviceFromPlacementOutput.httpOutput(from:), DisassociateDeviceFromPlacementOutputError.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: IoT1ClickProjectsClient.version, 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: "IoT1ClickProjects") - metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "DisassociateDeviceFromPlacement") - 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 `GetDevicesInPlacement` operation on the `AWSIoT1ClickProjects` service. - /// - /// Returns an object enumerating the devices in a placement. - /// - /// - Parameter GetDevicesInPlacementInput : [no documentation found] - /// - /// - Returns: `GetDevicesInPlacementOutput` : [no documentation found] - /// - /// - Throws: One of the exceptions listed below __Possible Exceptions__. - /// - /// __Possible Exceptions:__ - /// - `InternalFailureException` : - /// - `InvalidRequestException` : - /// - `ResourceNotFoundException` : - public func getDevicesInPlacement(input: GetDevicesInPlacementInput) async throws -> GetDevicesInPlacementOutput { - let context = Smithy.ContextBuilder() - .withMethod(value: .get) - .withServiceName(value: serviceName) - .withOperation(value: "getDevicesInPlacement") - .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: "iot1click") - .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(GetDevicesInPlacementInput.urlPathProvider(_:))) - builder.interceptors.add(ClientRuntime.URLHostMiddleware()) - builder.deserialize(ClientRuntime.DeserializeMiddleware(GetDevicesInPlacementOutput.httpOutput(from:), GetDevicesInPlacementOutputError.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: IoT1ClickProjectsClient.version, 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: "IoT1ClickProjects") - metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "GetDevicesInPlacement") - 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 `ListPlacements` operation on the `AWSIoT1ClickProjects` service. - /// - /// Lists the placement(s) of a project. - /// - /// - Parameter ListPlacementsInput : [no documentation found] - /// - /// - Returns: `ListPlacementsOutput` : [no documentation found] - /// - /// - Throws: One of the exceptions listed below __Possible Exceptions__. - /// - /// __Possible Exceptions:__ - /// - `InternalFailureException` : - /// - `InvalidRequestException` : - /// - `ResourceNotFoundException` : - public func listPlacements(input: ListPlacementsInput) async throws -> ListPlacementsOutput { - let context = Smithy.ContextBuilder() - .withMethod(value: .get) - .withServiceName(value: serviceName) - .withOperation(value: "listPlacements") - .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: "iot1click") - .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(ListPlacementsInput.urlPathProvider(_:))) - builder.interceptors.add(ClientRuntime.URLHostMiddleware()) - builder.serialize(ClientRuntime.QueryItemMiddleware(ListPlacementsInput.queryItemProvider(_:))) - builder.deserialize(ClientRuntime.DeserializeMiddleware(ListPlacementsOutput.httpOutput(from:), ListPlacementsOutputError.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: IoT1ClickProjectsClient.version, 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: "IoT1ClickProjects") - metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "ListPlacements") - 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 `ListProjects` operation on the `AWSIoT1ClickProjects` service. - /// - /// Lists the AWS IoT 1-Click project(s) associated with your AWS account and region. - /// - /// - Parameter ListProjectsInput : [no documentation found] - /// - /// - Returns: `ListProjectsOutput` : [no documentation found] - /// - /// - Throws: One of the exceptions listed below __Possible Exceptions__. - /// - /// __Possible Exceptions:__ - /// - `InternalFailureException` : - /// - `InvalidRequestException` : - public func listProjects(input: ListProjectsInput) async throws -> ListProjectsOutput { - let context = Smithy.ContextBuilder() - .withMethod(value: .get) - .withServiceName(value: serviceName) - .withOperation(value: "listProjects") - .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: "iot1click") - .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(ListProjectsInput.urlPathProvider(_:))) - builder.interceptors.add(ClientRuntime.URLHostMiddleware()) - builder.serialize(ClientRuntime.QueryItemMiddleware(ListProjectsInput.queryItemProvider(_:))) - builder.deserialize(ClientRuntime.DeserializeMiddleware(ListProjectsOutput.httpOutput(from:), ListProjectsOutputError.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: IoT1ClickProjectsClient.version, 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: "IoT1ClickProjects") - metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "ListProjects") - 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 `AWSIoT1ClickProjects` service. - /// - /// Lists the tags (metadata key/value pairs) which you have assigned to the resource. - /// - /// - Parameter ListTagsForResourceInput : [no documentation found] - /// - /// - Returns: `ListTagsForResourceOutput` : [no documentation found] - /// - /// - Throws: One of the exceptions listed below __Possible Exceptions__. - /// - /// __Possible Exceptions:__ - /// - `InternalFailureException` : - /// - `InvalidRequestException` : - /// - `ResourceNotFoundException` : - public func listTagsForResource(input: ListTagsForResourceInput) async throws -> ListTagsForResourceOutput { - let context = Smithy.ContextBuilder() - .withMethod(value: .get) - .withServiceName(value: serviceName) - .withOperation(value: "listTagsForResource") - .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: "iot1click") - .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(ListTagsForResourceInput.urlPathProvider(_:))) - builder.interceptors.add(ClientRuntime.URLHostMiddleware()) - builder.deserialize(ClientRuntime.DeserializeMiddleware(ListTagsForResourceOutput.httpOutput(from:), ListTagsForResourceOutputError.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: IoT1ClickProjectsClient.version, 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: "IoT1ClickProjects") - metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "ListTagsForResource") - 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 `TagResource` operation on the `AWSIoT1ClickProjects` service. - /// - /// Creates or modifies tags for a resource. Tags are key/value pairs (metadata) that can be used to manage a resource. For more information, see [AWS Tagging Strategies](https://aws.amazon.com/answers/account-management/aws-tagging-strategies/). - /// - /// - Parameter TagResourceInput : [no documentation found] - /// - /// - Returns: `TagResourceOutput` : [no documentation found] - /// - /// - Throws: One of the exceptions listed below __Possible Exceptions__. - /// - /// __Possible Exceptions:__ - /// - `InternalFailureException` : - /// - `InvalidRequestException` : - /// - `ResourceNotFoundException` : - public func tagResource(input: TagResourceInput) async throws -> TagResourceOutput { - let context = Smithy.ContextBuilder() - .withMethod(value: .post) - .withServiceName(value: serviceName) - .withOperation(value: "tagResource") - .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: "iot1click") - .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(TagResourceInput.urlPathProvider(_:))) - builder.interceptors.add(ClientRuntime.URLHostMiddleware()) - builder.interceptors.add(ClientRuntime.ContentTypeMiddleware(contentType: "application/json")) - builder.serialize(ClientRuntime.BodyMiddleware(rootNodeInfo: "", inputWritingClosure: TagResourceInput.write(value:to:))) - builder.interceptors.add(ClientRuntime.ContentLengthMiddleware()) - builder.deserialize(ClientRuntime.DeserializeMiddleware(TagResourceOutput.httpOutput(from:), TagResourceOutputError.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: IoT1ClickProjectsClient.version, 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: "IoT1ClickProjects") - metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "TagResource") - 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 `UntagResource` operation on the `AWSIoT1ClickProjects` service. - /// - /// Removes one or more tags (metadata key/value pairs) from a resource. - /// - /// - Parameter UntagResourceInput : [no documentation found] - /// - /// - Returns: `UntagResourceOutput` : [no documentation found] - /// - /// - Throws: One of the exceptions listed below __Possible Exceptions__. - /// - /// __Possible Exceptions:__ - /// - `InternalFailureException` : - /// - `InvalidRequestException` : - /// - `ResourceNotFoundException` : - public func untagResource(input: UntagResourceInput) async throws -> UntagResourceOutput { - let context = Smithy.ContextBuilder() - .withMethod(value: .delete) - .withServiceName(value: serviceName) - .withOperation(value: "untagResource") - .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: "iot1click") - .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(UntagResourceInput.urlPathProvider(_:))) - builder.interceptors.add(ClientRuntime.URLHostMiddleware()) - builder.serialize(ClientRuntime.QueryItemMiddleware(UntagResourceInput.queryItemProvider(_:))) - builder.deserialize(ClientRuntime.DeserializeMiddleware(UntagResourceOutput.httpOutput(from:), UntagResourceOutputError.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: IoT1ClickProjectsClient.version, 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: "IoT1ClickProjects") - metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "UntagResource") - 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 `UpdatePlacement` operation on the `AWSIoT1ClickProjects` service. - /// - /// Updates a placement with the given attributes. To clear an attribute, pass an empty value (i.e., ""). - /// - /// - Parameter UpdatePlacementInput : [no documentation found] - /// - /// - Returns: `UpdatePlacementOutput` : [no documentation found] - /// - /// - Throws: One of the exceptions listed below __Possible Exceptions__. - /// - /// __Possible Exceptions:__ - /// - `InternalFailureException` : - /// - `InvalidRequestException` : - /// - `ResourceNotFoundException` : - /// - `TooManyRequestsException` : - public func updatePlacement(input: UpdatePlacementInput) async throws -> UpdatePlacementOutput { - let context = Smithy.ContextBuilder() - .withMethod(value: .put) - .withServiceName(value: serviceName) - .withOperation(value: "updatePlacement") - .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: "iot1click") - .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(UpdatePlacementInput.urlPathProvider(_:))) - builder.interceptors.add(ClientRuntime.URLHostMiddleware()) - builder.interceptors.add(ClientRuntime.ContentTypeMiddleware(contentType: "application/json")) - builder.serialize(ClientRuntime.BodyMiddleware(rootNodeInfo: "", inputWritingClosure: UpdatePlacementInput.write(value:to:))) - builder.interceptors.add(ClientRuntime.ContentLengthMiddleware()) - builder.deserialize(ClientRuntime.DeserializeMiddleware(UpdatePlacementOutput.httpOutput(from:), UpdatePlacementOutputError.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: IoT1ClickProjectsClient.version, 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: "IoT1ClickProjects") - metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "UpdatePlacement") - 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 `UpdateProject` operation on the `AWSIoT1ClickProjects` service. - /// - /// Updates a project associated with your AWS account and region. With the exception of device template names, you can pass just the values that need to be updated because the update request will change only the values that are provided. To clear a value, pass the empty string (i.e., ""). - /// - /// - Parameter UpdateProjectInput : [no documentation found] - /// - /// - Returns: `UpdateProjectOutput` : [no documentation found] - /// - /// - Throws: One of the exceptions listed below __Possible Exceptions__. - /// - /// __Possible Exceptions:__ - /// - `InternalFailureException` : - /// - `InvalidRequestException` : - /// - `ResourceNotFoundException` : - /// - `TooManyRequestsException` : - public func updateProject(input: UpdateProjectInput) async throws -> UpdateProjectOutput { - let context = Smithy.ContextBuilder() - .withMethod(value: .put) - .withServiceName(value: serviceName) - .withOperation(value: "updateProject") - .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: "iot1click") - .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(UpdateProjectInput.urlPathProvider(_:))) - builder.interceptors.add(ClientRuntime.URLHostMiddleware()) - builder.interceptors.add(ClientRuntime.ContentTypeMiddleware(contentType: "application/json")) - builder.serialize(ClientRuntime.BodyMiddleware(rootNodeInfo: "", inputWritingClosure: UpdateProjectInput.write(value:to:))) - builder.interceptors.add(ClientRuntime.ContentLengthMiddleware()) - builder.deserialize(ClientRuntime.DeserializeMiddleware(UpdateProjectOutput.httpOutput(from:), UpdateProjectOutputError.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: IoT1ClickProjectsClient.version, 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: "IoT1ClickProjects") - metricsAttributes.set(key: ClientRuntime.OrchestratorMetricsAttributesKeys.method, value: "UpdateProject") - 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) - } - -} diff --git a/Sources/Services/AWSIoT1ClickProjects/Sources/AWSIoT1ClickProjects/Models.swift b/Sources/Services/AWSIoT1ClickProjects/Sources/AWSIoT1ClickProjects/Models.swift deleted file mode 100644 index 8e6a00145c1..00000000000 --- a/Sources/Services/AWSIoT1ClickProjects/Sources/AWSIoT1ClickProjects/Models.swift +++ /dev/null @@ -1,1651 +0,0 @@ -// -// Copyright Amazon.com Inc. or its affiliates. -// All Rights Reserved. -// -// SPDX-License-Identifier: Apache-2.0 -// - -// Code generated by smithy-swift-codegen. DO NOT EDIT! - -@_spi(SmithyReadWrite) import ClientRuntime -import Foundation -import class SmithyHTTPAPI.HTTPResponse -@_spi(SmithyReadWrite) import class SmithyJSON.Reader -@_spi(SmithyReadWrite) import class SmithyJSON.Writer -import enum ClientRuntime.ErrorFault -import enum Smithy.ClientError -import enum SmithyReadWrite.ReaderError -@_spi(SmithyReadWrite) import enum SmithyReadWrite.ReadingClosures -@_spi(SmithyReadWrite) import enum SmithyReadWrite.WritingClosures -@_spi(SmithyTimestamps) import enum SmithyTimestamps.TimestampFormat -import protocol AWSClientRuntime.AWSServiceError -import protocol ClientRuntime.HTTPError -import protocol ClientRuntime.ModeledError -@_spi(SmithyReadWrite) import protocol SmithyReadWrite.SmithyReader -@_spi(SmithyReadWrite) import protocol SmithyReadWrite.SmithyWriter -@_spi(SmithyReadWrite) import struct AWSClientRuntime.RestJSONError -@_spi(UnknownAWSHTTPServiceError) import struct AWSClientRuntime.UnknownAWSHTTPServiceError -import struct Smithy.URIQueryItem -@_spi(SmithyTimestamps) import struct SmithyTimestamps.TimestampFormatter - -/// -public struct InternalFailureException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error, Swift.Sendable { - - public struct Properties: Swift.Sendable { - /// This member is required. - public internal(set) var code: Swift.String? = nil - /// This member is required. - public internal(set) var message: Swift.String? = nil - } - - public internal(set) var properties = Properties() - public static var typeName: Swift.String { "InternalFailureException" } - public static var fault: ClientRuntime.ErrorFault { .server } - 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( - code: Swift.String? = nil, - message: Swift.String? = nil - ) - { - self.properties.code = code - self.properties.message = message - } -} - -/// -public struct InvalidRequestException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error, Swift.Sendable { - - public struct Properties: Swift.Sendable { - /// This member is required. - public internal(set) var code: Swift.String? = nil - /// This member is required. - public internal(set) var message: Swift.String? = nil - } - - public internal(set) var properties = Properties() - public static var typeName: Swift.String { "InvalidRequestException" } - 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( - code: Swift.String? = nil, - message: Swift.String? = nil - ) - { - self.properties.code = code - self.properties.message = message - } -} - -/// -public struct ResourceConflictException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error, Swift.Sendable { - - public struct Properties: Swift.Sendable { - /// This member is required. - public internal(set) var code: Swift.String? = nil - /// This member is required. - public internal(set) var message: Swift.String? = nil - } - - public internal(set) var properties = Properties() - public static var typeName: Swift.String { "ResourceConflictException" } - 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( - code: Swift.String? = nil, - message: Swift.String? = nil - ) - { - self.properties.code = code - self.properties.message = message - } -} - -/// -public struct ResourceNotFoundException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error, Swift.Sendable { - - public struct Properties: Swift.Sendable { - /// This member is required. - public internal(set) var code: Swift.String? = nil - /// This member is required. - public internal(set) var message: Swift.String? = nil - } - - public internal(set) var properties = Properties() - public static var typeName: Swift.String { "ResourceNotFoundException" } - 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( - code: Swift.String? = nil, - message: Swift.String? = nil - ) - { - self.properties.code = code - self.properties.message = message - } -} - -public struct AssociateDeviceWithPlacementInput: Swift.Sendable { - /// The ID of the physical device to be associated with the given placement in the project. Note that a mandatory 4 character prefix is required for all deviceId values. - /// This member is required. - public var deviceId: Swift.String? - /// The device template name to associate with the device ID. - /// This member is required. - public var deviceTemplateName: Swift.String? - /// The name of the placement in which to associate the device. - /// This member is required. - public var placementName: Swift.String? - /// The name of the project containing the placement in which to associate the device. - /// This member is required. - public var projectName: Swift.String? - - public init( - deviceId: Swift.String? = nil, - deviceTemplateName: Swift.String? = nil, - placementName: Swift.String? = nil, - projectName: Swift.String? = nil - ) - { - self.deviceId = deviceId - self.deviceTemplateName = deviceTemplateName - self.placementName = placementName - self.projectName = projectName - } -} - -public struct AssociateDeviceWithPlacementOutput: Swift.Sendable { - - public init() { } -} - -public struct CreatePlacementInput: Swift.Sendable { - /// Optional user-defined key/value pairs providing contextual data (such as location or function) for the placement. - public var attributes: [Swift.String: Swift.String]? - /// The name of the placement to be created. - /// This member is required. - public var placementName: Swift.String? - /// The name of the project in which to create the placement. - /// This member is required. - public var projectName: Swift.String? - - public init( - attributes: [Swift.String: Swift.String]? = nil, - placementName: Swift.String? = nil, - projectName: Swift.String? = nil - ) - { - self.attributes = attributes - self.placementName = placementName - self.projectName = projectName - } -} - -public struct CreatePlacementOutput: Swift.Sendable { - - public init() { } -} - -extension IoT1ClickProjectsClientTypes { - - /// An object representing a device for a placement template (see [PlacementTemplate]). - public struct DeviceTemplate: Swift.Sendable { - /// An optional Lambda function to invoke instead of the default Lambda function provided by the placement template. - public var callbackOverrides: [Swift.String: Swift.String]? - /// The device type, which currently must be "button". - public var deviceType: Swift.String? - - public init( - callbackOverrides: [Swift.String: Swift.String]? = nil, - deviceType: Swift.String? = nil - ) - { - self.callbackOverrides = callbackOverrides - self.deviceType = deviceType - } - } -} - -extension IoT1ClickProjectsClientTypes { - - /// An object defining the template for a placement. - public struct PlacementTemplate: Swift.Sendable { - /// The default attributes (key/value pairs) to be applied to all placements using this template. - public var defaultAttributes: [Swift.String: Swift.String]? - /// An object specifying the [DeviceTemplate] for all placements using this ([PlacementTemplate]) template. - public var deviceTemplates: [Swift.String: IoT1ClickProjectsClientTypes.DeviceTemplate]? - - public init( - defaultAttributes: [Swift.String: Swift.String]? = nil, - deviceTemplates: [Swift.String: IoT1ClickProjectsClientTypes.DeviceTemplate]? = nil - ) - { - self.defaultAttributes = defaultAttributes - self.deviceTemplates = deviceTemplates - } - } -} - -public struct CreateProjectInput: Swift.Sendable { - /// An optional description for the project. - public var description: Swift.String? - /// The schema defining the placement to be created. A placement template defines placement default attributes and device templates. You cannot add or remove device templates after the project has been created. However, you can update callbackOverrides for the device templates using the UpdateProject API. - public var placementTemplate: IoT1ClickProjectsClientTypes.PlacementTemplate? - /// The name of the project to create. - /// This member is required. - public var projectName: Swift.String? - /// Optional tags (metadata key/value pairs) to be associated with the project. For example, { {"key1": "value1", "key2": "value2"} }. For more information, see [AWS Tagging Strategies](https://aws.amazon.com/answers/account-management/aws-tagging-strategies/). - public var tags: [Swift.String: Swift.String]? - - public init( - description: Swift.String? = nil, - placementTemplate: IoT1ClickProjectsClientTypes.PlacementTemplate? = nil, - projectName: Swift.String? = nil, - tags: [Swift.String: Swift.String]? = nil - ) - { - self.description = description - self.placementTemplate = placementTemplate - self.projectName = projectName - self.tags = tags - } -} - -public struct CreateProjectOutput: Swift.Sendable { - - public init() { } -} - -/// -public struct TooManyRequestsException: ClientRuntime.ModeledError, AWSClientRuntime.AWSServiceError, ClientRuntime.HTTPError, Swift.Error, Swift.Sendable { - - public struct Properties: Swift.Sendable { - /// This member is required. - public internal(set) var code: Swift.String? = nil - /// This member is required. - public internal(set) var message: Swift.String? = nil - } - - public internal(set) var properties = Properties() - public static var typeName: Swift.String { "TooManyRequestsException" } - 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( - code: Swift.String? = nil, - message: Swift.String? = nil - ) - { - self.properties.code = code - self.properties.message = message - } -} - -public struct DeletePlacementInput: Swift.Sendable { - /// The name of the empty placement to delete. - /// This member is required. - public var placementName: Swift.String? - /// The project containing the empty placement to delete. - /// This member is required. - public var projectName: Swift.String? - - public init( - placementName: Swift.String? = nil, - projectName: Swift.String? = nil - ) - { - self.placementName = placementName - self.projectName = projectName - } -} - -public struct DeletePlacementOutput: Swift.Sendable { - - public init() { } -} - -public struct DeleteProjectInput: Swift.Sendable { - /// The name of the empty project to delete. - /// This member is required. - public var projectName: Swift.String? - - public init( - projectName: Swift.String? = nil - ) - { - self.projectName = projectName - } -} - -public struct DeleteProjectOutput: Swift.Sendable { - - public init() { } -} - -public struct DescribePlacementInput: Swift.Sendable { - /// The name of the placement within a project. - /// This member is required. - public var placementName: Swift.String? - /// The project containing the placement to be described. - /// This member is required. - public var projectName: Swift.String? - - public init( - placementName: Swift.String? = nil, - projectName: Swift.String? = nil - ) - { - self.placementName = placementName - self.projectName = projectName - } -} - -extension IoT1ClickProjectsClientTypes { - - /// An object describing a project's placement. - public struct PlacementDescription: Swift.Sendable { - /// The user-defined attributes associated with the placement. - /// This member is required. - public var attributes: [Swift.String: Swift.String]? - /// The date when the placement was initially created, in UNIX epoch time format. - /// This member is required. - public var createdDate: Foundation.Date? - /// The name of the placement. - /// This member is required. - public var placementName: Swift.String? - /// The name of the project containing the placement. - /// This member is required. - public var projectName: Swift.String? - /// The date when the placement was last updated, in UNIX epoch time format. If the placement was not updated, then createdDate and updatedDate are the same. - /// This member is required. - public var updatedDate: Foundation.Date? - - public init( - attributes: [Swift.String: Swift.String]? = nil, - createdDate: Foundation.Date? = nil, - placementName: Swift.String? = nil, - projectName: Swift.String? = nil, - updatedDate: Foundation.Date? = nil - ) - { - self.attributes = attributes - self.createdDate = createdDate - self.placementName = placementName - self.projectName = projectName - self.updatedDate = updatedDate - } - } -} - -public struct DescribePlacementOutput: Swift.Sendable { - /// An object describing the placement. - /// This member is required. - public var placement: IoT1ClickProjectsClientTypes.PlacementDescription? - - public init( - placement: IoT1ClickProjectsClientTypes.PlacementDescription? = nil - ) - { - self.placement = placement - } -} - -public struct DescribeProjectInput: Swift.Sendable { - /// The name of the project to be described. - /// This member is required. - public var projectName: Swift.String? - - public init( - projectName: Swift.String? = nil - ) - { - self.projectName = projectName - } -} - -extension IoT1ClickProjectsClientTypes { - - /// An object providing detailed information for a particular project associated with an AWS account and region. - public struct ProjectDescription: Swift.Sendable { - /// The ARN of the project. - public var arn: Swift.String? - /// The date when the project was originally created, in UNIX epoch time format. - /// This member is required. - public var createdDate: Foundation.Date? - /// The description of the project. - public var description: Swift.String? - /// An object describing the project's placement specifications. - public var placementTemplate: IoT1ClickProjectsClientTypes.PlacementTemplate? - /// The name of the project for which to obtain information from. - /// This member is required. - public var projectName: Swift.String? - /// The tags (metadata key/value pairs) associated with the project. - public var tags: [Swift.String: Swift.String]? - /// The date when the project was last updated, in UNIX epoch time format. If the project was not updated, then createdDate and updatedDate are the same. - /// This member is required. - public var updatedDate: Foundation.Date? - - public init( - arn: Swift.String? = nil, - createdDate: Foundation.Date? = nil, - description: Swift.String? = nil, - placementTemplate: IoT1ClickProjectsClientTypes.PlacementTemplate? = nil, - projectName: Swift.String? = nil, - tags: [Swift.String: Swift.String]? = nil, - updatedDate: Foundation.Date? = nil - ) - { - self.arn = arn - self.createdDate = createdDate - self.description = description - self.placementTemplate = placementTemplate - self.projectName = projectName - self.tags = tags - self.updatedDate = updatedDate - } - } -} - -public struct DescribeProjectOutput: Swift.Sendable { - /// An object describing the project. - /// This member is required. - public var project: IoT1ClickProjectsClientTypes.ProjectDescription? - - public init( - project: IoT1ClickProjectsClientTypes.ProjectDescription? = nil - ) - { - self.project = project - } -} - -public struct DisassociateDeviceFromPlacementInput: Swift.Sendable { - /// The device ID that should be removed from the placement. - /// This member is required. - public var deviceTemplateName: Swift.String? - /// The name of the placement that the device should be removed from. - /// This member is required. - public var placementName: Swift.String? - /// The name of the project that contains the placement. - /// This member is required. - public var projectName: Swift.String? - - public init( - deviceTemplateName: Swift.String? = nil, - placementName: Swift.String? = nil, - projectName: Swift.String? = nil - ) - { - self.deviceTemplateName = deviceTemplateName - self.placementName = placementName - self.projectName = projectName - } -} - -public struct DisassociateDeviceFromPlacementOutput: Swift.Sendable { - - public init() { } -} - -public struct GetDevicesInPlacementInput: Swift.Sendable { - /// The name of the placement to get the devices from. - /// This member is required. - public var placementName: Swift.String? - /// The name of the project containing the placement. - /// This member is required. - public var projectName: Swift.String? - - public init( - placementName: Swift.String? = nil, - projectName: Swift.String? = nil - ) - { - self.placementName = placementName - self.projectName = projectName - } -} - -public struct GetDevicesInPlacementOutput: Swift.Sendable { - /// An object containing the devices (zero or more) within the placement. - /// This member is required. - public var devices: [Swift.String: Swift.String]? - - public init( - devices: [Swift.String: Swift.String]? = nil - ) - { - self.devices = devices - } -} - -public struct ListPlacementsInput: Swift.Sendable { - /// The maximum number of results to return per request. If not set, a default value of 100 is used. - public var maxResults: Swift.Int? - /// The token to retrieve the next set of results. - public var nextToken: Swift.String? - /// The project containing the placements to be listed. - /// This member is required. - public var projectName: Swift.String? - - public init( - maxResults: Swift.Int? = nil, - nextToken: Swift.String? = nil, - projectName: Swift.String? = nil - ) - { - self.maxResults = maxResults - self.nextToken = nextToken - self.projectName = projectName - } -} - -extension IoT1ClickProjectsClientTypes { - - /// An object providing summary information for a particular placement. - public struct PlacementSummary: Swift.Sendable { - /// The date when the placement was originally created, in UNIX epoch time format. - /// This member is required. - public var createdDate: Foundation.Date? - /// The name of the placement being summarized. - /// This member is required. - public var placementName: Swift.String? - /// The name of the project containing the placement. - /// This member is required. - public var projectName: Swift.String? - /// The date when the placement was last updated, in UNIX epoch time format. If the placement was not updated, then createdDate and updatedDate are the same. - /// This member is required. - public var updatedDate: Foundation.Date? - - public init( - createdDate: Foundation.Date? = nil, - placementName: Swift.String? = nil, - projectName: Swift.String? = nil, - updatedDate: Foundation.Date? = nil - ) - { - self.createdDate = createdDate - self.placementName = placementName - self.projectName = projectName - self.updatedDate = updatedDate - } - } -} - -public struct ListPlacementsOutput: Swift.Sendable { - /// The token used to retrieve the next set of results - will be effectively empty if there are no further results. - public var nextToken: Swift.String? - /// An object listing the requested placements. - /// This member is required. - public var placements: [IoT1ClickProjectsClientTypes.PlacementSummary]? - - public init( - nextToken: Swift.String? = nil, - placements: [IoT1ClickProjectsClientTypes.PlacementSummary]? = nil - ) - { - self.nextToken = nextToken - self.placements = placements - } -} - -public struct ListProjectsInput: Swift.Sendable { - /// The maximum number of results to return per request. If not set, a default value of 100 is used. - 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 IoT1ClickProjectsClientTypes { - - /// An object providing summary information for a particular project for an associated AWS account and region. - public struct ProjectSummary: Swift.Sendable { - /// The ARN of the project. - public var arn: Swift.String? - /// The date when the project was originally created, in UNIX epoch time format. - /// This member is required. - public var createdDate: Foundation.Date? - /// The name of the project being summarized. - /// This member is required. - public var projectName: Swift.String? - /// The tags (metadata key/value pairs) associated with the project. - public var tags: [Swift.String: Swift.String]? - /// The date when the project was last updated, in UNIX epoch time format. If the project was not updated, then createdDate and updatedDate are the same. - /// This member is required. - public var updatedDate: Foundation.Date? - - public init( - arn: Swift.String? = nil, - createdDate: Foundation.Date? = nil, - projectName: Swift.String? = nil, - tags: [Swift.String: Swift.String]? = nil, - updatedDate: Foundation.Date? = nil - ) - { - self.arn = arn - self.createdDate = createdDate - self.projectName = projectName - self.tags = tags - self.updatedDate = updatedDate - } - } -} - -public struct ListProjectsOutput: Swift.Sendable { - /// The token used to retrieve the next set of results - will be effectively empty if there are no further results. - public var nextToken: Swift.String? - /// An object containing the list of projects. - /// This member is required. - public var projects: [IoT1ClickProjectsClientTypes.ProjectSummary]? - - public init( - nextToken: Swift.String? = nil, - projects: [IoT1ClickProjectsClientTypes.ProjectSummary]? = nil - ) - { - self.nextToken = nextToken - self.projects = projects - } -} - -public struct ListTagsForResourceInput: Swift.Sendable { - /// The ARN of the resource whose tags you want to list. - /// This member is required. - public var resourceArn: Swift.String? - - public init( - resourceArn: Swift.String? = nil - ) - { - self.resourceArn = resourceArn - } -} - -public struct ListTagsForResourceOutput: Swift.Sendable { - /// The tags (metadata key/value pairs) which you have assigned to the resource. - public var tags: [Swift.String: Swift.String]? - - public init( - tags: [Swift.String: Swift.String]? = nil - ) - { - self.tags = tags - } -} - -public struct TagResourceInput: Swift.Sendable { - /// The ARN of the resouce for which tag(s) should be added or modified. - /// This member is required. - public var resourceArn: Swift.String? - /// The new or modifying tag(s) for the resource. See [AWS IoT 1-Click Service Limits](https://docs.aws.amazon.com/iot-1-click/latest/developerguide/1click-appendix.html#1click-limits) for the maximum number of tags allowed per resource. - /// This member is required. - public var tags: [Swift.String: Swift.String]? - - public init( - resourceArn: Swift.String? = nil, - tags: [Swift.String: Swift.String]? = nil - ) - { - self.resourceArn = resourceArn - self.tags = tags - } -} - -public struct TagResourceOutput: Swift.Sendable { - - public init() { } -} - -public struct UntagResourceInput: Swift.Sendable { - /// The ARN of the resource whose tag you want to remove. - /// This member is required. - public var resourceArn: Swift.String? - /// The keys of those tags which you want to remove. - /// This member is required. - public var tagKeys: [Swift.String]? - - public init( - resourceArn: Swift.String? = nil, - tagKeys: [Swift.String]? = nil - ) - { - self.resourceArn = resourceArn - self.tagKeys = tagKeys - } -} - -public struct UntagResourceOutput: Swift.Sendable { - - public init() { } -} - -public struct UpdatePlacementInput: Swift.Sendable { - /// The user-defined object of attributes used to update the placement. The maximum number of key/value pairs is 50. - public var attributes: [Swift.String: Swift.String]? - /// The name of the placement to update. - /// This member is required. - public var placementName: Swift.String? - /// The name of the project containing the placement to be updated. - /// This member is required. - public var projectName: Swift.String? - - public init( - attributes: [Swift.String: Swift.String]? = nil, - placementName: Swift.String? = nil, - projectName: Swift.String? = nil - ) - { - self.attributes = attributes - self.placementName = placementName - self.projectName = projectName - } -} - -public struct UpdatePlacementOutput: Swift.Sendable { - - public init() { } -} - -public struct UpdateProjectInput: Swift.Sendable { - /// An optional user-defined description for the project. - public var description: Swift.String? - /// An object defining the project update. Once a project has been created, you cannot add device template names to the project. However, for a given placementTemplate, you can update the associated callbackOverrides for the device definition using this API. - public var placementTemplate: IoT1ClickProjectsClientTypes.PlacementTemplate? - /// The name of the project to be updated. - /// This member is required. - public var projectName: Swift.String? - - public init( - description: Swift.String? = nil, - placementTemplate: IoT1ClickProjectsClientTypes.PlacementTemplate? = nil, - projectName: Swift.String? = nil - ) - { - self.description = description - self.placementTemplate = placementTemplate - self.projectName = projectName - } -} - -public struct UpdateProjectOutput: Swift.Sendable { - - public init() { } -} - -extension AssociateDeviceWithPlacementInput { - - static func urlPathProvider(_ value: AssociateDeviceWithPlacementInput) -> Swift.String? { - guard let projectName = value.projectName else { - return nil - } - guard let placementName = value.placementName else { - return nil - } - guard let deviceTemplateName = value.deviceTemplateName else { - return nil - } - return "/projects/\(projectName.urlPercentEncoding())/placements/\(placementName.urlPercentEncoding())/devices/\(deviceTemplateName.urlPercentEncoding())" - } -} - -extension CreatePlacementInput { - - static func urlPathProvider(_ value: CreatePlacementInput) -> Swift.String? { - guard let projectName = value.projectName else { - return nil - } - return "/projects/\(projectName.urlPercentEncoding())/placements" - } -} - -extension CreateProjectInput { - - static func urlPathProvider(_ value: CreateProjectInput) -> Swift.String? { - return "/projects" - } -} - -extension DeletePlacementInput { - - static func urlPathProvider(_ value: DeletePlacementInput) -> Swift.String? { - guard let projectName = value.projectName else { - return nil - } - guard let placementName = value.placementName else { - return nil - } - return "/projects/\(projectName.urlPercentEncoding())/placements/\(placementName.urlPercentEncoding())" - } -} - -extension DeleteProjectInput { - - static func urlPathProvider(_ value: DeleteProjectInput) -> Swift.String? { - guard let projectName = value.projectName else { - return nil - } - return "/projects/\(projectName.urlPercentEncoding())" - } -} - -extension DescribePlacementInput { - - static func urlPathProvider(_ value: DescribePlacementInput) -> Swift.String? { - guard let projectName = value.projectName else { - return nil - } - guard let placementName = value.placementName else { - return nil - } - return "/projects/\(projectName.urlPercentEncoding())/placements/\(placementName.urlPercentEncoding())" - } -} - -extension DescribeProjectInput { - - static func urlPathProvider(_ value: DescribeProjectInput) -> Swift.String? { - guard let projectName = value.projectName else { - return nil - } - return "/projects/\(projectName.urlPercentEncoding())" - } -} - -extension DisassociateDeviceFromPlacementInput { - - static func urlPathProvider(_ value: DisassociateDeviceFromPlacementInput) -> Swift.String? { - guard let projectName = value.projectName else { - return nil - } - guard let placementName = value.placementName else { - return nil - } - guard let deviceTemplateName = value.deviceTemplateName else { - return nil - } - return "/projects/\(projectName.urlPercentEncoding())/placements/\(placementName.urlPercentEncoding())/devices/\(deviceTemplateName.urlPercentEncoding())" - } -} - -extension GetDevicesInPlacementInput { - - static func urlPathProvider(_ value: GetDevicesInPlacementInput) -> Swift.String? { - guard let projectName = value.projectName else { - return nil - } - guard let placementName = value.placementName else { - return nil - } - return "/projects/\(projectName.urlPercentEncoding())/placements/\(placementName.urlPercentEncoding())/devices" - } -} - -extension ListPlacementsInput { - - static func urlPathProvider(_ value: ListPlacementsInput) -> Swift.String? { - guard let projectName = value.projectName else { - return nil - } - return "/projects/\(projectName.urlPercentEncoding())/placements" - } -} - -extension ListPlacementsInput { - - static func queryItemProvider(_ value: ListPlacementsInput) 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 ListProjectsInput { - - static func urlPathProvider(_ value: ListProjectsInput) -> Swift.String? { - return "/projects" - } -} - -extension ListProjectsInput { - - static func queryItemProvider(_ value: ListProjectsInput) 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? { - guard let resourceArn = value.resourceArn else { - return nil - } - return "/tags/\(resourceArn.urlPercentEncoding())" - } -} - -extension TagResourceInput { - - static func urlPathProvider(_ value: TagResourceInput) -> Swift.String? { - guard let resourceArn = value.resourceArn else { - return nil - } - return "/tags/\(resourceArn.urlPercentEncoding())" - } -} - -extension UntagResourceInput { - - static func urlPathProvider(_ value: UntagResourceInput) -> Swift.String? { - guard let resourceArn = value.resourceArn else { - return nil - } - return "/tags/\(resourceArn.urlPercentEncoding())" - } -} - -extension UntagResourceInput { - - static func queryItemProvider(_ value: UntagResourceInput) throws -> [Smithy.URIQueryItem] { - var items = [Smithy.URIQueryItem]() - guard let tagKeys = value.tagKeys else { - let message = "Creating a URL Query Item failed. tagKeys is required and must not be nil." - throw Smithy.ClientError.unknownError(message) - } - tagKeys.forEach { queryItemValue in - let queryItem = Smithy.URIQueryItem(name: "tagKeys".urlPercentEncoding(), value: Swift.String(queryItemValue).urlPercentEncoding()) - items.append(queryItem) - } - return items - } -} - -extension UpdatePlacementInput { - - static func urlPathProvider(_ value: UpdatePlacementInput) -> Swift.String? { - guard let projectName = value.projectName else { - return nil - } - guard let placementName = value.placementName else { - return nil - } - return "/projects/\(projectName.urlPercentEncoding())/placements/\(placementName.urlPercentEncoding())" - } -} - -extension UpdateProjectInput { - - static func urlPathProvider(_ value: UpdateProjectInput) -> Swift.String? { - guard let projectName = value.projectName else { - return nil - } - return "/projects/\(projectName.urlPercentEncoding())" - } -} - -extension AssociateDeviceWithPlacementInput { - - static func write(value: AssociateDeviceWithPlacementInput?, to writer: SmithyJSON.Writer) throws { - guard let value else { return } - try writer["deviceId"].write(value.deviceId) - } -} - -extension CreatePlacementInput { - - static func write(value: CreatePlacementInput?, to writer: SmithyJSON.Writer) throws { - guard let value else { return } - try writer["attributes"].writeMap(value.attributes, valueWritingClosure: SmithyReadWrite.WritingClosures.writeString(value:to:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) - try writer["placementName"].write(value.placementName) - } -} - -extension CreateProjectInput { - - static func write(value: CreateProjectInput?, to writer: SmithyJSON.Writer) throws { - guard let value else { return } - try writer["description"].write(value.description) - try writer["placementTemplate"].write(value.placementTemplate, with: IoT1ClickProjectsClientTypes.PlacementTemplate.write(value:to:)) - try writer["projectName"].write(value.projectName) - try writer["tags"].writeMap(value.tags, valueWritingClosure: SmithyReadWrite.WritingClosures.writeString(value:to:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) - } -} - -extension TagResourceInput { - - static func write(value: TagResourceInput?, to writer: SmithyJSON.Writer) throws { - guard let value else { return } - try writer["tags"].writeMap(value.tags, valueWritingClosure: SmithyReadWrite.WritingClosures.writeString(value:to:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) - } -} - -extension UpdatePlacementInput { - - static func write(value: UpdatePlacementInput?, to writer: SmithyJSON.Writer) throws { - guard let value else { return } - try writer["attributes"].writeMap(value.attributes, valueWritingClosure: SmithyReadWrite.WritingClosures.writeString(value:to:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) - } -} - -extension UpdateProjectInput { - - static func write(value: UpdateProjectInput?, to writer: SmithyJSON.Writer) throws { - guard let value else { return } - try writer["description"].write(value.description) - try writer["placementTemplate"].write(value.placementTemplate, with: IoT1ClickProjectsClientTypes.PlacementTemplate.write(value:to:)) - } -} - -extension AssociateDeviceWithPlacementOutput { - - static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> AssociateDeviceWithPlacementOutput { - return AssociateDeviceWithPlacementOutput() - } -} - -extension CreatePlacementOutput { - - static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> CreatePlacementOutput { - return CreatePlacementOutput() - } -} - -extension CreateProjectOutput { - - static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> CreateProjectOutput { - return CreateProjectOutput() - } -} - -extension DeletePlacementOutput { - - static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> DeletePlacementOutput { - return DeletePlacementOutput() - } -} - -extension DeleteProjectOutput { - - static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> DeleteProjectOutput { - return DeleteProjectOutput() - } -} - -extension DescribePlacementOutput { - - static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> DescribePlacementOutput { - let data = try await httpResponse.data() - let responseReader = try SmithyJSON.Reader.from(data: data) - let reader = responseReader - var value = DescribePlacementOutput() - value.placement = try reader["placement"].readIfPresent(with: IoT1ClickProjectsClientTypes.PlacementDescription.read(from:)) - return value - } -} - -extension DescribeProjectOutput { - - static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> DescribeProjectOutput { - let data = try await httpResponse.data() - let responseReader = try SmithyJSON.Reader.from(data: data) - let reader = responseReader - var value = DescribeProjectOutput() - value.project = try reader["project"].readIfPresent(with: IoT1ClickProjectsClientTypes.ProjectDescription.read(from:)) - return value - } -} - -extension DisassociateDeviceFromPlacementOutput { - - static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> DisassociateDeviceFromPlacementOutput { - return DisassociateDeviceFromPlacementOutput() - } -} - -extension GetDevicesInPlacementOutput { - - static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> GetDevicesInPlacementOutput { - let data = try await httpResponse.data() - let responseReader = try SmithyJSON.Reader.from(data: data) - let reader = responseReader - var value = GetDevicesInPlacementOutput() - value.devices = try reader["devices"].readMapIfPresent(valueReadingClosure: SmithyReadWrite.ReadingClosures.readString(from:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) ?? [:] - return value - } -} - -extension ListPlacementsOutput { - - static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> ListPlacementsOutput { - let data = try await httpResponse.data() - let responseReader = try SmithyJSON.Reader.from(data: data) - let reader = responseReader - var value = ListPlacementsOutput() - value.nextToken = try reader["nextToken"].readIfPresent() - value.placements = try reader["placements"].readListIfPresent(memberReadingClosure: IoT1ClickProjectsClientTypes.PlacementSummary.read(from:), memberNodeInfo: "member", isFlattened: false) ?? [] - return value - } -} - -extension ListProjectsOutput { - - static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> ListProjectsOutput { - let data = try await httpResponse.data() - let responseReader = try SmithyJSON.Reader.from(data: data) - let reader = responseReader - var value = ListProjectsOutput() - value.nextToken = try reader["nextToken"].readIfPresent() - value.projects = try reader["projects"].readListIfPresent(memberReadingClosure: IoT1ClickProjectsClientTypes.ProjectSummary.read(from:), memberNodeInfo: "member", isFlattened: false) ?? [] - return value - } -} - -extension ListTagsForResourceOutput { - - static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> ListTagsForResourceOutput { - let data = try await httpResponse.data() - let responseReader = try SmithyJSON.Reader.from(data: data) - let reader = responseReader - var value = ListTagsForResourceOutput() - value.tags = try reader["tags"].readMapIfPresent(valueReadingClosure: SmithyReadWrite.ReadingClosures.readString(from:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) - return value - } -} - -extension TagResourceOutput { - - static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> TagResourceOutput { - return TagResourceOutput() - } -} - -extension UntagResourceOutput { - - static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> UntagResourceOutput { - return UntagResourceOutput() - } -} - -extension UpdatePlacementOutput { - - static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> UpdatePlacementOutput { - return UpdatePlacementOutput() - } -} - -extension UpdateProjectOutput { - - static func httpOutput(from httpResponse: SmithyHTTPAPI.HTTPResponse) async throws -> UpdateProjectOutput { - return UpdateProjectOutput() - } -} - -enum AssociateDeviceWithPlacementOutputError { - - 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 "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) - case "InvalidRequestException": return try InvalidRequestException.makeError(baseError: baseError) - case "ResourceConflictException": return try ResourceConflictException.makeError(baseError: baseError) - case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) - default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) - } - } -} - -enum CreatePlacementOutputError { - - 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 "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) - case "InvalidRequestException": return try InvalidRequestException.makeError(baseError: baseError) - case "ResourceConflictException": return try ResourceConflictException.makeError(baseError: baseError) - case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) - default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) - } - } -} - -enum CreateProjectOutputError { - - 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 "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) - case "InvalidRequestException": return try InvalidRequestException.makeError(baseError: baseError) - case "ResourceConflictException": return try ResourceConflictException.makeError(baseError: baseError) - default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) - } - } -} - -enum DeletePlacementOutputError { - - 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 "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) - case "InvalidRequestException": return try InvalidRequestException.makeError(baseError: baseError) - case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) - case "TooManyRequestsException": return try TooManyRequestsException.makeError(baseError: baseError) - default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) - } - } -} - -enum DeleteProjectOutputError { - - 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 "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) - case "InvalidRequestException": return try InvalidRequestException.makeError(baseError: baseError) - case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) - case "TooManyRequestsException": return try TooManyRequestsException.makeError(baseError: baseError) - default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) - } - } -} - -enum DescribePlacementOutputError { - - 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 "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) - case "InvalidRequestException": return try InvalidRequestException.makeError(baseError: baseError) - case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) - default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) - } - } -} - -enum DescribeProjectOutputError { - - 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 "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) - case "InvalidRequestException": return try InvalidRequestException.makeError(baseError: baseError) - case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) - default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) - } - } -} - -enum DisassociateDeviceFromPlacementOutputError { - - 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 "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) - case "InvalidRequestException": return try InvalidRequestException.makeError(baseError: baseError) - case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) - case "TooManyRequestsException": return try TooManyRequestsException.makeError(baseError: baseError) - default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) - } - } -} - -enum GetDevicesInPlacementOutputError { - - 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 "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) - case "InvalidRequestException": return try InvalidRequestException.makeError(baseError: baseError) - case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) - default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) - } - } -} - -enum ListPlacementsOutputError { - - 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 "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) - case "InvalidRequestException": return try InvalidRequestException.makeError(baseError: baseError) - case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) - default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) - } - } -} - -enum ListProjectsOutputError { - - 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 "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) - case "InvalidRequestException": return try InvalidRequestException.makeError(baseError: baseError) - default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) - } - } -} - -enum ListTagsForResourceOutputError { - - 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 "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) - case "InvalidRequestException": return try InvalidRequestException.makeError(baseError: baseError) - case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) - default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) - } - } -} - -enum TagResourceOutputError { - - 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 "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) - case "InvalidRequestException": return try InvalidRequestException.makeError(baseError: baseError) - case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) - default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) - } - } -} - -enum UntagResourceOutputError { - - 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 "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) - case "InvalidRequestException": return try InvalidRequestException.makeError(baseError: baseError) - case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) - default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) - } - } -} - -enum UpdatePlacementOutputError { - - 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 "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) - case "InvalidRequestException": return try InvalidRequestException.makeError(baseError: baseError) - case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) - case "TooManyRequestsException": return try TooManyRequestsException.makeError(baseError: baseError) - default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) - } - } -} - -enum UpdateProjectOutputError { - - 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 "InternalFailureException": return try InternalFailureException.makeError(baseError: baseError) - case "InvalidRequestException": return try InvalidRequestException.makeError(baseError: baseError) - case "ResourceNotFoundException": return try ResourceNotFoundException.makeError(baseError: baseError) - case "TooManyRequestsException": return try TooManyRequestsException.makeError(baseError: baseError) - default: return try AWSClientRuntime.UnknownAWSHTTPServiceError.makeError(baseError: baseError) - } - } -} - -extension ResourceConflictException { - - static func makeError(baseError: AWSClientRuntime.RestJSONError) throws -> ResourceConflictException { - let reader = baseError.errorBodyReader - var value = ResourceConflictException() - value.properties.code = try reader["code"].readIfPresent() ?? "" - 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 { - let reader = baseError.errorBodyReader - var value = ResourceNotFoundException() - value.properties.code = try reader["code"].readIfPresent() ?? "" - value.properties.message = try reader["message"].readIfPresent() ?? "" - value.httpResponse = baseError.httpResponse - value.requestID = baseError.requestID - value.message = baseError.message - return value - } -} - -extension InternalFailureException { - - static func makeError(baseError: AWSClientRuntime.RestJSONError) throws -> InternalFailureException { - let reader = baseError.errorBodyReader - var value = InternalFailureException() - value.properties.code = try reader["code"].readIfPresent() ?? "" - value.properties.message = try reader["message"].readIfPresent() ?? "" - value.httpResponse = baseError.httpResponse - value.requestID = baseError.requestID - value.message = baseError.message - return value - } -} - -extension InvalidRequestException { - - static func makeError(baseError: AWSClientRuntime.RestJSONError) throws -> InvalidRequestException { - let reader = baseError.errorBodyReader - var value = InvalidRequestException() - value.properties.code = try reader["code"].readIfPresent() ?? "" - value.properties.message = try reader["message"].readIfPresent() ?? "" - value.httpResponse = baseError.httpResponse - value.requestID = baseError.requestID - value.message = baseError.message - return value - } -} - -extension TooManyRequestsException { - - static func makeError(baseError: AWSClientRuntime.RestJSONError) throws -> TooManyRequestsException { - let reader = baseError.errorBodyReader - var value = TooManyRequestsException() - value.properties.code = try reader["code"].readIfPresent() ?? "" - value.properties.message = try reader["message"].readIfPresent() ?? "" - value.httpResponse = baseError.httpResponse - value.requestID = baseError.requestID - value.message = baseError.message - return value - } -} - -extension IoT1ClickProjectsClientTypes.PlacementDescription { - - static func read(from reader: SmithyJSON.Reader) throws -> IoT1ClickProjectsClientTypes.PlacementDescription { - guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } - var value = IoT1ClickProjectsClientTypes.PlacementDescription() - value.projectName = try reader["projectName"].readIfPresent() ?? "" - value.placementName = try reader["placementName"].readIfPresent() ?? "" - value.attributes = try reader["attributes"].readMapIfPresent(valueReadingClosure: SmithyReadWrite.ReadingClosures.readString(from:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) ?? [:] - value.createdDate = try reader["createdDate"].readTimestampIfPresent(format: SmithyTimestamps.TimestampFormat.epochSeconds) ?? SmithyTimestamps.TimestampFormatter(format: .dateTime).date(from: "1970-01-01T00:00:00Z") - value.updatedDate = try reader["updatedDate"].readTimestampIfPresent(format: SmithyTimestamps.TimestampFormat.epochSeconds) ?? SmithyTimestamps.TimestampFormatter(format: .dateTime).date(from: "1970-01-01T00:00:00Z") - return value - } -} - -extension IoT1ClickProjectsClientTypes.ProjectDescription { - - static func read(from reader: SmithyJSON.Reader) throws -> IoT1ClickProjectsClientTypes.ProjectDescription { - guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } - var value = IoT1ClickProjectsClientTypes.ProjectDescription() - value.arn = try reader["arn"].readIfPresent() - value.projectName = try reader["projectName"].readIfPresent() ?? "" - value.description = try reader["description"].readIfPresent() - value.createdDate = try reader["createdDate"].readTimestampIfPresent(format: SmithyTimestamps.TimestampFormat.epochSeconds) ?? SmithyTimestamps.TimestampFormatter(format: .dateTime).date(from: "1970-01-01T00:00:00Z") - value.updatedDate = try reader["updatedDate"].readTimestampIfPresent(format: SmithyTimestamps.TimestampFormat.epochSeconds) ?? SmithyTimestamps.TimestampFormatter(format: .dateTime).date(from: "1970-01-01T00:00:00Z") - value.placementTemplate = try reader["placementTemplate"].readIfPresent(with: IoT1ClickProjectsClientTypes.PlacementTemplate.read(from:)) - value.tags = try reader["tags"].readMapIfPresent(valueReadingClosure: SmithyReadWrite.ReadingClosures.readString(from:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) - return value - } -} - -extension IoT1ClickProjectsClientTypes.PlacementTemplate { - - static func write(value: IoT1ClickProjectsClientTypes.PlacementTemplate?, to writer: SmithyJSON.Writer) throws { - guard let value else { return } - try writer["defaultAttributes"].writeMap(value.defaultAttributes, valueWritingClosure: SmithyReadWrite.WritingClosures.writeString(value:to:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) - try writer["deviceTemplates"].writeMap(value.deviceTemplates, valueWritingClosure: IoT1ClickProjectsClientTypes.DeviceTemplate.write(value:to:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) - } - - static func read(from reader: SmithyJSON.Reader) throws -> IoT1ClickProjectsClientTypes.PlacementTemplate { - guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } - var value = IoT1ClickProjectsClientTypes.PlacementTemplate() - value.defaultAttributes = try reader["defaultAttributes"].readMapIfPresent(valueReadingClosure: SmithyReadWrite.ReadingClosures.readString(from:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) - value.deviceTemplates = try reader["deviceTemplates"].readMapIfPresent(valueReadingClosure: IoT1ClickProjectsClientTypes.DeviceTemplate.read(from:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) - return value - } -} - -extension IoT1ClickProjectsClientTypes.DeviceTemplate { - - static func write(value: IoT1ClickProjectsClientTypes.DeviceTemplate?, to writer: SmithyJSON.Writer) throws { - guard let value else { return } - try writer["callbackOverrides"].writeMap(value.callbackOverrides, valueWritingClosure: SmithyReadWrite.WritingClosures.writeString(value:to:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) - try writer["deviceType"].write(value.deviceType) - } - - static func read(from reader: SmithyJSON.Reader) throws -> IoT1ClickProjectsClientTypes.DeviceTemplate { - guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } - var value = IoT1ClickProjectsClientTypes.DeviceTemplate() - value.deviceType = try reader["deviceType"].readIfPresent() - value.callbackOverrides = try reader["callbackOverrides"].readMapIfPresent(valueReadingClosure: SmithyReadWrite.ReadingClosures.readString(from:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) - return value - } -} - -extension IoT1ClickProjectsClientTypes.PlacementSummary { - - static func read(from reader: SmithyJSON.Reader) throws -> IoT1ClickProjectsClientTypes.PlacementSummary { - guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } - var value = IoT1ClickProjectsClientTypes.PlacementSummary() - value.projectName = try reader["projectName"].readIfPresent() ?? "" - value.placementName = try reader["placementName"].readIfPresent() ?? "" - value.createdDate = try reader["createdDate"].readTimestampIfPresent(format: SmithyTimestamps.TimestampFormat.epochSeconds) ?? SmithyTimestamps.TimestampFormatter(format: .dateTime).date(from: "1970-01-01T00:00:00Z") - value.updatedDate = try reader["updatedDate"].readTimestampIfPresent(format: SmithyTimestamps.TimestampFormat.epochSeconds) ?? SmithyTimestamps.TimestampFormatter(format: .dateTime).date(from: "1970-01-01T00:00:00Z") - return value - } -} - -extension IoT1ClickProjectsClientTypes.ProjectSummary { - - static func read(from reader: SmithyJSON.Reader) throws -> IoT1ClickProjectsClientTypes.ProjectSummary { - guard reader.hasContent else { throw SmithyReadWrite.ReaderError.requiredValueNotPresent } - var value = IoT1ClickProjectsClientTypes.ProjectSummary() - value.arn = try reader["arn"].readIfPresent() - value.projectName = try reader["projectName"].readIfPresent() ?? "" - value.createdDate = try reader["createdDate"].readTimestampIfPresent(format: SmithyTimestamps.TimestampFormat.epochSeconds) ?? SmithyTimestamps.TimestampFormatter(format: .dateTime).date(from: "1970-01-01T00:00:00Z") - value.updatedDate = try reader["updatedDate"].readTimestampIfPresent(format: SmithyTimestamps.TimestampFormat.epochSeconds) ?? SmithyTimestamps.TimestampFormatter(format: .dateTime).date(from: "1970-01-01T00:00:00Z") - value.tags = try reader["tags"].readMapIfPresent(valueReadingClosure: SmithyReadWrite.ReadingClosures.readString(from:), keyNodeInfo: "key", valueNodeInfo: "value", isFlattened: false) - return value - } -} - -public enum IoT1ClickProjectsClientTypes {} diff --git a/Sources/Services/AWSIoT1ClickProjects/Sources/AWSIoT1ClickProjects/Paginators.swift b/Sources/Services/AWSIoT1ClickProjects/Sources/AWSIoT1ClickProjects/Paginators.swift deleted file mode 100644 index 06b51362963..00000000000 --- a/Sources/Services/AWSIoT1ClickProjects/Sources/AWSIoT1ClickProjects/Paginators.swift +++ /dev/null @@ -1,73 +0,0 @@ -// -// Copyright Amazon.com Inc. or its affiliates. -// All Rights Reserved. -// -// SPDX-License-Identifier: Apache-2.0 -// - -// Code generated by smithy-swift-codegen. DO NOT EDIT! - -import protocol ClientRuntime.PaginateToken -import struct ClientRuntime.PaginatorSequence - -extension IoT1ClickProjectsClient { - /// Paginate over `[ListPlacementsOutput]` 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 `[ListPlacementsInput]` to start pagination - /// - Returns: An `AsyncSequence` that can iterate over `ListPlacementsOutput` - public func listPlacementsPaginated(input: ListPlacementsInput) -> ClientRuntime.PaginatorSequence { - return ClientRuntime.PaginatorSequence(input: input, inputKey: \.nextToken, outputKey: \.nextToken, paginationFunction: self.listPlacements(input:)) - } -} - -extension ListPlacementsInput: ClientRuntime.PaginateToken { - public func usingPaginationToken(_ token: Swift.String) -> ListPlacementsInput { - return ListPlacementsInput( - maxResults: self.maxResults, - nextToken: token, - projectName: self.projectName - )} -} - -extension PaginatorSequence where OperationStackInput == ListPlacementsInput, OperationStackOutput == ListPlacementsOutput { - /// This paginator transforms the `AsyncSequence` returned by `listPlacementsPaginated` - /// to access the nested member `[IoT1ClickProjectsClientTypes.PlacementSummary]` - /// - Returns: `[IoT1ClickProjectsClientTypes.PlacementSummary]` - public func placements() async throws -> [IoT1ClickProjectsClientTypes.PlacementSummary] { - return try await self.asyncCompactMap { item in item.placements } - } -} -extension IoT1ClickProjectsClient { - /// Paginate over `[ListProjectsOutput]` 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 `[ListProjectsInput]` to start pagination - /// - Returns: An `AsyncSequence` that can iterate over `ListProjectsOutput` - public func listProjectsPaginated(input: ListProjectsInput) -> ClientRuntime.PaginatorSequence { - return ClientRuntime.PaginatorSequence(input: input, inputKey: \.nextToken, outputKey: \.nextToken, paginationFunction: self.listProjects(input:)) - } -} - -extension ListProjectsInput: ClientRuntime.PaginateToken { - public func usingPaginationToken(_ token: Swift.String) -> ListProjectsInput { - return ListProjectsInput( - maxResults: self.maxResults, - nextToken: token - )} -} - -extension PaginatorSequence where OperationStackInput == ListProjectsInput, OperationStackOutput == ListProjectsOutput { - /// This paginator transforms the `AsyncSequence` returned by `listProjectsPaginated` - /// to access the nested member `[IoT1ClickProjectsClientTypes.ProjectSummary]` - /// - Returns: `[IoT1ClickProjectsClientTypes.ProjectSummary]` - public func projects() async throws -> [IoT1ClickProjectsClientTypes.ProjectSummary] { - return try await self.asyncCompactMap { item in item.projects } - } -} diff --git a/Sources/Services/AWSIoT1ClickProjects/Sources/AWSIoT1ClickProjects/Plugins.swift b/Sources/Services/AWSIoT1ClickProjects/Sources/AWSIoT1ClickProjects/Plugins.swift deleted file mode 100644 index d41e67b730d..00000000000 --- a/Sources/Services/AWSIoT1ClickProjects/Sources/AWSIoT1ClickProjects/Plugins.swift +++ /dev/null @@ -1,82 +0,0 @@ -// -// Copyright Amazon.com Inc. or its affiliates. -// All Rights Reserved. -// -// SPDX-License-Identifier: Apache-2.0 -// - -// Code generated by smithy-swift-codegen. DO NOT EDIT! - -import class AWSClientRuntime.AWSClientConfigDefaultsProvider -import protocol ClientRuntime.ClientConfiguration -import protocol ClientRuntime.Plugin -import protocol SmithyHTTPAuthAPI.AuthSchemeResolver -import protocol SmithyIdentity.AWSCredentialIdentityResolver -import protocol SmithyIdentity.BearerTokenIdentityResolver -import struct AWSSDKHTTPAuth.SigV4AuthScheme -import struct SmithyIdentity.BearerTokenIdentity -import struct SmithyIdentity.StaticBearerTokenIdentityResolver -import typealias SmithyHTTPAuthAPI.AuthSchemes - -public class IoT1ClickProjectsClientEndpointPlugin: Plugin { - private var endpointResolver: EndpointResolver - - public init(endpointResolver: EndpointResolver) { - self.endpointResolver = endpointResolver - } - - public convenience init() throws { - self.init(endpointResolver: try DefaultEndpointResolver()) - } - - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if let config = clientConfiguration as? IoT1ClickProjectsClient.IoT1ClickProjectsClientConfiguration { - config.endpointResolver = self.endpointResolver - } - } -} - -public class DefaultAWSAuthSchemePlugin: ClientRuntime.Plugin { - - public init() {} - - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if let config = clientConfiguration as? IoT1ClickProjectsClient.IoT1ClickProjectsClientConfiguration { - config.authSchemeResolver = DefaultIoT1ClickProjectsAuthSchemeResolver() - config.authSchemes = [AWSSDKHTTPAuth.SigV4AuthScheme()] - config.awsCredentialIdentityResolver = try AWSClientRuntime.AWSClientConfigDefaultsProvider.awsCredentialIdentityResolver() - config.bearerTokenIdentityResolver = SmithyIdentity.StaticBearerTokenIdentityResolver(token: SmithyIdentity.BearerTokenIdentity(token: "")) - } - } -} - -public class IoT1ClickProjectsClientAuthSchemePlugin: ClientRuntime.Plugin { - private var authSchemes: SmithyHTTPAuthAPI.AuthSchemes? - private var authSchemeResolver: SmithyHTTPAuthAPI.AuthSchemeResolver? - private var awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? - private var bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? - - public init(authSchemes: SmithyHTTPAuthAPI.AuthSchemes? = nil, authSchemeResolver: IoT1ClickProjectsAuthSchemeResolver? = nil, awsCredentialIdentityResolver: (any SmithyIdentity.AWSCredentialIdentityResolver)? = nil, bearerTokenIdentityResolver: (any SmithyIdentity.BearerTokenIdentityResolver)? = nil) { - self.authSchemeResolver = authSchemeResolver - self.authSchemes = authSchemes - self.awsCredentialIdentityResolver = awsCredentialIdentityResolver - self.bearerTokenIdentityResolver = bearerTokenIdentityResolver - } - - public func configureClient(clientConfiguration: ClientRuntime.ClientConfiguration) throws { - if let config = clientConfiguration as? IoT1ClickProjectsClient.IoT1ClickProjectsClientConfiguration { - if (self.authSchemes != nil) { - config.authSchemes = self.authSchemes - } - if (self.authSchemeResolver != nil) { - config.authSchemeResolver = self.authSchemeResolver! - } - if (self.awsCredentialIdentityResolver != nil) { - config.awsCredentialIdentityResolver = self.awsCredentialIdentityResolver! - } - if (self.bearerTokenIdentityResolver != nil) { - config.bearerTokenIdentityResolver = self.bearerTokenIdentityResolver! - } - } - } -} diff --git a/Sources/Services/AWSIoT1ClickProjects/Tests/AWSIoT1ClickProjectsTests/EndpointResolverTest.swift b/Sources/Services/AWSIoT1ClickProjects/Tests/AWSIoT1ClickProjectsTests/EndpointResolverTest.swift deleted file mode 100644 index ee8e1bd0962..00000000000 --- a/Sources/Services/AWSIoT1ClickProjects/Tests/AWSIoT1ClickProjectsTests/EndpointResolverTest.swift +++ /dev/null @@ -1,636 +0,0 @@ -// -// Copyright Amazon.com Inc. or its affiliates. -// All Rights Reserved. -// -// SPDX-License-Identifier: Apache-2.0 -// - -// Code generated by smithy-swift-codegen. DO NOT EDIT! - -@testable import AWSIoT1ClickProjects -import XCTest -import enum ClientRuntime.EndpointError -import enum SmithyTestUtil.TestInitializer -import struct SmithyHTTPAPI.Endpoint -import struct SmithyHTTPAPI.Headers - -class EndpointResolverTest: XCTestCase { - - override class func setUp() { - SmithyTestUtil.TestInitializer.initialize() - } - - /// For region ap-northeast-1 with FIPS disabled and DualStack disabled - func testResolve1() throws { - let endpointParams = EndpointParams( - region: "ap-northeast-1", - useDualStack: false, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://projects.iot1click.ap-northeast-1.amazonaws.com", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region eu-central-1 with FIPS disabled and DualStack disabled - func testResolve2() throws { - let endpointParams = EndpointParams( - region: "eu-central-1", - useDualStack: false, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://projects.iot1click.eu-central-1.amazonaws.com", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region eu-west-1 with FIPS disabled and DualStack disabled - func testResolve3() throws { - let endpointParams = EndpointParams( - region: "eu-west-1", - useDualStack: false, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://projects.iot1click.eu-west-1.amazonaws.com", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region eu-west-2 with FIPS disabled and DualStack disabled - func testResolve4() throws { - let endpointParams = EndpointParams( - region: "eu-west-2", - useDualStack: false, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://projects.iot1click.eu-west-2.amazonaws.com", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region us-east-1 with FIPS disabled and DualStack disabled - func testResolve5() throws { - let endpointParams = EndpointParams( - region: "us-east-1", - useDualStack: false, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://projects.iot1click.us-east-1.amazonaws.com", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region us-east-2 with FIPS disabled and DualStack disabled - func testResolve6() throws { - let endpointParams = EndpointParams( - region: "us-east-2", - useDualStack: false, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://projects.iot1click.us-east-2.amazonaws.com", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region us-west-2 with FIPS disabled and DualStack disabled - func testResolve7() throws { - let endpointParams = EndpointParams( - region: "us-west-2", - useDualStack: false, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://projects.iot1click.us-west-2.amazonaws.com", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region us-east-1 with FIPS enabled and DualStack enabled - func testResolve8() throws { - let endpointParams = EndpointParams( - region: "us-east-1", - useDualStack: true, - useFIPS: true - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://projects.iot1click-fips.us-east-1.api.aws", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region us-east-1 with FIPS enabled and DualStack disabled - func testResolve9() throws { - let endpointParams = EndpointParams( - region: "us-east-1", - useDualStack: false, - useFIPS: true - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://projects.iot1click-fips.us-east-1.amazonaws.com", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region us-east-1 with FIPS disabled and DualStack enabled - func testResolve10() throws { - let endpointParams = EndpointParams( - region: "us-east-1", - useDualStack: true, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://projects.iot1click.us-east-1.api.aws", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region cn-north-1 with FIPS enabled and DualStack enabled - func testResolve11() throws { - let endpointParams = EndpointParams( - region: "cn-north-1", - useDualStack: true, - useFIPS: true - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://projects.iot1click-fips.cn-north-1.api.amazonwebservices.com.cn", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region cn-north-1 with FIPS enabled and DualStack disabled - func testResolve12() throws { - let endpointParams = EndpointParams( - region: "cn-north-1", - useDualStack: false, - useFIPS: true - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://projects.iot1click-fips.cn-north-1.amazonaws.com.cn", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region cn-north-1 with FIPS disabled and DualStack enabled - func testResolve13() throws { - let endpointParams = EndpointParams( - region: "cn-north-1", - useDualStack: true, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://projects.iot1click.cn-north-1.api.amazonwebservices.com.cn", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region cn-north-1 with FIPS disabled and DualStack disabled - func testResolve14() throws { - let endpointParams = EndpointParams( - region: "cn-north-1", - useDualStack: false, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://projects.iot1click.cn-north-1.amazonaws.com.cn", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region us-gov-east-1 with FIPS enabled and DualStack enabled - func testResolve15() throws { - let endpointParams = EndpointParams( - region: "us-gov-east-1", - useDualStack: true, - useFIPS: true - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://projects.iot1click-fips.us-gov-east-1.api.aws", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region us-gov-east-1 with FIPS enabled and DualStack disabled - func testResolve16() throws { - let endpointParams = EndpointParams( - region: "us-gov-east-1", - useDualStack: false, - useFIPS: true - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://projects.iot1click-fips.us-gov-east-1.amazonaws.com", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region us-gov-east-1 with FIPS disabled and DualStack enabled - func testResolve17() throws { - let endpointParams = EndpointParams( - region: "us-gov-east-1", - useDualStack: true, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://projects.iot1click.us-gov-east-1.api.aws", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region us-gov-east-1 with FIPS disabled and DualStack disabled - func testResolve18() throws { - let endpointParams = EndpointParams( - region: "us-gov-east-1", - useDualStack: false, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://projects.iot1click.us-gov-east-1.amazonaws.com", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region us-iso-east-1 with FIPS enabled and DualStack enabled - func testResolve19() throws { - let endpointParams = EndpointParams( - region: "us-iso-east-1", - useDualStack: true, - useFIPS: true - ) - let resolver = try DefaultEndpointResolver() - - XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in - switch error { - case ClientRuntime.EndpointError.unresolved(let message): - XCTAssertEqual("FIPS and DualStack are enabled, but this partition does not support one or both", message) - default: - XCTFail() - } - } - } - - /// For region us-iso-east-1 with FIPS enabled and DualStack disabled - func testResolve20() throws { - let endpointParams = EndpointParams( - region: "us-iso-east-1", - useDualStack: false, - useFIPS: true - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://projects.iot1click-fips.us-iso-east-1.c2s.ic.gov", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region us-iso-east-1 with FIPS disabled and DualStack enabled - func testResolve21() throws { - let endpointParams = EndpointParams( - region: "us-iso-east-1", - useDualStack: true, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in - switch error { - case ClientRuntime.EndpointError.unresolved(let message): - XCTAssertEqual("DualStack is enabled but this partition does not support DualStack", message) - default: - XCTFail() - } - } - } - - /// For region us-iso-east-1 with FIPS disabled and DualStack disabled - func testResolve22() throws { - let endpointParams = EndpointParams( - region: "us-iso-east-1", - useDualStack: false, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://projects.iot1click.us-iso-east-1.c2s.ic.gov", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region us-isob-east-1 with FIPS enabled and DualStack enabled - func testResolve23() throws { - let endpointParams = EndpointParams( - region: "us-isob-east-1", - useDualStack: true, - useFIPS: true - ) - let resolver = try DefaultEndpointResolver() - - XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in - switch error { - case ClientRuntime.EndpointError.unresolved(let message): - XCTAssertEqual("FIPS and DualStack are enabled, but this partition does not support one or both", message) - default: - XCTFail() - } - } - } - - /// For region us-isob-east-1 with FIPS enabled and DualStack disabled - func testResolve24() throws { - let endpointParams = EndpointParams( - region: "us-isob-east-1", - useDualStack: false, - useFIPS: true - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://projects.iot1click-fips.us-isob-east-1.sc2s.sgov.gov", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For region us-isob-east-1 with FIPS disabled and DualStack enabled - func testResolve25() throws { - let endpointParams = EndpointParams( - region: "us-isob-east-1", - useDualStack: true, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in - switch error { - case ClientRuntime.EndpointError.unresolved(let message): - XCTAssertEqual("DualStack is enabled but this partition does not support DualStack", message) - default: - XCTFail() - } - } - } - - /// For region us-isob-east-1 with FIPS disabled and DualStack disabled - func testResolve26() throws { - let endpointParams = EndpointParams( - region: "us-isob-east-1", - useDualStack: false, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://projects.iot1click.us-isob-east-1.sc2s.sgov.gov", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For custom endpoint with region set and fips disabled and dualstack disabled - func testResolve27() throws { - let endpointParams = EndpointParams( - endpoint: "https://example.com", - region: "us-east-1", - useDualStack: false, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://example.com", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For custom endpoint with region not set and fips disabled and dualstack disabled - func testResolve28() throws { - let endpointParams = EndpointParams( - endpoint: "https://example.com", - useDualStack: false, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - let actual = try resolver.resolve(params: endpointParams) - - let properties: [String: AnyHashable] = - [:] - - let headers = SmithyHTTPAPI.Headers() - let expected = try SmithyHTTPAPI.Endpoint(urlString: "https://example.com", headers: headers, properties: properties) - - XCTAssertEqual(expected, actual) - } - - /// For custom endpoint with fips enabled and dualstack disabled - func testResolve29() throws { - let endpointParams = EndpointParams( - endpoint: "https://example.com", - region: "us-east-1", - useDualStack: false, - useFIPS: true - ) - let resolver = try DefaultEndpointResolver() - - XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in - switch error { - case ClientRuntime.EndpointError.unresolved(let message): - XCTAssertEqual("Invalid Configuration: FIPS and custom endpoint are not supported", message) - default: - XCTFail() - } - } - } - - /// For custom endpoint with fips disabled and dualstack enabled - func testResolve30() throws { - let endpointParams = EndpointParams( - endpoint: "https://example.com", - region: "us-east-1", - useDualStack: true, - useFIPS: false - ) - let resolver = try DefaultEndpointResolver() - - XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in - switch error { - case ClientRuntime.EndpointError.unresolved(let message): - XCTAssertEqual("Invalid Configuration: Dualstack and custom endpoint are not supported", message) - default: - XCTFail() - } - } - } - - /// Missing region - func testResolve31() throws { - let endpointParams = EndpointParams( - ) - let resolver = try DefaultEndpointResolver() - - XCTAssertThrowsError(try resolver.resolve(params: endpointParams)) { error in - switch error { - case ClientRuntime.EndpointError.unresolved(let message): - XCTAssertEqual("Invalid Configuration: Missing Region", message) - default: - XCTFail() - } - } - } - -} diff --git a/codegen/sdk-codegen/aws-models/iot-1click-devices-service.json b/codegen/sdk-codegen/aws-models/iot-1click-devices-service.json deleted file mode 100644 index 5f09660ca51..00000000000 --- a/codegen/sdk-codegen/aws-models/iot-1click-devices-service.json +++ /dev/null @@ -1,1945 +0,0 @@ -{ - "smithy": "2.0", - "metadata": { - "suppressions": [ - { - "id": "HttpMethodSemantics", - "namespace": "*" - }, - { - "id": "HttpResponseCodeSemantics", - "namespace": "*" - }, - { - "id": "PaginatedTrait", - "namespace": "*" - }, - { - "id": "HttpHeaderTrait", - "namespace": "*" - }, - { - "id": "HttpUriConflict", - "namespace": "*" - }, - { - "id": "Service", - "namespace": "*" - } - ] - }, - "shapes": { - "com.amazonaws.iot1clickdevicesservice#Attributes": { - "type": "structure", - "members": {} - }, - "com.amazonaws.iot1clickdevicesservice#ClaimDevicesByClaimCode": { - "type": "operation", - "input": { - "target": "com.amazonaws.iot1clickdevicesservice#ClaimDevicesByClaimCodeRequest" - }, - "output": { - "target": "com.amazonaws.iot1clickdevicesservice#ClaimDevicesByClaimCodeResponse" - }, - "errors": [ - { - "target": "com.amazonaws.iot1clickdevicesservice#ForbiddenException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#InternalFailureException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#InvalidRequestException" - } - ], - "traits": { - "smithy.api#documentation": "

Adds device(s) to your account (i.e., claim one or more devices) if and only if you\n received a claim code with the device(s).

", - "smithy.api#http": { - "method": "PUT", - "uri": "/claims/{ClaimCode}", - "code": 200 - } - } - }, - "com.amazonaws.iot1clickdevicesservice#ClaimDevicesByClaimCodeRequest": { - "type": "structure", - "members": { - "ClaimCode": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The claim code, starting with \"C-\", as provided by the device manufacturer.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.iot1clickdevicesservice#ClaimDevicesByClaimCodeResponse": { - "type": "structure", - "members": { - "ClaimCode": { - "target": "com.amazonaws.iot1clickdevicesservice#__stringMin12Max40", - "traits": { - "smithy.api#documentation": "

The claim code provided by the device manufacturer.

", - "smithy.api#jsonName": "claimCode" - } - }, - "Total": { - "target": "com.amazonaws.iot1clickdevicesservice#__integer", - "traits": { - "smithy.api#documentation": "

The total number of devices associated with the claim code that has been processed in\n the claim request.

", - "smithy.api#jsonName": "total" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.iot1clickdevicesservice#DescribeDevice": { - "type": "operation", - "input": { - "target": "com.amazonaws.iot1clickdevicesservice#DescribeDeviceRequest" - }, - "output": { - "target": "com.amazonaws.iot1clickdevicesservice#DescribeDeviceResponse" - }, - "errors": [ - { - "target": "com.amazonaws.iot1clickdevicesservice#InternalFailureException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#InvalidRequestException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#ResourceNotFoundException" - } - ], - "traits": { - "smithy.api#documentation": "

Given a device ID, returns a DescribeDeviceResponse object describing the\n details of the device.

", - "smithy.api#http": { - "method": "GET", - "uri": "/devices/{DeviceId}", - "code": 200 - } - } - }, - "com.amazonaws.iot1clickdevicesservice#DescribeDeviceRequest": { - "type": "structure", - "members": { - "DeviceId": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The unique identifier of the device.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.iot1clickdevicesservice#DescribeDeviceResponse": { - "type": "structure", - "members": { - "DeviceDescription": { - "target": "com.amazonaws.iot1clickdevicesservice#DeviceDescription", - "traits": { - "smithy.api#documentation": "

Device details.

", - "smithy.api#jsonName": "deviceDescription" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.iot1clickdevicesservice#Device": { - "type": "structure", - "members": { - "Attributes": { - "target": "com.amazonaws.iot1clickdevicesservice#Attributes", - "traits": { - "smithy.api#documentation": "

The user specified attributes associated with the device for an event.

", - "smithy.api#jsonName": "attributes" - } - }, - "DeviceId": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The unique identifier of the device.

", - "smithy.api#jsonName": "deviceId" - } - }, - "Type": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The device type, such as \"button\".

", - "smithy.api#jsonName": "type" - } - } - } - }, - "com.amazonaws.iot1clickdevicesservice#DeviceAttributes": { - "type": "map", - "key": { - "target": "com.amazonaws.iot1clickdevicesservice#__string" - }, - "value": { - "target": "com.amazonaws.iot1clickdevicesservice#__string" - }, - "traits": { - "smithy.api#documentation": "

\n DeviceAttributes is a string-to-string map specified by the user.

" - } - }, - "com.amazonaws.iot1clickdevicesservice#DeviceDescription": { - "type": "structure", - "members": { - "Arn": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The ARN of the device.

", - "smithy.api#jsonName": "arn" - } - }, - "Attributes": { - "target": "com.amazonaws.iot1clickdevicesservice#DeviceAttributes", - "traits": { - "smithy.api#documentation": "

An array of zero or more elements of DeviceAttribute objects providing\n user specified device attributes.

", - "smithy.api#jsonName": "attributes" - } - }, - "DeviceId": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The unique identifier of the device.

", - "smithy.api#jsonName": "deviceId" - } - }, - "Enabled": { - "target": "com.amazonaws.iot1clickdevicesservice#__boolean", - "traits": { - "smithy.api#documentation": "

A Boolean value indicating whether or not the device is enabled.

", - "smithy.api#jsonName": "enabled" - } - }, - "RemainingLife": { - "target": "com.amazonaws.iot1clickdevicesservice#__doubleMin0Max100", - "traits": { - "smithy.api#documentation": "

A value between 0 and 1 inclusive, representing the fraction of life remaining for the\n device.

", - "smithy.api#jsonName": "remainingLife" - } - }, - "Type": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The type of the device, such as \"button\".

", - "smithy.api#jsonName": "type" - } - }, - "Tags": { - "target": "com.amazonaws.iot1clickdevicesservice#__mapOf__string", - "traits": { - "smithy.api#documentation": "

The tags currently associated with the AWS IoT 1-Click device.

", - "smithy.api#jsonName": "tags" - } - } - } - }, - "com.amazonaws.iot1clickdevicesservice#DeviceEvent": { - "type": "structure", - "members": { - "Device": { - "target": "com.amazonaws.iot1clickdevicesservice#Device", - "traits": { - "smithy.api#documentation": "

An object representing the device associated with the event.

", - "smithy.api#jsonName": "device" - } - }, - "StdEvent": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

A serialized JSON object representing the device-type specific event.

", - "smithy.api#jsonName": "stdEvent" - } - } - } - }, - "com.amazonaws.iot1clickdevicesservice#DeviceMethod": { - "type": "structure", - "members": { - "DeviceType": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The type of the device, such as \"button\".

", - "smithy.api#jsonName": "deviceType" - } - }, - "MethodName": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The name of the method applicable to the deviceType.

", - "smithy.api#jsonName": "methodName" - } - } - } - }, - "com.amazonaws.iot1clickdevicesservice#FinalizeDeviceClaim": { - "type": "operation", - "input": { - "target": "com.amazonaws.iot1clickdevicesservice#FinalizeDeviceClaimRequest" - }, - "output": { - "target": "com.amazonaws.iot1clickdevicesservice#FinalizeDeviceClaimResponse" - }, - "errors": [ - { - "target": "com.amazonaws.iot1clickdevicesservice#InternalFailureException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#InvalidRequestException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#PreconditionFailedException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#ResourceConflictException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#ResourceNotFoundException" - } - ], - "traits": { - "smithy.api#documentation": "

Given a device ID, finalizes the claim request for the associated device.

\n

Claiming a device consists of initiating a claim, then publishing a device event,\n and finalizing the claim. For a device of type button, a device event can\n be published by simply clicking the device.

\n
", - "smithy.api#http": { - "method": "PUT", - "uri": "/devices/{DeviceId}/finalize-claim", - "code": 200 - } - } - }, - "com.amazonaws.iot1clickdevicesservice#FinalizeDeviceClaimRequest": { - "type": "structure", - "members": { - "DeviceId": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The unique identifier of the device.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "Tags": { - "target": "com.amazonaws.iot1clickdevicesservice#__mapOf__string", - "traits": { - "smithy.api#documentation": "

A collection of key/value pairs defining the resource tags. For example, {\n \"tags\": {\"key1\": \"value1\", \"key2\": \"value2\"} }. For more information, see AWS\n Tagging Strategies.

\n \n

", - "smithy.api#jsonName": "tags" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.iot1clickdevicesservice#FinalizeDeviceClaimResponse": { - "type": "structure", - "members": { - "State": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The device's final claim state.

", - "smithy.api#jsonName": "state" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.iot1clickdevicesservice#ForbiddenException": { - "type": "structure", - "members": { - "Code": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

403

", - "smithy.api#jsonName": "code" - } - }, - "Message": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The 403 error message returned by the web server.

", - "smithy.api#jsonName": "message" - } - } - }, - "traits": { - "smithy.api#error": "client", - "smithy.api#httpError": 403 - } - }, - "com.amazonaws.iot1clickdevicesservice#GetDeviceMethods": { - "type": "operation", - "input": { - "target": "com.amazonaws.iot1clickdevicesservice#GetDeviceMethodsRequest" - }, - "output": { - "target": "com.amazonaws.iot1clickdevicesservice#GetDeviceMethodsResponse" - }, - "errors": [ - { - "target": "com.amazonaws.iot1clickdevicesservice#InternalFailureException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#InvalidRequestException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#ResourceNotFoundException" - } - ], - "traits": { - "smithy.api#documentation": "

Given a device ID, returns the invokable methods associated with the device.

", - "smithy.api#http": { - "method": "GET", - "uri": "/devices/{DeviceId}/methods", - "code": 200 - } - } - }, - "com.amazonaws.iot1clickdevicesservice#GetDeviceMethodsRequest": { - "type": "structure", - "members": { - "DeviceId": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The unique identifier of the device.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.iot1clickdevicesservice#GetDeviceMethodsResponse": { - "type": "structure", - "members": { - "DeviceMethods": { - "target": "com.amazonaws.iot1clickdevicesservice#__listOfDeviceMethod", - "traits": { - "smithy.api#documentation": "

List of available device APIs.

", - "smithy.api#jsonName": "deviceMethods" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.iot1clickdevicesservice#InitiateDeviceClaim": { - "type": "operation", - "input": { - "target": "com.amazonaws.iot1clickdevicesservice#InitiateDeviceClaimRequest" - }, - "output": { - "target": "com.amazonaws.iot1clickdevicesservice#InitiateDeviceClaimResponse" - }, - "errors": [ - { - "target": "com.amazonaws.iot1clickdevicesservice#InternalFailureException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#InvalidRequestException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#ResourceConflictException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#ResourceNotFoundException" - } - ], - "traits": { - "smithy.api#documentation": "

Given a device ID, initiates a claim request for the associated device.

\n

Claiming a device consists of initiating a claim, then publishing a device event,\n and finalizing the claim. For a device of type button, a device event can\n be published by simply clicking the device.

\n
", - "smithy.api#http": { - "method": "PUT", - "uri": "/devices/{DeviceId}/initiate-claim", - "code": 200 - } - } - }, - "com.amazonaws.iot1clickdevicesservice#InitiateDeviceClaimRequest": { - "type": "structure", - "members": { - "DeviceId": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The unique identifier of the device.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.iot1clickdevicesservice#InitiateDeviceClaimResponse": { - "type": "structure", - "members": { - "State": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The device's final claim state.

", - "smithy.api#jsonName": "state" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.iot1clickdevicesservice#InternalFailureException": { - "type": "structure", - "members": { - "Code": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

500

", - "smithy.api#jsonName": "code" - } - }, - "Message": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The 500 error message returned by the web server.

", - "smithy.api#jsonName": "message" - } - } - }, - "traits": { - "smithy.api#error": "server", - "smithy.api#httpError": 500 - } - }, - "com.amazonaws.iot1clickdevicesservice#InvalidRequestException": { - "type": "structure", - "members": { - "Code": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

400

", - "smithy.api#jsonName": "code" - } - }, - "Message": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The 400 error message returned by the web server.

", - "smithy.api#jsonName": "message" - } - } - }, - "traits": { - "smithy.api#error": "client", - "smithy.api#httpError": 400 - } - }, - "com.amazonaws.iot1clickdevicesservice#InvokeDeviceMethod": { - "type": "operation", - "input": { - "target": "com.amazonaws.iot1clickdevicesservice#InvokeDeviceMethodRequest" - }, - "output": { - "target": "com.amazonaws.iot1clickdevicesservice#InvokeDeviceMethodResponse" - }, - "errors": [ - { - "target": "com.amazonaws.iot1clickdevicesservice#InternalFailureException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#InvalidRequestException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#PreconditionFailedException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#RangeNotSatisfiableException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#ResourceConflictException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#ResourceNotFoundException" - } - ], - "traits": { - "smithy.api#documentation": "

Given a device ID, issues a request to invoke a named device method (with possible\n parameters). See the \"Example POST\" code snippet below.

", - "smithy.api#http": { - "method": "POST", - "uri": "/devices/{DeviceId}/methods", - "code": 200 - } - } - }, - "com.amazonaws.iot1clickdevicesservice#InvokeDeviceMethodRequest": { - "type": "structure", - "members": { - "DeviceId": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The unique identifier of the device.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "DeviceMethod": { - "target": "com.amazonaws.iot1clickdevicesservice#DeviceMethod", - "traits": { - "smithy.api#documentation": "

The device method to invoke.

", - "smithy.api#jsonName": "deviceMethod" - } - }, - "DeviceMethodParameters": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

A JSON encoded string containing the device method request parameters.

", - "smithy.api#jsonName": "deviceMethodParameters" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.iot1clickdevicesservice#InvokeDeviceMethodResponse": { - "type": "structure", - "members": { - "DeviceMethodResponse": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

A JSON encoded string containing the device method response.

", - "smithy.api#jsonName": "deviceMethodResponse" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.iot1clickdevicesservice#IoT1ClickDevicesService": { - "type": "service", - "version": "2018-05-14", - "operations": [ - { - "target": "com.amazonaws.iot1clickdevicesservice#ClaimDevicesByClaimCode" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#DescribeDevice" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#FinalizeDeviceClaim" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#GetDeviceMethods" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#InitiateDeviceClaim" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#InvokeDeviceMethod" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#ListDeviceEvents" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#ListDevices" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#ListTagsForResource" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#TagResource" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#UnclaimDevice" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#UntagResource" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#UpdateDeviceState" - } - ], - "traits": { - "aws.api#service": { - "sdkId": "IoT 1Click Devices Service", - "arnNamespace": "iot1click", - "cloudFormationName": "IoT1ClickDevicesService", - "cloudTrailEventSource": "iot1clickdevicesservice.amazonaws.com", - "docId": "devices-2018-05-14", - "endpointPrefix": "devices.iot1click" - }, - "aws.auth#sigv4": { - "name": "iot1click" - }, - "aws.protocols#restJson1": {}, - "smithy.api#documentation": "

Describes all of the AWS IoT 1-Click device-related API operations for the service.\n Also provides sample requests, responses, and errors for the supported web services\n protocols.

", - "smithy.api#title": "AWS IoT 1-Click Devices Service", - "smithy.rules#endpointRuleSet": { - "version": "1.0", - "parameters": { - "Region": { - "builtIn": "AWS::Region", - "required": false, - "documentation": "The AWS region used to dispatch the request.", - "type": "String" - }, - "UseDualStack": { - "builtIn": "AWS::UseDualStack", - "required": true, - "default": false, - "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", - "type": "Boolean" - }, - "UseFIPS": { - "builtIn": "AWS::UseFIPS", - "required": true, - "default": false, - "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", - "type": "Boolean" - }, - "Endpoint": { - "builtIn": "SDK::Endpoint", - "required": false, - "documentation": "Override the endpoint used to send this request", - "type": "String" - } - }, - "rules": [ - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "error": "Invalid Configuration: FIPS and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" - }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Region" - } - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "aws.partition", - "argv": [ - { - "ref": "Region" - } - ], - "assign": "PartitionResult" - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://devices.iot1click-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - }, - true - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://devices.iot1click-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://devices.iot1click.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [], - "endpoint": { - "url": "https://devices.iot1click.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" - } - ] - }, - "smithy.rules#endpointTests": { - "testCases": [ - { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://devices.iot1click-fips.us-east-1.api.aws" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://devices.iot1click-fips.us-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://devices.iot1click.us-east-1.api.aws" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://devices.iot1click.us-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://devices.iot1click-fips.cn-north-1.api.amazonwebservices.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://devices.iot1click-fips.cn-north-1.amazonaws.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://devices.iot1click.cn-north-1.api.amazonwebservices.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://devices.iot1click.cn-north-1.amazonaws.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://devices.iot1click-fips.us-gov-east-1.api.aws" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://devices.iot1click-fips.us-gov-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://devices.iot1click.us-gov-east-1.api.aws" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://devices.iot1click.us-gov-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", - "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" - }, - "params": { - "Region": "us-iso-east-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://devices.iot1click-fips.us-iso-east-1.c2s.ic.gov" - } - }, - "params": { - "Region": "us-iso-east-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", - "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" - }, - "params": { - "Region": "us-iso-east-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://devices.iot1click.us-iso-east-1.c2s.ic.gov" - } - }, - "params": { - "Region": "us-iso-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", - "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://devices.iot1click-fips.us-isob-east-1.sc2s.sgov.gov" - } - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", - "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://devices.iot1click.us-isob-east-1.sc2s.sgov.gov" - } - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", - "expect": { - "endpoint": { - "url": "https://example.com" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": false, - "Endpoint": "https://example.com" - } - }, - { - "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", - "expect": { - "endpoint": { - "url": "https://example.com" - } - }, - "params": { - "UseFIPS": false, - "UseDualStack": false, - "Endpoint": "https://example.com" - } - }, - { - "documentation": "For custom endpoint with fips enabled and dualstack disabled", - "expect": { - "error": "Invalid Configuration: FIPS and custom endpoint are not supported" - }, - "params": { - "Region": "us-east-1", - "UseFIPS": true, - "UseDualStack": false, - "Endpoint": "https://example.com" - } - }, - { - "documentation": "For custom endpoint with fips disabled and dualstack enabled", - "expect": { - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": true, - "Endpoint": "https://example.com" - } - }, - { - "documentation": "Missing region", - "expect": { - "error": "Invalid Configuration: Missing Region" - } - } - ], - "version": "1.0" - } - } - }, - "com.amazonaws.iot1clickdevicesservice#ListDeviceEvents": { - "type": "operation", - "input": { - "target": "com.amazonaws.iot1clickdevicesservice#ListDeviceEventsRequest" - }, - "output": { - "target": "com.amazonaws.iot1clickdevicesservice#ListDeviceEventsResponse" - }, - "errors": [ - { - "target": "com.amazonaws.iot1clickdevicesservice#InternalFailureException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#InvalidRequestException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#RangeNotSatisfiableException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#ResourceNotFoundException" - } - ], - "traits": { - "smithy.api#documentation": "

Using a device ID, returns a DeviceEventsResponse object containing an\n array of events for the device.

", - "smithy.api#http": { - "method": "GET", - "uri": "/devices/{DeviceId}/events", - "code": 200 - } - } - }, - "com.amazonaws.iot1clickdevicesservice#ListDeviceEventsRequest": { - "type": "structure", - "members": { - "DeviceId": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The unique identifier of the device.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "FromTimeStamp": { - "target": "com.amazonaws.iot1clickdevicesservice#__timestampIso8601", - "traits": { - "smithy.api#clientOptional": {}, - "smithy.api#documentation": "

The start date for the device event query, in ISO8061 format. For example,\n 2018-03-28T15:45:12.880Z\n

", - "smithy.api#httpQuery": "fromTimeStamp", - "smithy.api#required": {} - } - }, - "MaxResults": { - "target": "com.amazonaws.iot1clickdevicesservice#MaxResults", - "traits": { - "smithy.api#documentation": "

The maximum number of results to return per request. If not set, a default value of\n 100 is used.

", - "smithy.api#httpQuery": "maxResults" - } - }, - "NextToken": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The token to retrieve the next set of results.

", - "smithy.api#httpQuery": "nextToken" - } - }, - "ToTimeStamp": { - "target": "com.amazonaws.iot1clickdevicesservice#__timestampIso8601", - "traits": { - "smithy.api#clientOptional": {}, - "smithy.api#documentation": "

The end date for the device event query, in ISO8061 format. For example,\n 2018-03-28T15:45:12.880Z\n

", - "smithy.api#httpQuery": "toTimeStamp", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.iot1clickdevicesservice#ListDeviceEventsResponse": { - "type": "structure", - "members": { - "Events": { - "target": "com.amazonaws.iot1clickdevicesservice#__listOfDeviceEvent", - "traits": { - "smithy.api#documentation": "

An array of zero or more elements describing the event(s) associated with the\n device.

", - "smithy.api#jsonName": "events" - } - }, - "NextToken": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The token to retrieve the next set of results.

", - "smithy.api#jsonName": "nextToken" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.iot1clickdevicesservice#ListDevices": { - "type": "operation", - "input": { - "target": "com.amazonaws.iot1clickdevicesservice#ListDevicesRequest" - }, - "output": { - "target": "com.amazonaws.iot1clickdevicesservice#ListDevicesResponse" - }, - "errors": [ - { - "target": "com.amazonaws.iot1clickdevicesservice#InternalFailureException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#InvalidRequestException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#RangeNotSatisfiableException" - } - ], - "traits": { - "smithy.api#documentation": "

Lists the 1-Click compatible devices associated with your AWS account.

", - "smithy.api#http": { - "method": "GET", - "uri": "/devices", - "code": 200 - } - } - }, - "com.amazonaws.iot1clickdevicesservice#ListDevicesRequest": { - "type": "structure", - "members": { - "DeviceType": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The type of the device, such as \"button\".

", - "smithy.api#httpQuery": "deviceType" - } - }, - "MaxResults": { - "target": "com.amazonaws.iot1clickdevicesservice#MaxResults", - "traits": { - "smithy.api#documentation": "

The maximum number of results to return per request. If not set, a default value of\n 100 is used.

", - "smithy.api#httpQuery": "maxResults" - } - }, - "NextToken": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The token to retrieve the next set of results.

", - "smithy.api#httpQuery": "nextToken" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.iot1clickdevicesservice#ListDevicesResponse": { - "type": "structure", - "members": { - "Devices": { - "target": "com.amazonaws.iot1clickdevicesservice#__listOfDeviceDescription", - "traits": { - "smithy.api#documentation": "

A list of devices.

", - "smithy.api#jsonName": "devices" - } - }, - "NextToken": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The token to retrieve the next set of results.

", - "smithy.api#jsonName": "nextToken" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.iot1clickdevicesservice#ListTagsForResource": { - "type": "operation", - "input": { - "target": "com.amazonaws.iot1clickdevicesservice#ListTagsForResourceRequest" - }, - "output": { - "target": "com.amazonaws.iot1clickdevicesservice#ListTagsForResourceResponse" - }, - "errors": [ - { - "target": "com.amazonaws.iot1clickdevicesservice#InternalFailureException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#ResourceNotFoundException" - } - ], - "traits": { - "smithy.api#documentation": "

Lists the tags associated with the specified resource ARN.

", - "smithy.api#http": { - "method": "GET", - "uri": "/tags/{ResourceArn}", - "code": 200 - } - } - }, - "com.amazonaws.iot1clickdevicesservice#ListTagsForResourceRequest": { - "type": "structure", - "members": { - "ResourceArn": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The ARN of the resource.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.iot1clickdevicesservice#ListTagsForResourceResponse": { - "type": "structure", - "members": { - "Tags": { - "target": "com.amazonaws.iot1clickdevicesservice#__mapOf__string", - "traits": { - "smithy.api#documentation": "

A collection of key/value pairs defining the resource tags. For example, {\n \"tags\": {\"key1\": \"value1\", \"key2\": \"value2\"} }. For more information, see AWS\n Tagging Strategies.

\n \n

", - "smithy.api#jsonName": "tags" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.iot1clickdevicesservice#MaxResults": { - "type": "integer", - "traits": { - "smithy.api#range": { - "min": 1, - "max": 250 - } - } - }, - "com.amazonaws.iot1clickdevicesservice#PreconditionFailedException": { - "type": "structure", - "members": { - "Code": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

412

", - "smithy.api#jsonName": "code" - } - }, - "Message": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

An error message explaining the error or its remedy.

", - "smithy.api#jsonName": "message" - } - } - }, - "traits": { - "smithy.api#error": "client", - "smithy.api#httpError": 412 - } - }, - "com.amazonaws.iot1clickdevicesservice#RangeNotSatisfiableException": { - "type": "structure", - "members": { - "Code": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

416

", - "smithy.api#jsonName": "code" - } - }, - "Message": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The requested number of results specified by nextToken cannot be\n satisfied.

", - "smithy.api#jsonName": "message" - } - } - }, - "traits": { - "smithy.api#error": "client", - "smithy.api#httpError": 416 - } - }, - "com.amazonaws.iot1clickdevicesservice#ResourceConflictException": { - "type": "structure", - "members": { - "Code": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

409

", - "smithy.api#jsonName": "code" - } - }, - "Message": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

An error message explaining the error or its remedy.

", - "smithy.api#jsonName": "message" - } - } - }, - "traits": { - "smithy.api#error": "client", - "smithy.api#httpError": 409 - } - }, - "com.amazonaws.iot1clickdevicesservice#ResourceNotFoundException": { - "type": "structure", - "members": { - "Code": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

404

", - "smithy.api#jsonName": "code" - } - }, - "Message": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The requested device could not be found.

", - "smithy.api#jsonName": "message" - } - } - }, - "traits": { - "smithy.api#error": "client", - "smithy.api#httpError": 404 - } - }, - "com.amazonaws.iot1clickdevicesservice#TagResource": { - "type": "operation", - "input": { - "target": "com.amazonaws.iot1clickdevicesservice#TagResourceRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "errors": [ - { - "target": "com.amazonaws.iot1clickdevicesservice#InternalFailureException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#InvalidRequestException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#ResourceNotFoundException" - } - ], - "traits": { - "smithy.api#documentation": "

Adds or updates the tags associated with the resource ARN. See AWS IoT 1-Click Service Limits for the maximum number of tags allowed per\n resource.

", - "smithy.api#http": { - "method": "POST", - "uri": "/tags/{ResourceArn}", - "code": 204 - } - } - }, - "com.amazonaws.iot1clickdevicesservice#TagResourceRequest": { - "type": "structure", - "members": { - "ResourceArn": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The ARN of the resource.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "Tags": { - "target": "com.amazonaws.iot1clickdevicesservice#__mapOf__string", - "traits": { - "smithy.api#clientOptional": {}, - "smithy.api#documentation": "

A collection of key/value pairs defining the resource tags. For example, {\n \"tags\": {\"key1\": \"value1\", \"key2\": \"value2\"} }. For more information, see AWS\n Tagging Strategies.

\n \n

", - "smithy.api#jsonName": "tags", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.iot1clickdevicesservice#UnclaimDevice": { - "type": "operation", - "input": { - "target": "com.amazonaws.iot1clickdevicesservice#UnclaimDeviceRequest" - }, - "output": { - "target": "com.amazonaws.iot1clickdevicesservice#UnclaimDeviceResponse" - }, - "errors": [ - { - "target": "com.amazonaws.iot1clickdevicesservice#InternalFailureException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#InvalidRequestException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#ResourceNotFoundException" - } - ], - "traits": { - "smithy.api#documentation": "

Disassociates a device from your AWS account using its device ID.

", - "smithy.api#http": { - "method": "PUT", - "uri": "/devices/{DeviceId}/unclaim", - "code": 200 - } - } - }, - "com.amazonaws.iot1clickdevicesservice#UnclaimDeviceRequest": { - "type": "structure", - "members": { - "DeviceId": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The unique identifier of the device.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.iot1clickdevicesservice#UnclaimDeviceResponse": { - "type": "structure", - "members": { - "State": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The device's final claim state.

", - "smithy.api#jsonName": "state" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.iot1clickdevicesservice#UntagResource": { - "type": "operation", - "input": { - "target": "com.amazonaws.iot1clickdevicesservice#UntagResourceRequest" - }, - "output": { - "target": "smithy.api#Unit" - }, - "errors": [ - { - "target": "com.amazonaws.iot1clickdevicesservice#InternalFailureException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#InvalidRequestException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#ResourceNotFoundException" - } - ], - "traits": { - "smithy.api#documentation": "

Using tag keys, deletes the tags (key/value pairs) associated with the specified\n resource ARN.

", - "smithy.api#http": { - "method": "DELETE", - "uri": "/tags/{ResourceArn}", - "code": 204 - } - } - }, - "com.amazonaws.iot1clickdevicesservice#UntagResourceRequest": { - "type": "structure", - "members": { - "ResourceArn": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The ARN of the resource.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "TagKeys": { - "target": "com.amazonaws.iot1clickdevicesservice#__listOf__string", - "traits": { - "smithy.api#clientOptional": {}, - "smithy.api#documentation": "

A collections of tag keys. For example, {\"key1\",\"key2\"}

", - "smithy.api#httpQuery": "tagKeys", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.iot1clickdevicesservice#UpdateDeviceState": { - "type": "operation", - "input": { - "target": "com.amazonaws.iot1clickdevicesservice#UpdateDeviceStateRequest" - }, - "output": { - "target": "com.amazonaws.iot1clickdevicesservice#UpdateDeviceStateResponse" - }, - "errors": [ - { - "target": "com.amazonaws.iot1clickdevicesservice#InternalFailureException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#InvalidRequestException" - }, - { - "target": "com.amazonaws.iot1clickdevicesservice#ResourceNotFoundException" - } - ], - "traits": { - "smithy.api#documentation": "

Using a Boolean value (true or false), this operation\n enables or disables the device given a device ID.

", - "smithy.api#http": { - "method": "PUT", - "uri": "/devices/{DeviceId}/state", - "code": 200 - } - } - }, - "com.amazonaws.iot1clickdevicesservice#UpdateDeviceStateRequest": { - "type": "structure", - "members": { - "DeviceId": { - "target": "com.amazonaws.iot1clickdevicesservice#__string", - "traits": { - "smithy.api#documentation": "

The unique identifier of the device.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "Enabled": { - "target": "com.amazonaws.iot1clickdevicesservice#__boolean", - "traits": { - "smithy.api#documentation": "

If true, the device is enabled. If false, the device is\n disabled.

", - "smithy.api#jsonName": "enabled" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.iot1clickdevicesservice#UpdateDeviceStateResponse": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.iot1clickdevicesservice#__boolean": { - "type": "boolean" - }, - "com.amazonaws.iot1clickdevicesservice#__doubleMin0Max100": { - "type": "double" - }, - "com.amazonaws.iot1clickdevicesservice#__integer": { - "type": "integer" - }, - "com.amazonaws.iot1clickdevicesservice#__listOfDeviceDescription": { - "type": "list", - "member": { - "target": "com.amazonaws.iot1clickdevicesservice#DeviceDescription" - } - }, - "com.amazonaws.iot1clickdevicesservice#__listOfDeviceEvent": { - "type": "list", - "member": { - "target": "com.amazonaws.iot1clickdevicesservice#DeviceEvent" - } - }, - "com.amazonaws.iot1clickdevicesservice#__listOfDeviceMethod": { - "type": "list", - "member": { - "target": "com.amazonaws.iot1clickdevicesservice#DeviceMethod" - } - }, - "com.amazonaws.iot1clickdevicesservice#__listOf__string": { - "type": "list", - "member": { - "target": "com.amazonaws.iot1clickdevicesservice#__string" - } - }, - "com.amazonaws.iot1clickdevicesservice#__mapOf__string": { - "type": "map", - "key": { - "target": "com.amazonaws.iot1clickdevicesservice#__string" - }, - "value": { - "target": "com.amazonaws.iot1clickdevicesservice#__string" - } - }, - "com.amazonaws.iot1clickdevicesservice#__string": { - "type": "string" - }, - "com.amazonaws.iot1clickdevicesservice#__stringMin12Max40": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 12, - "max": 40 - } - } - }, - "com.amazonaws.iot1clickdevicesservice#__timestampIso8601": { - "type": "timestamp", - "traits": { - "smithy.api#timestampFormat": "date-time" - } - } - } -} diff --git a/codegen/sdk-codegen/aws-models/iot-1click-projects.json b/codegen/sdk-codegen/aws-models/iot-1click-projects.json deleted file mode 100644 index 36a0a8535fb..00000000000 --- a/codegen/sdk-codegen/aws-models/iot-1click-projects.json +++ /dev/null @@ -1,2429 +0,0 @@ -{ - "smithy": "2.0", - "metadata": { - "suppressions": [ - { - "id": "HttpMethodSemantics", - "namespace": "*" - }, - { - "id": "HttpResponseCodeSemantics", - "namespace": "*" - }, - { - "id": "PaginatedTrait", - "namespace": "*" - }, - { - "id": "HttpHeaderTrait", - "namespace": "*" - }, - { - "id": "HttpUriConflict", - "namespace": "*" - }, - { - "id": "Service", - "namespace": "*" - } - ] - }, - "shapes": { - "com.amazonaws.iot1clickprojects#AWSIoT1ClickProjects": { - "type": "service", - "version": "2018-05-14", - "operations": [ - { - "target": "com.amazonaws.iot1clickprojects#AssociateDeviceWithPlacement" - }, - { - "target": "com.amazonaws.iot1clickprojects#CreatePlacement" - }, - { - "target": "com.amazonaws.iot1clickprojects#CreateProject" - }, - { - "target": "com.amazonaws.iot1clickprojects#DeletePlacement" - }, - { - "target": "com.amazonaws.iot1clickprojects#DeleteProject" - }, - { - "target": "com.amazonaws.iot1clickprojects#DescribePlacement" - }, - { - "target": "com.amazonaws.iot1clickprojects#DescribeProject" - }, - { - "target": "com.amazonaws.iot1clickprojects#DisassociateDeviceFromPlacement" - }, - { - "target": "com.amazonaws.iot1clickprojects#GetDevicesInPlacement" - }, - { - "target": "com.amazonaws.iot1clickprojects#ListPlacements" - }, - { - "target": "com.amazonaws.iot1clickprojects#ListProjects" - }, - { - "target": "com.amazonaws.iot1clickprojects#ListTagsForResource" - }, - { - "target": "com.amazonaws.iot1clickprojects#TagResource" - }, - { - "target": "com.amazonaws.iot1clickprojects#UntagResource" - }, - { - "target": "com.amazonaws.iot1clickprojects#UpdatePlacement" - }, - { - "target": "com.amazonaws.iot1clickprojects#UpdateProject" - } - ], - "traits": { - "aws.api#service": { - "sdkId": "IoT 1Click Projects", - "arnNamespace": "iot1click", - "cloudFormationName": "IoT1Click", - "cloudTrailEventSource": "iot1clickprojects.amazonaws.com", - "docId": "iot1click-projects-2018-05-14", - "endpointPrefix": "projects.iot1click" - }, - "aws.auth#sigv4": { - "name": "iot1click" - }, - "aws.protocols#restJson1": {}, - "smithy.api#documentation": "

The AWS IoT 1-Click Projects API Reference

", - "smithy.api#title": "AWS IoT 1-Click Projects Service", - "smithy.rules#endpointRuleSet": { - "version": "1.0", - "parameters": { - "Region": { - "builtIn": "AWS::Region", - "required": false, - "documentation": "The AWS region used to dispatch the request.", - "type": "String" - }, - "UseDualStack": { - "builtIn": "AWS::UseDualStack", - "required": true, - "default": false, - "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", - "type": "Boolean" - }, - "UseFIPS": { - "builtIn": "AWS::UseFIPS", - "required": true, - "default": false, - "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", - "type": "Boolean" - }, - "Endpoint": { - "builtIn": "SDK::Endpoint", - "required": false, - "documentation": "Override the endpoint used to send this request", - "type": "String" - } - }, - "rules": [ - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "error": "Invalid Configuration: FIPS and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" - }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Region" - } - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "aws.partition", - "argv": [ - { - "ref": "Region" - } - ], - "assign": "PartitionResult" - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://projects.iot1click-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - }, - true - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://projects.iot1click-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://projects.iot1click.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [], - "endpoint": { - "url": "https://projects.iot1click.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" - } - ] - }, - "smithy.rules#endpointTests": { - "testCases": [ - { - "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://projects.iot1click.ap-northeast-1.amazonaws.com" - } - }, - "params": { - "Region": "ap-northeast-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://projects.iot1click.eu-central-1.amazonaws.com" - } - }, - "params": { - "Region": "eu-central-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://projects.iot1click.eu-west-1.amazonaws.com" - } - }, - "params": { - "Region": "eu-west-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://projects.iot1click.eu-west-2.amazonaws.com" - } - }, - "params": { - "Region": "eu-west-2", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://projects.iot1click.us-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://projects.iot1click.us-east-2.amazonaws.com" - } - }, - "params": { - "Region": "us-east-2", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://projects.iot1click.us-west-2.amazonaws.com" - } - }, - "params": { - "Region": "us-west-2", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://projects.iot1click-fips.us-east-1.api.aws" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://projects.iot1click-fips.us-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://projects.iot1click.us-east-1.api.aws" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://projects.iot1click-fips.cn-north-1.api.amazonwebservices.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://projects.iot1click-fips.cn-north-1.amazonaws.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://projects.iot1click.cn-north-1.api.amazonwebservices.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://projects.iot1click.cn-north-1.amazonaws.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://projects.iot1click-fips.us-gov-east-1.api.aws" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://projects.iot1click-fips.us-gov-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://projects.iot1click.us-gov-east-1.api.aws" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://projects.iot1click.us-gov-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", - "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" - }, - "params": { - "Region": "us-iso-east-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://projects.iot1click-fips.us-iso-east-1.c2s.ic.gov" - } - }, - "params": { - "Region": "us-iso-east-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", - "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" - }, - "params": { - "Region": "us-iso-east-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://projects.iot1click.us-iso-east-1.c2s.ic.gov" - } - }, - "params": { - "Region": "us-iso-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", - "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://projects.iot1click-fips.us-isob-east-1.sc2s.sgov.gov" - } - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", - "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://projects.iot1click.us-isob-east-1.sc2s.sgov.gov" - } - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", - "expect": { - "endpoint": { - "url": "https://example.com" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": false, - "Endpoint": "https://example.com" - } - }, - { - "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", - "expect": { - "endpoint": { - "url": "https://example.com" - } - }, - "params": { - "UseFIPS": false, - "UseDualStack": false, - "Endpoint": "https://example.com" - } - }, - { - "documentation": "For custom endpoint with fips enabled and dualstack disabled", - "expect": { - "error": "Invalid Configuration: FIPS and custom endpoint are not supported" - }, - "params": { - "Region": "us-east-1", - "UseFIPS": true, - "UseDualStack": false, - "Endpoint": "https://example.com" - } - }, - { - "documentation": "For custom endpoint with fips disabled and dualstack enabled", - "expect": { - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": true, - "Endpoint": "https://example.com" - } - }, - { - "documentation": "Missing region", - "expect": { - "error": "Invalid Configuration: Missing Region" - } - } - ], - "version": "1.0" - } - } - }, - "com.amazonaws.iot1clickprojects#AssociateDeviceWithPlacement": { - "type": "operation", - "input": { - "target": "com.amazonaws.iot1clickprojects#AssociateDeviceWithPlacementRequest" - }, - "output": { - "target": "com.amazonaws.iot1clickprojects#AssociateDeviceWithPlacementResponse" - }, - "errors": [ - { - "target": "com.amazonaws.iot1clickprojects#InternalFailureException" - }, - { - "target": "com.amazonaws.iot1clickprojects#InvalidRequestException" - }, - { - "target": "com.amazonaws.iot1clickprojects#ResourceConflictException" - }, - { - "target": "com.amazonaws.iot1clickprojects#ResourceNotFoundException" - } - ], - "traits": { - "smithy.api#documentation": "

Associates a physical device with a placement.

", - "smithy.api#http": { - "method": "PUT", - "uri": "/projects/{projectName}/placements/{placementName}/devices/{deviceTemplateName}", - "code": 200 - } - } - }, - "com.amazonaws.iot1clickprojects#AssociateDeviceWithPlacementRequest": { - "type": "structure", - "members": { - "projectName": { - "target": "com.amazonaws.iot1clickprojects#ProjectName", - "traits": { - "smithy.api#documentation": "

The name of the project containing the placement in which to associate the device.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "placementName": { - "target": "com.amazonaws.iot1clickprojects#PlacementName", - "traits": { - "smithy.api#documentation": "

The name of the placement in which to associate the device.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "deviceId": { - "target": "com.amazonaws.iot1clickprojects#DeviceId", - "traits": { - "smithy.api#documentation": "

The ID of the physical device to be associated with the given placement in the project.\n Note that a mandatory 4 character prefix is required for all deviceId\n values.

", - "smithy.api#required": {} - } - }, - "deviceTemplateName": { - "target": "com.amazonaws.iot1clickprojects#DeviceTemplateName", - "traits": { - "smithy.api#documentation": "

The device template name to associate with the device ID.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.iot1clickprojects#AssociateDeviceWithPlacementResponse": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.iot1clickprojects#AttributeDefaultValue": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 800 - } - } - }, - "com.amazonaws.iot1clickprojects#AttributeName": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 128 - } - } - }, - "com.amazonaws.iot1clickprojects#AttributeValue": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 800 - } - } - }, - "com.amazonaws.iot1clickprojects#Code": { - "type": "string" - }, - "com.amazonaws.iot1clickprojects#CreatePlacement": { - "type": "operation", - "input": { - "target": "com.amazonaws.iot1clickprojects#CreatePlacementRequest" - }, - "output": { - "target": "com.amazonaws.iot1clickprojects#CreatePlacementResponse" - }, - "errors": [ - { - "target": "com.amazonaws.iot1clickprojects#InternalFailureException" - }, - { - "target": "com.amazonaws.iot1clickprojects#InvalidRequestException" - }, - { - "target": "com.amazonaws.iot1clickprojects#ResourceConflictException" - }, - { - "target": "com.amazonaws.iot1clickprojects#ResourceNotFoundException" - } - ], - "traits": { - "smithy.api#documentation": "

Creates an empty placement.

", - "smithy.api#http": { - "method": "POST", - "uri": "/projects/{projectName}/placements", - "code": 200 - } - } - }, - "com.amazonaws.iot1clickprojects#CreatePlacementRequest": { - "type": "structure", - "members": { - "placementName": { - "target": "com.amazonaws.iot1clickprojects#PlacementName", - "traits": { - "smithy.api#documentation": "

The name of the placement to be created.

", - "smithy.api#required": {} - } - }, - "projectName": { - "target": "com.amazonaws.iot1clickprojects#ProjectName", - "traits": { - "smithy.api#documentation": "

The name of the project in which to create the placement.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "attributes": { - "target": "com.amazonaws.iot1clickprojects#PlacementAttributeMap", - "traits": { - "smithy.api#documentation": "

Optional user-defined key/value pairs providing contextual data (such as location or\n function) for the placement.

" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.iot1clickprojects#CreatePlacementResponse": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.iot1clickprojects#CreateProject": { - "type": "operation", - "input": { - "target": "com.amazonaws.iot1clickprojects#CreateProjectRequest" - }, - "output": { - "target": "com.amazonaws.iot1clickprojects#CreateProjectResponse" - }, - "errors": [ - { - "target": "com.amazonaws.iot1clickprojects#InternalFailureException" - }, - { - "target": "com.amazonaws.iot1clickprojects#InvalidRequestException" - }, - { - "target": "com.amazonaws.iot1clickprojects#ResourceConflictException" - } - ], - "traits": { - "smithy.api#documentation": "

Creates an empty project with a placement template. A project contains zero or more\n placements that adhere to the placement template defined in the project.

", - "smithy.api#http": { - "method": "POST", - "uri": "/projects", - "code": 200 - } - } - }, - "com.amazonaws.iot1clickprojects#CreateProjectRequest": { - "type": "structure", - "members": { - "projectName": { - "target": "com.amazonaws.iot1clickprojects#ProjectName", - "traits": { - "smithy.api#documentation": "

The name of the project to create.

", - "smithy.api#required": {} - } - }, - "description": { - "target": "com.amazonaws.iot1clickprojects#Description", - "traits": { - "smithy.api#documentation": "

An optional description for the project.

" - } - }, - "placementTemplate": { - "target": "com.amazonaws.iot1clickprojects#PlacementTemplate", - "traits": { - "smithy.api#documentation": "

The schema defining the placement to be created. A placement template defines placement\n default attributes and device templates. You cannot add or remove device templates after the\n project has been created. However, you can update callbackOverrides for the\n device templates using the UpdateProject API.

" - } - }, - "tags": { - "target": "com.amazonaws.iot1clickprojects#TagMap", - "traits": { - "smithy.api#documentation": "

Optional tags (metadata key/value pairs) to be associated with the project. For example,\n { {\"key1\": \"value1\", \"key2\": \"value2\"} }. For more information, see AWS Tagging\n Strategies.

" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.iot1clickprojects#CreateProjectResponse": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.iot1clickprojects#DefaultPlacementAttributeMap": { - "type": "map", - "key": { - "target": "com.amazonaws.iot1clickprojects#AttributeName" - }, - "value": { - "target": "com.amazonaws.iot1clickprojects#AttributeDefaultValue" - } - }, - "com.amazonaws.iot1clickprojects#DeletePlacement": { - "type": "operation", - "input": { - "target": "com.amazonaws.iot1clickprojects#DeletePlacementRequest" - }, - "output": { - "target": "com.amazonaws.iot1clickprojects#DeletePlacementResponse" - }, - "errors": [ - { - "target": "com.amazonaws.iot1clickprojects#InternalFailureException" - }, - { - "target": "com.amazonaws.iot1clickprojects#InvalidRequestException" - }, - { - "target": "com.amazonaws.iot1clickprojects#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.iot1clickprojects#TooManyRequestsException" - } - ], - "traits": { - "smithy.api#documentation": "

Deletes a placement. To delete a placement, it must not have any devices associated with\n it.

\n \n

When you delete a placement, all associated data becomes irretrievable.

\n
", - "smithy.api#http": { - "method": "DELETE", - "uri": "/projects/{projectName}/placements/{placementName}", - "code": 200 - } - } - }, - "com.amazonaws.iot1clickprojects#DeletePlacementRequest": { - "type": "structure", - "members": { - "placementName": { - "target": "com.amazonaws.iot1clickprojects#PlacementName", - "traits": { - "smithy.api#documentation": "

The name of the empty placement to delete.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "projectName": { - "target": "com.amazonaws.iot1clickprojects#ProjectName", - "traits": { - "smithy.api#documentation": "

The project containing the empty placement to delete.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.iot1clickprojects#DeletePlacementResponse": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.iot1clickprojects#DeleteProject": { - "type": "operation", - "input": { - "target": "com.amazonaws.iot1clickprojects#DeleteProjectRequest" - }, - "output": { - "target": "com.amazonaws.iot1clickprojects#DeleteProjectResponse" - }, - "errors": [ - { - "target": "com.amazonaws.iot1clickprojects#InternalFailureException" - }, - { - "target": "com.amazonaws.iot1clickprojects#InvalidRequestException" - }, - { - "target": "com.amazonaws.iot1clickprojects#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.iot1clickprojects#TooManyRequestsException" - } - ], - "traits": { - "smithy.api#documentation": "

Deletes a project. To delete a project, it must not have any placements associated with\n it.

\n \n

When you delete a project, all associated data becomes irretrievable.

\n
", - "smithy.api#http": { - "method": "DELETE", - "uri": "/projects/{projectName}", - "code": 200 - } - } - }, - "com.amazonaws.iot1clickprojects#DeleteProjectRequest": { - "type": "structure", - "members": { - "projectName": { - "target": "com.amazonaws.iot1clickprojects#ProjectName", - "traits": { - "smithy.api#documentation": "

The name of the empty project to delete.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.iot1clickprojects#DeleteProjectResponse": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.iot1clickprojects#DescribePlacement": { - "type": "operation", - "input": { - "target": "com.amazonaws.iot1clickprojects#DescribePlacementRequest" - }, - "output": { - "target": "com.amazonaws.iot1clickprojects#DescribePlacementResponse" - }, - "errors": [ - { - "target": "com.amazonaws.iot1clickprojects#InternalFailureException" - }, - { - "target": "com.amazonaws.iot1clickprojects#InvalidRequestException" - }, - { - "target": "com.amazonaws.iot1clickprojects#ResourceNotFoundException" - } - ], - "traits": { - "smithy.api#documentation": "

Describes a placement in a project.

", - "smithy.api#http": { - "method": "GET", - "uri": "/projects/{projectName}/placements/{placementName}", - "code": 200 - } - } - }, - "com.amazonaws.iot1clickprojects#DescribePlacementRequest": { - "type": "structure", - "members": { - "placementName": { - "target": "com.amazonaws.iot1clickprojects#PlacementName", - "traits": { - "smithy.api#documentation": "

The name of the placement within a project.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "projectName": { - "target": "com.amazonaws.iot1clickprojects#ProjectName", - "traits": { - "smithy.api#documentation": "

The project containing the placement to be described.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.iot1clickprojects#DescribePlacementResponse": { - "type": "structure", - "members": { - "placement": { - "target": "com.amazonaws.iot1clickprojects#PlacementDescription", - "traits": { - "smithy.api#documentation": "

An object describing the placement.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.iot1clickprojects#DescribeProject": { - "type": "operation", - "input": { - "target": "com.amazonaws.iot1clickprojects#DescribeProjectRequest" - }, - "output": { - "target": "com.amazonaws.iot1clickprojects#DescribeProjectResponse" - }, - "errors": [ - { - "target": "com.amazonaws.iot1clickprojects#InternalFailureException" - }, - { - "target": "com.amazonaws.iot1clickprojects#InvalidRequestException" - }, - { - "target": "com.amazonaws.iot1clickprojects#ResourceNotFoundException" - } - ], - "traits": { - "smithy.api#documentation": "

Returns an object describing a project.

", - "smithy.api#http": { - "method": "GET", - "uri": "/projects/{projectName}", - "code": 200 - } - } - }, - "com.amazonaws.iot1clickprojects#DescribeProjectRequest": { - "type": "structure", - "members": { - "projectName": { - "target": "com.amazonaws.iot1clickprojects#ProjectName", - "traits": { - "smithy.api#documentation": "

The name of the project to be described.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.iot1clickprojects#DescribeProjectResponse": { - "type": "structure", - "members": { - "project": { - "target": "com.amazonaws.iot1clickprojects#ProjectDescription", - "traits": { - "smithy.api#documentation": "

An object describing the project.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.iot1clickprojects#Description": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 500 - } - } - }, - "com.amazonaws.iot1clickprojects#DeviceCallbackKey": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 128 - } - } - }, - "com.amazonaws.iot1clickprojects#DeviceCallbackOverrideMap": { - "type": "map", - "key": { - "target": "com.amazonaws.iot1clickprojects#DeviceCallbackKey" - }, - "value": { - "target": "com.amazonaws.iot1clickprojects#DeviceCallbackValue" - } - }, - "com.amazonaws.iot1clickprojects#DeviceCallbackValue": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 200 - } - } - }, - "com.amazonaws.iot1clickprojects#DeviceId": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 32 - } - } - }, - "com.amazonaws.iot1clickprojects#DeviceMap": { - "type": "map", - "key": { - "target": "com.amazonaws.iot1clickprojects#DeviceTemplateName" - }, - "value": { - "target": "com.amazonaws.iot1clickprojects#DeviceId" - } - }, - "com.amazonaws.iot1clickprojects#DeviceTemplate": { - "type": "structure", - "members": { - "deviceType": { - "target": "com.amazonaws.iot1clickprojects#DeviceType", - "traits": { - "smithy.api#documentation": "

The device type, which currently must be \"button\".

" - } - }, - "callbackOverrides": { - "target": "com.amazonaws.iot1clickprojects#DeviceCallbackOverrideMap", - "traits": { - "smithy.api#documentation": "

An optional Lambda function to invoke instead of the default Lambda function provided by\n the placement template.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

An object representing a device for a placement template (see PlacementTemplate).

" - } - }, - "com.amazonaws.iot1clickprojects#DeviceTemplateMap": { - "type": "map", - "key": { - "target": "com.amazonaws.iot1clickprojects#DeviceTemplateName" - }, - "value": { - "target": "com.amazonaws.iot1clickprojects#DeviceTemplate" - } - }, - "com.amazonaws.iot1clickprojects#DeviceTemplateName": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 128 - }, - "smithy.api#pattern": "^[a-zA-Z0-9_-]+$" - } - }, - "com.amazonaws.iot1clickprojects#DeviceType": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 128 - } - } - }, - "com.amazonaws.iot1clickprojects#DisassociateDeviceFromPlacement": { - "type": "operation", - "input": { - "target": "com.amazonaws.iot1clickprojects#DisassociateDeviceFromPlacementRequest" - }, - "output": { - "target": "com.amazonaws.iot1clickprojects#DisassociateDeviceFromPlacementResponse" - }, - "errors": [ - { - "target": "com.amazonaws.iot1clickprojects#InternalFailureException" - }, - { - "target": "com.amazonaws.iot1clickprojects#InvalidRequestException" - }, - { - "target": "com.amazonaws.iot1clickprojects#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.iot1clickprojects#TooManyRequestsException" - } - ], - "traits": { - "smithy.api#documentation": "

Removes a physical device from a placement.

", - "smithy.api#http": { - "method": "DELETE", - "uri": "/projects/{projectName}/placements/{placementName}/devices/{deviceTemplateName}", - "code": 200 - } - } - }, - "com.amazonaws.iot1clickprojects#DisassociateDeviceFromPlacementRequest": { - "type": "structure", - "members": { - "projectName": { - "target": "com.amazonaws.iot1clickprojects#ProjectName", - "traits": { - "smithy.api#documentation": "

The name of the project that contains the placement.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "placementName": { - "target": "com.amazonaws.iot1clickprojects#PlacementName", - "traits": { - "smithy.api#documentation": "

The name of the placement that the device should be removed from.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "deviceTemplateName": { - "target": "com.amazonaws.iot1clickprojects#DeviceTemplateName", - "traits": { - "smithy.api#documentation": "

The device ID that should be removed from the placement.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.iot1clickprojects#DisassociateDeviceFromPlacementResponse": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.iot1clickprojects#GetDevicesInPlacement": { - "type": "operation", - "input": { - "target": "com.amazonaws.iot1clickprojects#GetDevicesInPlacementRequest" - }, - "output": { - "target": "com.amazonaws.iot1clickprojects#GetDevicesInPlacementResponse" - }, - "errors": [ - { - "target": "com.amazonaws.iot1clickprojects#InternalFailureException" - }, - { - "target": "com.amazonaws.iot1clickprojects#InvalidRequestException" - }, - { - "target": "com.amazonaws.iot1clickprojects#ResourceNotFoundException" - } - ], - "traits": { - "smithy.api#documentation": "

Returns an object enumerating the devices in a placement.

", - "smithy.api#http": { - "method": "GET", - "uri": "/projects/{projectName}/placements/{placementName}/devices", - "code": 200 - } - } - }, - "com.amazonaws.iot1clickprojects#GetDevicesInPlacementRequest": { - "type": "structure", - "members": { - "projectName": { - "target": "com.amazonaws.iot1clickprojects#ProjectName", - "traits": { - "smithy.api#documentation": "

The name of the project containing the placement.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "placementName": { - "target": "com.amazonaws.iot1clickprojects#PlacementName", - "traits": { - "smithy.api#documentation": "

The name of the placement to get the devices from.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.iot1clickprojects#GetDevicesInPlacementResponse": { - "type": "structure", - "members": { - "devices": { - "target": "com.amazonaws.iot1clickprojects#DeviceMap", - "traits": { - "smithy.api#documentation": "

An object containing the devices (zero or more) within the placement.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.iot1clickprojects#InternalFailureException": { - "type": "structure", - "members": { - "code": { - "target": "com.amazonaws.iot1clickprojects#Code", - "traits": { - "smithy.api#required": {} - } - }, - "message": { - "target": "com.amazonaws.iot1clickprojects#Message", - "traits": { - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "

", - "smithy.api#error": "server", - "smithy.api#httpError": 500 - } - }, - "com.amazonaws.iot1clickprojects#InvalidRequestException": { - "type": "structure", - "members": { - "code": { - "target": "com.amazonaws.iot1clickprojects#Code", - "traits": { - "smithy.api#required": {} - } - }, - "message": { - "target": "com.amazonaws.iot1clickprojects#Message", - "traits": { - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "

", - "smithy.api#error": "client", - "smithy.api#httpError": 400 - } - }, - "com.amazonaws.iot1clickprojects#ListPlacements": { - "type": "operation", - "input": { - "target": "com.amazonaws.iot1clickprojects#ListPlacementsRequest" - }, - "output": { - "target": "com.amazonaws.iot1clickprojects#ListPlacementsResponse" - }, - "errors": [ - { - "target": "com.amazonaws.iot1clickprojects#InternalFailureException" - }, - { - "target": "com.amazonaws.iot1clickprojects#InvalidRequestException" - }, - { - "target": "com.amazonaws.iot1clickprojects#ResourceNotFoundException" - } - ], - "traits": { - "smithy.api#documentation": "

Lists the placement(s) of a project.

", - "smithy.api#http": { - "method": "GET", - "uri": "/projects/{projectName}/placements", - "code": 200 - }, - "smithy.api#paginated": { - "inputToken": "nextToken", - "outputToken": "nextToken", - "items": "placements", - "pageSize": "maxResults" - } - } - }, - "com.amazonaws.iot1clickprojects#ListPlacementsRequest": { - "type": "structure", - "members": { - "projectName": { - "target": "com.amazonaws.iot1clickprojects#ProjectName", - "traits": { - "smithy.api#documentation": "

The project containing the placements to be listed.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "nextToken": { - "target": "com.amazonaws.iot1clickprojects#NextToken", - "traits": { - "smithy.api#documentation": "

The token to retrieve the next set of results.

", - "smithy.api#httpQuery": "nextToken" - } - }, - "maxResults": { - "target": "com.amazonaws.iot1clickprojects#MaxResults", - "traits": { - "smithy.api#documentation": "

The maximum number of results to return per request. If not set, a default value of 100 is\n used.

", - "smithy.api#httpQuery": "maxResults" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.iot1clickprojects#ListPlacementsResponse": { - "type": "structure", - "members": { - "placements": { - "target": "com.amazonaws.iot1clickprojects#PlacementSummaryList", - "traits": { - "smithy.api#documentation": "

An object listing the requested placements.

", - "smithy.api#required": {} - } - }, - "nextToken": { - "target": "com.amazonaws.iot1clickprojects#NextToken", - "traits": { - "smithy.api#documentation": "

The token used to retrieve the next set of results - will be effectively empty if there\n are no further results.

" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.iot1clickprojects#ListProjects": { - "type": "operation", - "input": { - "target": "com.amazonaws.iot1clickprojects#ListProjectsRequest" - }, - "output": { - "target": "com.amazonaws.iot1clickprojects#ListProjectsResponse" - }, - "errors": [ - { - "target": "com.amazonaws.iot1clickprojects#InternalFailureException" - }, - { - "target": "com.amazonaws.iot1clickprojects#InvalidRequestException" - } - ], - "traits": { - "smithy.api#documentation": "

Lists the AWS IoT 1-Click project(s) associated with your AWS account and region.

", - "smithy.api#http": { - "method": "GET", - "uri": "/projects", - "code": 200 - }, - "smithy.api#paginated": { - "inputToken": "nextToken", - "outputToken": "nextToken", - "items": "projects", - "pageSize": "maxResults" - } - } - }, - "com.amazonaws.iot1clickprojects#ListProjectsRequest": { - "type": "structure", - "members": { - "nextToken": { - "target": "com.amazonaws.iot1clickprojects#NextToken", - "traits": { - "smithy.api#documentation": "

The token to retrieve the next set of results.

", - "smithy.api#httpQuery": "nextToken" - } - }, - "maxResults": { - "target": "com.amazonaws.iot1clickprojects#MaxResults", - "traits": { - "smithy.api#documentation": "

The maximum number of results to return per request. If not set, a default value of 100 is\n used.

", - "smithy.api#httpQuery": "maxResults" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.iot1clickprojects#ListProjectsResponse": { - "type": "structure", - "members": { - "projects": { - "target": "com.amazonaws.iot1clickprojects#ProjectSummaryList", - "traits": { - "smithy.api#documentation": "

An object containing the list of projects.

", - "smithy.api#required": {} - } - }, - "nextToken": { - "target": "com.amazonaws.iot1clickprojects#NextToken", - "traits": { - "smithy.api#documentation": "

The token used to retrieve the next set of results - will be effectively empty if there\n are no further results.

" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.iot1clickprojects#ListTagsForResource": { - "type": "operation", - "input": { - "target": "com.amazonaws.iot1clickprojects#ListTagsForResourceRequest" - }, - "output": { - "target": "com.amazonaws.iot1clickprojects#ListTagsForResourceResponse" - }, - "errors": [ - { - "target": "com.amazonaws.iot1clickprojects#InternalFailureException" - }, - { - "target": "com.amazonaws.iot1clickprojects#InvalidRequestException" - }, - { - "target": "com.amazonaws.iot1clickprojects#ResourceNotFoundException" - } - ], - "traits": { - "smithy.api#documentation": "

Lists the tags (metadata key/value pairs) which you have assigned to the resource.

", - "smithy.api#http": { - "method": "GET", - "uri": "/tags/{resourceArn}", - "code": 200 - } - } - }, - "com.amazonaws.iot1clickprojects#ListTagsForResourceRequest": { - "type": "structure", - "members": { - "resourceArn": { - "target": "com.amazonaws.iot1clickprojects#ProjectArn", - "traits": { - "smithy.api#documentation": "

The ARN of the resource whose tags you want to list.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.iot1clickprojects#ListTagsForResourceResponse": { - "type": "structure", - "members": { - "tags": { - "target": "com.amazonaws.iot1clickprojects#TagMap", - "traits": { - "smithy.api#documentation": "

The tags (metadata key/value pairs) which you have assigned to the resource.

" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.iot1clickprojects#MaxResults": { - "type": "integer", - "traits": { - "smithy.api#range": { - "min": 1, - "max": 250 - } - } - }, - "com.amazonaws.iot1clickprojects#Message": { - "type": "string" - }, - "com.amazonaws.iot1clickprojects#NextToken": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 1024 - } - } - }, - "com.amazonaws.iot1clickprojects#PlacementAttributeMap": { - "type": "map", - "key": { - "target": "com.amazonaws.iot1clickprojects#AttributeName" - }, - "value": { - "target": "com.amazonaws.iot1clickprojects#AttributeValue" - } - }, - "com.amazonaws.iot1clickprojects#PlacementDescription": { - "type": "structure", - "members": { - "projectName": { - "target": "com.amazonaws.iot1clickprojects#ProjectName", - "traits": { - "smithy.api#documentation": "

The name of the project containing the placement.

", - "smithy.api#required": {} - } - }, - "placementName": { - "target": "com.amazonaws.iot1clickprojects#PlacementName", - "traits": { - "smithy.api#documentation": "

The name of the placement.

", - "smithy.api#required": {} - } - }, - "attributes": { - "target": "com.amazonaws.iot1clickprojects#PlacementAttributeMap", - "traits": { - "smithy.api#documentation": "

The user-defined attributes associated with the placement.

", - "smithy.api#required": {} - } - }, - "createdDate": { - "target": "com.amazonaws.iot1clickprojects#Time", - "traits": { - "smithy.api#documentation": "

The date when the placement was initially created, in UNIX epoch time format.

", - "smithy.api#required": {} - } - }, - "updatedDate": { - "target": "com.amazonaws.iot1clickprojects#Time", - "traits": { - "smithy.api#documentation": "

The date when the placement was last updated, in UNIX epoch time format. If the placement\n was not updated, then createdDate and updatedDate are the\n same.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "

An object describing a project's placement.

" - } - }, - "com.amazonaws.iot1clickprojects#PlacementName": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 128 - }, - "smithy.api#pattern": "^[a-zA-Z0-9_-]+$" - } - }, - "com.amazonaws.iot1clickprojects#PlacementSummary": { - "type": "structure", - "members": { - "projectName": { - "target": "com.amazonaws.iot1clickprojects#ProjectName", - "traits": { - "smithy.api#documentation": "

The name of the project containing the placement.

", - "smithy.api#required": {} - } - }, - "placementName": { - "target": "com.amazonaws.iot1clickprojects#PlacementName", - "traits": { - "smithy.api#documentation": "

The name of the placement being summarized.

", - "smithy.api#required": {} - } - }, - "createdDate": { - "target": "com.amazonaws.iot1clickprojects#Time", - "traits": { - "smithy.api#documentation": "

The date when the placement was originally created, in UNIX epoch time format.

", - "smithy.api#required": {} - } - }, - "updatedDate": { - "target": "com.amazonaws.iot1clickprojects#Time", - "traits": { - "smithy.api#documentation": "

The date when the placement was last updated, in UNIX epoch time format. If the placement\n was not updated, then createdDate and updatedDate are the\n same.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "

An object providing summary information for a particular placement.

" - } - }, - "com.amazonaws.iot1clickprojects#PlacementSummaryList": { - "type": "list", - "member": { - "target": "com.amazonaws.iot1clickprojects#PlacementSummary" - } - }, - "com.amazonaws.iot1clickprojects#PlacementTemplate": { - "type": "structure", - "members": { - "defaultAttributes": { - "target": "com.amazonaws.iot1clickprojects#DefaultPlacementAttributeMap", - "traits": { - "smithy.api#documentation": "

The default attributes (key/value pairs) to be applied to all placements using this\n template.

" - } - }, - "deviceTemplates": { - "target": "com.amazonaws.iot1clickprojects#DeviceTemplateMap", - "traits": { - "smithy.api#documentation": "

An object specifying the DeviceTemplate for all placements using this\n (PlacementTemplate) template.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

An object defining the template for a placement.

" - } - }, - "com.amazonaws.iot1clickprojects#ProjectArn": { - "type": "string", - "traits": { - "smithy.api#pattern": "^arn:aws:iot1click:[A-Za-z0-9_/.-]{0,63}:\\d+:projects/[0-9A-Za-z_-]{1,128}$" - } - }, - "com.amazonaws.iot1clickprojects#ProjectDescription": { - "type": "structure", - "members": { - "arn": { - "target": "com.amazonaws.iot1clickprojects#ProjectArn", - "traits": { - "smithy.api#documentation": "

The ARN of the project.

" - } - }, - "projectName": { - "target": "com.amazonaws.iot1clickprojects#ProjectName", - "traits": { - "smithy.api#documentation": "

The name of the project for which to obtain information from.

", - "smithy.api#required": {} - } - }, - "description": { - "target": "com.amazonaws.iot1clickprojects#Description", - "traits": { - "smithy.api#documentation": "

The description of the project.

" - } - }, - "createdDate": { - "target": "com.amazonaws.iot1clickprojects#Time", - "traits": { - "smithy.api#documentation": "

The date when the project was originally created, in UNIX epoch time format.

", - "smithy.api#required": {} - } - }, - "updatedDate": { - "target": "com.amazonaws.iot1clickprojects#Time", - "traits": { - "smithy.api#documentation": "

The date when the project was last updated, in UNIX epoch time format. If the project was\n not updated, then createdDate and updatedDate are the same.

", - "smithy.api#required": {} - } - }, - "placementTemplate": { - "target": "com.amazonaws.iot1clickprojects#PlacementTemplate", - "traits": { - "smithy.api#documentation": "

An object describing the project's placement specifications.

" - } - }, - "tags": { - "target": "com.amazonaws.iot1clickprojects#TagMap", - "traits": { - "smithy.api#documentation": "

The tags (metadata key/value pairs) associated with the project.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

An object providing detailed information for a particular project associated with an AWS\n account and region.

" - } - }, - "com.amazonaws.iot1clickprojects#ProjectName": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 128 - }, - "smithy.api#pattern": "^[0-9A-Za-z_-]+$" - } - }, - "com.amazonaws.iot1clickprojects#ProjectSummary": { - "type": "structure", - "members": { - "arn": { - "target": "com.amazonaws.iot1clickprojects#ProjectArn", - "traits": { - "smithy.api#documentation": "

The ARN of the project.

" - } - }, - "projectName": { - "target": "com.amazonaws.iot1clickprojects#ProjectName", - "traits": { - "smithy.api#documentation": "

The name of the project being summarized.

", - "smithy.api#required": {} - } - }, - "createdDate": { - "target": "com.amazonaws.iot1clickprojects#Time", - "traits": { - "smithy.api#documentation": "

The date when the project was originally created, in UNIX epoch time format.

", - "smithy.api#required": {} - } - }, - "updatedDate": { - "target": "com.amazonaws.iot1clickprojects#Time", - "traits": { - "smithy.api#documentation": "

The date when the project was last updated, in UNIX epoch time format. If the project was\n not updated, then createdDate and updatedDate are the same.

", - "smithy.api#required": {} - } - }, - "tags": { - "target": "com.amazonaws.iot1clickprojects#TagMap", - "traits": { - "smithy.api#documentation": "

The tags (metadata key/value pairs) associated with the project.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

An object providing summary information for a particular project for an associated AWS\n account and region.

" - } - }, - "com.amazonaws.iot1clickprojects#ProjectSummaryList": { - "type": "list", - "member": { - "target": "com.amazonaws.iot1clickprojects#ProjectSummary" - } - }, - "com.amazonaws.iot1clickprojects#ResourceConflictException": { - "type": "structure", - "members": { - "code": { - "target": "com.amazonaws.iot1clickprojects#Code", - "traits": { - "smithy.api#required": {} - } - }, - "message": { - "target": "com.amazonaws.iot1clickprojects#Message", - "traits": { - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "

", - "smithy.api#error": "client", - "smithy.api#httpError": 409 - } - }, - "com.amazonaws.iot1clickprojects#ResourceNotFoundException": { - "type": "structure", - "members": { - "code": { - "target": "com.amazonaws.iot1clickprojects#Code", - "traits": { - "smithy.api#required": {} - } - }, - "message": { - "target": "com.amazonaws.iot1clickprojects#Message", - "traits": { - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "

", - "smithy.api#error": "client", - "smithy.api#httpError": 404 - } - }, - "com.amazonaws.iot1clickprojects#TagKey": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 128 - }, - "smithy.api#pattern": "^(?!aws:)[a-zA-Z+-=._:/]+$" - } - }, - "com.amazonaws.iot1clickprojects#TagKeyList": { - "type": "list", - "member": { - "target": "com.amazonaws.iot1clickprojects#TagKey" - }, - "traits": { - "smithy.api#length": { - "min": 1, - "max": 50 - } - } - }, - "com.amazonaws.iot1clickprojects#TagMap": { - "type": "map", - "key": { - "target": "com.amazonaws.iot1clickprojects#TagKey" - }, - "value": { - "target": "com.amazonaws.iot1clickprojects#TagValue" - }, - "traits": { - "smithy.api#length": { - "min": 1, - "max": 50 - } - } - }, - "com.amazonaws.iot1clickprojects#TagResource": { - "type": "operation", - "input": { - "target": "com.amazonaws.iot1clickprojects#TagResourceRequest" - }, - "output": { - "target": "com.amazonaws.iot1clickprojects#TagResourceResponse" - }, - "errors": [ - { - "target": "com.amazonaws.iot1clickprojects#InternalFailureException" - }, - { - "target": "com.amazonaws.iot1clickprojects#InvalidRequestException" - }, - { - "target": "com.amazonaws.iot1clickprojects#ResourceNotFoundException" - } - ], - "traits": { - "smithy.api#documentation": "

Creates or modifies tags for a resource. Tags are key/value pairs (metadata) that can be\n used to manage a resource. For more information, see AWS Tagging\n Strategies.

", - "smithy.api#http": { - "method": "POST", - "uri": "/tags/{resourceArn}", - "code": 200 - } - } - }, - "com.amazonaws.iot1clickprojects#TagResourceRequest": { - "type": "structure", - "members": { - "resourceArn": { - "target": "com.amazonaws.iot1clickprojects#ProjectArn", - "traits": { - "smithy.api#documentation": "

The ARN of the resouce for which tag(s) should be added or modified.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "tags": { - "target": "com.amazonaws.iot1clickprojects#TagMap", - "traits": { - "smithy.api#documentation": "

The new or modifying tag(s) for the resource. See AWS IoT 1-Click Service Limits for the maximum number of tags allowed per\n resource.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.iot1clickprojects#TagResourceResponse": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.iot1clickprojects#TagValue": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 256 - } - } - }, - "com.amazonaws.iot1clickprojects#Time": { - "type": "timestamp" - }, - "com.amazonaws.iot1clickprojects#TooManyRequestsException": { - "type": "structure", - "members": { - "code": { - "target": "com.amazonaws.iot1clickprojects#Code", - "traits": { - "smithy.api#required": {} - } - }, - "message": { - "target": "com.amazonaws.iot1clickprojects#Message", - "traits": { - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "

", - "smithy.api#error": "client", - "smithy.api#httpError": 429 - } - }, - "com.amazonaws.iot1clickprojects#UntagResource": { - "type": "operation", - "input": { - "target": "com.amazonaws.iot1clickprojects#UntagResourceRequest" - }, - "output": { - "target": "com.amazonaws.iot1clickprojects#UntagResourceResponse" - }, - "errors": [ - { - "target": "com.amazonaws.iot1clickprojects#InternalFailureException" - }, - { - "target": "com.amazonaws.iot1clickprojects#InvalidRequestException" - }, - { - "target": "com.amazonaws.iot1clickprojects#ResourceNotFoundException" - } - ], - "traits": { - "smithy.api#documentation": "

Removes one or more tags (metadata key/value pairs) from a resource.

", - "smithy.api#http": { - "method": "DELETE", - "uri": "/tags/{resourceArn}", - "code": 200 - } - } - }, - "com.amazonaws.iot1clickprojects#UntagResourceRequest": { - "type": "structure", - "members": { - "resourceArn": { - "target": "com.amazonaws.iot1clickprojects#ProjectArn", - "traits": { - "smithy.api#documentation": "

The ARN of the resource whose tag you want to remove.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "tagKeys": { - "target": "com.amazonaws.iot1clickprojects#TagKeyList", - "traits": { - "smithy.api#documentation": "

The keys of those tags which you want to remove.

", - "smithy.api#httpQuery": "tagKeys", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.iot1clickprojects#UntagResourceResponse": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.iot1clickprojects#UpdatePlacement": { - "type": "operation", - "input": { - "target": "com.amazonaws.iot1clickprojects#UpdatePlacementRequest" - }, - "output": { - "target": "com.amazonaws.iot1clickprojects#UpdatePlacementResponse" - }, - "errors": [ - { - "target": "com.amazonaws.iot1clickprojects#InternalFailureException" - }, - { - "target": "com.amazonaws.iot1clickprojects#InvalidRequestException" - }, - { - "target": "com.amazonaws.iot1clickprojects#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.iot1clickprojects#TooManyRequestsException" - } - ], - "traits": { - "smithy.api#documentation": "

Updates a placement with the given attributes. To clear an attribute, pass an empty value\n (i.e., \"\").

", - "smithy.api#http": { - "method": "PUT", - "uri": "/projects/{projectName}/placements/{placementName}", - "code": 200 - } - } - }, - "com.amazonaws.iot1clickprojects#UpdatePlacementRequest": { - "type": "structure", - "members": { - "placementName": { - "target": "com.amazonaws.iot1clickprojects#PlacementName", - "traits": { - "smithy.api#documentation": "

The name of the placement to update.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "projectName": { - "target": "com.amazonaws.iot1clickprojects#ProjectName", - "traits": { - "smithy.api#documentation": "

The name of the project containing the placement to be updated.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "attributes": { - "target": "com.amazonaws.iot1clickprojects#PlacementAttributeMap", - "traits": { - "smithy.api#documentation": "

The user-defined object of attributes used to update the placement. The maximum number of\n key/value pairs is 50.

" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.iot1clickprojects#UpdatePlacementResponse": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.iot1clickprojects#UpdateProject": { - "type": "operation", - "input": { - "target": "com.amazonaws.iot1clickprojects#UpdateProjectRequest" - }, - "output": { - "target": "com.amazonaws.iot1clickprojects#UpdateProjectResponse" - }, - "errors": [ - { - "target": "com.amazonaws.iot1clickprojects#InternalFailureException" - }, - { - "target": "com.amazonaws.iot1clickprojects#InvalidRequestException" - }, - { - "target": "com.amazonaws.iot1clickprojects#ResourceNotFoundException" - }, - { - "target": "com.amazonaws.iot1clickprojects#TooManyRequestsException" - } - ], - "traits": { - "smithy.api#documentation": "

Updates a project associated with your AWS account and region. With the exception of\n device template names, you can pass just the values that need to be updated because the update\n request will change only the values that are provided. To clear a value, pass the empty string\n (i.e., \"\").

", - "smithy.api#http": { - "method": "PUT", - "uri": "/projects/{projectName}", - "code": 200 - } - } - }, - "com.amazonaws.iot1clickprojects#UpdateProjectRequest": { - "type": "structure", - "members": { - "projectName": { - "target": "com.amazonaws.iot1clickprojects#ProjectName", - "traits": { - "smithy.api#documentation": "

The name of the project to be updated.

", - "smithy.api#httpLabel": {}, - "smithy.api#required": {} - } - }, - "description": { - "target": "com.amazonaws.iot1clickprojects#Description", - "traits": { - "smithy.api#documentation": "

An optional user-defined description for the project.

" - } - }, - "placementTemplate": { - "target": "com.amazonaws.iot1clickprojects#PlacementTemplate", - "traits": { - "smithy.api#documentation": "

An object defining the project update. Once a project has been created, you cannot add\n device template names to the project. However, for a given placementTemplate, you\n can update the associated callbackOverrides for the device definition using this\n API.

" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.iot1clickprojects#UpdateProjectResponse": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#output": {} - } - } - } -} diff --git a/sdk.properties b/sdk.properties index 0ecd6cd91c8..f06f5ab57ad 100644 --- a/sdk.properties +++ b/sdk.properties @@ -3,4 +3,5 @@ # Use this line to exclude one or more AWS services: # excludeModels=s3,sts,dynamodb +excludeModels=iot-1click-devices-service,iot-1click-projects