/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace Aws { namespace Http { class HttpClient; class HttpClientFactory; } // namespace Http namespace Utils { template< typename R, typename E> class Outcome; namespace Threading { class Executor; } // namespace Threading } // namespace Utils namespace Auth { class AWSCredentials; class AWSCredentialsProvider; } // namespace Auth namespace Client { class RetryStrategy; } // namespace Client namespace IoT1ClickDevicesService { namespace Model { class ClaimDevicesByClaimCodeRequest; class DescribeDeviceRequest; class FinalizeDeviceClaimRequest; class GetDeviceMethodsRequest; class InitiateDeviceClaimRequest; class InvokeDeviceMethodRequest; class ListDeviceEventsRequest; class ListDevicesRequest; class ListTagsForResourceRequest; class TagResourceRequest; class UnclaimDeviceRequest; class UntagResourceRequest; class UpdateDeviceStateRequest; typedef Aws::Utils::Outcome ClaimDevicesByClaimCodeOutcome; typedef Aws::Utils::Outcome DescribeDeviceOutcome; typedef Aws::Utils::Outcome FinalizeDeviceClaimOutcome; typedef Aws::Utils::Outcome GetDeviceMethodsOutcome; typedef Aws::Utils::Outcome InitiateDeviceClaimOutcome; typedef Aws::Utils::Outcome InvokeDeviceMethodOutcome; typedef Aws::Utils::Outcome ListDeviceEventsOutcome; typedef Aws::Utils::Outcome ListDevicesOutcome; typedef Aws::Utils::Outcome ListTagsForResourceOutcome; typedef Aws::Utils::Outcome TagResourceOutcome; typedef Aws::Utils::Outcome UnclaimDeviceOutcome; typedef Aws::Utils::Outcome UntagResourceOutcome; typedef Aws::Utils::Outcome UpdateDeviceStateOutcome; typedef std::future ClaimDevicesByClaimCodeOutcomeCallable; typedef std::future DescribeDeviceOutcomeCallable; typedef std::future FinalizeDeviceClaimOutcomeCallable; typedef std::future GetDeviceMethodsOutcomeCallable; typedef std::future InitiateDeviceClaimOutcomeCallable; typedef std::future InvokeDeviceMethodOutcomeCallable; typedef std::future ListDeviceEventsOutcomeCallable; typedef std::future ListDevicesOutcomeCallable; typedef std::future ListTagsForResourceOutcomeCallable; typedef std::future TagResourceOutcomeCallable; typedef std::future UnclaimDeviceOutcomeCallable; typedef std::future UntagResourceOutcomeCallable; typedef std::future UpdateDeviceStateOutcomeCallable; } // namespace Model class IoT1ClickDevicesServiceClient; typedef std::function&) > ClaimDevicesByClaimCodeResponseReceivedHandler; typedef std::function&) > DescribeDeviceResponseReceivedHandler; typedef std::function&) > FinalizeDeviceClaimResponseReceivedHandler; typedef std::function&) > GetDeviceMethodsResponseReceivedHandler; typedef std::function&) > InitiateDeviceClaimResponseReceivedHandler; typedef std::function&) > InvokeDeviceMethodResponseReceivedHandler; typedef std::function&) > ListDeviceEventsResponseReceivedHandler; typedef std::function&) > ListDevicesResponseReceivedHandler; typedef std::function&) > ListTagsForResourceResponseReceivedHandler; typedef std::function&) > TagResourceResponseReceivedHandler; typedef std::function&) > UnclaimDeviceResponseReceivedHandler; typedef std::function&) > UntagResourceResponseReceivedHandler; typedef std::function&) > UpdateDeviceStateResponseReceivedHandler; /** *

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

*/ class AWS_IOT1CLICKDEVICESSERVICE_API IoT1ClickDevicesServiceClient : public Aws::Client::AWSJsonClient { public: typedef Aws::Client::AWSJsonClient BASECLASS; /** * Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config * is not specified, it will be initialized to default values. */ IoT1ClickDevicesServiceClient(const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration()); /** * Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config * is not specified, it will be initialized to default values. */ IoT1ClickDevicesServiceClient(const Aws::Auth::AWSCredentials& credentials, const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration()); /** * Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied, * the default http client factory will be used */ IoT1ClickDevicesServiceClient(const std::shared_ptr& credentialsProvider, const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration()); virtual ~IoT1ClickDevicesServiceClient(); /** *

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).

See Also:

AWS * API Reference

*/ virtual Model::ClaimDevicesByClaimCodeOutcome ClaimDevicesByClaimCode(const Model::ClaimDevicesByClaimCodeRequest& request) const; /** *

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).

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::ClaimDevicesByClaimCodeOutcomeCallable ClaimDevicesByClaimCodeCallable(const Model::ClaimDevicesByClaimCodeRequest& request) const; /** *

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).

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void ClaimDevicesByClaimCodeAsync(const Model::ClaimDevicesByClaimCodeRequest& request, const ClaimDevicesByClaimCodeResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

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

See Also:

AWS * API Reference

*/ virtual Model::DescribeDeviceOutcome DescribeDevice(const Model::DescribeDeviceRequest& request) const; /** *

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

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::DescribeDeviceOutcomeCallable DescribeDeviceCallable(const Model::DescribeDeviceRequest& request) const; /** *

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

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void DescribeDeviceAsync(const Model::DescribeDeviceRequest& request, const DescribeDeviceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

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.

*

See Also:

AWS * API Reference

*/ virtual Model::FinalizeDeviceClaimOutcome FinalizeDeviceClaim(const Model::FinalizeDeviceClaimRequest& request) const; /** *

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.

*

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::FinalizeDeviceClaimOutcomeCallable FinalizeDeviceClaimCallable(const Model::FinalizeDeviceClaimRequest& request) const; /** *

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.

*

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void FinalizeDeviceClaimAsync(const Model::FinalizeDeviceClaimRequest& request, const FinalizeDeviceClaimResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

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

See Also:

AWS * API Reference

*/ virtual Model::GetDeviceMethodsOutcome GetDeviceMethods(const Model::GetDeviceMethodsRequest& request) const; /** *

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

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::GetDeviceMethodsOutcomeCallable GetDeviceMethodsCallable(const Model::GetDeviceMethodsRequest& request) const; /** *

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

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void GetDeviceMethodsAsync(const Model::GetDeviceMethodsRequest& request, const GetDeviceMethodsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

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.

*

See Also:

AWS * API Reference

*/ virtual Model::InitiateDeviceClaimOutcome InitiateDeviceClaim(const Model::InitiateDeviceClaimRequest& request) const; /** *

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.

*

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::InitiateDeviceClaimOutcomeCallable InitiateDeviceClaimCallable(const Model::InitiateDeviceClaimRequest& request) const; /** *

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.

*

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void InitiateDeviceClaimAsync(const Model::InitiateDeviceClaimRequest& request, const InitiateDeviceClaimResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

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

See * Also:

AWS * API Reference

*/ virtual Model::InvokeDeviceMethodOutcome InvokeDeviceMethod(const Model::InvokeDeviceMethodRequest& request) const; /** *

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

See * Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::InvokeDeviceMethodOutcomeCallable InvokeDeviceMethodCallable(const Model::InvokeDeviceMethodRequest& request) const; /** *

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

See * Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void InvokeDeviceMethodAsync(const Model::InvokeDeviceMethodRequest& request, const InvokeDeviceMethodResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

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

See Also:

AWS * API Reference

*/ virtual Model::ListDeviceEventsOutcome ListDeviceEvents(const Model::ListDeviceEventsRequest& request) const; /** *

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

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::ListDeviceEventsOutcomeCallable ListDeviceEventsCallable(const Model::ListDeviceEventsRequest& request) const; /** *

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

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void ListDeviceEventsAsync(const Model::ListDeviceEventsRequest& request, const ListDeviceEventsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

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

See Also:

AWS * API Reference

*/ virtual Model::ListDevicesOutcome ListDevices(const Model::ListDevicesRequest& request) const; /** *

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

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::ListDevicesOutcomeCallable ListDevicesCallable(const Model::ListDevicesRequest& request) const; /** *

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

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void ListDevicesAsync(const Model::ListDevicesRequest& request, const ListDevicesResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

Lists the tags associated with the specified resource ARN.

See * Also:

AWS * API Reference

*/ virtual Model::ListTagsForResourceOutcome ListTagsForResource(const Model::ListTagsForResourceRequest& request) const; /** *

Lists the tags associated with the specified resource ARN.

See * Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::ListTagsForResourceOutcomeCallable ListTagsForResourceCallable(const Model::ListTagsForResourceRequest& request) const; /** *

Lists the tags associated with the specified resource ARN.

See * Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void ListTagsForResourceAsync(const Model::ListTagsForResourceRequest& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

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 * resource.

See Also:

AWS * API Reference

*/ virtual Model::TagResourceOutcome TagResource(const Model::TagResourceRequest& request) const; /** *

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 * resource.

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::TagResourceOutcomeCallable TagResourceCallable(const Model::TagResourceRequest& request) const; /** *

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 * resource.

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void TagResourceAsync(const Model::TagResourceRequest& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

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

See Also:

AWS * API Reference

*/ virtual Model::UnclaimDeviceOutcome UnclaimDevice(const Model::UnclaimDeviceRequest& request) const; /** *

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

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::UnclaimDeviceOutcomeCallable UnclaimDeviceCallable(const Model::UnclaimDeviceRequest& request) const; /** *

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

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void UnclaimDeviceAsync(const Model::UnclaimDeviceRequest& request, const UnclaimDeviceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

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

See Also:

AWS * API Reference

*/ virtual Model::UntagResourceOutcome UntagResource(const Model::UntagResourceRequest& request) const; /** *

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

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::UntagResourceOutcomeCallable UntagResourceCallable(const Model::UntagResourceRequest& request) const; /** *

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

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void UntagResourceAsync(const Model::UntagResourceRequest& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; /** *

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

See Also:

AWS * API Reference

*/ virtual Model::UpdateDeviceStateOutcome UpdateDeviceState(const Model::UpdateDeviceStateRequest& request) const; /** *

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

See Also:

AWS * API Reference

* * returns a future to the operation so that it can be executed in parallel to other requests. */ virtual Model::UpdateDeviceStateOutcomeCallable UpdateDeviceStateCallable(const Model::UpdateDeviceStateRequest& request) const; /** *

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

See Also:

AWS * API Reference

* * Queues the request into a thread executor and triggers associated callback when operation has finished. */ virtual void UpdateDeviceStateAsync(const Model::UpdateDeviceStateRequest& request, const UpdateDeviceStateResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; void OverrideEndpoint(const Aws::String& endpoint); private: void init(const Aws::Client::ClientConfiguration& clientConfiguration); void ClaimDevicesByClaimCodeAsyncHelper(const Model::ClaimDevicesByClaimCodeRequest& request, const ClaimDevicesByClaimCodeResponseReceivedHandler& handler, const std::shared_ptr& context) const; void DescribeDeviceAsyncHelper(const Model::DescribeDeviceRequest& request, const DescribeDeviceResponseReceivedHandler& handler, const std::shared_ptr& context) const; void FinalizeDeviceClaimAsyncHelper(const Model::FinalizeDeviceClaimRequest& request, const FinalizeDeviceClaimResponseReceivedHandler& handler, const std::shared_ptr& context) const; void GetDeviceMethodsAsyncHelper(const Model::GetDeviceMethodsRequest& request, const GetDeviceMethodsResponseReceivedHandler& handler, const std::shared_ptr& context) const; void InitiateDeviceClaimAsyncHelper(const Model::InitiateDeviceClaimRequest& request, const InitiateDeviceClaimResponseReceivedHandler& handler, const std::shared_ptr& context) const; void InvokeDeviceMethodAsyncHelper(const Model::InvokeDeviceMethodRequest& request, const InvokeDeviceMethodResponseReceivedHandler& handler, const std::shared_ptr& context) const; void ListDeviceEventsAsyncHelper(const Model::ListDeviceEventsRequest& request, const ListDeviceEventsResponseReceivedHandler& handler, const std::shared_ptr& context) const; void ListDevicesAsyncHelper(const Model::ListDevicesRequest& request, const ListDevicesResponseReceivedHandler& handler, const std::shared_ptr& context) const; void ListTagsForResourceAsyncHelper(const Model::ListTagsForResourceRequest& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr& context) const; void TagResourceAsyncHelper(const Model::TagResourceRequest& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr& context) const; void UnclaimDeviceAsyncHelper(const Model::UnclaimDeviceRequest& request, const UnclaimDeviceResponseReceivedHandler& handler, const std::shared_ptr& context) const; void UntagResourceAsyncHelper(const Model::UntagResourceRequest& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr& context) const; void UpdateDeviceStateAsyncHelper(const Model::UpdateDeviceStateRequest& request, const UpdateDeviceStateResponseReceivedHandler& handler, const std::shared_ptr& context) const; Aws::String m_uri; Aws::String m_configScheme; std::shared_ptr m_executor; }; } // namespace IoT1ClickDevicesService } // namespace Aws