feat(hos_client_create, hos_client_destory): 多次调用destory不会导致重复释放

This commit is contained in:
彭宣正
2020-12-14 17:24:58 +08:00
parent 505d529c32
commit 10b370e486
55976 changed files with 8544395 additions and 2 deletions

View File

@@ -0,0 +1,296 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/iot-data/IoTDataPlane_EXPORTS.h>
#include <aws/iot-data/IoTDataPlaneErrors.h>
#include <aws/core/client/AWSError.h>
#include <aws/core/client/ClientConfiguration.h>
#include <aws/core/client/AWSClient.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/iot-data/model/DeleteThingShadowResult.h>
#include <aws/iot-data/model/GetThingShadowResult.h>
#include <aws/iot-data/model/ListNamedShadowsForThingResult.h>
#include <aws/iot-data/model/UpdateThingShadowResult.h>
#include <aws/core/NoResult.h>
#include <aws/core/client/AsyncCallerContext.h>
#include <aws/core/http/HttpTypes.h>
#include <future>
#include <functional>
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 IoTDataPlane
{
namespace Model
{
class DeleteThingShadowRequest;
class GetThingShadowRequest;
class ListNamedShadowsForThingRequest;
class PublishRequest;
class UpdateThingShadowRequest;
typedef Aws::Utils::Outcome<DeleteThingShadowResult, IoTDataPlaneError> DeleteThingShadowOutcome;
typedef Aws::Utils::Outcome<GetThingShadowResult, IoTDataPlaneError> GetThingShadowOutcome;
typedef Aws::Utils::Outcome<ListNamedShadowsForThingResult, IoTDataPlaneError> ListNamedShadowsForThingOutcome;
typedef Aws::Utils::Outcome<Aws::NoResult, IoTDataPlaneError> PublishOutcome;
typedef Aws::Utils::Outcome<UpdateThingShadowResult, IoTDataPlaneError> UpdateThingShadowOutcome;
typedef std::future<DeleteThingShadowOutcome> DeleteThingShadowOutcomeCallable;
typedef std::future<GetThingShadowOutcome> GetThingShadowOutcomeCallable;
typedef std::future<ListNamedShadowsForThingOutcome> ListNamedShadowsForThingOutcomeCallable;
typedef std::future<PublishOutcome> PublishOutcomeCallable;
typedef std::future<UpdateThingShadowOutcome> UpdateThingShadowOutcomeCallable;
} // namespace Model
class IoTDataPlaneClient;
typedef std::function<void(const IoTDataPlaneClient*, const Model::DeleteThingShadowRequest&, Model::DeleteThingShadowOutcome, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DeleteThingShadowResponseReceivedHandler;
typedef std::function<void(const IoTDataPlaneClient*, const Model::GetThingShadowRequest&, Model::GetThingShadowOutcome, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetThingShadowResponseReceivedHandler;
typedef std::function<void(const IoTDataPlaneClient*, const Model::ListNamedShadowsForThingRequest&, const Model::ListNamedShadowsForThingOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListNamedShadowsForThingResponseReceivedHandler;
typedef std::function<void(const IoTDataPlaneClient*, const Model::PublishRequest&, const Model::PublishOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > PublishResponseReceivedHandler;
typedef std::function<void(const IoTDataPlaneClient*, const Model::UpdateThingShadowRequest&, Model::UpdateThingShadowOutcome, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > UpdateThingShadowResponseReceivedHandler;
/**
* <fullname>AWS IoT</fullname> <p>AWS IoT-Data enables secure, bi-directional
* communication between Internet-connected things (such as sensors, actuators,
* embedded devices, or smart appliances) and the AWS cloud. It implements a broker
* for applications and things to publish messages over HTTP (Publish) and
* retrieve, update, and delete shadows. A shadow is a persistent representation of
* your things and their state in the AWS cloud.</p> <p>Find the endpoint address
* for actions in the AWS IoT data plane by running this CLI command:</p> <p>
* <code>aws iot describe-endpoint --endpoint-type iot:Data-ATS</code> </p> <p>The
* service name used by <a
* href="https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html">AWS
* Signature Version 4</a> to sign requests is: <i>iotdevicegateway</i>.</p>
*/
class AWS_IOTDATAPLANE_API IoTDataPlaneClient : 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.
*/
IoTDataPlaneClient(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.
*/
IoTDataPlaneClient(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
*/
IoTDataPlaneClient(const std::shared_ptr<Aws::Auth::AWSCredentialsProvider>& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
virtual ~IoTDataPlaneClient();
/**
* <p>Deletes the shadow for the specified thing.</p> <p>For more information, see
* <a
* href="http://docs.aws.amazon.com/iot/latest/developerguide/API_DeleteThingShadow.html">DeleteThingShadow</a>
* in the AWS IoT Developer Guide.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/DeleteThingShadow">AWS
* API Reference</a></p>
*/
virtual Model::DeleteThingShadowOutcome DeleteThingShadow(const Model::DeleteThingShadowRequest& request) const;
/**
* <p>Deletes the shadow for the specified thing.</p> <p>For more information, see
* <a
* href="http://docs.aws.amazon.com/iot/latest/developerguide/API_DeleteThingShadow.html">DeleteThingShadow</a>
* in the AWS IoT Developer Guide.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/DeleteThingShadow">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DeleteThingShadowOutcomeCallable DeleteThingShadowCallable(const Model::DeleteThingShadowRequest& request) const;
/**
* <p>Deletes the shadow for the specified thing.</p> <p>For more information, see
* <a
* href="http://docs.aws.amazon.com/iot/latest/developerguide/API_DeleteThingShadow.html">DeleteThingShadow</a>
* in the AWS IoT Developer Guide.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/DeleteThingShadow">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DeleteThingShadowAsync(const Model::DeleteThingShadowRequest& request, const DeleteThingShadowResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Gets the shadow for the specified thing.</p> <p>For more information, see <a
* href="http://docs.aws.amazon.com/iot/latest/developerguide/API_GetThingShadow.html">GetThingShadow</a>
* in the AWS IoT Developer Guide.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/GetThingShadow">AWS
* API Reference</a></p>
*/
virtual Model::GetThingShadowOutcome GetThingShadow(const Model::GetThingShadowRequest& request) const;
/**
* <p>Gets the shadow for the specified thing.</p> <p>For more information, see <a
* href="http://docs.aws.amazon.com/iot/latest/developerguide/API_GetThingShadow.html">GetThingShadow</a>
* in the AWS IoT Developer Guide.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/GetThingShadow">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::GetThingShadowOutcomeCallable GetThingShadowCallable(const Model::GetThingShadowRequest& request) const;
/**
* <p>Gets the shadow for the specified thing.</p> <p>For more information, see <a
* href="http://docs.aws.amazon.com/iot/latest/developerguide/API_GetThingShadow.html">GetThingShadow</a>
* in the AWS IoT Developer Guide.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/GetThingShadow">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void GetThingShadowAsync(const Model::GetThingShadowRequest& request, const GetThingShadowResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Lists the shadows for the specified thing.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/ListNamedShadowsForThing">AWS
* API Reference</a></p>
*/
virtual Model::ListNamedShadowsForThingOutcome ListNamedShadowsForThing(const Model::ListNamedShadowsForThingRequest& request) const;
/**
* <p>Lists the shadows for the specified thing.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/ListNamedShadowsForThing">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListNamedShadowsForThingOutcomeCallable ListNamedShadowsForThingCallable(const Model::ListNamedShadowsForThingRequest& request) const;
/**
* <p>Lists the shadows for the specified thing.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/ListNamedShadowsForThing">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListNamedShadowsForThingAsync(const Model::ListNamedShadowsForThingRequest& request, const ListNamedShadowsForThingResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Publishes state information.</p> <p>For more information, see <a
* href="http://docs.aws.amazon.com/iot/latest/developerguide/protocols.html#http">HTTP
* Protocol</a> in the AWS IoT Developer Guide.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/Publish">AWS
* API Reference</a></p>
*/
virtual Model::PublishOutcome Publish(const Model::PublishRequest& request) const;
/**
* <p>Publishes state information.</p> <p>For more information, see <a
* href="http://docs.aws.amazon.com/iot/latest/developerguide/protocols.html#http">HTTP
* Protocol</a> in the AWS IoT Developer Guide.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/Publish">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::PublishOutcomeCallable PublishCallable(const Model::PublishRequest& request) const;
/**
* <p>Publishes state information.</p> <p>For more information, see <a
* href="http://docs.aws.amazon.com/iot/latest/developerguide/protocols.html#http">HTTP
* Protocol</a> in the AWS IoT Developer Guide.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/Publish">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void PublishAsync(const Model::PublishRequest& request, const PublishResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Updates the shadow for the specified thing.</p> <p>For more information, see
* <a
* href="http://docs.aws.amazon.com/iot/latest/developerguide/API_UpdateThingShadow.html">UpdateThingShadow</a>
* in the AWS IoT Developer Guide.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/UpdateThingShadow">AWS
* API Reference</a></p>
*/
virtual Model::UpdateThingShadowOutcome UpdateThingShadow(const Model::UpdateThingShadowRequest& request) const;
/**
* <p>Updates the shadow for the specified thing.</p> <p>For more information, see
* <a
* href="http://docs.aws.amazon.com/iot/latest/developerguide/API_UpdateThingShadow.html">UpdateThingShadow</a>
* in the AWS IoT Developer Guide.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/UpdateThingShadow">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::UpdateThingShadowOutcomeCallable UpdateThingShadowCallable(const Model::UpdateThingShadowRequest& request) const;
/**
* <p>Updates the shadow for the specified thing.</p> <p>For more information, see
* <a
* href="http://docs.aws.amazon.com/iot/latest/developerguide/API_UpdateThingShadow.html">UpdateThingShadow</a>
* in the AWS IoT Developer Guide.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/UpdateThingShadow">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void UpdateThingShadowAsync(const Model::UpdateThingShadowRequest& request, const UpdateThingShadowResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
void OverrideEndpoint(const Aws::String& endpoint);
private:
void init(const Aws::Client::ClientConfiguration& clientConfiguration);
void DeleteThingShadowAsyncHelper(const Model::DeleteThingShadowRequest& request, const DeleteThingShadowResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void GetThingShadowAsyncHelper(const Model::GetThingShadowRequest& request, const GetThingShadowResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void ListNamedShadowsForThingAsyncHelper(const Model::ListNamedShadowsForThingRequest& request, const ListNamedShadowsForThingResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void PublishAsyncHelper(const Model::PublishRequest& request, const PublishResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void UpdateThingShadowAsyncHelper(const Model::UpdateThingShadowRequest& request, const UpdateThingShadowResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
Aws::String m_uri;
Aws::String m_configScheme;
std::shared_ptr<Aws::Utils::Threading::Executor> m_executor;
};
} // namespace IoTDataPlane
} // namespace Aws

View File

@@ -0,0 +1,21 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/iot-data/IoTDataPlane_EXPORTS.h>
#include <aws/core/Region.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace IoTDataPlane
{
namespace IoTDataPlaneEndpoint
{
AWS_IOTDATAPLANE_API Aws::String ForRegion(const Aws::String& regionName, bool useDualStack = false);
} // namespace IoTDataPlaneEndpoint
} // namespace IoTDataPlane
} // namespace Aws

View File

@@ -0,0 +1,23 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/iot-data/IoTDataPlane_EXPORTS.h>
#include <aws/core/client/AWSErrorMarshaller.h>
namespace Aws
{
namespace Client
{
class AWS_IOTDATAPLANE_API IoTDataPlaneErrorMarshaller : public Aws::Client::JsonErrorMarshaller
{
public:
Aws::Client::AWSError<Aws::Client::CoreErrors> FindErrorByName(const char* exceptionName) const override;
};
} // namespace Client
} // namespace Aws

View File

@@ -0,0 +1,77 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/core/client/AWSError.h>
#include <aws/core/client/CoreErrors.h>
#include <aws/iot-data/IoTDataPlane_EXPORTS.h>
namespace Aws
{
namespace IoTDataPlane
{
enum class IoTDataPlaneErrors
{
//From Core//
//////////////////////////////////////////////////////////////////////////////////////////
INCOMPLETE_SIGNATURE = 0,
INTERNAL_FAILURE = 1,
INVALID_ACTION = 2,
INVALID_CLIENT_TOKEN_ID = 3,
INVALID_PARAMETER_COMBINATION = 4,
INVALID_QUERY_PARAMETER = 5,
INVALID_PARAMETER_VALUE = 6,
MISSING_ACTION = 7, // SDK should never allow
MISSING_AUTHENTICATION_TOKEN = 8, // SDK should never allow
MISSING_PARAMETER = 9, // SDK should never allow
OPT_IN_REQUIRED = 10,
REQUEST_EXPIRED = 11,
SERVICE_UNAVAILABLE = 12,
THROTTLING = 13,
VALIDATION = 14,
ACCESS_DENIED = 15,
RESOURCE_NOT_FOUND = 16,
UNRECOGNIZED_CLIENT = 17,
MALFORMED_QUERY_STRING = 18,
SLOW_DOWN = 19,
REQUEST_TIME_TOO_SKEWED = 20,
INVALID_SIGNATURE = 21,
SIGNATURE_DOES_NOT_MATCH = 22,
INVALID_ACCESS_KEY_ID = 23,
REQUEST_TIMEOUT = 24,
NETWORK_CONNECTION = 99,
UNKNOWN = 100,
///////////////////////////////////////////////////////////////////////////////////////////
CONFLICT= static_cast<int>(Aws::Client::CoreErrors::SERVICE_EXTENSION_START_RANGE) + 1,
INVALID_REQUEST,
METHOD_NOT_ALLOWED,
REQUEST_ENTITY_TOO_LARGE,
UNAUTHORIZED,
UNSUPPORTED_DOCUMENT_ENCODING
};
class AWS_IOTDATAPLANE_API IoTDataPlaneError : public Aws::Client::AWSError<IoTDataPlaneErrors>
{
public:
IoTDataPlaneError() {}
IoTDataPlaneError(const Aws::Client::AWSError<Aws::Client::CoreErrors>& rhs) : Aws::Client::AWSError<IoTDataPlaneErrors>(rhs) {}
IoTDataPlaneError(Aws::Client::AWSError<Aws::Client::CoreErrors>&& rhs) : Aws::Client::AWSError<IoTDataPlaneErrors>(rhs) {}
IoTDataPlaneError(const Aws::Client::AWSError<IoTDataPlaneErrors>& rhs) : Aws::Client::AWSError<IoTDataPlaneErrors>(rhs) {}
IoTDataPlaneError(Aws::Client::AWSError<IoTDataPlaneErrors>&& rhs) : Aws::Client::AWSError<IoTDataPlaneErrors>(rhs) {}
template <typename T>
T GetModeledError();
};
namespace IoTDataPlaneErrorMapper
{
AWS_IOTDATAPLANE_API Aws::Client::AWSError<Aws::Client::CoreErrors> GetErrorForName(const char* errorName);
}
} // namespace IoTDataPlane
} // namespace Aws

View File

@@ -0,0 +1,44 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/iot-data/IoTDataPlane_EXPORTS.h>
#include <aws/core/AmazonSerializableWebServiceRequest.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <aws/core/http/HttpRequest.h>
#include <aws/core/AmazonStreamingWebServiceRequest.h>
namespace Aws
{
namespace IoTDataPlane
{
class AWS_IOTDATAPLANE_API IoTDataPlaneRequest : public Aws::AmazonSerializableWebServiceRequest
{
public:
virtual ~IoTDataPlaneRequest () {}
void AddParametersToRequest(Aws::Http::HttpRequest& httpRequest) const { AWS_UNREFERENCED_PARAM(httpRequest); }
inline Aws::Http::HeaderValueCollection GetHeaders() const override
{
auto headers = GetRequestSpecificHeaders();
if(headers.size() == 0 || (headers.size() > 0 && headers.count(Aws::Http::CONTENT_TYPE_HEADER) == 0))
{
headers.emplace(Aws::Http::HeaderValuePair(Aws::Http::CONTENT_TYPE_HEADER, Aws::AMZN_JSON_CONTENT_TYPE_1_1 ));
}
headers.emplace(Aws::Http::HeaderValuePair(Aws::Http::API_VERSION_HEADER, "2015-05-28"));
return headers;
}
protected:
virtual Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const { return Aws::Http::HeaderValueCollection(); }
};
typedef Aws::AmazonStreamingWebServiceRequest StreamingIoTDataPlaneRequest;
} // namespace IoTDataPlane
} // namespace Aws

View File

@@ -0,0 +1,29 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#ifdef _MSC_VER
//disable windows complaining about max template size.
#pragma warning (disable : 4503)
#endif // _MSC_VER
#if defined (USE_WINDOWS_DLL_SEMANTICS) || defined (_WIN32)
#ifdef _MSC_VER
#pragma warning(disable : 4251)
#endif // _MSC_VER
#ifdef USE_IMPORT_EXPORT
#ifdef AWS_IOTDATAPLANE_EXPORTS
#define AWS_IOTDATAPLANE_API __declspec(dllexport)
#else
#define AWS_IOTDATAPLANE_API __declspec(dllimport)
#endif /* AWS_IOTDATAPLANE_EXPORTS */
#else
#define AWS_IOTDATAPLANE_API
#endif // USE_IMPORT_EXPORT
#else // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)
#define AWS_IOTDATAPLANE_API
#endif // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)

View File

@@ -0,0 +1,136 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/iot-data/IoTDataPlane_EXPORTS.h>
#include <aws/iot-data/IoTDataPlaneRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Http
{
class URI;
} //namespace Http
namespace IoTDataPlane
{
namespace Model
{
/**
* <p>The input for the DeleteThingShadow operation.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/DeleteThingShadowRequest">AWS
* API Reference</a></p>
*/
class AWS_IOTDATAPLANE_API DeleteThingShadowRequest : public IoTDataPlaneRequest
{
public:
DeleteThingShadowRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "DeleteThingShadow"; }
Aws::String SerializePayload() const override;
void AddQueryStringParameters(Aws::Http::URI& uri) const override;
/**
* <p>The name of the thing.</p>
*/
inline const Aws::String& GetThingName() const{ return m_thingName; }
/**
* <p>The name of the thing.</p>
*/
inline bool ThingNameHasBeenSet() const { return m_thingNameHasBeenSet; }
/**
* <p>The name of the thing.</p>
*/
inline void SetThingName(const Aws::String& value) { m_thingNameHasBeenSet = true; m_thingName = value; }
/**
* <p>The name of the thing.</p>
*/
inline void SetThingName(Aws::String&& value) { m_thingNameHasBeenSet = true; m_thingName = std::move(value); }
/**
* <p>The name of the thing.</p>
*/
inline void SetThingName(const char* value) { m_thingNameHasBeenSet = true; m_thingName.assign(value); }
/**
* <p>The name of the thing.</p>
*/
inline DeleteThingShadowRequest& WithThingName(const Aws::String& value) { SetThingName(value); return *this;}
/**
* <p>The name of the thing.</p>
*/
inline DeleteThingShadowRequest& WithThingName(Aws::String&& value) { SetThingName(std::move(value)); return *this;}
/**
* <p>The name of the thing.</p>
*/
inline DeleteThingShadowRequest& WithThingName(const char* value) { SetThingName(value); return *this;}
/**
* <p>The name of the shadow.</p>
*/
inline const Aws::String& GetShadowName() const{ return m_shadowName; }
/**
* <p>The name of the shadow.</p>
*/
inline bool ShadowNameHasBeenSet() const { return m_shadowNameHasBeenSet; }
/**
* <p>The name of the shadow.</p>
*/
inline void SetShadowName(const Aws::String& value) { m_shadowNameHasBeenSet = true; m_shadowName = value; }
/**
* <p>The name of the shadow.</p>
*/
inline void SetShadowName(Aws::String&& value) { m_shadowNameHasBeenSet = true; m_shadowName = std::move(value); }
/**
* <p>The name of the shadow.</p>
*/
inline void SetShadowName(const char* value) { m_shadowNameHasBeenSet = true; m_shadowName.assign(value); }
/**
* <p>The name of the shadow.</p>
*/
inline DeleteThingShadowRequest& WithShadowName(const Aws::String& value) { SetShadowName(value); return *this;}
/**
* <p>The name of the shadow.</p>
*/
inline DeleteThingShadowRequest& WithShadowName(Aws::String&& value) { SetShadowName(std::move(value)); return *this;}
/**
* <p>The name of the shadow.</p>
*/
inline DeleteThingShadowRequest& WithShadowName(const char* value) { SetShadowName(value); return *this;}
private:
Aws::String m_thingName;
bool m_thingNameHasBeenSet;
Aws::String m_shadowName;
bool m_shadowNameHasBeenSet;
};
} // namespace Model
} // namespace IoTDataPlane
} // namespace Aws

View File

@@ -0,0 +1,62 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/iot-data/IoTDataPlane_EXPORTS.h>
#include <aws/core/utils/stream/ResponseStream.h>
#include <aws/core/utils/Array.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace IoTDataPlane
{
namespace Model
{
/**
* <p>The output from the DeleteThingShadow operation.</p><p><h3>See Also:</h3>
* <a
* href="http://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/DeleteThingShadowResponse">AWS
* API Reference</a></p>
*/
class AWS_IOTDATAPLANE_API DeleteThingShadowResult
{
public:
DeleteThingShadowResult();
//We have to define these because Microsoft doesn't auto generate them
DeleteThingShadowResult(DeleteThingShadowResult&&);
DeleteThingShadowResult& operator=(DeleteThingShadowResult&&);
//we delete these because Microsoft doesn't handle move generation correctly
//and we therefore don't trust them to get it right here either.
DeleteThingShadowResult(const DeleteThingShadowResult&) = delete;
DeleteThingShadowResult& operator=(const DeleteThingShadowResult&) = delete;
DeleteThingShadowResult(Aws::AmazonWebServiceResult<Aws::Utils::Stream::ResponseStream>&& result);
DeleteThingShadowResult& operator=(Aws::AmazonWebServiceResult<Aws::Utils::Stream::ResponseStream>&& result);
/**
* <p>The state information, in JSON format.</p>
*/
inline Aws::IOStream& GetPayload() { return m_payload.GetUnderlyingStream(); }
/**
* <p>The state information, in JSON format.</p>
*/
inline void ReplaceBody(Aws::IOStream* body) { m_payload = Aws::Utils::Stream::ResponseStream(body); }
private:
Aws::Utils::Stream::ResponseStream m_payload;
};
} // namespace Model
} // namespace IoTDataPlane
} // namespace Aws

View File

@@ -0,0 +1,136 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/iot-data/IoTDataPlane_EXPORTS.h>
#include <aws/iot-data/IoTDataPlaneRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Http
{
class URI;
} //namespace Http
namespace IoTDataPlane
{
namespace Model
{
/**
* <p>The input for the GetThingShadow operation.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/GetThingShadowRequest">AWS
* API Reference</a></p>
*/
class AWS_IOTDATAPLANE_API GetThingShadowRequest : public IoTDataPlaneRequest
{
public:
GetThingShadowRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "GetThingShadow"; }
Aws::String SerializePayload() const override;
void AddQueryStringParameters(Aws::Http::URI& uri) const override;
/**
* <p>The name of the thing.</p>
*/
inline const Aws::String& GetThingName() const{ return m_thingName; }
/**
* <p>The name of the thing.</p>
*/
inline bool ThingNameHasBeenSet() const { return m_thingNameHasBeenSet; }
/**
* <p>The name of the thing.</p>
*/
inline void SetThingName(const Aws::String& value) { m_thingNameHasBeenSet = true; m_thingName = value; }
/**
* <p>The name of the thing.</p>
*/
inline void SetThingName(Aws::String&& value) { m_thingNameHasBeenSet = true; m_thingName = std::move(value); }
/**
* <p>The name of the thing.</p>
*/
inline void SetThingName(const char* value) { m_thingNameHasBeenSet = true; m_thingName.assign(value); }
/**
* <p>The name of the thing.</p>
*/
inline GetThingShadowRequest& WithThingName(const Aws::String& value) { SetThingName(value); return *this;}
/**
* <p>The name of the thing.</p>
*/
inline GetThingShadowRequest& WithThingName(Aws::String&& value) { SetThingName(std::move(value)); return *this;}
/**
* <p>The name of the thing.</p>
*/
inline GetThingShadowRequest& WithThingName(const char* value) { SetThingName(value); return *this;}
/**
* <p>The name of the shadow.</p>
*/
inline const Aws::String& GetShadowName() const{ return m_shadowName; }
/**
* <p>The name of the shadow.</p>
*/
inline bool ShadowNameHasBeenSet() const { return m_shadowNameHasBeenSet; }
/**
* <p>The name of the shadow.</p>
*/
inline void SetShadowName(const Aws::String& value) { m_shadowNameHasBeenSet = true; m_shadowName = value; }
/**
* <p>The name of the shadow.</p>
*/
inline void SetShadowName(Aws::String&& value) { m_shadowNameHasBeenSet = true; m_shadowName = std::move(value); }
/**
* <p>The name of the shadow.</p>
*/
inline void SetShadowName(const char* value) { m_shadowNameHasBeenSet = true; m_shadowName.assign(value); }
/**
* <p>The name of the shadow.</p>
*/
inline GetThingShadowRequest& WithShadowName(const Aws::String& value) { SetShadowName(value); return *this;}
/**
* <p>The name of the shadow.</p>
*/
inline GetThingShadowRequest& WithShadowName(Aws::String&& value) { SetShadowName(std::move(value)); return *this;}
/**
* <p>The name of the shadow.</p>
*/
inline GetThingShadowRequest& WithShadowName(const char* value) { SetShadowName(value); return *this;}
private:
Aws::String m_thingName;
bool m_thingNameHasBeenSet;
Aws::String m_shadowName;
bool m_shadowNameHasBeenSet;
};
} // namespace Model
} // namespace IoTDataPlane
} // namespace Aws

View File

@@ -0,0 +1,61 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/iot-data/IoTDataPlane_EXPORTS.h>
#include <aws/core/utils/stream/ResponseStream.h>
#include <aws/core/utils/Array.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace IoTDataPlane
{
namespace Model
{
/**
* <p>The output from the GetThingShadow operation.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/GetThingShadowResponse">AWS
* API Reference</a></p>
*/
class AWS_IOTDATAPLANE_API GetThingShadowResult
{
public:
GetThingShadowResult();
//We have to define these because Microsoft doesn't auto generate them
GetThingShadowResult(GetThingShadowResult&&);
GetThingShadowResult& operator=(GetThingShadowResult&&);
//we delete these because Microsoft doesn't handle move generation correctly
//and we therefore don't trust them to get it right here either.
GetThingShadowResult(const GetThingShadowResult&) = delete;
GetThingShadowResult& operator=(const GetThingShadowResult&) = delete;
GetThingShadowResult(Aws::AmazonWebServiceResult<Aws::Utils::Stream::ResponseStream>&& result);
GetThingShadowResult& operator=(Aws::AmazonWebServiceResult<Aws::Utils::Stream::ResponseStream>&& result);
/**
* <p>The state information, in JSON format.</p>
*/
inline Aws::IOStream& GetPayload() { return m_payload.GetUnderlyingStream(); }
/**
* <p>The state information, in JSON format.</p>
*/
inline void ReplaceBody(Aws::IOStream* body) { m_payload = Aws::Utils::Stream::ResponseStream(body); }
private:
Aws::Utils::Stream::ResponseStream m_payload;
};
} // namespace Model
} // namespace IoTDataPlane
} // namespace Aws

View File

@@ -0,0 +1,157 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/iot-data/IoTDataPlane_EXPORTS.h>
#include <aws/iot-data/IoTDataPlaneRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Http
{
class URI;
} //namespace Http
namespace IoTDataPlane
{
namespace Model
{
/**
*/
class AWS_IOTDATAPLANE_API ListNamedShadowsForThingRequest : public IoTDataPlaneRequest
{
public:
ListNamedShadowsForThingRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "ListNamedShadowsForThing"; }
Aws::String SerializePayload() const override;
void AddQueryStringParameters(Aws::Http::URI& uri) const override;
/**
* <p>The name of the thing.</p>
*/
inline const Aws::String& GetThingName() const{ return m_thingName; }
/**
* <p>The name of the thing.</p>
*/
inline bool ThingNameHasBeenSet() const { return m_thingNameHasBeenSet; }
/**
* <p>The name of the thing.</p>
*/
inline void SetThingName(const Aws::String& value) { m_thingNameHasBeenSet = true; m_thingName = value; }
/**
* <p>The name of the thing.</p>
*/
inline void SetThingName(Aws::String&& value) { m_thingNameHasBeenSet = true; m_thingName = std::move(value); }
/**
* <p>The name of the thing.</p>
*/
inline void SetThingName(const char* value) { m_thingNameHasBeenSet = true; m_thingName.assign(value); }
/**
* <p>The name of the thing.</p>
*/
inline ListNamedShadowsForThingRequest& WithThingName(const Aws::String& value) { SetThingName(value); return *this;}
/**
* <p>The name of the thing.</p>
*/
inline ListNamedShadowsForThingRequest& WithThingName(Aws::String&& value) { SetThingName(std::move(value)); return *this;}
/**
* <p>The name of the thing.</p>
*/
inline ListNamedShadowsForThingRequest& WithThingName(const char* value) { SetThingName(value); return *this;}
/**
* <p>The token to retrieve the next set of results.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>The token to retrieve the next set of results.</p>
*/
inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
/**
* <p>The token to retrieve the next set of results.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
/**
* <p>The token to retrieve the next set of results.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); }
/**
* <p>The token to retrieve the next set of results.</p>
*/
inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }
/**
* <p>The token to retrieve the next set of results.</p>
*/
inline ListNamedShadowsForThingRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>The token to retrieve the next set of results.</p>
*/
inline ListNamedShadowsForThingRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>The token to retrieve the next set of results.</p>
*/
inline ListNamedShadowsForThingRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}
/**
* <p>The result page size.</p>
*/
inline int GetPageSize() const{ return m_pageSize; }
/**
* <p>The result page size.</p>
*/
inline bool PageSizeHasBeenSet() const { return m_pageSizeHasBeenSet; }
/**
* <p>The result page size.</p>
*/
inline void SetPageSize(int value) { m_pageSizeHasBeenSet = true; m_pageSize = value; }
/**
* <p>The result page size.</p>
*/
inline ListNamedShadowsForThingRequest& WithPageSize(int value) { SetPageSize(value); return *this;}
private:
Aws::String m_thingName;
bool m_thingNameHasBeenSet;
Aws::String m_nextToken;
bool m_nextTokenHasBeenSet;
int m_pageSize;
bool m_pageSizeHasBeenSet;
};
} // namespace Model
} // namespace IoTDataPlane
} // namespace Aws

