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,76 @@
add_project(aws-cpp-sdk-braket "C++ SDK for the AWS braket service" aws-cpp-sdk-core)
file(GLOB AWS_BRAKET_HEADERS
"include/aws/braket/*.h"
)
file(GLOB AWS_BRAKET_MODEL_HEADERS
"include/aws/braket/model/*.h"
)
file(GLOB AWS_BRAKET_SOURCE
"source/*.cpp"
)
file(GLOB AWS_BRAKET_MODEL_SOURCE
"source/model/*.cpp"
)
file(GLOB BRAKET_UNIFIED_HEADERS
${AWS_BRAKET_HEADERS}
${AWS_BRAKET_MODEL_HEADERS}
)
file(GLOB BRAKET_UNITY_SRC
${AWS_BRAKET_SOURCE}
${AWS_BRAKET_MODEL_SOURCE}
)
if(ENABLE_UNITY_BUILD)
enable_unity_build("BRAKET" BRAKET_UNITY_SRC)
endif()
file(GLOB BRAKET_SRC
${BRAKET_UNIFIED_HEADERS}
${BRAKET_UNITY_SRC}
)
if(WIN32)
#if we are compiling for visual studio, create a sane directory tree.
if(MSVC)
source_group("Header Files\\aws\\braket" FILES ${AWS_BRAKET_HEADERS})
source_group("Header Files\\aws\\braket\\model" FILES ${AWS_BRAKET_MODEL_HEADERS})
source_group("Source Files" FILES ${AWS_BRAKET_SOURCE})
source_group("Source Files\\model" FILES ${AWS_BRAKET_MODEL_SOURCE})
endif(MSVC)
endif()
set(BRAKET_INCLUDES
"${CMAKE_CURRENT_SOURCE_DIR}/include/"
)
add_library(${PROJECT_NAME} ${BRAKET_SRC})
add_library(AWS::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
set_compiler_flags(${PROJECT_NAME})
set_compiler_warnings(${PROJECT_NAME})
if(USE_WINDOWS_DLL_SEMANTICS AND BUILD_SHARED_LIBS)
target_compile_definitions(${PROJECT_NAME} PRIVATE "AWS_BRAKET_EXPORTS")
endif()
target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
target_link_libraries(${PROJECT_NAME} PRIVATE ${PLATFORM_DEP_LIBS} ${PROJECT_LIBS})
setup_install()
install (FILES ${AWS_BRAKET_HEADERS} DESTINATION ${INCLUDE_DIRECTORY}/aws/braket)
install (FILES ${AWS_BRAKET_MODEL_HEADERS} DESTINATION ${INCLUDE_DIRECTORY}/aws/braket/model)
do_packaging()

View File

@@ -0,0 +1,294 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/braket/Braket_EXPORTS.h>
#include <aws/braket/BraketErrors.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/braket/model/CancelQuantumTaskResult.h>
#include <aws/braket/model/CreateQuantumTaskResult.h>
#include <aws/braket/model/GetDeviceResult.h>
#include <aws/braket/model/GetQuantumTaskResult.h>
#include <aws/braket/model/SearchDevicesResult.h>
#include <aws/braket/model/SearchQuantumTasksResult.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 Braket
{
namespace Model
{
class CancelQuantumTaskRequest;
class CreateQuantumTaskRequest;
class GetDeviceRequest;
class GetQuantumTaskRequest;
class SearchDevicesRequest;
class SearchQuantumTasksRequest;
typedef Aws::Utils::Outcome<CancelQuantumTaskResult, BraketError> CancelQuantumTaskOutcome;
typedef Aws::Utils::Outcome<CreateQuantumTaskResult, BraketError> CreateQuantumTaskOutcome;
typedef Aws::Utils::Outcome<GetDeviceResult, BraketError> GetDeviceOutcome;
typedef Aws::Utils::Outcome<GetQuantumTaskResult, BraketError> GetQuantumTaskOutcome;
typedef Aws::Utils::Outcome<SearchDevicesResult, BraketError> SearchDevicesOutcome;
typedef Aws::Utils::Outcome<SearchQuantumTasksResult, BraketError> SearchQuantumTasksOutcome;
typedef std::future<CancelQuantumTaskOutcome> CancelQuantumTaskOutcomeCallable;
typedef std::future<CreateQuantumTaskOutcome> CreateQuantumTaskOutcomeCallable;
typedef std::future<GetDeviceOutcome> GetDeviceOutcomeCallable;
typedef std::future<GetQuantumTaskOutcome> GetQuantumTaskOutcomeCallable;
typedef std::future<SearchDevicesOutcome> SearchDevicesOutcomeCallable;
typedef std::future<SearchQuantumTasksOutcome> SearchQuantumTasksOutcomeCallable;
} // namespace Model
class BraketClient;
typedef std::function<void(const BraketClient*, const Model::CancelQuantumTaskRequest&, const Model::CancelQuantumTaskOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > CancelQuantumTaskResponseReceivedHandler;
typedef std::function<void(const BraketClient*, const Model::CreateQuantumTaskRequest&, const Model::CreateQuantumTaskOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > CreateQuantumTaskResponseReceivedHandler;
typedef std::function<void(const BraketClient*, const Model::GetDeviceRequest&, const Model::GetDeviceOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetDeviceResponseReceivedHandler;
typedef std::function<void(const BraketClient*, const Model::GetQuantumTaskRequest&, const Model::GetQuantumTaskOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetQuantumTaskResponseReceivedHandler;
typedef std::function<void(const BraketClient*, const Model::SearchDevicesRequest&, const Model::SearchDevicesOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > SearchDevicesResponseReceivedHandler;
typedef std::function<void(const BraketClient*, const Model::SearchQuantumTasksRequest&, const Model::SearchQuantumTasksOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > SearchQuantumTasksResponseReceivedHandler;
/**
* <p>The Amazon Braket API Reference provides information about the operations and
* structures supported in Amazon Braket.</p>
*/
class AWS_BRAKET_API BraketClient : 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.
*/
BraketClient(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.
*/
BraketClient(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
*/
BraketClient(const std::shared_ptr<Aws::Auth::AWSCredentialsProvider>& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
virtual ~BraketClient();
/**
* <p>Cancels the specified task.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/braket-2019-09-01/CancelQuantumTask">AWS
* API Reference</a></p>
*/
virtual Model::CancelQuantumTaskOutcome CancelQuantumTask(const Model::CancelQuantumTaskRequest& request) const;
/**
* <p>Cancels the specified task.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/braket-2019-09-01/CancelQuantumTask">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::CancelQuantumTaskOutcomeCallable CancelQuantumTaskCallable(const Model::CancelQuantumTaskRequest& request) const;
/**
* <p>Cancels the specified task.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/braket-2019-09-01/CancelQuantumTask">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void CancelQuantumTaskAsync(const Model::CancelQuantumTaskRequest& request, const CancelQuantumTaskResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Creates a quantum task.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/braket-2019-09-01/CreateQuantumTask">AWS
* API Reference</a></p>
*/
virtual Model::CreateQuantumTaskOutcome CreateQuantumTask(const Model::CreateQuantumTaskRequest& request) const;
/**
* <p>Creates a quantum task.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/braket-2019-09-01/CreateQuantumTask">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::CreateQuantumTaskOutcomeCallable CreateQuantumTaskCallable(const Model::CreateQuantumTaskRequest& request) const;
/**
* <p>Creates a quantum task.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/braket-2019-09-01/CreateQuantumTask">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void CreateQuantumTaskAsync(const Model::CreateQuantumTaskRequest& request, const CreateQuantumTaskResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Retrieves the devices available in Amazon Braket.</p><p><h3>See Also:</h3>
* <a href="http://docs.aws.amazon.com/goto/WebAPI/braket-2019-09-01/GetDevice">AWS
* API Reference</a></p>
*/
virtual Model::GetDeviceOutcome GetDevice(const Model::GetDeviceRequest& request) const;
/**
* <p>Retrieves the devices available in Amazon Braket.</p><p><h3>See Also:</h3>
* <a href="http://docs.aws.amazon.com/goto/WebAPI/braket-2019-09-01/GetDevice">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::GetDeviceOutcomeCallable GetDeviceCallable(const Model::GetDeviceRequest& request) const;
/**
* <p>Retrieves the devices available in Amazon Braket.</p><p><h3>See Also:</h3>
* <a href="http://docs.aws.amazon.com/goto/WebAPI/braket-2019-09-01/GetDevice">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void GetDeviceAsync(const Model::GetDeviceRequest& request, const GetDeviceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Retrieves the specified quantum task.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/braket-2019-09-01/GetQuantumTask">AWS
* API Reference</a></p>
*/
virtual Model::GetQuantumTaskOutcome GetQuantumTask(const Model::GetQuantumTaskRequest& request) const;
/**
* <p>Retrieves the specified quantum task.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/braket-2019-09-01/GetQuantumTask">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::GetQuantumTaskOutcomeCallable GetQuantumTaskCallable(const Model::GetQuantumTaskRequest& request) const;
/**
* <p>Retrieves the specified quantum task.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/braket-2019-09-01/GetQuantumTask">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void GetQuantumTaskAsync(const Model::GetQuantumTaskRequest& request, const GetQuantumTaskResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Searches for devices using the specified filters.</p><p><h3>See Also:</h3>
* <a
* href="http://docs.aws.amazon.com/goto/WebAPI/braket-2019-09-01/SearchDevices">AWS
* API Reference</a></p>
*/
virtual Model::SearchDevicesOutcome SearchDevices(const Model::SearchDevicesRequest& request) const;
/**
* <p>Searches for devices using the specified filters.</p><p><h3>See Also:</h3>
* <a
* href="http://docs.aws.amazon.com/goto/WebAPI/braket-2019-09-01/SearchDevices">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::SearchDevicesOutcomeCallable SearchDevicesCallable(const Model::SearchDevicesRequest& request) const;
/**
* <p>Searches for devices using the specified filters.</p><p><h3>See Also:</h3>
* <a
* href="http://docs.aws.amazon.com/goto/WebAPI/braket-2019-09-01/SearchDevices">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void SearchDevicesAsync(const Model::SearchDevicesRequest& request, const SearchDevicesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Searches for tasks that match the specified filter values.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/braket-2019-09-01/SearchQuantumTasks">AWS
* API Reference</a></p>
*/
virtual Model::SearchQuantumTasksOutcome SearchQuantumTasks(const Model::SearchQuantumTasksRequest& request) const;
/**
* <p>Searches for tasks that match the specified filter values.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/braket-2019-09-01/SearchQuantumTasks">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::SearchQuantumTasksOutcomeCallable SearchQuantumTasksCallable(const Model::SearchQuantumTasksRequest& request) const;
/**
* <p>Searches for tasks that match the specified filter values.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/braket-2019-09-01/SearchQuantumTasks">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void SearchQuantumTasksAsync(const Model::SearchQuantumTasksRequest& request, const SearchQuantumTasksResponseReceivedHandler& 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 CancelQuantumTaskAsyncHelper(const Model::CancelQuantumTaskRequest& request, const CancelQuantumTaskResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void CreateQuantumTaskAsyncHelper(const Model::CreateQuantumTaskRequest& request, const CreateQuantumTaskResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void GetDeviceAsyncHelper(const Model::GetDeviceRequest& request, const GetDeviceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void GetQuantumTaskAsyncHelper(const Model::GetQuantumTaskRequest& request, const GetQuantumTaskResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void SearchDevicesAsyncHelper(const Model::SearchDevicesRequest& request, const SearchDevicesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void SearchQuantumTasksAsyncHelper(const Model::SearchQuantumTasksRequest& request, const SearchQuantumTasksResponseReceivedHandler& 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 Braket
} // 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/braket/Braket_EXPORTS.h>
#include <aws/core/Region.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace Braket
{
namespace BraketEndpoint
{
AWS_BRAKET_API Aws::String ForRegion(const Aws::String& regionName, bool useDualStack = false);
} // namespace BraketEndpoint
} // namespace Braket
} // 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/braket/Braket_EXPORTS.h>
#include <aws/core/client/AWSErrorMarshaller.h>
namespace Aws
{
namespace Client
{
class AWS_BRAKET_API BraketErrorMarshaller : 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,75 @@
/**
* 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/braket/Braket_EXPORTS.h>
namespace Aws
{
namespace Braket
{
enum class BraketErrors
{
//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,
DEVICE_OFFLINE,
INTERNAL_SERVICE,
SERVICE_QUOTA_EXCEEDED
};
class AWS_BRAKET_API BraketError : public Aws::Client::AWSError<BraketErrors>
{
public:
BraketError() {}
BraketError(const Aws::Client::AWSError<Aws::Client::CoreErrors>& rhs) : Aws::Client::AWSError<BraketErrors>(rhs) {}
BraketError(Aws::Client::AWSError<Aws::Client::CoreErrors>&& rhs) : Aws::Client::AWSError<BraketErrors>(rhs) {}
BraketError(const Aws::Client::AWSError<BraketErrors>& rhs) : Aws::Client::AWSError<BraketErrors>(rhs) {}
BraketError(Aws::Client::AWSError<BraketErrors>&& rhs) : Aws::Client::AWSError<BraketErrors>(rhs) {}
template <typename T>
T GetModeledError();
};
namespace BraketErrorMapper
{
AWS_BRAKET_API Aws::Client::AWSError<Aws::Client::CoreErrors> GetErrorForName(const char* errorName);
}
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,42 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/braket/Braket_EXPORTS.h>
#include <aws/core/AmazonSerializableWebServiceRequest.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <aws/core/http/HttpRequest.h>
namespace Aws
{
namespace Braket
{
class AWS_BRAKET_API BraketRequest : public Aws::AmazonSerializableWebServiceRequest
{
public:
virtual ~BraketRequest () {}
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, "2019-09-01"));
return headers;
}
protected:
virtual Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const { return Aws::Http::HeaderValueCollection(); }
};
} // namespace Braket
} // 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_BRAKET_EXPORTS
#define AWS_BRAKET_API __declspec(dllexport)
#else
#define AWS_BRAKET_API __declspec(dllimport)
#endif /* AWS_BRAKET_EXPORTS */
#else
#define AWS_BRAKET_API
#endif // USE_IMPORT_EXPORT
#else // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)
#define AWS_BRAKET_API
#endif // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)

View File

@@ -0,0 +1,128 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/braket/Braket_EXPORTS.h>
#include <aws/braket/BraketRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
#include <aws/core/utils/UUID.h>
namespace Aws
{
namespace Braket
{
namespace Model
{
/**
*/
class AWS_BRAKET_API CancelQuantumTaskRequest : public BraketRequest
{
public:
CancelQuantumTaskRequest();
// 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 "CancelQuantumTask"; }
Aws::String SerializePayload() const override;
/**
* <p>The client token associated with the request.</p>
*/
inline const Aws::String& GetClientToken() const{ return m_clientToken; }
/**
* <p>The client token associated with the request.</p>
*/
inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
/**
* <p>The client token associated with the request.</p>
*/
inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; }
/**
* <p>The client token associated with the request.</p>
*/
inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); }
/**
* <p>The client token associated with the request.</p>
*/
inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); }
/**
* <p>The client token associated with the request.</p>
*/
inline CancelQuantumTaskRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;}
/**
* <p>The client token associated with the request.</p>
*/
inline CancelQuantumTaskRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;}
/**
* <p>The client token associated with the request.</p>
*/
inline CancelQuantumTaskRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;}
/**
* <p>The ARN of the task to cancel.</p>
*/
inline const Aws::String& GetQuantumTaskArn() const{ return m_quantumTaskArn; }
/**
* <p>The ARN of the task to cancel.</p>
*/
inline bool QuantumTaskArnHasBeenSet() const { return m_quantumTaskArnHasBeenSet; }
/**
* <p>The ARN of the task to cancel.</p>
*/
inline void SetQuantumTaskArn(const Aws::String& value) { m_quantumTaskArnHasBeenSet = true; m_quantumTaskArn = value; }
/**
* <p>The ARN of the task to cancel.</p>
*/
inline void SetQuantumTaskArn(Aws::String&& value) { m_quantumTaskArnHasBeenSet = true; m_quantumTaskArn = std::move(value); }
/**
* <p>The ARN of the task to cancel.</p>
*/
inline void SetQuantumTaskArn(const char* value) { m_quantumTaskArnHasBeenSet = true; m_quantumTaskArn.assign(value); }
/**
* <p>The ARN of the task to cancel.</p>
*/
inline CancelQuantumTaskRequest& WithQuantumTaskArn(const Aws::String& value) { SetQuantumTaskArn(value); return *this;}
/**
* <p>The ARN of the task to cancel.</p>
*/
inline CancelQuantumTaskRequest& WithQuantumTaskArn(Aws::String&& value) { SetQuantumTaskArn(std::move(value)); return *this;}
/**
* <p>The ARN of the task to cancel.</p>
*/
inline CancelQuantumTaskRequest& WithQuantumTaskArn(const char* value) { SetQuantumTaskArn(value); return *this;}
private:
Aws::String m_clientToken;
bool m_clientTokenHasBeenSet;
Aws::String m_quantumTaskArn;
bool m_quantumTaskArnHasBeenSet;
};
} // namespace Model
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,106 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/braket/Braket_EXPORTS.h>
#include <aws/braket/model/CancellationStatus.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 Braket
{
namespace Model
{
class AWS_BRAKET_API CancelQuantumTaskResult
{
public:
CancelQuantumTaskResult();
CancelQuantumTaskResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
CancelQuantumTaskResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>The status of the cancellation request.</p>
*/
inline const CancellationStatus& GetCancellationStatus() const{ return m_cancellationStatus; }
/**
* <p>The status of the cancellation request.</p>
*/
inline void SetCancellationStatus(const CancellationStatus& value) { m_cancellationStatus = value; }
/**
* <p>The status of the cancellation request.</p>
*/
inline void SetCancellationStatus(CancellationStatus&& value) { m_cancellationStatus = std::move(value); }
/**
* <p>The status of the cancellation request.</p>
*/
inline CancelQuantumTaskResult& WithCancellationStatus(const CancellationStatus& value) { SetCancellationStatus(value); return *this;}
/**
* <p>The status of the cancellation request.</p>
*/
inline CancelQuantumTaskResult& WithCancellationStatus(CancellationStatus&& value) { SetCancellationStatus(std::move(value)); return *this;}
/**
* <p>The ARN of the task.</p>
*/
inline const Aws::String& GetQuantumTaskArn() const{ return m_quantumTaskArn; }
/**
* <p>The ARN of the task.</p>
*/
inline void SetQuantumTaskArn(const Aws::String& value) { m_quantumTaskArn = value; }
/**
* <p>The ARN of the task.</p>
*/
inline void SetQuantumTaskArn(Aws::String&& value) { m_quantumTaskArn = std::move(value); }
/**
* <p>The ARN of the task.</p>
*/
inline void SetQuantumTaskArn(const char* value) { m_quantumTaskArn.assign(value); }
/**
* <p>The ARN of the task.</p>
*/
inline CancelQuantumTaskResult& WithQuantumTaskArn(const Aws::String& value) { SetQuantumTaskArn(value); return *this;}
/**
* <p>The ARN of the task.</p>
*/
inline CancelQuantumTaskResult& WithQuantumTaskArn(Aws::String&& value) { SetQuantumTaskArn(std::move(value)); return *this;}
/**
* <p>The ARN of the task.</p>
*/
inline CancelQuantumTaskResult& WithQuantumTaskArn(const char* value) { SetQuantumTaskArn(value); return *this;}
private:
CancellationStatus m_cancellationStatus;
Aws::String m_quantumTaskArn;
};
} // namespace Model
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,31 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/braket/Braket_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace Braket
{
namespace Model
{
enum class CancellationStatus
{
NOT_SET,
CANCELLED,
CANCELLING
};
namespace CancellationStatusMapper
{
AWS_BRAKET_API CancellationStatus GetCancellationStatusForName(const Aws::String& name);
AWS_BRAKET_API Aws::String GetNameForCancellationStatus(CancellationStatus value);
} // namespace CancellationStatusMapper
} // namespace Model
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,336 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/braket/Braket_EXPORTS.h>
#include <aws/braket/BraketRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
#include <aws/core/utils/UUID.h>
namespace Aws
{
namespace Braket
{
namespace Model
{
/**
*/
class AWS_BRAKET_API CreateQuantumTaskRequest : public BraketRequest
{
public:
CreateQuantumTaskRequest();
// 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 "CreateQuantumTask"; }
Aws::String SerializePayload() const override;
/**
* <p>The action associated with the task.</p>
*/
inline const Aws::String& GetAction() const{ return m_action; }
/**
* <p>The action associated with the task.</p>
*/
inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; }
/**
* <p>The action associated with the task.</p>
*/
inline void SetAction(const Aws::String& value) { m_actionHasBeenSet = true; m_action = value; }
/**
* <p>The action associated with the task.</p>
*/
inline void SetAction(Aws::String&& value) { m_actionHasBeenSet = true; m_action = std::move(value); }
/**
* <p>The action associated with the task.</p>
*/
inline void SetAction(const char* value) { m_actionHasBeenSet = true; m_action.assign(value); }
/**
* <p>The action associated with the task.</p>
*/
inline CreateQuantumTaskRequest& WithAction(const Aws::String& value) { SetAction(value); return *this;}
/**
* <p>The action associated with the task.</p>
*/
inline CreateQuantumTaskRequest& WithAction(Aws::String&& value) { SetAction(std::move(value)); return *this;}
/**
* <p>The action associated with the task.</p>
*/
inline CreateQuantumTaskRequest& WithAction(const char* value) { SetAction(value); return *this;}
/**
* <p>The client token associated with the request.</p>
*/
inline const Aws::String& GetClientToken() const{ return m_clientToken; }
/**
* <p>The client token associated with the request.</p>
*/
inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
/**
* <p>The client token associated with the request.</p>
*/
inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; }
/**
* <p>The client token associated with the request.</p>
*/
inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); }
/**
* <p>The client token associated with the request.</p>
*/
inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); }
/**
* <p>The client token associated with the request.</p>
*/
inline CreateQuantumTaskRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;}
/**
* <p>The client token associated with the request.</p>
*/
inline CreateQuantumTaskRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;}
/**
* <p>The client token associated with the request.</p>
*/
inline CreateQuantumTaskRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;}
/**
* <p>The ARN of the device to run the task on.</p>
*/
inline const Aws::String& GetDeviceArn() const{ return m_deviceArn; }
/**
* <p>The ARN of the device to run the task on.</p>
*/
inline bool DeviceArnHasBeenSet() const { return m_deviceArnHasBeenSet; }
/**
* <p>The ARN of the device to run the task on.</p>
*/
inline void SetDeviceArn(const Aws::String& value) { m_deviceArnHasBeenSet = true; m_deviceArn = value; }
/**
* <p>The ARN of the device to run the task on.</p>
*/
inline void SetDeviceArn(Aws::String&& value) { m_deviceArnHasBeenSet = true; m_deviceArn = std::move(value); }
/**
* <p>The ARN of the device to run the task on.</p>
*/
inline void SetDeviceArn(const char* value) { m_deviceArnHasBeenSet = true; m_deviceArn.assign(value); }
/**
* <p>The ARN of the device to run the task on.</p>
*/
inline CreateQuantumTaskRequest& WithDeviceArn(const Aws::String& value) { SetDeviceArn(value); return *this;}
/**
* <p>The ARN of the device to run the task on.</p>
*/
inline CreateQuantumTaskRequest& WithDeviceArn(Aws::String&& value) { SetDeviceArn(std::move(value)); return *this;}
/**
* <p>The ARN of the device to run the task on.</p>
*/
inline CreateQuantumTaskRequest& WithDeviceArn(const char* value) { SetDeviceArn(value); return *this;}
/**
* <p>The parameters for the device to run the task on.</p>
*/
inline const Aws::String& GetDeviceParameters() const{ return m_deviceParameters; }
/**
* <p>The parameters for the device to run the task on.</p>
*/
inline bool DeviceParametersHasBeenSet() const { return m_deviceParametersHasBeenSet; }
/**
* <p>The parameters for the device to run the task on.</p>
*/
inline void SetDeviceParameters(const Aws::String& value) { m_deviceParametersHasBeenSet = true; m_deviceParameters = value; }
/**
* <p>The parameters for the device to run the task on.</p>
*/
inline void SetDeviceParameters(Aws::String&& value) { m_deviceParametersHasBeenSet = true; m_deviceParameters = std::move(value); }
/**
* <p>The parameters for the device to run the task on.</p>
*/
inline void SetDeviceParameters(const char* value) { m_deviceParametersHasBeenSet = true; m_deviceParameters.assign(value); }
/**
* <p>The parameters for the device to run the task on.</p>
*/
inline CreateQuantumTaskRequest& WithDeviceParameters(const Aws::String& value) { SetDeviceParameters(value); return *this;}
/**
* <p>The parameters for the device to run the task on.</p>
*/
inline CreateQuantumTaskRequest& WithDeviceParameters(Aws::String&& value) { SetDeviceParameters(std::move(value)); return *this;}
/**
* <p>The parameters for the device to run the task on.</p>
*/
inline CreateQuantumTaskRequest& WithDeviceParameters(const char* value) { SetDeviceParameters(value); return *this;}
/**
* <p>The S3 bucket to store task result files in.</p>
*/
inline const Aws::String& GetOutputS3Bucket() const{ return m_outputS3Bucket; }
/**
* <p>The S3 bucket to store task result files in.</p>
*/
inline bool OutputS3BucketHasBeenSet() const { return m_outputS3BucketHasBeenSet; }
/**
* <p>The S3 bucket to store task result files in.</p>
*/
inline void SetOutputS3Bucket(const Aws::String& value) { m_outputS3BucketHasBeenSet = true; m_outputS3Bucket = value; }
/**
* <p>The S3 bucket to store task result files in.</p>
*/
inline void SetOutputS3Bucket(Aws::String&& value) { m_outputS3BucketHasBeenSet = true; m_outputS3Bucket = std::move(value); }
/**
* <p>The S3 bucket to store task result files in.</p>
*/
inline void SetOutputS3Bucket(const char* value) { m_outputS3BucketHasBeenSet = true; m_outputS3Bucket.assign(value); }
/**
* <p>The S3 bucket to store task result files in.</p>
*/
inline CreateQuantumTaskRequest& WithOutputS3Bucket(const Aws::String& value) { SetOutputS3Bucket(value); return *this;}
/**
* <p>The S3 bucket to store task result files in.</p>
*/
inline CreateQuantumTaskRequest& WithOutputS3Bucket(Aws::String&& value) { SetOutputS3Bucket(std::move(value)); return *this;}
/**
* <p>The S3 bucket to store task result files in.</p>
*/
inline CreateQuantumTaskRequest& WithOutputS3Bucket(const char* value) { SetOutputS3Bucket(value); return *this;}
/**
* <p>The key prefix for the location in the S3 bucket to store task results
* in.</p>
*/
inline const Aws::String& GetOutputS3KeyPrefix() const{ return m_outputS3KeyPrefix; }
/**
* <p>The key prefix for the location in the S3 bucket to store task results
* in.</p>
*/
inline bool OutputS3KeyPrefixHasBeenSet() const { return m_outputS3KeyPrefixHasBeenSet; }
/**
* <p>The key prefix for the location in the S3 bucket to store task results
* in.</p>
*/
inline void SetOutputS3KeyPrefix(const Aws::String& value) { m_outputS3KeyPrefixHasBeenSet = true; m_outputS3KeyPrefix = value; }
/**
* <p>The key prefix for the location in the S3 bucket to store task results
* in.</p>
*/
inline void SetOutputS3KeyPrefix(Aws::String&& value) { m_outputS3KeyPrefixHasBeenSet = true; m_outputS3KeyPrefix = std::move(value); }
/**
* <p>The key prefix for the location in the S3 bucket to store task results
* in.</p>
*/
inline void SetOutputS3KeyPrefix(const char* value) { m_outputS3KeyPrefixHasBeenSet = true; m_outputS3KeyPrefix.assign(value); }
/**
* <p>The key prefix for the location in the S3 bucket to store task results
* in.</p>
*/
inline CreateQuantumTaskRequest& WithOutputS3KeyPrefix(const Aws::String& value) { SetOutputS3KeyPrefix(value); return *this;}
/**
* <p>The key prefix for the location in the S3 bucket to store task results
* in.</p>
*/
inline CreateQuantumTaskRequest& WithOutputS3KeyPrefix(Aws::String&& value) { SetOutputS3KeyPrefix(std::move(value)); return *this;}
/**
* <p>The key prefix for the location in the S3 bucket to store task results
* in.</p>
*/
inline CreateQuantumTaskRequest& WithOutputS3KeyPrefix(const char* value) { SetOutputS3KeyPrefix(value); return *this;}
/**
* <p>The number of shots to use for the task.</p>
*/
inline long long GetShots() const{ return m_shots; }
/**
* <p>The number of shots to use for the task.</p>
*/
inline bool ShotsHasBeenSet() const { return m_shotsHasBeenSet; }
/**
* <p>The number of shots to use for the task.</p>
*/
inline void SetShots(long long value) { m_shotsHasBeenSet = true; m_shots = value; }
/**
* <p>The number of shots to use for the task.</p>
*/
inline CreateQuantumTaskRequest& WithShots(long long value) { SetShots(value); return *this;}
private:
Aws::String m_action;
bool m_actionHasBeenSet;
Aws::String m_clientToken;
bool m_clientTokenHasBeenSet;
Aws::String m_deviceArn;
bool m_deviceArnHasBeenSet;
Aws::String m_deviceParameters;
bool m_deviceParametersHasBeenSet;
Aws::String m_outputS3Bucket;
bool m_outputS3BucketHasBeenSet;
Aws::String m_outputS3KeyPrefix;
bool m_outputS3KeyPrefixHasBeenSet;
long long m_shots;
bool m_shotsHasBeenSet;
};
} // namespace Model
} // namespace Braket
} // 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/braket/Braket_EXPORTS.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 Braket
{
namespace Model
{
class AWS_BRAKET_API CreateQuantumTaskResult
{
public:
CreateQuantumTaskResult();
CreateQuantumTaskResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
CreateQuantumTaskResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>The ARN of the task created by the request.</p>
*/
inline const Aws::String& GetQuantumTaskArn() const{ return m_quantumTaskArn; }
/**
* <p>The ARN of the task created by the request.</p>
*/
inline void SetQuantumTaskArn(const Aws::String& value) { m_quantumTaskArn = value; }
/**
* <p>The ARN of the task created by the request.</p>
*/
inline void SetQuantumTaskArn(Aws::String&& value) { m_quantumTaskArn = std::move(value); }
/**
* <p>The ARN of the task created by the request.</p>
*/
inline void SetQuantumTaskArn(const char* value) { m_quantumTaskArn.assign(value); }
/**
* <p>The ARN of the task created by the request.</p>
*/
inline CreateQuantumTaskResult& WithQuantumTaskArn(const Aws::String& value) { SetQuantumTaskArn(value); return *this;}
/**
* <p>The ARN of the task created by the request.</p>
*/
inline CreateQuantumTaskResult& WithQuantumTaskArn(Aws::String&& value) { SetQuantumTaskArn(std::move(value)); return *this;}
/**
* <p>The ARN of the task created by the request.</p>
*/
inline CreateQuantumTaskResult& WithQuantumTaskArn(const char* value) { SetQuantumTaskArn(value); return *this;}
private:
Aws::String m_quantumTaskArn;
};
} // namespace Model
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,31 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/braket/Braket_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace Braket
{
namespace Model
{
enum class DeviceStatus
{
NOT_SET,
OFFLINE,
ONLINE
};
namespace DeviceStatusMapper
{
AWS_BRAKET_API DeviceStatus GetDeviceStatusForName(const Aws::String& name);
AWS_BRAKET_API Aws::String GetNameForDeviceStatus(DeviceStatus value);
} // namespace DeviceStatusMapper
} // namespace Model
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,246 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/braket/Braket_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/braket/model/DeviceStatus.h>
#include <aws/braket/model/DeviceType.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace Braket
{
namespace Model
{
/**
* <p>Includes information about the device.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/braket-2019-09-01/DeviceSummary">AWS
* API Reference</a></p>
*/
class AWS_BRAKET_API DeviceSummary
{
public:
DeviceSummary();
DeviceSummary(Aws::Utils::Json::JsonView jsonValue);
DeviceSummary& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The ARN of the device.</p>
*/
inline const Aws::String& GetDeviceArn() const{ return m_deviceArn; }
/**
* <p>The ARN of the device.</p>
*/
inline bool DeviceArnHasBeenSet() const { return m_deviceArnHasBeenSet; }
/**
* <p>The ARN of the device.</p>
*/
inline void SetDeviceArn(const Aws::String& value) { m_deviceArnHasBeenSet = true; m_deviceArn = value; }
/**
* <p>The ARN of the device.</p>
*/
inline void SetDeviceArn(Aws::String&& value) { m_deviceArnHasBeenSet = true; m_deviceArn = std::move(value); }
/**
* <p>The ARN of the device.</p>
*/
inline void SetDeviceArn(const char* value) { m_deviceArnHasBeenSet = true; m_deviceArn.assign(value); }
/**
* <p>The ARN of the device.</p>
*/
inline DeviceSummary& WithDeviceArn(const Aws::String& value) { SetDeviceArn(value); return *this;}
/**
* <p>The ARN of the device.</p>
*/
inline DeviceSummary& WithDeviceArn(Aws::String&& value) { SetDeviceArn(std::move(value)); return *this;}
/**
* <p>The ARN of the device.</p>
*/
inline DeviceSummary& WithDeviceArn(const char* value) { SetDeviceArn(value); return *this;}
/**
* <p>The name of the device.</p>
*/
inline const Aws::String& GetDeviceName() const{ return m_deviceName; }
/**
* <p>The name of the device.</p>
*/
inline bool DeviceNameHasBeenSet() const { return m_deviceNameHasBeenSet; }
/**
* <p>The name of the device.</p>
*/
inline void SetDeviceName(const Aws::String& value) { m_deviceNameHasBeenSet = true; m_deviceName = value; }
/**
* <p>The name of the device.</p>
*/
inline void SetDeviceName(Aws::String&& value) { m_deviceNameHasBeenSet = true; m_deviceName = std::move(value); }
/**
* <p>The name of the device.</p>
*/
inline void SetDeviceName(const char* value) { m_deviceNameHasBeenSet = true; m_deviceName.assign(value); }
/**
* <p>The name of the device.</p>
*/
inline DeviceSummary& WithDeviceName(const Aws::String& value) { SetDeviceName(value); return *this;}
/**
* <p>The name of the device.</p>
*/
inline DeviceSummary& WithDeviceName(Aws::String&& value) { SetDeviceName(std::move(value)); return *this;}
/**
* <p>The name of the device.</p>
*/
inline DeviceSummary& WithDeviceName(const char* value) { SetDeviceName(value); return *this;}
/**
* <p>The status of the device.</p>
*/
inline const DeviceStatus& GetDeviceStatus() const{ return m_deviceStatus; }
/**
* <p>The status of the device.</p>
*/
inline bool DeviceStatusHasBeenSet() const { return m_deviceStatusHasBeenSet; }
/**
* <p>The status of the device.</p>
*/
inline void SetDeviceStatus(const DeviceStatus& value) { m_deviceStatusHasBeenSet = true; m_deviceStatus = value; }
/**
* <p>The status of the device.</p>
*/
inline void SetDeviceStatus(DeviceStatus&& value) { m_deviceStatusHasBeenSet = true; m_deviceStatus = std::move(value); }
/**
* <p>The status of the device.</p>
*/
inline DeviceSummary& WithDeviceStatus(const DeviceStatus& value) { SetDeviceStatus(value); return *this;}
/**
* <p>The status of the device.</p>
*/
inline DeviceSummary& WithDeviceStatus(DeviceStatus&& value) { SetDeviceStatus(std::move(value)); return *this;}
/**
* <p>The type of the device.</p>
*/
inline const DeviceType& GetDeviceType() const{ return m_deviceType; }
/**
* <p>The type of the device.</p>
*/
inline bool DeviceTypeHasBeenSet() const { return m_deviceTypeHasBeenSet; }
/**
* <p>The type of the device.</p>
*/
inline void SetDeviceType(const DeviceType& value) { m_deviceTypeHasBeenSet = true; m_deviceType = value; }
/**
* <p>The type of the device.</p>
*/
inline void SetDeviceType(DeviceType&& value) { m_deviceTypeHasBeenSet = true; m_deviceType = std::move(value); }
/**
* <p>The type of the device.</p>
*/
inline DeviceSummary& WithDeviceType(const DeviceType& value) { SetDeviceType(value); return *this;}
/**
* <p>The type of the device.</p>
*/
inline DeviceSummary& WithDeviceType(DeviceType&& value) { SetDeviceType(std::move(value)); return *this;}
/**
* <p>The provider of the device.</p>
*/
inline const Aws::String& GetProviderName() const{ return m_providerName; }
/**
* <p>The provider of the device.</p>
*/
inline bool ProviderNameHasBeenSet() const { return m_providerNameHasBeenSet; }
/**
* <p>The provider of the device.</p>
*/
inline void SetProviderName(const Aws::String& value) { m_providerNameHasBeenSet = true; m_providerName = value; }
/**
* <p>The provider of the device.</p>
*/
inline void SetProviderName(Aws::String&& value) { m_providerNameHasBeenSet = true; m_providerName = std::move(value); }
/**
* <p>The provider of the device.</p>
*/
inline void SetProviderName(const char* value) { m_providerNameHasBeenSet = true; m_providerName.assign(value); }
/**
* <p>The provider of the device.</p>
*/
inline DeviceSummary& WithProviderName(const Aws::String& value) { SetProviderName(value); return *this;}
/**
* <p>The provider of the device.</p>
*/
inline DeviceSummary& WithProviderName(Aws::String&& value) { SetProviderName(std::move(value)); return *this;}
/**
* <p>The provider of the device.</p>
*/
inline DeviceSummary& WithProviderName(const char* value) { SetProviderName(value); return *this;}
private:
Aws::String m_deviceArn;
bool m_deviceArnHasBeenSet;
Aws::String m_deviceName;
bool m_deviceNameHasBeenSet;
DeviceStatus m_deviceStatus;
bool m_deviceStatusHasBeenSet;
DeviceType m_deviceType;
bool m_deviceTypeHasBeenSet;
Aws::String m_providerName;
bool m_providerNameHasBeenSet;
};
} // namespace Model
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,31 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/braket/Braket_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace Braket
{
namespace Model
{
enum class DeviceType
{
NOT_SET,
QPU,
SIMULATOR
};
namespace DeviceTypeMapper
{
AWS_BRAKET_API DeviceType GetDeviceTypeForName(const Aws::String& name);
AWS_BRAKET_API Aws::String GetNameForDeviceType(DeviceType value);
} // namespace DeviceTypeMapper
} // namespace Model
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,83 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/braket/Braket_EXPORTS.h>
#include <aws/braket/BraketRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Braket
{
namespace Model
{
/**
*/
class AWS_BRAKET_API GetDeviceRequest : public BraketRequest
{
public:
GetDeviceRequest();
// 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 "GetDevice"; }
Aws::String SerializePayload() const override;
/**
* <p>The ARN of the device to retrieve.</p>
*/
inline const Aws::String& GetDeviceArn() const{ return m_deviceArn; }
/**
* <p>The ARN of the device to retrieve.</p>
*/
inline bool DeviceArnHasBeenSet() const { return m_deviceArnHasBeenSet; }
/**
* <p>The ARN of the device to retrieve.</p>
*/
inline void SetDeviceArn(const Aws::String& value) { m_deviceArnHasBeenSet = true; m_deviceArn = value; }
/**
* <p>The ARN of the device to retrieve.</p>
*/
inline void SetDeviceArn(Aws::String&& value) { m_deviceArnHasBeenSet = true; m_deviceArn = std::move(value); }
/**
* <p>The ARN of the device to retrieve.</p>
*/
inline void SetDeviceArn(const char* value) { m_deviceArnHasBeenSet = true; m_deviceArn.assign(value); }
/**
* <p>The ARN of the device to retrieve.</p>
*/
inline GetDeviceRequest& WithDeviceArn(const Aws::String& value) { SetDeviceArn(value); return *this;}
/**
* <p>The ARN of the device to retrieve.</p>
*/
inline GetDeviceRequest& WithDeviceArn(Aws::String&& value) { SetDeviceArn(std::move(value)); return *this;}
/**
* <p>The ARN of the device to retrieve.</p>
*/
inline GetDeviceRequest& WithDeviceArn(const char* value) { SetDeviceArn(value); return *this;}
private:
Aws::String m_deviceArn;
bool m_deviceArnHasBeenSet;
};
} // namespace Model
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,249 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/braket/Braket_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/braket/model/DeviceStatus.h>
#include <aws/braket/model/DeviceType.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace Braket
{
namespace Model
{
class AWS_BRAKET_API GetDeviceResult
{
public:
GetDeviceResult();
GetDeviceResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
GetDeviceResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>The ARN of the device.</p>
*/
inline const Aws::String& GetDeviceArn() const{ return m_deviceArn; }
/**
* <p>The ARN of the device.</p>
*/
inline void SetDeviceArn(const Aws::String& value) { m_deviceArn = value; }
/**
* <p>The ARN of the device.</p>
*/
inline void SetDeviceArn(Aws::String&& value) { m_deviceArn = std::move(value); }
/**
* <p>The ARN of the device.</p>
*/
inline void SetDeviceArn(const char* value) { m_deviceArn.assign(value); }
/**
* <p>The ARN of the device.</p>
*/
inline GetDeviceResult& WithDeviceArn(const Aws::String& value) { SetDeviceArn(value); return *this;}
/**
* <p>The ARN of the device.</p>
*/
inline GetDeviceResult& WithDeviceArn(Aws::String&& value) { SetDeviceArn(std::move(value)); return *this;}
/**
* <p>The ARN of the device.</p>
*/
inline GetDeviceResult& WithDeviceArn(const char* value) { SetDeviceArn(value); return *this;}
/**
* <p>Details about the capabilities of the device.</p>
*/
inline const Aws::String& GetDeviceCapabilities() const{ return m_deviceCapabilities; }
/**
* <p>Details about the capabilities of the device.</p>
*/
inline void SetDeviceCapabilities(const Aws::String& value) { m_deviceCapabilities = value; }
/**
* <p>Details about the capabilities of the device.</p>
*/
inline void SetDeviceCapabilities(Aws::String&& value) { m_deviceCapabilities = std::move(value); }
/**
* <p>Details about the capabilities of the device.</p>
*/
inline void SetDeviceCapabilities(const char* value) { m_deviceCapabilities.assign(value); }
/**
* <p>Details about the capabilities of the device.</p>
*/
inline GetDeviceResult& WithDeviceCapabilities(const Aws::String& value) { SetDeviceCapabilities(value); return *this;}
/**
* <p>Details about the capabilities of the device.</p>
*/
inline GetDeviceResult& WithDeviceCapabilities(Aws::String&& value) { SetDeviceCapabilities(std::move(value)); return *this;}
/**
* <p>Details about the capabilities of the device.</p>
*/
inline GetDeviceResult& WithDeviceCapabilities(const char* value) { SetDeviceCapabilities(value); return *this;}
/**
* <p>The name of the device.</p>
*/
inline const Aws::String& GetDeviceName() const{ return m_deviceName; }
/**
* <p>The name of the device.</p>
*/
inline void SetDeviceName(const Aws::String& value) { m_deviceName = value; }
/**
* <p>The name of the device.</p>
*/
inline void SetDeviceName(Aws::String&& value) { m_deviceName = std::move(value); }
/**
* <p>The name of the device.</p>
*/
inline void SetDeviceName(const char* value) { m_deviceName.assign(value); }
/**
* <p>The name of the device.</p>
*/
inline GetDeviceResult& WithDeviceName(const Aws::String& value) { SetDeviceName(value); return *this;}
/**
* <p>The name of the device.</p>
*/
inline GetDeviceResult& WithDeviceName(Aws::String&& value) { SetDeviceName(std::move(value)); return *this;}
/**
* <p>The name of the device.</p>
*/
inline GetDeviceResult& WithDeviceName(const char* value) { SetDeviceName(value); return *this;}
/**
* <p>The status of the device.</p>
*/
inline const DeviceStatus& GetDeviceStatus() const{ return m_deviceStatus; }
/**
* <p>The status of the device.</p>
*/
inline void SetDeviceStatus(const DeviceStatus& value) { m_deviceStatus = value; }
/**
* <p>The status of the device.</p>
*/
inline void SetDeviceStatus(DeviceStatus&& value) { m_deviceStatus = std::move(value); }
/**
* <p>The status of the device.</p>
*/
inline GetDeviceResult& WithDeviceStatus(const DeviceStatus& value) { SetDeviceStatus(value); return *this;}
/**
* <p>The status of the device.</p>
*/
inline GetDeviceResult& WithDeviceStatus(DeviceStatus&& value) { SetDeviceStatus(std::move(value)); return *this;}
/**
* <p>The type of the device.</p>
*/
inline const DeviceType& GetDeviceType() const{ return m_deviceType; }
/**
* <p>The type of the device.</p>
*/
inline void SetDeviceType(const DeviceType& value) { m_deviceType = value; }
/**
* <p>The type of the device.</p>
*/
inline void SetDeviceType(DeviceType&& value) { m_deviceType = std::move(value); }
/**
* <p>The type of the device.</p>
*/
inline GetDeviceResult& WithDeviceType(const DeviceType& value) { SetDeviceType(value); return *this;}
/**
* <p>The type of the device.</p>
*/
inline GetDeviceResult& WithDeviceType(DeviceType&& value) { SetDeviceType(std::move(value)); return *this;}
/**
* <p>The name of the partner company for the device.</p>
*/
inline const Aws::String& GetProviderName() const{ return m_providerName; }
/**
* <p>The name of the partner company for the device.</p>
*/
inline void SetProviderName(const Aws::String& value) { m_providerName = value; }
/**
* <p>The name of the partner company for the device.</p>
*/
inline void SetProviderName(Aws::String&& value) { m_providerName = std::move(value); }
/**
* <p>The name of the partner company for the device.</p>
*/
inline void SetProviderName(const char* value) { m_providerName.assign(value); }
/**
* <p>The name of the partner company for the device.</p>
*/
inline GetDeviceResult& WithProviderName(const Aws::String& value) { SetProviderName(value); return *this;}
/**
* <p>The name of the partner company for the device.</p>
*/
inline GetDeviceResult& WithProviderName(Aws::String&& value) { SetProviderName(std::move(value)); return *this;}
/**
* <p>The name of the partner company for the device.</p>
*/
inline GetDeviceResult& WithProviderName(const char* value) { SetProviderName(value); return *this;}
private:
Aws::String m_deviceArn;
Aws::String m_deviceCapabilities;
Aws::String m_deviceName;
DeviceStatus m_deviceStatus;
DeviceType m_deviceType;
Aws::String m_providerName;
};
} // namespace Model
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,83 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/braket/Braket_EXPORTS.h>
#include <aws/braket/BraketRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Braket
{
namespace Model
{
/**
*/
class AWS_BRAKET_API GetQuantumTaskRequest : public BraketRequest
{
public:
GetQuantumTaskRequest();
// 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 "GetQuantumTask"; }
Aws::String SerializePayload() const override;
/**
* <p>the ARN of the task to retrieve.</p>
*/
inline const Aws::String& GetQuantumTaskArn() const{ return m_quantumTaskArn; }
/**
* <p>the ARN of the task to retrieve.</p>
*/
inline bool QuantumTaskArnHasBeenSet() const { return m_quantumTaskArnHasBeenSet; }
/**
* <p>the ARN of the task to retrieve.</p>
*/
inline void SetQuantumTaskArn(const Aws::String& value) { m_quantumTaskArnHasBeenSet = true; m_quantumTaskArn = value; }
/**
* <p>the ARN of the task to retrieve.</p>
*/
inline void SetQuantumTaskArn(Aws::String&& value) { m_quantumTaskArnHasBeenSet = true; m_quantumTaskArn = std::move(value); }
/**
* <p>the ARN of the task to retrieve.</p>
*/
inline void SetQuantumTaskArn(const char* value) { m_quantumTaskArnHasBeenSet = true; m_quantumTaskArn.assign(value); }
/**
* <p>the ARN of the task to retrieve.</p>
*/
inline GetQuantumTaskRequest& WithQuantumTaskArn(const Aws::String& value) { SetQuantumTaskArn(value); return *this;}
/**
* <p>the ARN of the task to retrieve.</p>
*/
inline GetQuantumTaskRequest& WithQuantumTaskArn(Aws::String&& value) { SetQuantumTaskArn(std::move(value)); return *this;}
/**
* <p>the ARN of the task to retrieve.</p>
*/
inline GetQuantumTaskRequest& WithQuantumTaskArn(const char* value) { SetQuantumTaskArn(value); return *this;}
private:
Aws::String m_quantumTaskArn;
bool m_quantumTaskArnHasBeenSet;
};
} // namespace Model
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,371 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/braket/Braket_EXPORTS.h>
#include <aws/core/utils/DateTime.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/braket/model/QuantumTaskStatus.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace Braket
{
namespace Model
{
class AWS_BRAKET_API GetQuantumTaskResult
{
public:
GetQuantumTaskResult();
GetQuantumTaskResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
GetQuantumTaskResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>The time at which the task was created.</p>
*/
inline const Aws::Utils::DateTime& GetCreatedAt() const{ return m_createdAt; }
/**
* <p>The time at which the task was created.</p>
*/
inline void SetCreatedAt(const Aws::Utils::DateTime& value) { m_createdAt = value; }
/**
* <p>The time at which the task was created.</p>
*/
inline void SetCreatedAt(Aws::Utils::DateTime&& value) { m_createdAt = std::move(value); }
/**
* <p>The time at which the task was created.</p>
*/
inline GetQuantumTaskResult& WithCreatedAt(const Aws::Utils::DateTime& value) { SetCreatedAt(value); return *this;}
/**
* <p>The time at which the task was created.</p>
*/
inline GetQuantumTaskResult& WithCreatedAt(Aws::Utils::DateTime&& value) { SetCreatedAt(std::move(value)); return *this;}
/**
* <p>The ARN of the device the task was run on.</p>
*/
inline const Aws::String& GetDeviceArn() const{ return m_deviceArn; }
/**
* <p>The ARN of the device the task was run on.</p>
*/
inline void SetDeviceArn(const Aws::String& value) { m_deviceArn = value; }
/**
* <p>The ARN of the device the task was run on.</p>
*/
inline void SetDeviceArn(Aws::String&& value) { m_deviceArn = std::move(value); }
/**
* <p>The ARN of the device the task was run on.</p>
*/
inline void SetDeviceArn(const char* value) { m_deviceArn.assign(value); }
/**
* <p>The ARN of the device the task was run on.</p>
*/
inline GetQuantumTaskResult& WithDeviceArn(const Aws::String& value) { SetDeviceArn(value); return *this;}
/**
* <p>The ARN of the device the task was run on.</p>
*/
inline GetQuantumTaskResult& WithDeviceArn(Aws::String&& value) { SetDeviceArn(std::move(value)); return *this;}
/**
* <p>The ARN of the device the task was run on.</p>
*/
inline GetQuantumTaskResult& WithDeviceArn(const char* value) { SetDeviceArn(value); return *this;}
/**
* <p>The parameters for the device on which the task ran.</p>
*/
inline const Aws::String& GetDeviceParameters() const{ return m_deviceParameters; }
/**
* <p>The parameters for the device on which the task ran.</p>
*/
inline void SetDeviceParameters(const Aws::String& value) { m_deviceParameters = value; }
/**
* <p>The parameters for the device on which the task ran.</p>
*/
inline void SetDeviceParameters(Aws::String&& value) { m_deviceParameters = std::move(value); }
/**
* <p>The parameters for the device on which the task ran.</p>
*/
inline void SetDeviceParameters(const char* value) { m_deviceParameters.assign(value); }
/**
* <p>The parameters for the device on which the task ran.</p>
*/
inline GetQuantumTaskResult& WithDeviceParameters(const Aws::String& value) { SetDeviceParameters(value); return *this;}
/**
* <p>The parameters for the device on which the task ran.</p>
*/
inline GetQuantumTaskResult& WithDeviceParameters(Aws::String&& value) { SetDeviceParameters(std::move(value)); return *this;}
/**
* <p>The parameters for the device on which the task ran.</p>
*/
inline GetQuantumTaskResult& WithDeviceParameters(const char* value) { SetDeviceParameters(value); return *this;}
/**
* <p>The time at which the task ended.</p>
*/
inline const Aws::Utils::DateTime& GetEndedAt() const{ return m_endedAt; }
/**
* <p>The time at which the task ended.</p>
*/
inline void SetEndedAt(const Aws::Utils::DateTime& value) { m_endedAt = value; }
/**
* <p>The time at which the task ended.</p>
*/
inline void SetEndedAt(Aws::Utils::DateTime&& value) { m_endedAt = std::move(value); }
/**
* <p>The time at which the task ended.</p>
*/
inline GetQuantumTaskResult& WithEndedAt(const Aws::Utils::DateTime& value) { SetEndedAt(value); return *this;}
/**
* <p>The time at which the task ended.</p>
*/
inline GetQuantumTaskResult& WithEndedAt(Aws::Utils::DateTime&& value) { SetEndedAt(std::move(value)); return *this;}
/**
* <p>The reason that a task failed.</p>
*/
inline const Aws::String& GetFailureReason() const{ return m_failureReason; }
/**
* <p>The reason that a task failed.</p>
*/
inline void SetFailureReason(const Aws::String& value) { m_failureReason = value; }
/**
* <p>The reason that a task failed.</p>
*/
inline void SetFailureReason(Aws::String&& value) { m_failureReason = std::move(value); }
/**
* <p>The reason that a task failed.</p>
*/
inline void SetFailureReason(const char* value) { m_failureReason.assign(value); }
/**
* <p>The reason that a task failed.</p>
*/
inline GetQuantumTaskResult& WithFailureReason(const Aws::String& value) { SetFailureReason(value); return *this;}
/**
* <p>The reason that a task failed.</p>
*/
inline GetQuantumTaskResult& WithFailureReason(Aws::String&& value) { SetFailureReason(std::move(value)); return *this;}
/**
* <p>The reason that a task failed.</p>
*/
inline GetQuantumTaskResult& WithFailureReason(const char* value) { SetFailureReason(value); return *this;}
/**
* <p>The S3 bucket where task results are stored.</p>
*/
inline const Aws::String& GetOutputS3Bucket() const{ return m_outputS3Bucket; }
/**
* <p>The S3 bucket where task results are stored.</p>
*/
inline void SetOutputS3Bucket(const Aws::String& value) { m_outputS3Bucket = value; }
/**
* <p>The S3 bucket where task results are stored.</p>
*/
inline void SetOutputS3Bucket(Aws::String&& value) { m_outputS3Bucket = std::move(value); }
/**
* <p>The S3 bucket where task results are stored.</p>
*/
inline void SetOutputS3Bucket(const char* value) { m_outputS3Bucket.assign(value); }
/**
* <p>The S3 bucket where task results are stored.</p>
*/
inline GetQuantumTaskResult& WithOutputS3Bucket(const Aws::String& value) { SetOutputS3Bucket(value); return *this;}
/**
* <p>The S3 bucket where task results are stored.</p>
*/
inline GetQuantumTaskResult& WithOutputS3Bucket(Aws::String&& value) { SetOutputS3Bucket(std::move(value)); return *this;}
/**
* <p>The S3 bucket where task results are stored.</p>
*/
inline GetQuantumTaskResult& WithOutputS3Bucket(const char* value) { SetOutputS3Bucket(value); return *this;}
/**
* <p>The folder in the S3 bucket where task results are stored.</p>
*/
inline const Aws::String& GetOutputS3Directory() const{ return m_outputS3Directory; }
/**
* <p>The folder in the S3 bucket where task results are stored.</p>
*/
inline void SetOutputS3Directory(const Aws::String& value) { m_outputS3Directory = value; }
/**
* <p>The folder in the S3 bucket where task results are stored.</p>
*/
inline void SetOutputS3Directory(Aws::String&& value) { m_outputS3Directory = std::move(value); }
/**
* <p>The folder in the S3 bucket where task results are stored.</p>
*/
inline void SetOutputS3Directory(const char* value) { m_outputS3Directory.assign(value); }
/**
* <p>The folder in the S3 bucket where task results are stored.</p>
*/
inline GetQuantumTaskResult& WithOutputS3Directory(const Aws::String& value) { SetOutputS3Directory(value); return *this;}
/**
* <p>The folder in the S3 bucket where task results are stored.</p>
*/
inline GetQuantumTaskResult& WithOutputS3Directory(Aws::String&& value) { SetOutputS3Directory(std::move(value)); return *this;}
/**
* <p>The folder in the S3 bucket where task results are stored.</p>
*/
inline GetQuantumTaskResult& WithOutputS3Directory(const char* value) { SetOutputS3Directory(value); return *this;}
/**
* <p>The ARN of the task.</p>
*/
inline const Aws::String& GetQuantumTaskArn() const{ return m_quantumTaskArn; }
/**
* <p>The ARN of the task.</p>
*/
inline void SetQuantumTaskArn(const Aws::String& value) { m_quantumTaskArn = value; }
/**
* <p>The ARN of the task.</p>
*/
inline void SetQuantumTaskArn(Aws::String&& value) { m_quantumTaskArn = std::move(value); }
/**
* <p>The ARN of the task.</p>
*/
inline void SetQuantumTaskArn(const char* value) { m_quantumTaskArn.assign(value); }
/**
* <p>The ARN of the task.</p>
*/
inline GetQuantumTaskResult& WithQuantumTaskArn(const Aws::String& value) { SetQuantumTaskArn(value); return *this;}
/**
* <p>The ARN of the task.</p>
*/
inline GetQuantumTaskResult& WithQuantumTaskArn(Aws::String&& value) { SetQuantumTaskArn(std::move(value)); return *this;}
/**
* <p>The ARN of the task.</p>
*/
inline GetQuantumTaskResult& WithQuantumTaskArn(const char* value) { SetQuantumTaskArn(value); return *this;}
/**
* <p>The number of shots used in the task.</p>
*/
inline long long GetShots() const{ return m_shots; }
/**
* <p>The number of shots used in the task.</p>
*/
inline void SetShots(long long value) { m_shots = value; }
/**
* <p>The number of shots used in the task.</p>
*/
inline GetQuantumTaskResult& WithShots(long long value) { SetShots(value); return *this;}
/**
* <p>The status of the task.</p>
*/
inline const QuantumTaskStatus& GetStatus() const{ return m_status; }
/**
* <p>The status of the task.</p>
*/
inline void SetStatus(const QuantumTaskStatus& value) { m_status = value; }
/**
* <p>The status of the task.</p>
*/
inline void SetStatus(QuantumTaskStatus&& value) { m_status = std::move(value); }
/**
* <p>The status of the task.</p>
*/
inline GetQuantumTaskResult& WithStatus(const QuantumTaskStatus& value) { SetStatus(value); return *this;}
/**
* <p>The status of the task.</p>
*/
inline GetQuantumTaskResult& WithStatus(QuantumTaskStatus&& value) { SetStatus(std::move(value)); return *this;}
private:
Aws::Utils::DateTime m_createdAt;
Aws::String m_deviceArn;
Aws::String m_deviceParameters;
Aws::Utils::DateTime m_endedAt;
Aws::String m_failureReason;
Aws::String m_outputS3Bucket;
Aws::String m_outputS3Directory;
Aws::String m_quantumTaskArn;
long long m_shots;
QuantumTaskStatus m_status;
};
} // namespace Model
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,36 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/braket/Braket_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace Braket
{
namespace Model
{
enum class QuantumTaskStatus
{
NOT_SET,
CANCELLED,
CANCELLING,
COMPLETED,
CREATED,
FAILED,
QUEUED,
RUNNING
};
namespace QuantumTaskStatusMapper
{
AWS_BRAKET_API QuantumTaskStatus GetQuantumTaskStatusForName(const Aws::String& name);
AWS_BRAKET_API Aws::String GetNameForQuantumTaskStatus(QuantumTaskStatus value);
} // namespace QuantumTaskStatusMapper
} // namespace Model
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,348 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/braket/Braket_EXPORTS.h>
#include <aws/core/utils/DateTime.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/braket/model/QuantumTaskStatus.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace Braket
{
namespace Model
{
/**
* <p>Includes information about a quantum task.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/braket-2019-09-01/QuantumTaskSummary">AWS
* API Reference</a></p>
*/
class AWS_BRAKET_API QuantumTaskSummary
{
public:
QuantumTaskSummary();
QuantumTaskSummary(Aws::Utils::Json::JsonView jsonValue);
QuantumTaskSummary& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The time at which the task was created.</p>
*/
inline const Aws::Utils::DateTime& GetCreatedAt() const{ return m_createdAt; }
/**
* <p>The time at which the task was created.</p>
*/
inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }
/**
* <p>The time at which the task was created.</p>
*/
inline void SetCreatedAt(const Aws::Utils::DateTime& value) { m_createdAtHasBeenSet = true; m_createdAt = value; }
/**
* <p>The time at which the task was created.</p>
*/
inline void SetCreatedAt(Aws::Utils::DateTime&& value) { m_createdAtHasBeenSet = true; m_createdAt = std::move(value); }
/**
* <p>The time at which the task was created.</p>
*/
inline QuantumTaskSummary& WithCreatedAt(const Aws::Utils::DateTime& value) { SetCreatedAt(value); return *this;}
/**
* <p>The time at which the task was created.</p>
*/
inline QuantumTaskSummary& WithCreatedAt(Aws::Utils::DateTime&& value) { SetCreatedAt(std::move(value)); return *this;}
/**
* <p>The ARN of the device the task ran on.</p>
*/
inline const Aws::String& GetDeviceArn() const{ return m_deviceArn; }
/**
* <p>The ARN of the device the task ran on.</p>
*/
inline bool DeviceArnHasBeenSet() const { return m_deviceArnHasBeenSet; }
/**
* <p>The ARN of the device the task ran on.</p>
*/
inline void SetDeviceArn(const Aws::String& value) { m_deviceArnHasBeenSet = true; m_deviceArn = value; }
/**
* <p>The ARN of the device the task ran on.</p>
*/
inline void SetDeviceArn(Aws::String&& value) { m_deviceArnHasBeenSet = true; m_deviceArn = std::move(value); }
/**
* <p>The ARN of the device the task ran on.</p>
*/
inline void SetDeviceArn(const char* value) { m_deviceArnHasBeenSet = true; m_deviceArn.assign(value); }
/**
* <p>The ARN of the device the task ran on.</p>
*/
inline QuantumTaskSummary& WithDeviceArn(const Aws::String& value) { SetDeviceArn(value); return *this;}
/**
* <p>The ARN of the device the task ran on.</p>
*/
inline QuantumTaskSummary& WithDeviceArn(Aws::String&& value) { SetDeviceArn(std::move(value)); return *this;}
/**
* <p>The ARN of the device the task ran on.</p>
*/
inline QuantumTaskSummary& WithDeviceArn(const char* value) { SetDeviceArn(value); return *this;}
/**
* <p>The time at which the task finished.</p>
*/
inline const Aws::Utils::DateTime& GetEndedAt() const{ return m_endedAt; }
/**
* <p>The time at which the task finished.</p>
*/
inline bool EndedAtHasBeenSet() const { return m_endedAtHasBeenSet; }
/**
* <p>The time at which the task finished.</p>
*/
inline void SetEndedAt(const Aws::Utils::DateTime& value) { m_endedAtHasBeenSet = true; m_endedAt = value; }
/**
* <p>The time at which the task finished.</p>
*/
inline void SetEndedAt(Aws::Utils::DateTime&& value) { m_endedAtHasBeenSet = true; m_endedAt = std::move(value); }
/**
* <p>The time at which the task finished.</p>
*/
inline QuantumTaskSummary& WithEndedAt(const Aws::Utils::DateTime& value) { SetEndedAt(value); return *this;}
/**
* <p>The time at which the task finished.</p>
*/
inline QuantumTaskSummary& WithEndedAt(Aws::Utils::DateTime&& value) { SetEndedAt(std::move(value)); return *this;}
/**
* <p>The S3 bucket where the task result file is stored..</p>
*/
inline const Aws::String& GetOutputS3Bucket() const{ return m_outputS3Bucket; }
/**
* <p>The S3 bucket where the task result file is stored..</p>
*/
inline bool OutputS3BucketHasBeenSet() const { return m_outputS3BucketHasBeenSet; }
/**
* <p>The S3 bucket where the task result file is stored..</p>
*/
inline void SetOutputS3Bucket(const Aws::String& value) { m_outputS3BucketHasBeenSet = true; m_outputS3Bucket = value; }
/**
* <p>The S3 bucket where the task result file is stored..</p>
*/
inline void SetOutputS3Bucket(Aws::String&& value) { m_outputS3BucketHasBeenSet = true; m_outputS3Bucket = std::move(value); }
/**
* <p>The S3 bucket where the task result file is stored..</p>
*/
inline void SetOutputS3Bucket(const char* value) { m_outputS3BucketHasBeenSet = true; m_outputS3Bucket.assign(value); }
/**
* <p>The S3 bucket where the task result file is stored..</p>
*/
inline QuantumTaskSummary& WithOutputS3Bucket(const Aws::String& value) { SetOutputS3Bucket(value); return *this;}
/**
* <p>The S3 bucket where the task result file is stored..</p>
*/
inline QuantumTaskSummary& WithOutputS3Bucket(Aws::String&& value) { SetOutputS3Bucket(std::move(value)); return *this;}
/**
* <p>The S3 bucket where the task result file is stored..</p>
*/
inline QuantumTaskSummary& WithOutputS3Bucket(const char* value) { SetOutputS3Bucket(value); return *this;}
/**
* <p>The folder in the S3 bucket where the task result file is stored.</p>
*/
inline const Aws::String& GetOutputS3Directory() const{ return m_outputS3Directory; }
/**
* <p>The folder in the S3 bucket where the task result file is stored.</p>
*/
inline bool OutputS3DirectoryHasBeenSet() const { return m_outputS3DirectoryHasBeenSet; }
/**
* <p>The folder in the S3 bucket where the task result file is stored.</p>
*/
inline void SetOutputS3Directory(const Aws::String& value) { m_outputS3DirectoryHasBeenSet = true; m_outputS3Directory = value; }
/**
* <p>The folder in the S3 bucket where the task result file is stored.</p>
*/
inline void SetOutputS3Directory(Aws::String&& value) { m_outputS3DirectoryHasBeenSet = true; m_outputS3Directory = std::move(value); }
/**
* <p>The folder in the S3 bucket where the task result file is stored.</p>
*/
inline void SetOutputS3Directory(const char* value) { m_outputS3DirectoryHasBeenSet = true; m_outputS3Directory.assign(value); }
/**
* <p>The folder in the S3 bucket where the task result file is stored.</p>
*/
inline QuantumTaskSummary& WithOutputS3Directory(const Aws::String& value) { SetOutputS3Directory(value); return *this;}
/**
* <p>The folder in the S3 bucket where the task result file is stored.</p>
*/
inline QuantumTaskSummary& WithOutputS3Directory(Aws::String&& value) { SetOutputS3Directory(std::move(value)); return *this;}
/**
* <p>The folder in the S3 bucket where the task result file is stored.</p>
*/
inline QuantumTaskSummary& WithOutputS3Directory(const char* value) { SetOutputS3Directory(value); return *this;}
/**
* <p>The ARN of the task.</p>
*/
inline const Aws::String& GetQuantumTaskArn() const{ return m_quantumTaskArn; }
/**
* <p>The ARN of the task.</p>
*/
inline bool QuantumTaskArnHasBeenSet() const { return m_quantumTaskArnHasBeenSet; }
/**
* <p>The ARN of the task.</p>
*/
inline void SetQuantumTaskArn(const Aws::String& value) { m_quantumTaskArnHasBeenSet = true; m_quantumTaskArn = value; }
/**
* <p>The ARN of the task.</p>
*/
inline void SetQuantumTaskArn(Aws::String&& value) { m_quantumTaskArnHasBeenSet = true; m_quantumTaskArn = std::move(value); }
/**
* <p>The ARN of the task.</p>
*/
inline void SetQuantumTaskArn(const char* value) { m_quantumTaskArnHasBeenSet = true; m_quantumTaskArn.assign(value); }
/**
* <p>The ARN of the task.</p>
*/
inline QuantumTaskSummary& WithQuantumTaskArn(const Aws::String& value) { SetQuantumTaskArn(value); return *this;}
/**
* <p>The ARN of the task.</p>
*/
inline QuantumTaskSummary& WithQuantumTaskArn(Aws::String&& value) { SetQuantumTaskArn(std::move(value)); return *this;}
/**
* <p>The ARN of the task.</p>
*/
inline QuantumTaskSummary& WithQuantumTaskArn(const char* value) { SetQuantumTaskArn(value); return *this;}
/**
* <p>The shots used for the task.</p>
*/
inline long long GetShots() const{ return m_shots; }
/**
* <p>The shots used for the task.</p>
*/
inline bool ShotsHasBeenSet() const { return m_shotsHasBeenSet; }
/**
* <p>The shots used for the task.</p>
*/
inline void SetShots(long long value) { m_shotsHasBeenSet = true; m_shots = value; }
/**
* <p>The shots used for the task.</p>
*/
inline QuantumTaskSummary& WithShots(long long value) { SetShots(value); return *this;}
/**
* <p>The status of the task.</p>
*/
inline const QuantumTaskStatus& GetStatus() const{ return m_status; }
/**
* <p>The status of the task.</p>
*/
inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
/**
* <p>The status of the task.</p>
*/
inline void SetStatus(const QuantumTaskStatus& value) { m_statusHasBeenSet = true; m_status = value; }
/**
* <p>The status of the task.</p>
*/
inline void SetStatus(QuantumTaskStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); }
/**
* <p>The status of the task.</p>
*/
inline QuantumTaskSummary& WithStatus(const QuantumTaskStatus& value) { SetStatus(value); return *this;}
/**
* <p>The status of the task.</p>
*/
inline QuantumTaskSummary& WithStatus(QuantumTaskStatus&& value) { SetStatus(std::move(value)); return *this;}
private:
Aws::Utils::DateTime m_createdAt;
bool m_createdAtHasBeenSet;
Aws::String m_deviceArn;
bool m_deviceArnHasBeenSet;
Aws::Utils::DateTime m_endedAt;
bool m_endedAtHasBeenSet;
Aws::String m_outputS3Bucket;
bool m_outputS3BucketHasBeenSet;
Aws::String m_outputS3Directory;
bool m_outputS3DirectoryHasBeenSet;
Aws::String m_quantumTaskArn;
bool m_quantumTaskArnHasBeenSet;
long long m_shots;
bool m_shotsHasBeenSet;
QuantumTaskStatus m_status;
bool m_statusHasBeenSet;
};
} // namespace Model
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,138 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/braket/Braket_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace Braket
{
namespace Model
{
/**
* <p>The filter to use for searching devices.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/braket-2019-09-01/SearchDevicesFilter">AWS
* API Reference</a></p>
*/
class AWS_BRAKET_API SearchDevicesFilter
{
public:
SearchDevicesFilter();
SearchDevicesFilter(Aws::Utils::Json::JsonView jsonValue);
SearchDevicesFilter& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The name to use to filter results.</p>
*/
inline const Aws::String& GetName() const{ return m_name; }
/**
* <p>The name to use to filter results.</p>
*/
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
/**
* <p>The name to use to filter results.</p>
*/
inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
/**
* <p>The name to use to filter results.</p>
*/
inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
/**
* <p>The name to use to filter results.</p>
*/
inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
/**
* <p>The name to use to filter results.</p>
*/
inline SearchDevicesFilter& WithName(const Aws::String& value) { SetName(value); return *this;}
/**
* <p>The name to use to filter results.</p>
*/
inline SearchDevicesFilter& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
/**
* <p>The name to use to filter results.</p>
*/
inline SearchDevicesFilter& WithName(const char* value) { SetName(value); return *this;}
/**
* <p>The values to use to filter results.</p>
*/
inline const Aws::Vector<Aws::String>& GetValues() const{ return m_values; }
/**
* <p>The values to use to filter results.</p>
*/
inline bool ValuesHasBeenSet() const { return m_valuesHasBeenSet; }
/**
* <p>The values to use to filter results.</p>
*/
inline void SetValues(const Aws::Vector<Aws::String>& value) { m_valuesHasBeenSet = true; m_values = value; }
/**
* <p>The values to use to filter results.</p>
*/
inline void SetValues(Aws::Vector<Aws::String>&& value) { m_valuesHasBeenSet = true; m_values = std::move(value); }
/**
* <p>The values to use to filter results.</p>
*/
inline SearchDevicesFilter& WithValues(const Aws::Vector<Aws::String>& value) { SetValues(value); return *this;}
/**
* <p>The values to use to filter results.</p>
*/
inline SearchDevicesFilter& WithValues(Aws::Vector<Aws::String>&& value) { SetValues(std::move(value)); return *this;}
/**
* <p>The values to use to filter results.</p>
*/
inline SearchDevicesFilter& AddValues(const Aws::String& value) { m_valuesHasBeenSet = true; m_values.push_back(value); return *this; }
/**
* <p>The values to use to filter results.</p>
*/
inline SearchDevicesFilter& AddValues(Aws::String&& value) { m_valuesHasBeenSet = true; m_values.push_back(std::move(value)); return *this; }
/**
* <p>The values to use to filter results.</p>
*/
inline SearchDevicesFilter& AddValues(const char* value) { m_valuesHasBeenSet = true; m_values.push_back(value); return *this; }
private:
Aws::String m_name;
bool m_nameHasBeenSet;
Aws::Vector<Aws::String> m_values;
bool m_valuesHasBeenSet;
};
} // namespace Model
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,169 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/braket/Braket_EXPORTS.h>
#include <aws/braket/BraketRequest.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/braket/model/SearchDevicesFilter.h>
#include <utility>
namespace Aws
{
namespace Braket
{
namespace Model
{
/**
*/
class AWS_BRAKET_API SearchDevicesRequest : public BraketRequest
{
public:
SearchDevicesRequest();
// 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 "SearchDevices"; }
Aws::String SerializePayload() const override;
/**
* <p>The filter values to use to search for a device.</p>
*/
inline const Aws::Vector<SearchDevicesFilter>& GetFilters() const{ return m_filters; }
/**
* <p>The filter values to use to search for a device.</p>
*/
inline bool FiltersHasBeenSet() const { return m_filtersHasBeenSet; }
/**
* <p>The filter values to use to search for a device.</p>
*/
inline void SetFilters(const Aws::Vector<SearchDevicesFilter>& value) { m_filtersHasBeenSet = true; m_filters = value; }
/**
* <p>The filter values to use to search for a device.</p>
*/
inline void SetFilters(Aws::Vector<SearchDevicesFilter>&& value) { m_filtersHasBeenSet = true; m_filters = std::move(value); }
/**
* <p>The filter values to use to search for a device.</p>
*/
inline SearchDevicesRequest& WithFilters(const Aws::Vector<SearchDevicesFilter>& value) { SetFilters(value); return *this;}
/**
* <p>The filter values to use to search for a device.</p>
*/
inline SearchDevicesRequest& WithFilters(Aws::Vector<SearchDevicesFilter>&& value) { SetFilters(std::move(value)); return *this;}
/**
* <p>The filter values to use to search for a device.</p>
*/
inline SearchDevicesRequest& AddFilters(const SearchDevicesFilter& value) { m_filtersHasBeenSet = true; m_filters.push_back(value); return *this; }
/**
* <p>The filter values to use to search for a device.</p>
*/
inline SearchDevicesRequest& AddFilters(SearchDevicesFilter&& value) { m_filtersHasBeenSet = true; m_filters.push_back(std::move(value)); return *this; }
/**
* <p>The maximum number of results to return in the response.</p>
*/
inline int GetMaxResults() const{ return m_maxResults; }
/**
* <p>The maximum number of results to return in the response.</p>
*/
inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }
/**
* <p>The maximum number of results to return in the response.</p>
*/
inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; }
/**
* <p>The maximum number of results to return in the response.</p>
*/
inline SearchDevicesRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;}
/**
* <p>A token used for pagination of results returned in the response. Use the
* token returned from the previous request continue results where the previous
* request ended.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>A token used for pagination of results returned in the response. Use the
* token returned from the previous request continue results where the previous
* request ended.</p>
*/
inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
/**
* <p>A token used for pagination of results returned in the response. Use the
* token returned from the previous request continue results where the previous
* request ended.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
/**
* <p>A token used for pagination of results returned in the response. Use the
* token returned from the previous request continue results where the previous
* request ended.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); }
/**
* <p>A token used for pagination of results returned in the response. Use the
* token returned from the previous request continue results where the previous
* request ended.</p>
*/
inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }
/**
* <p>A token used for pagination of results returned in the response. Use the
* token returned from the previous request continue results where the previous
* request ended.</p>
*/
inline SearchDevicesRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>A token used for pagination of results returned in the response. Use the
* token returned from the previous request continue results where the previous
* request ended.</p>
*/
inline SearchDevicesRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>A token used for pagination of results returned in the response. Use the
* token returned from the previous request continue results where the previous
* request ended.</p>
*/
inline SearchDevicesRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}
private:
Aws::Vector<SearchDevicesFilter> m_filters;
bool m_filtersHasBeenSet;
int m_maxResults;
bool m_maxResultsHasBeenSet;
Aws::String m_nextToken;
bool m_nextTokenHasBeenSet;
};
} // namespace Model
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,138 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/braket/Braket_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/braket/model/DeviceSummary.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace Braket
{
namespace Model
{
class AWS_BRAKET_API SearchDevicesResult
{
public:
SearchDevicesResult();
SearchDevicesResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
SearchDevicesResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>An array of <code>DeviceSummary</code> objects for devices that match the
* specified filter values.</p>
*/
inline const Aws::Vector<DeviceSummary>& GetDevices() const{ return m_devices; }
/**
* <p>An array of <code>DeviceSummary</code> objects for devices that match the
* specified filter values.</p>
*/
inline void SetDevices(const Aws::Vector<DeviceSummary>& value) { m_devices = value; }
/**
* <p>An array of <code>DeviceSummary</code> objects for devices that match the
* specified filter values.</p>
*/
inline void SetDevices(Aws::Vector<DeviceSummary>&& value) { m_devices = std::move(value); }
/**
* <p>An array of <code>DeviceSummary</code> objects for devices that match the
* specified filter values.</p>
*/
inline SearchDevicesResult& WithDevices(const Aws::Vector<DeviceSummary>& value) { SetDevices(value); return *this;}
/**
* <p>An array of <code>DeviceSummary</code> objects for devices that match the
* specified filter values.</p>
*/
inline SearchDevicesResult& WithDevices(Aws::Vector<DeviceSummary>&& value) { SetDevices(std::move(value)); return *this;}
/**
* <p>An array of <code>DeviceSummary</code> objects for devices that match the
* specified filter values.</p>
*/
inline SearchDevicesResult& AddDevices(const DeviceSummary& value) { m_devices.push_back(value); return *this; }
/**
* <p>An array of <code>DeviceSummary</code> objects for devices that match the
* specified filter values.</p>
*/
inline SearchDevicesResult& AddDevices(DeviceSummary&& value) { m_devices.push_back(std::move(value)); return *this; }
/**
* <p>A token used for pagination of results, or null if there are no additional
* results. Use the token value in a subsequent request to continue results where
* the previous request ended.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>A token used for pagination of results, or null if there are no additional
* results. Use the token value in a subsequent request to continue results where
* the previous request ended.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextToken = value; }
/**
* <p>A token used for pagination of results, or null if there are no additional
* results. Use the token value in a subsequent request to continue results where
* the previous request ended.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); }
/**
* <p>A token used for pagination of results, or null if there are no additional
* results. Use the token value in a subsequent request to continue results where
* the previous request ended.</p>
*/
inline void SetNextToken(const char* value) { m_nextToken.assign(value); }
/**
* <p>A token used for pagination of results, or null if there are no additional
* results. Use the token value in a subsequent request to continue results where
* the previous request ended.</p>
*/
inline SearchDevicesResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>A token used for pagination of results, or null if there are no additional
* results. Use the token value in a subsequent request to continue results where
* the previous request ended.</p>
*/
inline SearchDevicesResult& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>A token used for pagination of results, or null if there are no additional
* results. Use the token value in a subsequent request to continue results where
* the previous request ended.</p>
*/
inline SearchDevicesResult& WithNextToken(const char* value) { SetNextToken(value); return *this;}
private:
Aws::Vector<DeviceSummary> m_devices;
Aws::String m_nextToken;
};
} // namespace Model
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,173 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/braket/Braket_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/braket/model/SearchQuantumTasksFilterOperator.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace Braket
{
namespace Model
{
/**
* <p>A filter to use to search for tasks.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/braket-2019-09-01/SearchQuantumTasksFilter">AWS
* API Reference</a></p>
*/
class AWS_BRAKET_API SearchQuantumTasksFilter
{
public:
SearchQuantumTasksFilter();
SearchQuantumTasksFilter(Aws::Utils::Json::JsonView jsonValue);
SearchQuantumTasksFilter& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The name of the device used for the task.</p>
*/
inline const Aws::String& GetName() const{ return m_name; }
/**
* <p>The name of the device used for the task.</p>
*/
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
/**
* <p>The name of the device used for the task.</p>
*/
inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
/**
* <p>The name of the device used for the task.</p>
*/
inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
/**
* <p>The name of the device used for the task.</p>
*/
inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
/**
* <p>The name of the device used for the task.</p>
*/
inline SearchQuantumTasksFilter& WithName(const Aws::String& value) { SetName(value); return *this;}
/**
* <p>The name of the device used for the task.</p>
*/
inline SearchQuantumTasksFilter& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
/**
* <p>The name of the device used for the task.</p>
*/
inline SearchQuantumTasksFilter& WithName(const char* value) { SetName(value); return *this;}
/**
* <p>An operator to use in the filter.</p>
*/
inline const SearchQuantumTasksFilterOperator& GetOperator() const{ return m_operator; }
/**
* <p>An operator to use in the filter.</p>
*/
inline bool OperatorHasBeenSet() const { return m_operatorHasBeenSet; }
/**
* <p>An operator to use in the filter.</p>
*/
inline void SetOperator(const SearchQuantumTasksFilterOperator& value) { m_operatorHasBeenSet = true; m_operator = value; }
/**
* <p>An operator to use in the filter.</p>
*/
inline void SetOperator(SearchQuantumTasksFilterOperator&& value) { m_operatorHasBeenSet = true; m_operator = std::move(value); }
/**
* <p>An operator to use in the filter.</p>
*/
inline SearchQuantumTasksFilter& WithOperator(const SearchQuantumTasksFilterOperator& value) { SetOperator(value); return *this;}
/**
* <p>An operator to use in the filter.</p>
*/
inline SearchQuantumTasksFilter& WithOperator(SearchQuantumTasksFilterOperator&& value) { SetOperator(std::move(value)); return *this;}
/**
* <p>The values to use for the filter.</p>
*/
inline const Aws::Vector<Aws::String>& GetValues() const{ return m_values; }
/**
* <p>The values to use for the filter.</p>
*/
inline bool ValuesHasBeenSet() const { return m_valuesHasBeenSet; }
/**
* <p>The values to use for the filter.</p>
*/
inline void SetValues(const Aws::Vector<Aws::String>& value) { m_valuesHasBeenSet = true; m_values = value; }
/**
* <p>The values to use for the filter.</p>
*/
inline void SetValues(Aws::Vector<Aws::String>&& value) { m_valuesHasBeenSet = true; m_values = std::move(value); }
/**
* <p>The values to use for the filter.</p>
*/
inline SearchQuantumTasksFilter& WithValues(const Aws::Vector<Aws::String>& value) { SetValues(value); return *this;}
/**
* <p>The values to use for the filter.</p>
*/
inline SearchQuantumTasksFilter& WithValues(Aws::Vector<Aws::String>&& value) { SetValues(std::move(value)); return *this;}
/**
* <p>The values to use for the filter.</p>
*/
inline SearchQuantumTasksFilter& AddValues(const Aws::String& value) { m_valuesHasBeenSet = true; m_values.push_back(value); return *this; }
/**
* <p>The values to use for the filter.</p>
*/
inline SearchQuantumTasksFilter& AddValues(Aws::String&& value) { m_valuesHasBeenSet = true; m_values.push_back(std::move(value)); return *this; }
/**
* <p>The values to use for the filter.</p>
*/
inline SearchQuantumTasksFilter& AddValues(const char* value) { m_valuesHasBeenSet = true; m_values.push_back(value); return *this; }
private:
Aws::String m_name;
bool m_nameHasBeenSet;
SearchQuantumTasksFilterOperator m_operator;
bool m_operatorHasBeenSet;
Aws::Vector<Aws::String> m_values;
bool m_valuesHasBeenSet;
};
} // namespace Model
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,35 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/braket/Braket_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace Braket
{
namespace Model
{
enum class SearchQuantumTasksFilterOperator
{
NOT_SET,
BETWEEN,
EQUAL,
GT,
GTE,
LT,
LTE
};
namespace SearchQuantumTasksFilterOperatorMapper
{
AWS_BRAKET_API SearchQuantumTasksFilterOperator GetSearchQuantumTasksFilterOperatorForName(const Aws::String& name);
AWS_BRAKET_API Aws::String GetNameForSearchQuantumTasksFilterOperator(SearchQuantumTasksFilterOperator value);
} // namespace SearchQuantumTasksFilterOperatorMapper
} // namespace Model
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,169 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/braket/Braket_EXPORTS.h>
#include <aws/braket/BraketRequest.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/braket/model/SearchQuantumTasksFilter.h>
#include <utility>
namespace Aws
{
namespace Braket
{
namespace Model
{
/**
*/
class AWS_BRAKET_API SearchQuantumTasksRequest : public BraketRequest
{
public:
SearchQuantumTasksRequest();
// 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 "SearchQuantumTasks"; }
Aws::String SerializePayload() const override;
/**
* <p>Array of <code>SearchQuantumTasksFilter</code> objects.</p>
*/
inline const Aws::Vector<SearchQuantumTasksFilter>& GetFilters() const{ return m_filters; }
/**
* <p>Array of <code>SearchQuantumTasksFilter</code> objects.</p>
*/
inline bool FiltersHasBeenSet() const { return m_filtersHasBeenSet; }
/**
* <p>Array of <code>SearchQuantumTasksFilter</code> objects.</p>
*/
inline void SetFilters(const Aws::Vector<SearchQuantumTasksFilter>& value) { m_filtersHasBeenSet = true; m_filters = value; }
/**
* <p>Array of <code>SearchQuantumTasksFilter</code> objects.</p>
*/
inline void SetFilters(Aws::Vector<SearchQuantumTasksFilter>&& value) { m_filtersHasBeenSet = true; m_filters = std::move(value); }
/**
* <p>Array of <code>SearchQuantumTasksFilter</code> objects.</p>
*/
inline SearchQuantumTasksRequest& WithFilters(const Aws::Vector<SearchQuantumTasksFilter>& value) { SetFilters(value); return *this;}
/**
* <p>Array of <code>SearchQuantumTasksFilter</code> objects.</p>
*/
inline SearchQuantumTasksRequest& WithFilters(Aws::Vector<SearchQuantumTasksFilter>&& value) { SetFilters(std::move(value)); return *this;}
/**
* <p>Array of <code>SearchQuantumTasksFilter</code> objects.</p>
*/
inline SearchQuantumTasksRequest& AddFilters(const SearchQuantumTasksFilter& value) { m_filtersHasBeenSet = true; m_filters.push_back(value); return *this; }
/**
* <p>Array of <code>SearchQuantumTasksFilter</code> objects.</p>
*/
inline SearchQuantumTasksRequest& AddFilters(SearchQuantumTasksFilter&& value) { m_filtersHasBeenSet = true; m_filters.push_back(std::move(value)); return *this; }
/**
* <p>Maximum number of results to return in the response.</p>
*/
inline int GetMaxResults() const{ return m_maxResults; }
/**
* <p>Maximum number of results to return in the response.</p>
*/
inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }
/**
* <p>Maximum number of results to return in the response.</p>
*/
inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; }
/**
* <p>Maximum number of results to return in the response.</p>
*/
inline SearchQuantumTasksRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;}
/**
* <p>A token used for pagination of results returned in the response. Use the
* token returned from the previous request continue results where the previous
* request ended.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>A token used for pagination of results returned in the response. Use the
* token returned from the previous request continue results where the previous
* request ended.</p>
*/
inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
/**
* <p>A token used for pagination of results returned in the response. Use the
* token returned from the previous request continue results where the previous
* request ended.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
/**
* <p>A token used for pagination of results returned in the response. Use the
* token returned from the previous request continue results where the previous
* request ended.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); }
/**
* <p>A token used for pagination of results returned in the response. Use the
* token returned from the previous request continue results where the previous
* request ended.</p>
*/
inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }
/**
* <p>A token used for pagination of results returned in the response. Use the
* token returned from the previous request continue results where the previous
* request ended.</p>
*/
inline SearchQuantumTasksRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>A token used for pagination of results returned in the response. Use the
* token returned from the previous request continue results where the previous
* request ended.</p>
*/
inline SearchQuantumTasksRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>A token used for pagination of results returned in the response. Use the
* token returned from the previous request continue results where the previous
* request ended.</p>
*/
inline SearchQuantumTasksRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}
private:
Aws::Vector<SearchQuantumTasksFilter> m_filters;
bool m_filtersHasBeenSet;
int m_maxResults;
bool m_maxResultsHasBeenSet;
Aws::String m_nextToken;
bool m_nextTokenHasBeenSet;
};
} // namespace Model
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,138 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/braket/Braket_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/braket/model/QuantumTaskSummary.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace Braket
{
namespace Model
{
class AWS_BRAKET_API SearchQuantumTasksResult
{
public:
SearchQuantumTasksResult();
SearchQuantumTasksResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
SearchQuantumTasksResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>A token used for pagination of results, or null if there are no additional
* results. Use the token value in a subsequent request to continue results where
* the previous request ended.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
/**
* <p>A token used for pagination of results, or null if there are no additional
* results. Use the token value in a subsequent request to continue results where
* the previous request ended.</p>
*/
inline void SetNextToken(const Aws::String& value) { m_nextToken = value; }
/**
* <p>A token used for pagination of results, or null if there are no additional
* results. Use the token value in a subsequent request to continue results where
* the previous request ended.</p>
*/
inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); }
/**
* <p>A token used for pagination of results, or null if there are no additional
* results. Use the token value in a subsequent request to continue results where
* the previous request ended.</p>
*/
inline void SetNextToken(const char* value) { m_nextToken.assign(value); }
/**
* <p>A token used for pagination of results, or null if there are no additional
* results. Use the token value in a subsequent request to continue results where
* the previous request ended.</p>
*/
inline SearchQuantumTasksResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
/**
* <p>A token used for pagination of results, or null if there are no additional
* results. Use the token value in a subsequent request to continue results where
* the previous request ended.</p>
*/
inline SearchQuantumTasksResult& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
/**
* <p>A token used for pagination of results, or null if there are no additional
* results. Use the token value in a subsequent request to continue results where
* the previous request ended.</p>
*/
inline SearchQuantumTasksResult& WithNextToken(const char* value) { SetNextToken(value); return *this;}
/**
* <p>An array of <code>QuantumTaskSummary</code> objects for tasks that match the
* specified filters.</p>
*/
inline const Aws::Vector<QuantumTaskSummary>& GetQuantumTasks() const{ return m_quantumTasks; }
/**
* <p>An array of <code>QuantumTaskSummary</code> objects for tasks that match the
* specified filters.</p>
*/
inline void SetQuantumTasks(const Aws::Vector<QuantumTaskSummary>& value) { m_quantumTasks = value; }
/**
* <p>An array of <code>QuantumTaskSummary</code> objects for tasks that match the
* specified filters.</p>
*/
inline void SetQuantumTasks(Aws::Vector<QuantumTaskSummary>&& value) { m_quantumTasks = std::move(value); }
/**
* <p>An array of <code>QuantumTaskSummary</code> objects for tasks that match the
* specified filters.</p>
*/
inline SearchQuantumTasksResult& WithQuantumTasks(const Aws::Vector<QuantumTaskSummary>& value) { SetQuantumTasks(value); return *this;}
/**
* <p>An array of <code>QuantumTaskSummary</code> objects for tasks that match the
* specified filters.</p>
*/
inline SearchQuantumTasksResult& WithQuantumTasks(Aws::Vector<QuantumTaskSummary>&& value) { SetQuantumTasks(std::move(value)); return *this;}
/**
* <p>An array of <code>QuantumTaskSummary</code> objects for tasks that match the
* specified filters.</p>
*/
inline SearchQuantumTasksResult& AddQuantumTasks(const QuantumTaskSummary& value) { m_quantumTasks.push_back(value); return *this; }
/**
* <p>An array of <code>QuantumTaskSummary</code> objects for tasks that match the
* specified filters.</p>
*/
inline SearchQuantumTasksResult& AddQuantumTasks(QuantumTaskSummary&& value) { m_quantumTasks.push_back(std::move(value)); return *this; }
private:
Aws::String m_nextToken;
Aws::Vector<QuantumTaskSummary> m_quantumTasks;
};
} // namespace Model
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,283 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/utils/Outcome.h>
#include <aws/core/auth/AWSAuthSigner.h>
#include <aws/core/client/CoreErrors.h>
#include <aws/core/client/RetryStrategy.h>
#include <aws/core/http/HttpClient.h>
#include <aws/core/http/HttpResponse.h>
#include <aws/core/http/HttpClientFactory.h>
#include <aws/core/auth/AWSCredentialsProviderChain.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/threading/Executor.h>
#include <aws/core/utils/DNS.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <aws/braket/BraketClient.h>
#include <aws/braket/BraketEndpoint.h>
#include <aws/braket/BraketErrorMarshaller.h>
#include <aws/braket/model/CancelQuantumTaskRequest.h>
#include <aws/braket/model/CreateQuantumTaskRequest.h>
#include <aws/braket/model/GetDeviceRequest.h>
#include <aws/braket/model/GetQuantumTaskRequest.h>
#include <aws/braket/model/SearchDevicesRequest.h>
#include <aws/braket/model/SearchQuantumTasksRequest.h>
using namespace Aws;
using namespace Aws::Auth;
using namespace Aws::Client;
using namespace Aws::Braket;
using namespace Aws::Braket::Model;
using namespace Aws::Http;
using namespace Aws::Utils::Json;
static const char* SERVICE_NAME = "braket";
static const char* ALLOCATION_TAG = "BraketClient";
BraketClient::BraketClient(const Client::ClientConfiguration& clientConfiguration) :
BASECLASS(clientConfiguration,
Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, Aws::MakeShared<DefaultAWSCredentialsProviderChain>(ALLOCATION_TAG),
SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
Aws::MakeShared<BraketErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
BraketClient::BraketClient(const AWSCredentials& credentials, const Client::ClientConfiguration& clientConfiguration) :
BASECLASS(clientConfiguration,
Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, Aws::MakeShared<SimpleAWSCredentialsProvider>(ALLOCATION_TAG, credentials),
SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
Aws::MakeShared<BraketErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
BraketClient::BraketClient(const std::shared_ptr<AWSCredentialsProvider>& credentialsProvider,
const Client::ClientConfiguration& clientConfiguration) :
BASECLASS(clientConfiguration,
Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, credentialsProvider,
SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
Aws::MakeShared<BraketErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
BraketClient::~BraketClient()
{
}
void BraketClient::init(const ClientConfiguration& config)
{
SetServiceClientName("Braket");
m_configScheme = SchemeMapper::ToString(config.scheme);
if (config.endpointOverride.empty())
{
m_uri = m_configScheme + "://" + BraketEndpoint::ForRegion(config.region, config.useDualStack);
}
else
{
OverrideEndpoint(config.endpointOverride);
}
}
void BraketClient::OverrideEndpoint(const Aws::String& endpoint)
{
if (endpoint.compare(0, 7, "http://") == 0 || endpoint.compare(0, 8, "https://") == 0)
{
m_uri = endpoint;
}
else
{
m_uri = m_configScheme + "://" + endpoint;
}
}
CancelQuantumTaskOutcome BraketClient::CancelQuantumTask(const CancelQuantumTaskRequest& request) const
{
if (!request.QuantumTaskArnHasBeenSet())
{
AWS_LOGSTREAM_ERROR("CancelQuantumTask", "Required field: QuantumTaskArn, is not set");
return CancelQuantumTaskOutcome(Aws::Client::AWSError<BraketErrors>(BraketErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [QuantumTaskArn]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/quantum-task/";
ss << request.GetQuantumTaskArn();
ss << "/cancel";
uri.SetPath(uri.GetPath() + ss.str());
return CancelQuantumTaskOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_PUT, Aws::Auth::SIGV4_SIGNER));
}
CancelQuantumTaskOutcomeCallable BraketClient::CancelQuantumTaskCallable(const CancelQuantumTaskRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< CancelQuantumTaskOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CancelQuantumTask(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void BraketClient::CancelQuantumTaskAsync(const CancelQuantumTaskRequest& request, const CancelQuantumTaskResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->CancelQuantumTaskAsyncHelper( request, handler, context ); } );
}
void BraketClient::CancelQuantumTaskAsyncHelper(const CancelQuantumTaskRequest& request, const CancelQuantumTaskResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, CancelQuantumTask(request), context);
}
CreateQuantumTaskOutcome BraketClient::CreateQuantumTask(const CreateQuantumTaskRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/quantum-task";
uri.SetPath(uri.GetPath() + ss.str());
return CreateQuantumTaskOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
CreateQuantumTaskOutcomeCallable BraketClient::CreateQuantumTaskCallable(const CreateQuantumTaskRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< CreateQuantumTaskOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->CreateQuantumTask(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void BraketClient::CreateQuantumTaskAsync(const CreateQuantumTaskRequest& request, const CreateQuantumTaskResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->CreateQuantumTaskAsyncHelper( request, handler, context ); } );
}
void BraketClient::CreateQuantumTaskAsyncHelper(const CreateQuantumTaskRequest& request, const CreateQuantumTaskResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, CreateQuantumTask(request), context);
}
GetDeviceOutcome BraketClient::GetDevice(const GetDeviceRequest& request) const
{
if (!request.DeviceArnHasBeenSet())
{
AWS_LOGSTREAM_ERROR("GetDevice", "Required field: DeviceArn, is not set");
return GetDeviceOutcome(Aws::Client::AWSError<BraketErrors>(BraketErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [DeviceArn]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/device/";
ss << request.GetDeviceArn();
uri.SetPath(uri.GetPath() + ss.str());
return GetDeviceOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
}
GetDeviceOutcomeCallable BraketClient::GetDeviceCallable(const GetDeviceRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< GetDeviceOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetDevice(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void BraketClient::GetDeviceAsync(const GetDeviceRequest& request, const GetDeviceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->GetDeviceAsyncHelper( request, handler, context ); } );
}
void BraketClient::GetDeviceAsyncHelper(const GetDeviceRequest& request, const GetDeviceResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, GetDevice(request), context);
}
GetQuantumTaskOutcome BraketClient::GetQuantumTask(const GetQuantumTaskRequest& request) const
{
if (!request.QuantumTaskArnHasBeenSet())
{
AWS_LOGSTREAM_ERROR("GetQuantumTask", "Required field: QuantumTaskArn, is not set");
return GetQuantumTaskOutcome(Aws::Client::AWSError<BraketErrors>(BraketErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [QuantumTaskArn]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/quantum-task/";
ss << request.GetQuantumTaskArn();
uri.SetPath(uri.GetPath() + ss.str());
return GetQuantumTaskOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
}
GetQuantumTaskOutcomeCallable BraketClient::GetQuantumTaskCallable(const GetQuantumTaskRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< GetQuantumTaskOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetQuantumTask(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void BraketClient::GetQuantumTaskAsync(const GetQuantumTaskRequest& request, const GetQuantumTaskResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->GetQuantumTaskAsyncHelper( request, handler, context ); } );
}
void BraketClient::GetQuantumTaskAsyncHelper(const GetQuantumTaskRequest& request, const GetQuantumTaskResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, GetQuantumTask(request), context);
}
SearchDevicesOutcome BraketClient::SearchDevices(const SearchDevicesRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/devices";
uri.SetPath(uri.GetPath() + ss.str());
return SearchDevicesOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
SearchDevicesOutcomeCallable BraketClient::SearchDevicesCallable(const SearchDevicesRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< SearchDevicesOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->SearchDevices(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void BraketClient::SearchDevicesAsync(const SearchDevicesRequest& request, const SearchDevicesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->SearchDevicesAsyncHelper( request, handler, context ); } );
}
void BraketClient::SearchDevicesAsyncHelper(const SearchDevicesRequest& request, const SearchDevicesResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, SearchDevices(request), context);
}
SearchQuantumTasksOutcome BraketClient::SearchQuantumTasks(const SearchQuantumTasksRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/quantum-tasks";
uri.SetPath(uri.GetPath() + ss.str());
return SearchQuantumTasksOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
SearchQuantumTasksOutcomeCallable BraketClient::SearchQuantumTasksCallable(const SearchQuantumTasksRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< SearchQuantumTasksOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->SearchQuantumTasks(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void BraketClient::SearchQuantumTasksAsync(const SearchQuantumTasksRequest& request, const SearchQuantumTasksResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->SearchQuantumTasksAsyncHelper( request, handler, context ); } );
}
void BraketClient::SearchQuantumTasksAsyncHelper(const SearchQuantumTasksRequest& request, const SearchQuantumTasksResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, SearchQuantumTasks(request), context);
}

View File

@@ -0,0 +1,64 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/braket/BraketEndpoint.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/HashingUtils.h>
using namespace Aws;
using namespace Aws::Braket;
namespace Aws
{
namespace Braket
{
namespace BraketEndpoint
{
static const int CN_NORTH_1_HASH = Aws::Utils::HashingUtils::HashString("cn-north-1");
static const int CN_NORTHWEST_1_HASH = Aws::Utils::HashingUtils::HashString("cn-northwest-1");
static const int US_ISO_EAST_1_HASH = Aws::Utils::HashingUtils::HashString("us-iso-east-1");
static const int US_ISOB_EAST_1_HASH = Aws::Utils::HashingUtils::HashString("us-isob-east-1");
Aws::String ForRegion(const Aws::String& regionName, bool useDualStack)
{
// Fallback to us-east-1 if global endpoint does not exists.
Aws::String region = regionName == Aws::Region::AWS_GLOBAL ? Aws::Region::US_EAST_1 : regionName;
auto hash = Aws::Utils::HashingUtils::HashString(region.c_str());
Aws::StringStream ss;
ss << "braket" << ".";
if(useDualStack)
{
ss << "dualstack.";
}
ss << region;
if (hash == CN_NORTH_1_HASH || hash == CN_NORTHWEST_1_HASH)
{
ss << ".amazonaws.com.cn";
}
else if (hash == US_ISO_EAST_1_HASH)
{
ss << ".c2s.ic.gov";
}
else if (hash == US_ISOB_EAST_1_HASH)
{
ss << ".sc2s.sgov.gov";
}
else
{
ss << ".amazonaws.com";
}
return ss.str();
}
} // namespace BraketEndpoint
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,22 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/client/AWSError.h>
#include <aws/braket/BraketErrorMarshaller.h>
#include <aws/braket/BraketErrors.h>
using namespace Aws::Client;
using namespace Aws::Braket;
AWSError<CoreErrors> BraketErrorMarshaller::FindErrorByName(const char* errorName) const
{
AWSError<CoreErrors> error = BraketErrorMapper::GetErrorForName(errorName);
if(error.GetErrorType() != CoreErrors::UNKNOWN)
{
return error;
}
return AWSErrorMarshaller::FindErrorByName(errorName);
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/client/AWSError.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/braket/BraketErrors.h>
using namespace Aws::Client;
using namespace Aws::Utils;
using namespace Aws::Braket;
namespace Aws
{
namespace Braket
{
namespace BraketErrorMapper
{
static const int CONFLICT_HASH = HashingUtils::HashString("ConflictException");
static const int SERVICE_QUOTA_EXCEEDED_HASH = HashingUtils::HashString("ServiceQuotaExceededException");
static const int DEVICE_OFFLINE_HASH = HashingUtils::HashString("DeviceOfflineException");
static const int INTERNAL_SERVICE_HASH = HashingUtils::HashString("InternalServiceException");
AWSError<CoreErrors> GetErrorForName(const char* errorName)
{
int hashCode = HashingUtils::HashString(errorName);
if (hashCode == CONFLICT_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(BraketErrors::CONFLICT), false);
}
else if (hashCode == SERVICE_QUOTA_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(BraketErrors::SERVICE_QUOTA_EXCEEDED), false);
}
else if (hashCode == DEVICE_OFFLINE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(BraketErrors::DEVICE_OFFLINE), false);
}
else if (hashCode == INTERNAL_SERVICE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(BraketErrors::INTERNAL_SERVICE), false);
}
return AWSError<CoreErrors>(CoreErrors::UNKNOWN, false);
}
} // namespace BraketErrorMapper
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,37 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/braket/model/CancelQuantumTaskRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Braket::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CancelQuantumTaskRequest::CancelQuantumTaskRequest() :
m_clientToken(Aws::Utils::UUID::RandomUUID()),
m_clientTokenHasBeenSet(true),
m_quantumTaskArnHasBeenSet(false)
{
}
Aws::String CancelQuantumTaskRequest::SerializePayload() const
{
JsonValue payload;
if(m_clientTokenHasBeenSet)
{
payload.WithString("clientToken", m_clientToken);
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,48 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/braket/model/CancelQuantumTaskResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Braket::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CancelQuantumTaskResult::CancelQuantumTaskResult() :
m_cancellationStatus(CancellationStatus::NOT_SET)
{
}
CancelQuantumTaskResult::CancelQuantumTaskResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_cancellationStatus(CancellationStatus::NOT_SET)
{
*this = result;
}
CancelQuantumTaskResult& CancelQuantumTaskResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("cancellationStatus"))
{
m_cancellationStatus = CancellationStatusMapper::GetCancellationStatusForName(jsonValue.GetString("cancellationStatus"));
}
if(jsonValue.ValueExists("quantumTaskArn"))
{
m_quantumTaskArn = jsonValue.GetString("quantumTaskArn");
}
return *this;
}

View File

@@ -0,0 +1,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/braket/model/CancellationStatus.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Braket
{
namespace Model
{
namespace CancellationStatusMapper
{
static const int CANCELLED_HASH = HashingUtils::HashString("CANCELLED");
static const int CANCELLING_HASH = HashingUtils::HashString("CANCELLING");
CancellationStatus GetCancellationStatusForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == CANCELLED_HASH)
{
return CancellationStatus::CANCELLED;
}
else if (hashCode == CANCELLING_HASH)
{
return CancellationStatus::CANCELLING;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<CancellationStatus>(hashCode);
}
return CancellationStatus::NOT_SET;
}
Aws::String GetNameForCancellationStatus(CancellationStatus enumValue)
{
switch(enumValue)
{
case CancellationStatus::CANCELLED:
return "CANCELLED";
case CancellationStatus::CANCELLING:
return "CANCELLING";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace CancellationStatusMapper
} // namespace Model
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,79 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/braket/model/CreateQuantumTaskRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Braket::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateQuantumTaskRequest::CreateQuantumTaskRequest() :
m_actionHasBeenSet(false),
m_clientToken(Aws::Utils::UUID::RandomUUID()),
m_clientTokenHasBeenSet(true),
m_deviceArnHasBeenSet(false),
m_deviceParametersHasBeenSet(false),
m_outputS3BucketHasBeenSet(false),
m_outputS3KeyPrefixHasBeenSet(false),
m_shots(0),
m_shotsHasBeenSet(false)
{
}
Aws::String CreateQuantumTaskRequest::SerializePayload() const
{
JsonValue payload;
if(m_actionHasBeenSet)
{
payload.WithString("action", m_action);
}
if(m_clientTokenHasBeenSet)
{
payload.WithString("clientToken", m_clientToken);
}
if(m_deviceArnHasBeenSet)
{
payload.WithString("deviceArn", m_deviceArn);
}
if(m_deviceParametersHasBeenSet)
{
payload.WithString("deviceParameters", m_deviceParameters);
}
if(m_outputS3BucketHasBeenSet)
{
payload.WithString("outputS3Bucket", m_outputS3Bucket);
}
if(m_outputS3KeyPrefixHasBeenSet)
{
payload.WithString("outputS3KeyPrefix", m_outputS3KeyPrefix);
}
if(m_shotsHasBeenSet)
{
payload.WithInt64("shots", m_shots);
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/braket/model/CreateQuantumTaskResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Braket::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateQuantumTaskResult::CreateQuantumTaskResult()
{
}
CreateQuantumTaskResult::CreateQuantumTaskResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateQuantumTaskResult& CreateQuantumTaskResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("quantumTaskArn"))
{
m_quantumTaskArn = jsonValue.GetString("quantumTaskArn");
}
return *this;
}

View File

@@ -0,0 +1,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/braket/model/DeviceStatus.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Braket
{
namespace Model
{
namespace DeviceStatusMapper
{
static const int OFFLINE_HASH = HashingUtils::HashString("OFFLINE");
static const int ONLINE_HASH = HashingUtils::HashString("ONLINE");
DeviceStatus GetDeviceStatusForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == OFFLINE_HASH)
{
return DeviceStatus::OFFLINE;
}
else if (hashCode == ONLINE_HASH)
{
return DeviceStatus::ONLINE;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<DeviceStatus>(hashCode);
}
return DeviceStatus::NOT_SET;
}
Aws::String GetNameForDeviceStatus(DeviceStatus enumValue)
{
switch(enumValue)
{
case DeviceStatus::OFFLINE:
return "OFFLINE";
case DeviceStatus::ONLINE:
return "ONLINE";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace DeviceStatusMapper
} // namespace Model
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,121 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/braket/model/DeviceSummary.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Braket
{
namespace Model
{
DeviceSummary::DeviceSummary() :
m_deviceArnHasBeenSet(false),
m_deviceNameHasBeenSet(false),
m_deviceStatus(DeviceStatus::NOT_SET),
m_deviceStatusHasBeenSet(false),
m_deviceType(DeviceType::NOT_SET),
m_deviceTypeHasBeenSet(false),
m_providerNameHasBeenSet(false)
{
}
DeviceSummary::DeviceSummary(JsonView jsonValue) :
m_deviceArnHasBeenSet(false),
m_deviceNameHasBeenSet(false),
m_deviceStatus(DeviceStatus::NOT_SET),
m_deviceStatusHasBeenSet(false),
m_deviceType(DeviceType::NOT_SET),
m_deviceTypeHasBeenSet(false),
m_providerNameHasBeenSet(false)
{
*this = jsonValue;
}
DeviceSummary& DeviceSummary::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("deviceArn"))
{
m_deviceArn = jsonValue.GetString("deviceArn");
m_deviceArnHasBeenSet = true;
}
if(jsonValue.ValueExists("deviceName"))
{
m_deviceName = jsonValue.GetString("deviceName");
m_deviceNameHasBeenSet = true;
}
if(jsonValue.ValueExists("deviceStatus"))
{
m_deviceStatus = DeviceStatusMapper::GetDeviceStatusForName(jsonValue.GetString("deviceStatus"));
m_deviceStatusHasBeenSet = true;
}
if(jsonValue.ValueExists("deviceType"))
{
m_deviceType = DeviceTypeMapper::GetDeviceTypeForName(jsonValue.GetString("deviceType"));
m_deviceTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("providerName"))
{
m_providerName = jsonValue.GetString("providerName");
m_providerNameHasBeenSet = true;
}
return *this;
}
JsonValue DeviceSummary::Jsonize() const
{
JsonValue payload;
if(m_deviceArnHasBeenSet)
{
payload.WithString("deviceArn", m_deviceArn);
}
if(m_deviceNameHasBeenSet)
{
payload.WithString("deviceName", m_deviceName);
}
if(m_deviceStatusHasBeenSet)
{
payload.WithString("deviceStatus", DeviceStatusMapper::GetNameForDeviceStatus(m_deviceStatus));
}
if(m_deviceTypeHasBeenSet)
{
payload.WithString("deviceType", DeviceTypeMapper::GetNameForDeviceType(m_deviceType));
}
if(m_providerNameHasBeenSet)
{
payload.WithString("providerName", m_providerName);
}
return payload;
}
} // namespace Model
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/braket/model/DeviceType.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Braket
{
namespace Model
{
namespace DeviceTypeMapper
{
static const int QPU_HASH = HashingUtils::HashString("QPU");
static const int SIMULATOR_HASH = HashingUtils::HashString("SIMULATOR");
DeviceType GetDeviceTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == QPU_HASH)
{
return DeviceType::QPU;
}
else if (hashCode == SIMULATOR_HASH)
{
return DeviceType::SIMULATOR;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<DeviceType>(hashCode);
}
return DeviceType::NOT_SET;
}
Aws::String GetNameForDeviceType(DeviceType enumValue)
{
switch(enumValue)
{
case DeviceType::QPU:
return "QPU";
case DeviceType::SIMULATOR:
return "SIMULATOR";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace DeviceTypeMapper
} // namespace Model
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,27 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/braket/model/GetDeviceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Braket::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetDeviceRequest::GetDeviceRequest() :
m_deviceArnHasBeenSet(false)
{
}
Aws::String GetDeviceRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,74 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/braket/model/GetDeviceResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Braket::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetDeviceResult::GetDeviceResult() :
m_deviceStatus(DeviceStatus::NOT_SET),
m_deviceType(DeviceType::NOT_SET)
{
}
GetDeviceResult::GetDeviceResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_deviceStatus(DeviceStatus::NOT_SET),
m_deviceType(DeviceType::NOT_SET)
{
*this = result;
}
GetDeviceResult& GetDeviceResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("deviceArn"))
{
m_deviceArn = jsonValue.GetString("deviceArn");
}
if(jsonValue.ValueExists("deviceCapabilities"))
{
m_deviceCapabilities = jsonValue.GetString("deviceCapabilities");
}
if(jsonValue.ValueExists("deviceName"))
{
m_deviceName = jsonValue.GetString("deviceName");
}
if(jsonValue.ValueExists("deviceStatus"))
{
m_deviceStatus = DeviceStatusMapper::GetDeviceStatusForName(jsonValue.GetString("deviceStatus"));
}
if(jsonValue.ValueExists("deviceType"))
{
m_deviceType = DeviceTypeMapper::GetDeviceTypeForName(jsonValue.GetString("deviceType"));
}
if(jsonValue.ValueExists("providerName"))
{
m_providerName = jsonValue.GetString("providerName");
}
return *this;
}

View File

@@ -0,0 +1,27 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/braket/model/GetQuantumTaskRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Braket::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetQuantumTaskRequest::GetQuantumTaskRequest() :
m_quantumTaskArnHasBeenSet(false)
{
}
Aws::String GetQuantumTaskRequest::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,98 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/braket/model/GetQuantumTaskResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Braket::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetQuantumTaskResult::GetQuantumTaskResult() :
m_shots(0),
m_status(QuantumTaskStatus::NOT_SET)
{
}
GetQuantumTaskResult::GetQuantumTaskResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_shots(0),
m_status(QuantumTaskStatus::NOT_SET)
{
*this = result;
}
GetQuantumTaskResult& GetQuantumTaskResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("createdAt"))
{
m_createdAt = jsonValue.GetString("createdAt");
}
if(jsonValue.ValueExists("deviceArn"))
{
m_deviceArn = jsonValue.GetString("deviceArn");
}
if(jsonValue.ValueExists("deviceParameters"))
{
m_deviceParameters = jsonValue.GetString("deviceParameters");
}
if(jsonValue.ValueExists("endedAt"))
{
m_endedAt = jsonValue.GetString("endedAt");
}
if(jsonValue.ValueExists("failureReason"))
{
m_failureReason = jsonValue.GetString("failureReason");
}
if(jsonValue.ValueExists("outputS3Bucket"))
{
m_outputS3Bucket = jsonValue.GetString("outputS3Bucket");
}
if(jsonValue.ValueExists("outputS3Directory"))
{
m_outputS3Directory = jsonValue.GetString("outputS3Directory");
}
if(jsonValue.ValueExists("quantumTaskArn"))
{
m_quantumTaskArn = jsonValue.GetString("quantumTaskArn");
}
if(jsonValue.ValueExists("shots"))
{
m_shots = jsonValue.GetInt64("shots");
}
if(jsonValue.ValueExists("status"))
{
m_status = QuantumTaskStatusMapper::GetQuantumTaskStatusForName(jsonValue.GetString("status"));
}
return *this;
}

View File

@@ -0,0 +1,105 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/braket/model/QuantumTaskStatus.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Braket
{
namespace Model
{
namespace QuantumTaskStatusMapper
{
static const int CANCELLED_HASH = HashingUtils::HashString("CANCELLED");
static const int CANCELLING_HASH = HashingUtils::HashString("CANCELLING");
static const int COMPLETED_HASH = HashingUtils::HashString("COMPLETED");
static const int CREATED_HASH = HashingUtils::HashString("CREATED");
static const int FAILED_HASH = HashingUtils::HashString("FAILED");
static const int QUEUED_HASH = HashingUtils::HashString("QUEUED");
static const int RUNNING_HASH = HashingUtils::HashString("RUNNING");
QuantumTaskStatus GetQuantumTaskStatusForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == CANCELLED_HASH)
{
return QuantumTaskStatus::CANCELLED;
}
else if (hashCode == CANCELLING_HASH)
{
return QuantumTaskStatus::CANCELLING;
}
else if (hashCode == COMPLETED_HASH)
{
return QuantumTaskStatus::COMPLETED;
}
else if (hashCode == CREATED_HASH)
{
return QuantumTaskStatus::CREATED;
}
else if (hashCode == FAILED_HASH)
{
return QuantumTaskStatus::FAILED;
}
else if (hashCode == QUEUED_HASH)
{
return QuantumTaskStatus::QUEUED;
}
else if (hashCode == RUNNING_HASH)
{
return QuantumTaskStatus::RUNNING;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<QuantumTaskStatus>(hashCode);
}
return QuantumTaskStatus::NOT_SET;
}
Aws::String GetNameForQuantumTaskStatus(QuantumTaskStatus enumValue)
{
switch(enumValue)
{
case QuantumTaskStatus::CANCELLED:
return "CANCELLED";
case QuantumTaskStatus::CANCELLING:
return "CANCELLING";
case QuantumTaskStatus::COMPLETED:
return "COMPLETED";
case QuantumTaskStatus::CREATED:
return "CREATED";
case QuantumTaskStatus::FAILED:
return "FAILED";
case QuantumTaskStatus::QUEUED:
return "QUEUED";
case QuantumTaskStatus::RUNNING:
return "RUNNING";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace QuantumTaskStatusMapper
} // namespace Model
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,165 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/braket/model/QuantumTaskSummary.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Braket
{
namespace Model
{
QuantumTaskSummary::QuantumTaskSummary() :
m_createdAtHasBeenSet(false),
m_deviceArnHasBeenSet(false),
m_endedAtHasBeenSet(false),
m_outputS3BucketHasBeenSet(false),
m_outputS3DirectoryHasBeenSet(false),
m_quantumTaskArnHasBeenSet(false),
m_shots(0),
m_shotsHasBeenSet(false),
m_status(QuantumTaskStatus::NOT_SET),
m_statusHasBeenSet(false)
{
}
QuantumTaskSummary::QuantumTaskSummary(JsonView jsonValue) :
m_createdAtHasBeenSet(false),
m_deviceArnHasBeenSet(false),
m_endedAtHasBeenSet(false),
m_outputS3BucketHasBeenSet(false),
m_outputS3DirectoryHasBeenSet(false),
m_quantumTaskArnHasBeenSet(false),
m_shots(0),
m_shotsHasBeenSet(false),
m_status(QuantumTaskStatus::NOT_SET),
m_statusHasBeenSet(false)
{
*this = jsonValue;
}
QuantumTaskSummary& QuantumTaskSummary::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("createdAt"))
{
m_createdAt = jsonValue.GetString("createdAt");
m_createdAtHasBeenSet = true;
}
if(jsonValue.ValueExists("deviceArn"))
{
m_deviceArn = jsonValue.GetString("deviceArn");
m_deviceArnHasBeenSet = true;
}
if(jsonValue.ValueExists("endedAt"))
{
m_endedAt = jsonValue.GetString("endedAt");
m_endedAtHasBeenSet = true;
}
if(jsonValue.ValueExists("outputS3Bucket"))
{
m_outputS3Bucket = jsonValue.GetString("outputS3Bucket");
m_outputS3BucketHasBeenSet = true;
}
if(jsonValue.ValueExists("outputS3Directory"))
{
m_outputS3Directory = jsonValue.GetString("outputS3Directory");
m_outputS3DirectoryHasBeenSet = true;
}
if(jsonValue.ValueExists("quantumTaskArn"))
{
m_quantumTaskArn = jsonValue.GetString("quantumTaskArn");
m_quantumTaskArnHasBeenSet = true;
}
if(jsonValue.ValueExists("shots"))
{
m_shots = jsonValue.GetInt64("shots");
m_shotsHasBeenSet = true;
}
if(jsonValue.ValueExists("status"))
{
m_status = QuantumTaskStatusMapper::GetQuantumTaskStatusForName(jsonValue.GetString("status"));
m_statusHasBeenSet = true;
}
return *this;
}
JsonValue QuantumTaskSummary::Jsonize() const
{
JsonValue payload;
if(m_createdAtHasBeenSet)
{
payload.WithString("createdAt", m_createdAt.ToGmtString(DateFormat::ISO_8601));
}
if(m_deviceArnHasBeenSet)
{
payload.WithString("deviceArn", m_deviceArn);
}
if(m_endedAtHasBeenSet)
{
payload.WithString("endedAt", m_endedAt.ToGmtString(DateFormat::ISO_8601));
}
if(m_outputS3BucketHasBeenSet)
{
payload.WithString("outputS3Bucket", m_outputS3Bucket);
}
if(m_outputS3DirectoryHasBeenSet)
{
payload.WithString("outputS3Directory", m_outputS3Directory);
}
if(m_quantumTaskArnHasBeenSet)
{
payload.WithString("quantumTaskArn", m_quantumTaskArn);
}
if(m_shotsHasBeenSet)
{
payload.WithInt64("shots", m_shots);
}
if(m_statusHasBeenSet)
{
payload.WithString("status", QuantumTaskStatusMapper::GetNameForQuantumTaskStatus(m_status));
}
return payload;
}
} // namespace Model
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,82 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/braket/model/SearchDevicesFilter.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Braket
{
namespace Model
{
SearchDevicesFilter::SearchDevicesFilter() :
m_nameHasBeenSet(false),
m_valuesHasBeenSet(false)
{
}
SearchDevicesFilter::SearchDevicesFilter(JsonView jsonValue) :
m_nameHasBeenSet(false),
m_valuesHasBeenSet(false)
{
*this = jsonValue;
}
SearchDevicesFilter& SearchDevicesFilter::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("name"))
{
m_name = jsonValue.GetString("name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("values"))
{
Array<JsonView> valuesJsonList = jsonValue.GetArray("values");
for(unsigned valuesIndex = 0; valuesIndex < valuesJsonList.GetLength(); ++valuesIndex)
{
m_values.push_back(valuesJsonList[valuesIndex].AsString());
}
m_valuesHasBeenSet = true;
}
return *this;
}
JsonValue SearchDevicesFilter::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("name", m_name);
}
if(m_valuesHasBeenSet)
{
Array<JsonValue> valuesJsonList(m_values.size());
for(unsigned valuesIndex = 0; valuesIndex < valuesJsonList.GetLength(); ++valuesIndex)
{
valuesJsonList[valuesIndex].AsString(m_values[valuesIndex]);
}
payload.WithArray("values", std::move(valuesJsonList));
}
return payload;
}
} // namespace Model
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,55 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/braket/model/SearchDevicesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Braket::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
SearchDevicesRequest::SearchDevicesRequest() :
m_filtersHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String SearchDevicesRequest::SerializePayload() const
{
JsonValue payload;
if(m_filtersHasBeenSet)
{
Array<JsonValue> filtersJsonList(m_filters.size());
for(unsigned filtersIndex = 0; filtersIndex < filtersJsonList.GetLength(); ++filtersIndex)
{
filtersJsonList[filtersIndex].AsObject(m_filters[filtersIndex].Jsonize());
}
payload.WithArray("filters", std::move(filtersJsonList));
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("maxResults", m_maxResults);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("nextToken", m_nextToken);
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/braket/model/SearchDevicesResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Braket::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
SearchDevicesResult::SearchDevicesResult()
{
}
SearchDevicesResult::SearchDevicesResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
SearchDevicesResult& SearchDevicesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("devices"))
{
Array<JsonView> devicesJsonList = jsonValue.GetArray("devices");
for(unsigned devicesIndex = 0; devicesIndex < devicesJsonList.GetLength(); ++devicesIndex)
{
m_devices.push_back(devicesJsonList[devicesIndex].AsObject());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
return *this;
}

View File

@@ -0,0 +1,98 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/braket/model/SearchQuantumTasksFilter.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Braket
{
namespace Model
{
SearchQuantumTasksFilter::SearchQuantumTasksFilter() :
m_nameHasBeenSet(false),
m_operator(SearchQuantumTasksFilterOperator::NOT_SET),
m_operatorHasBeenSet(false),
m_valuesHasBeenSet(false)
{
}
SearchQuantumTasksFilter::SearchQuantumTasksFilter(JsonView jsonValue) :
m_nameHasBeenSet(false),
m_operator(SearchQuantumTasksFilterOperator::NOT_SET),
m_operatorHasBeenSet(false),
m_valuesHasBeenSet(false)
{
*this = jsonValue;
}
SearchQuantumTasksFilter& SearchQuantumTasksFilter::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("name"))
{
m_name = jsonValue.GetString("name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("operator"))
{
m_operator = SearchQuantumTasksFilterOperatorMapper::GetSearchQuantumTasksFilterOperatorForName(jsonValue.GetString("operator"));
m_operatorHasBeenSet = true;
}
if(jsonValue.ValueExists("values"))
{
Array<JsonView> valuesJsonList = jsonValue.GetArray("values");
for(unsigned valuesIndex = 0; valuesIndex < valuesJsonList.GetLength(); ++valuesIndex)
{
m_values.push_back(valuesJsonList[valuesIndex].AsString());
}
m_valuesHasBeenSet = true;
}
return *this;
}
JsonValue SearchQuantumTasksFilter::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("name", m_name);
}
if(m_operatorHasBeenSet)
{
payload.WithString("operator", SearchQuantumTasksFilterOperatorMapper::GetNameForSearchQuantumTasksFilterOperator(m_operator));
}
if(m_valuesHasBeenSet)
{
Array<JsonValue> valuesJsonList(m_values.size());
for(unsigned valuesIndex = 0; valuesIndex < valuesJsonList.GetLength(); ++valuesIndex)
{
valuesJsonList[valuesIndex].AsString(m_values[valuesIndex]);
}
payload.WithArray("values", std::move(valuesJsonList));
}
return payload;
}
} // namespace Model
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,98 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/braket/model/SearchQuantumTasksFilterOperator.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Braket
{
namespace Model
{
namespace SearchQuantumTasksFilterOperatorMapper
{
static const int BETWEEN_HASH = HashingUtils::HashString("BETWEEN");
static const int EQUAL_HASH = HashingUtils::HashString("EQUAL");
static const int GT_HASH = HashingUtils::HashString("GT");
static const int GTE_HASH = HashingUtils::HashString("GTE");
static const int LT_HASH = HashingUtils::HashString("LT");
static const int LTE_HASH = HashingUtils::HashString("LTE");
SearchQuantumTasksFilterOperator GetSearchQuantumTasksFilterOperatorForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == BETWEEN_HASH)
{
return SearchQuantumTasksFilterOperator::BETWEEN;
}
else if (hashCode == EQUAL_HASH)
{
return SearchQuantumTasksFilterOperator::EQUAL;
}
else if (hashCode == GT_HASH)
{
return SearchQuantumTasksFilterOperator::GT;
}
else if (hashCode == GTE_HASH)
{
return SearchQuantumTasksFilterOperator::GTE;
}
else if (hashCode == LT_HASH)
{
return SearchQuantumTasksFilterOperator::LT;
}
else if (hashCode == LTE_HASH)
{
return SearchQuantumTasksFilterOperator::LTE;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<SearchQuantumTasksFilterOperator>(hashCode);
}
return SearchQuantumTasksFilterOperator::NOT_SET;
}
Aws::String GetNameForSearchQuantumTasksFilterOperator(SearchQuantumTasksFilterOperator enumValue)
{
switch(enumValue)
{
case SearchQuantumTasksFilterOperator::BETWEEN:
return "BETWEEN";
case SearchQuantumTasksFilterOperator::EQUAL:
return "EQUAL";
case SearchQuantumTasksFilterOperator::GT:
return "GT";
case SearchQuantumTasksFilterOperator::GTE:
return "GTE";
case SearchQuantumTasksFilterOperator::LT:
return "LT";
case SearchQuantumTasksFilterOperator::LTE:
return "LTE";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace SearchQuantumTasksFilterOperatorMapper
} // namespace Model
} // namespace Braket
} // namespace Aws

View File

@@ -0,0 +1,55 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/braket/model/SearchQuantumTasksRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Braket::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
SearchQuantumTasksRequest::SearchQuantumTasksRequest() :
m_filtersHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String SearchQuantumTasksRequest::SerializePayload() const
{
JsonValue payload;
if(m_filtersHasBeenSet)
{
Array<JsonValue> filtersJsonList(m_filters.size());
for(unsigned filtersIndex = 0; filtersIndex < filtersJsonList.GetLength(); ++filtersIndex)
{
filtersJsonList[filtersIndex].AsObject(m_filters[filtersIndex].Jsonize());
}
payload.WithArray("filters", std::move(filtersJsonList));
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("maxResults", m_maxResults);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("nextToken", m_nextToken);
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/braket/model/SearchQuantumTasksResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Braket::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
SearchQuantumTasksResult::SearchQuantumTasksResult()
{
}
SearchQuantumTasksResult::SearchQuantumTasksResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
SearchQuantumTasksResult& SearchQuantumTasksResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
if(jsonValue.ValueExists("quantumTasks"))
{
Array<JsonView> quantumTasksJsonList = jsonValue.GetArray("quantumTasks");
for(unsigned quantumTasksIndex = 0; quantumTasksIndex < quantumTasksJsonList.GetLength(); ++quantumTasksIndex)
{
m_quantumTasks.push_back(quantumTasksJsonList[quantumTasksIndex].AsObject());
}
}
return *this;
}