/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include
#include
#include
#include
#include
#include
namespace Aws
{
namespace ForecastQueryService
{
/**
* Provides APIs for creating and managing Amazon Forecast resources.
*/
class AWS_FORECASTQUERYSERVICE_API ForecastQueryServiceClient : public Aws::Client::AWSJsonClient, public Aws::Client::ClientWithAsyncTemplateMethods
{
public:
typedef Aws::Client::AWSJsonClient BASECLASS;
static const char* SERVICE_NAME;
static const char* ALLOCATION_TAG;
typedef ForecastQueryServiceClientConfiguration ClientConfigurationType;
typedef ForecastQueryServiceEndpointProvider EndpointProviderType;
/**
* Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
ForecastQueryServiceClient(const Aws::ForecastQueryService::ForecastQueryServiceClientConfiguration& clientConfiguration = Aws::ForecastQueryService::ForecastQueryServiceClientConfiguration(),
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG));
/**
* Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
ForecastQueryServiceClient(const Aws::Auth::AWSCredentials& credentials,
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG),
const Aws::ForecastQueryService::ForecastQueryServiceClientConfiguration& clientConfiguration = Aws::ForecastQueryService::ForecastQueryServiceClientConfiguration());
/**
* 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
*/
ForecastQueryServiceClient(const std::shared_ptr& credentialsProvider,
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG),
const Aws::ForecastQueryService::ForecastQueryServiceClientConfiguration& clientConfiguration = Aws::ForecastQueryService::ForecastQueryServiceClientConfiguration());
/* Legacy constructors due deprecation */
/**
* Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
ForecastQueryServiceClient(const Aws::Client::ClientConfiguration& clientConfiguration);
/**
* Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
ForecastQueryServiceClient(const Aws::Auth::AWSCredentials& credentials,
const Aws::Client::ClientConfiguration& clientConfiguration);
/**
* Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied,
* the default http client factory will be used
*/
ForecastQueryServiceClient(const std::shared_ptr& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration);
/* End of legacy constructors due deprecation */
virtual ~ForecastQueryServiceClient();
/**
* Retrieves a forecast for a single item, filtered by the supplied
* criteria.
The criteria is a key-value pair. The key is either
* item_id
(or the equivalent non-timestamp, non-target field) from
* the TARGET_TIME_SERIES
dataset, or one of the forecast dimensions
* specified as part of the FeaturizationConfig
object.
By
* default, QueryForecast
returns the complete date range for the
* filtered forecast. You can request a specific date range.
To get the full
* forecast, use the CreateForecastExportJob
* operation.
The forecasts generated by Amazon Forecast are in the
* same timezone as the dataset that was used to create the predictor.
* See Also:
AWS
* API Reference
*/
virtual Model::QueryForecastOutcome QueryForecast(const Model::QueryForecastRequest& request) const;
/**
* A Callable wrapper for QueryForecast that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::QueryForecastOutcomeCallable QueryForecastCallable(const QueryForecastRequestT& request) const
{
return SubmitCallable(&ForecastQueryServiceClient::QueryForecast, request);
}
/**
* An Async wrapper for QueryForecast that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void QueryForecastAsync(const QueryForecastRequestT& request, const QueryForecastResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&ForecastQueryServiceClient::QueryForecast, request, handler, context);
}
/**
* Retrieves a what-if forecast.
See Also:
AWS
* API Reference
*/
virtual Model::QueryWhatIfForecastOutcome QueryWhatIfForecast(const Model::QueryWhatIfForecastRequest& request) const;
/**
* A Callable wrapper for QueryWhatIfForecast that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::QueryWhatIfForecastOutcomeCallable QueryWhatIfForecastCallable(const QueryWhatIfForecastRequestT& request) const
{
return SubmitCallable(&ForecastQueryServiceClient::QueryWhatIfForecast, request);
}
/**
* An Async wrapper for QueryWhatIfForecast that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void QueryWhatIfForecastAsync(const QueryWhatIfForecastRequestT& request, const QueryWhatIfForecastResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&ForecastQueryServiceClient::QueryWhatIfForecast, request, handler, context);
}
void OverrideEndpoint(const Aws::String& endpoint);
std::shared_ptr& accessEndpointProvider();
private:
friend class Aws::Client::ClientWithAsyncTemplateMethods;
void init(const ForecastQueryServiceClientConfiguration& clientConfiguration);
ForecastQueryServiceClientConfiguration m_clientConfiguration;
std::shared_ptr m_executor;
std::shared_ptr m_endpointProvider;
};
} // namespace ForecastQueryService
} // namespace Aws