View File

@@ -0,0 +1,146 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/iot-data/IoTDataPlane_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace IoTDataPlane
{
namespace Model
{
class AWS_IOTDATAPLANE_API ListNamedShadowsForThingResult
{
public:
ListNamedShadowsForThingResult();
ListNamedShadowsForThingResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
ListNamedShadowsForThingResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>The list of shadows for the specified thing.</p>
*/
inline const Aws::Vector<Aws::String>& GetResults() const{ return m_results; }
/**
* <p>The list of shadows for the specified thing.</p>
*/
inline void SetResults(const Aws::Vector<Aws::String>& value) { m_results = value; }
/**
* <p>The list of shadows for the specified thing.</p>
*/
inline void SetResults(Aws::Vector<Aws::String>&& value) { m_results = std::move(value); }
/**
* <p>The list of shadows for the specified thing.</p>
*/
inline ListNamedShadowsForThingResult& WithResults(const Aws::Vector<Aws::String>& value) { SetResults(value); return *this;}
/**
* <p>The list of shadows for the specified thing.</p>
*/
inline ListNamedShadowsForThingResult& WithResults(Aws::Vector<Aws::String>&& value) { SetResults(std::move(value)); return *this;}
/**
* <p>The list of shadows for the specified thing.</p>
*/
inline ListNamedShadowsForThingResult& AddResults(const Aws::String& value) { m_results.push_back(value); return *this; }
/**
* <p>The list of shadows for the specified thing.</p>
*/
inline ListNamedShadowsForThingResult& AddResults(Aws::String&& value) { m_results.push_back(std::move(value)); return *this; }
/**
* <p>The list of shadows for the specified thing.</p>
*/
inline ListNamedShadowsForThingResult& AddResults(const char* value) { m_results.push_back(value); return *this; }
/**
* <p>The token for the next set of results, or null if there are no additional
* results.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>The token for the next set of results, or null if there are no additional
* results.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextToken = value; }
/**
* <p>The token for the next set of results, or null if there are no additional
* results.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); }
/**
* <p>The token for the next set of results, or null if there are no additional
* results.</p>
*/
inline void SetNextToken(const char* value) { m_nextToken.assign(value); }
/**
* <p>The token for the next set of results, or null if there are no additional
* results.</p>
*/
inline ListNamedShadowsForThingResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>The token for the next set of results, or null if there are no additional
* results.</p>
*/
inline ListNamedShadowsForThingResult& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>The token for the next set of results, or null if there are no additional
* results.</p>
*/
inline ListNamedShadowsForThingResult& WithNextToken(const char* value) { SetNextToken(value); return *this;}
/**
* <p>The Epoch date and time the response was generated by AWS IoT.</p>
*/
inline long long GetTimestamp() const{ return m_timestamp; }
/**
* <p>The Epoch date and time the response was generated by AWS IoT.</p>
*/
inline void SetTimestamp(long long value) { m_timestamp = value; }
/**
* <p>The Epoch date and time the response was generated by AWS IoT.</p>
*/
inline ListNamedShadowsForThingResult& WithTimestamp(long long value) { SetTimestamp(value); return *this;}
private:
Aws::Vector<Aws::String> m_results;
Aws::String m_nextToken;
long long m_timestamp;
};
} // namespace Model
} // namespace IoTDataPlane
} // namespace Aws

