/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include
#include
#include
#include
#include
#include
namespace Aws
{
namespace IoT1ClickDevicesService
{
/**
* 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 Aws::Client::ClientWithAsyncTemplateMethods
{
public:
typedef Aws::Client::AWSJsonClient BASECLASS;
static const char* SERVICE_NAME;
static const char* ALLOCATION_TAG;
typedef IoT1ClickDevicesServiceClientConfiguration ClientConfigurationType;
typedef IoT1ClickDevicesServiceEndpointProvider EndpointProviderType;
/**
* 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::IoT1ClickDevicesService::IoT1ClickDevicesServiceClientConfiguration& clientConfiguration = Aws::IoT1ClickDevicesService::IoT1ClickDevicesServiceClientConfiguration(),
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG));
/**
* 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,
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG),
const Aws::IoT1ClickDevicesService::IoT1ClickDevicesServiceClientConfiguration& clientConfiguration = Aws::IoT1ClickDevicesService::IoT1ClickDevicesServiceClientConfiguration());
/**
* 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,
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG),
const Aws::IoT1ClickDevicesService::IoT1ClickDevicesServiceClientConfiguration& clientConfiguration = Aws::IoT1ClickDevicesService::IoT1ClickDevicesServiceClientConfiguration());
/* Legacy constructors due deprecation */
/**
* 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);
/**
* 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);
/**
* 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);
/* End of legacy constructors due deprecation */
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;
/**
* A Callable wrapper for ClaimDevicesByClaimCode that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::ClaimDevicesByClaimCodeOutcomeCallable ClaimDevicesByClaimCodeCallable(const ClaimDevicesByClaimCodeRequestT& request) const
{
return SubmitCallable(&IoT1ClickDevicesServiceClient::ClaimDevicesByClaimCode, request);
}
/**
* An Async wrapper for ClaimDevicesByClaimCode that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void ClaimDevicesByClaimCodeAsync(const ClaimDevicesByClaimCodeRequestT& request, const ClaimDevicesByClaimCodeResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&IoT1ClickDevicesServiceClient::ClaimDevicesByClaimCode, request, handler, context);
}
/**
* 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;
/**
* A Callable wrapper for DescribeDevice that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::DescribeDeviceOutcomeCallable DescribeDeviceCallable(const DescribeDeviceRequestT& request) const
{
return SubmitCallable(&IoT1ClickDevicesServiceClient::DescribeDevice, request);
}
/**
* An Async wrapper for DescribeDevice that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void DescribeDeviceAsync(const DescribeDeviceRequestT& request, const DescribeDeviceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&IoT1ClickDevicesServiceClient::DescribeDevice, request, handler, context);
}
/**
* 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;
/**
* A Callable wrapper for FinalizeDeviceClaim that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::FinalizeDeviceClaimOutcomeCallable FinalizeDeviceClaimCallable(const FinalizeDeviceClaimRequestT& request) const
{
return SubmitCallable(&IoT1ClickDevicesServiceClient::FinalizeDeviceClaim, request);
}
/**
* An Async wrapper for FinalizeDeviceClaim that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void FinalizeDeviceClaimAsync(const FinalizeDeviceClaimRequestT& request, const FinalizeDeviceClaimResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&IoT1ClickDevicesServiceClient::FinalizeDeviceClaim, request, handler, context);
}
/**
* 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;
/**
* A Callable wrapper for GetDeviceMethods that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::GetDeviceMethodsOutcomeCallable GetDeviceMethodsCallable(const GetDeviceMethodsRequestT& request) const
{
return SubmitCallable(&IoT1ClickDevicesServiceClient::GetDeviceMethods, request);
}
/**
* An Async wrapper for GetDeviceMethods that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void GetDeviceMethodsAsync(const GetDeviceMethodsRequestT& request, const GetDeviceMethodsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&IoT1ClickDevicesServiceClient::GetDeviceMethods, request, handler, context);
}
/**
* 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;
/**
* A Callable wrapper for InitiateDeviceClaim that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::InitiateDeviceClaimOutcomeCallable InitiateDeviceClaimCallable(const InitiateDeviceClaimRequestT& request) const
{
return SubmitCallable(&IoT1ClickDevicesServiceClient::InitiateDeviceClaim, request);
}
/**
* An Async wrapper for InitiateDeviceClaim that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void InitiateDeviceClaimAsync(const InitiateDeviceClaimRequestT& request, const InitiateDeviceClaimResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&IoT1ClickDevicesServiceClient::InitiateDeviceClaim, request, handler, context);
}
/**
* 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;
/**
* A Callable wrapper for InvokeDeviceMethod that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::InvokeDeviceMethodOutcomeCallable InvokeDeviceMethodCallable(const InvokeDeviceMethodRequestT& request) const
{
return SubmitCallable(&IoT1ClickDevicesServiceClient::InvokeDeviceMethod, request);
}
/**
* An Async wrapper for InvokeDeviceMethod that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void InvokeDeviceMethodAsync(const InvokeDeviceMethodRequestT& request, const InvokeDeviceMethodResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&IoT1ClickDevicesServiceClient::InvokeDeviceMethod, request, handler, context);
}
/**
* 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;
/**
* A Callable wrapper for ListDeviceEvents that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::ListDeviceEventsOutcomeCallable ListDeviceEventsCallable(const ListDeviceEventsRequestT& request) const
{
return SubmitCallable(&IoT1ClickDevicesServiceClient::ListDeviceEvents, request);
}
/**
* An Async wrapper for ListDeviceEvents that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void ListDeviceEventsAsync(const ListDeviceEventsRequestT& request, const ListDeviceEventsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&IoT1ClickDevicesServiceClient::ListDeviceEvents, request, handler, context);
}
/**
* 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;
/**
* A Callable wrapper for ListDevices that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::ListDevicesOutcomeCallable ListDevicesCallable(const ListDevicesRequestT& request) const
{
return SubmitCallable(&IoT1ClickDevicesServiceClient::ListDevices, request);
}
/**
* An Async wrapper for ListDevices that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void ListDevicesAsync(const ListDevicesRequestT& request, const ListDevicesResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&IoT1ClickDevicesServiceClient::ListDevices, request, handler, context);
}
/**
* Lists the tags associated with the specified resource ARN.
See
* Also:
AWS
* API Reference
*/
virtual Model::ListTagsForResourceOutcome ListTagsForResource(const Model::ListTagsForResourceRequest& request) const;
/**
* A Callable wrapper for ListTagsForResource that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::ListTagsForResourceOutcomeCallable ListTagsForResourceCallable(const ListTagsForResourceRequestT& request) const
{
return SubmitCallable(&IoT1ClickDevicesServiceClient::ListTagsForResource, request);
}
/**
* An Async wrapper for ListTagsForResource that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void ListTagsForResourceAsync(const ListTagsForResourceRequestT& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&IoT1ClickDevicesServiceClient::ListTagsForResource, request, handler, context);
}
/**
* 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;
/**
* A Callable wrapper for TagResource that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::TagResourceOutcomeCallable TagResourceCallable(const TagResourceRequestT& request) const
{
return SubmitCallable(&IoT1ClickDevicesServiceClient::TagResource, request);
}
/**
* An Async wrapper for TagResource that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void TagResourceAsync(const TagResourceRequestT& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&IoT1ClickDevicesServiceClient::TagResource, request, handler, context);
}
/**
* 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;
/**
* A Callable wrapper for UnclaimDevice that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::UnclaimDeviceOutcomeCallable UnclaimDeviceCallable(const UnclaimDeviceRequestT& request) const
{
return SubmitCallable(&IoT1ClickDevicesServiceClient::UnclaimDevice, request);
}
/**
* An Async wrapper for UnclaimDevice that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void UnclaimDeviceAsync(const UnclaimDeviceRequestT& request, const UnclaimDeviceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&IoT1ClickDevicesServiceClient::UnclaimDevice, request, handler, context);
}
/**
* 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;
/**
* A Callable wrapper for UntagResource that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::UntagResourceOutcomeCallable UntagResourceCallable(const UntagResourceRequestT& request) const
{
return SubmitCallable(&IoT1ClickDevicesServiceClient::UntagResource, request);
}
/**
* An Async wrapper for UntagResource that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void UntagResourceAsync(const UntagResourceRequestT& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&IoT1ClickDevicesServiceClient::UntagResource, request, handler, context);
}
/**
* 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;
/**
* A Callable wrapper for UpdateDeviceState that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::UpdateDeviceStateOutcomeCallable UpdateDeviceStateCallable(const UpdateDeviceStateRequestT& request) const
{
return SubmitCallable(&IoT1ClickDevicesServiceClient::UpdateDeviceState, request);
}
/**
* An Async wrapper for UpdateDeviceState that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void UpdateDeviceStateAsync(const UpdateDeviceStateRequestT& request, const UpdateDeviceStateResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&IoT1ClickDevicesServiceClient::UpdateDeviceState, request, handler, context);
}
void OverrideEndpoint(const Aws::String& endpoint);
std::shared_ptr& accessEndpointProvider();
private:
friend class Aws::Client::ClientWithAsyncTemplateMethods;
void init(const IoT1ClickDevicesServiceClientConfiguration& clientConfiguration);
IoT1ClickDevicesServiceClientConfiguration m_clientConfiguration;
std::shared_ptr m_executor;
std::shared_ptr m_endpointProvider;
};
} // namespace IoT1ClickDevicesService
} // namespace Aws