/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
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 AugmentedAIRuntime
{
namespace Model
{
class DeleteHumanLoopRequest;
class DescribeHumanLoopRequest;
class ListHumanLoopsRequest;
class StartHumanLoopRequest;
class StopHumanLoopRequest;
typedef Aws::Utils::Outcome DeleteHumanLoopOutcome;
typedef Aws::Utils::Outcome DescribeHumanLoopOutcome;
typedef Aws::Utils::Outcome ListHumanLoopsOutcome;
typedef Aws::Utils::Outcome StartHumanLoopOutcome;
typedef Aws::Utils::Outcome StopHumanLoopOutcome;
typedef std::future DeleteHumanLoopOutcomeCallable;
typedef std::future DescribeHumanLoopOutcomeCallable;
typedef std::future ListHumanLoopsOutcomeCallable;
typedef std::future StartHumanLoopOutcomeCallable;
typedef std::future StopHumanLoopOutcomeCallable;
} // namespace Model
class AugmentedAIRuntimeClient;
typedef std::function&) > DeleteHumanLoopResponseReceivedHandler;
typedef std::function&) > DescribeHumanLoopResponseReceivedHandler;
typedef std::function&) > ListHumanLoopsResponseReceivedHandler;
typedef std::function&) > StartHumanLoopResponseReceivedHandler;
typedef std::function&) > StopHumanLoopResponseReceivedHandler;
/**
* Amazon Augmented AI is in preview release and is subject to
* change. We do not recommend using this product in production environments.
* Amazon Augmented AI (Amazon A2I) adds the benefit of human
* judgment to any machine learning application. When an AI application can't
* evaluate data with a high degree of confidence, human reviewers can take over.
* This human review is called a human review workflow. To create and start a human
* review workflow, you need three resources: a worker task template, a
* flow definition, and a human loop.
For information about
* these resources and prerequisites for using Amazon A2I, see Get
* Started with Amazon Augmented AI in the Amazon SageMaker Developer
* Guide.
This API reference includes information about API actions and data
* types that you can use to interact with Amazon A2I programmatically. Use this
* guide to:
-
Start a human loop with the
* StartHumanLoop operation when using Amazon A2I with a custom
* task type. To learn more about the difference between custom and built-in
* task types, see Use
* Task Types . To learn how to start a human loop using this API, see Create
* and Start a Human Loop for a Custom Task Type in the Amazon SageMaker
* Developer Guide.
-
Manage your human loops. You can list all
* human loops that you have created, describe individual human loops, and stop and
* delete human loops. To learn more, see Monitor
* and Manage Your Human Loop in the Amazon SageMaker Developer Guide.
*
Amazon A2I integrates APIs from various AWS services to create
* and start human review workflows for those services. To learn how Amazon A2I
* uses these APIs, see Use
* APIs in Amazon A2I in the Amazon SageMaker Developer Guide.
*/
class AWS_AUGMENTEDAIRUNTIME_API AugmentedAIRuntimeClient : 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.
*/
AugmentedAIRuntimeClient(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.
*/
AugmentedAIRuntimeClient(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
*/
AugmentedAIRuntimeClient(const std::shared_ptr& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
virtual ~AugmentedAIRuntimeClient();
/**
* Deletes the specified human loop for a flow definition.
See
* Also:
AWS
* API Reference
*/
virtual Model::DeleteHumanLoopOutcome DeleteHumanLoop(const Model::DeleteHumanLoopRequest& request) const;
/**
* Deletes the specified human loop for a flow definition.
See
* Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DeleteHumanLoopOutcomeCallable DeleteHumanLoopCallable(const Model::DeleteHumanLoopRequest& request) const;
/**
* Deletes the specified human loop for a flow definition.
See
* Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DeleteHumanLoopAsync(const Model::DeleteHumanLoopRequest& request, const DeleteHumanLoopResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Returns information about the specified human loop.
See Also:
* AWS
* API Reference
*/
virtual Model::DescribeHumanLoopOutcome DescribeHumanLoop(const Model::DescribeHumanLoopRequest& request) const;
/**
* Returns information about the specified human loop.
See Also:
* AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::DescribeHumanLoopOutcomeCallable DescribeHumanLoopCallable(const Model::DescribeHumanLoopRequest& request) const;
/**
* Returns information about the specified human loop.
See Also:
* AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void DescribeHumanLoopAsync(const Model::DescribeHumanLoopRequest& request, const DescribeHumanLoopResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Returns information about human loops, given the specified parameters. If a
* human loop was deleted, it will not be included.
See Also:
AWS
* API Reference
*/
virtual Model::ListHumanLoopsOutcome ListHumanLoops(const Model::ListHumanLoopsRequest& request) const;
/**
* Returns information about human loops, given the specified parameters. If a
* human loop was deleted, it will not be included.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::ListHumanLoopsOutcomeCallable ListHumanLoopsCallable(const Model::ListHumanLoopsRequest& request) const;
/**
* Returns information about human loops, given the specified parameters. If a
* human loop was deleted, it will not be included.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void ListHumanLoopsAsync(const Model::ListHumanLoopsRequest& request, const ListHumanLoopsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Starts a human loop, provided that at least one activation condition is
* met.
See Also:
AWS
* API Reference
*/
virtual Model::StartHumanLoopOutcome StartHumanLoop(const Model::StartHumanLoopRequest& request) const;
/**
* Starts a human loop, provided that at least one activation condition is
* met.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::StartHumanLoopOutcomeCallable StartHumanLoopCallable(const Model::StartHumanLoopRequest& request) const;
/**
* Starts a human loop, provided that at least one activation condition is
* met.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void StartHumanLoopAsync(const Model::StartHumanLoopRequest& request, const StartHumanLoopResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
/**
* Stops the specified human loop.
See Also:
AWS
* API Reference
*/
virtual Model::StopHumanLoopOutcome StopHumanLoop(const Model::StopHumanLoopRequest& request) const;
/**
* Stops the specified human loop.
See Also:
AWS
* API Reference
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::StopHumanLoopOutcomeCallable StopHumanLoopCallable(const Model::StopHumanLoopRequest& request) const;
/**
* Stops the specified human loop.
See Also:
AWS
* API Reference
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void StopHumanLoopAsync(const Model::StopHumanLoopRequest& request, const StopHumanLoopResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const;
void OverrideEndpoint(const Aws::String& endpoint);
private:
void init(const Aws::Client::ClientConfiguration& clientConfiguration);
void DeleteHumanLoopAsyncHelper(const Model::DeleteHumanLoopRequest& request, const DeleteHumanLoopResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void DescribeHumanLoopAsyncHelper(const Model::DescribeHumanLoopRequest& request, const DescribeHumanLoopResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void ListHumanLoopsAsyncHelper(const Model::ListHumanLoopsRequest& request, const ListHumanLoopsResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void StartHumanLoopAsyncHelper(const Model::StartHumanLoopRequest& request, const StartHumanLoopResponseReceivedHandler& handler, const std::shared_ptr& context) const;
void StopHumanLoopAsyncHelper(const Model::StopHumanLoopRequest& request, const StopHumanLoopResponseReceivedHandler& handler, const std::shared_ptr& context) const;
Aws::String m_uri;
Aws::String m_configScheme;
std::shared_ptr m_executor;
};
} // namespace AugmentedAIRuntime
} // namespace Aws