View File

@@ -0,0 +1,116 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/iot-data/IoTDataPlane_EXPORTS.h>
#include <aws/iot-data/IoTDataPlaneRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/Array.h>
#include <utility>
namespace Aws
{
namespace Http
{
class URI;
} //namespace Http
namespace IoTDataPlane
{
namespace Model
{
/**
* <p>The input for the Publish operation.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/PublishRequest">AWS
* API Reference</a></p>
*/
class AWS_IOTDATAPLANE_API PublishRequest : public StreamingIoTDataPlaneRequest
{
public:
PublishRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "Publish"; }
void AddQueryStringParameters(Aws::Http::URI& uri) const override;
/**
* <p>The name of the MQTT topic.</p>
*/
inline const Aws::String& GetTopic() const{ return m_topic; }
/**
* <p>The name of the MQTT topic.</p>
*/
inline bool TopicHasBeenSet() const { return m_topicHasBeenSet; }
/**
* <p>The name of the MQTT topic.</p>
*/
inline void SetTopic(const Aws::String& value) { m_topicHasBeenSet = true; m_topic = value; }
/**
* <p>The name of the MQTT topic.</p>
*/
inline void SetTopic(Aws::String&& value) { m_topicHasBeenSet = true; m_topic = std::move(value); }
/**
* <p>The name of the MQTT topic.</p>
*/
inline void SetTopic(const char* value) { m_topicHasBeenSet = true; m_topic.assign(value); }
/**
* <p>The name of the MQTT topic.</p>
*/
inline PublishRequest& WithTopic(const Aws::String& value) { SetTopic(value); return *this;}
/**
* <p>The name of the MQTT topic.</p>
*/
inline PublishRequest& WithTopic(Aws::String&& value) { SetTopic(std::move(value)); return *this;}
/**
* <p>The name of the MQTT topic.</p>
*/
inline PublishRequest& WithTopic(const char* value) { SetTopic(value); return *this;}
/**
* <p>The Quality of Service (QoS) level.</p>
*/
inline int GetQos() const{ return m_qos; }
/**
* <p>The Quality of Service (QoS) level.</p>
*/
inline bool QosHasBeenSet() const { return m_qosHasBeenSet; }
/**
* <p>The Quality of Service (QoS) level.</p>
*/
inline void SetQos(int value) { m_qosHasBeenSet = true; m_qos = value; }
/**
* <p>The Quality of Service (QoS) level.</p>
*/
inline PublishRequest& WithQos(int value) { SetQos(value); return *this;}
private:
Aws::String m_topic;
bool m_topicHasBeenSet;
int m_qos;
bool m_qosHasBeenSet;
};
} // namespace Model
} // namespace IoTDataPlane
} // namespace Aws

View File

@@ -0,0 +1,136 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/iot-data/IoTDataPlane_EXPORTS.h>
#include <aws/iot-data/IoTDataPlaneRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/Array.h>
#include <utility>
namespace Aws
{
namespace Http
{
class URI;
} //namespace Http
namespace IoTDataPlane
{
namespace Model
{
/**
* <p>The input for the UpdateThingShadow operation.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/UpdateThingShadowRequest">AWS
* API Reference</a></p>
*/
class AWS_IOTDATAPLANE_API UpdateThingShadowRequest : public StreamingIoTDataPlaneRequest
{
public:
UpdateThingShadowRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "UpdateThingShadow"; }
void AddQueryStringParameters(Aws::Http::URI& uri) const override;
/**
* <p>The name of the thing.</p>
*/
inline const Aws::String& GetThingName() const{ return m_thingName; }
/**
* <p>The name of the thing.</p>
*/
inline bool ThingNameHasBeenSet() const { return m_thingNameHasBeenSet; }
/**
* <p>The name of the thing.</p>
*/
inline void SetThingName(const Aws::String& value) { m_thingNameHasBeenSet = true; m_thingName = value; }
/**
* <p>The name of the thing.</p>
*/
inline void SetThingName(Aws::String&& value) { m_thingNameHasBeenSet = true; m_thingName = std::move(value); }
/**
* <p>The name of the thing.</p>
*/
inline void SetThingName(const char* value) { m_thingNameHasBeenSet = true; m_thingName.assign(value); }
/**
* <p>The name of the thing.</p>
*/
inline UpdateThingShadowRequest& WithThingName(const Aws::String& value) { SetThingName(value); return *this;}
/**
* <p>The name of the thing.</p>
*/
inline UpdateThingShadowRequest& WithThingName(Aws::String&& value) { SetThingName(std::move(value)); return *this;}
/**
* <p>The name of the thing.</p>
*/
inline UpdateThingShadowRequest& WithThingName(const char* value) { SetThingName(value); return *this;}
/**
* <p>The name of the shadow.</p>
*/
inline const Aws::String& GetShadowName() const{ return m_shadowName; }
/**
* <p>The name of the shadow.</p>
*/
inline bool ShadowNameHasBeenSet() const { return m_shadowNameHasBeenSet; }
/**
* <p>The name of the shadow.</p>
*/
inline void SetShadowName(const Aws::String& value) { m_shadowNameHasBeenSet = true; m_shadowName = value; }
/**
* <p>The name of the shadow.</p>
*/
inline void SetShadowName(Aws::String&& value) { m_shadowNameHasBeenSet = true; m_shadowName = std::move(value); }
/**
* <p>The name of the shadow.</p>
*/
inline void SetShadowName(const char* value) { m_shadowNameHasBeenSet = true; m_shadowName.assign(value); }
/**
* <p>The name of the shadow.</p>
*/
inline UpdateThingShadowRequest& WithShadowName(const Aws::String& value) { SetShadowName(value); return *this;}
/**
* <p>The name of the shadow.</p>
*/
inline UpdateThingShadowRequest& WithShadowName(Aws::String&& value) { SetShadowName(std::move(value)); return *this;}
/**
* <p>The name of the shadow.</p>
*/
inline UpdateThingShadowRequest& WithShadowName(const char* value) { SetShadowName(value); return *this;}
private:
Aws::String m_thingName;
bool m_thingNameHasBeenSet;
Aws::String m_shadowName;
bool m_shadowNameHasBeenSet;
};
} // namespace Model
} // namespace IoTDataPlane
} // namespace Aws

View File

@@ -0,0 +1,62 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/iot-data/IoTDataPlane_EXPORTS.h>
#include <aws/core/utils/stream/ResponseStream.h>
#include <aws/core/utils/Array.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace IoTDataPlane
{
namespace Model
{
/**
* <p>The output from the UpdateThingShadow operation.</p><p><h3>See Also:</h3>
* <a
* href="http://docs.aws.amazon.com/goto/WebAPI/iot-data-2015-05-28/UpdateThingShadowResponse">AWS
* API Reference</a></p>
*/
class AWS_IOTDATAPLANE_API UpdateThingShadowResult
{
public:
UpdateThingShadowResult();
//We have to define these because Microsoft doesn't auto generate them
UpdateThingShadowResult(UpdateThingShadowResult&&);
UpdateThingShadowResult& operator=(UpdateThingShadowResult&&);
//we delete these because Microsoft doesn't handle move generation correctly
//and we therefore don't trust them to get it right here either.
UpdateThingShadowResult(const UpdateThingShadowResult&) = delete;
UpdateThingShadowResult& operator=(const UpdateThingShadowResult&) = delete;
UpdateThingShadowResult(Aws::AmazonWebServiceResult<Aws::Utils::Stream::ResponseStream>&& result);
UpdateThingShadowResult& operator=(Aws::AmazonWebServiceResult<Aws::Utils::Stream::ResponseStream>&& result);
/**
* <p>The state information, in JSON format.</p>
*/
inline Aws::IOStream& GetPayload() { return m_payload.GetUnderlyingStream(); }
/**
* <p>The state information, in JSON format.</p>
*/
inline void ReplaceBody(Aws::IOStream* body) { m_payload = Aws::Utils::Stream::ResponseStream(body); }
private:
Aws::Utils::Stream::ResponseStream m_payload;
};
} // namespace Model
} // namespace IoTDataPlane
} // namespace Aws