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-cloudsearchdomain "C++ SDK for the AWS cloudsearchdomain service" aws-cpp-sdk-core)
file(GLOB AWS_CLOUDSEARCHDOMAIN_HEADERS
"include/aws/cloudsearchdomain/*.h"
)
file(GLOB AWS_CLOUDSEARCHDOMAIN_MODEL_HEADERS
"include/aws/cloudsearchdomain/model/*.h"
)
file(GLOB AWS_CLOUDSEARCHDOMAIN_SOURCE
"source/*.cpp"
)
file(GLOB AWS_CLOUDSEARCHDOMAIN_MODEL_SOURCE
"source/model/*.cpp"
)
file(GLOB CLOUDSEARCHDOMAIN_UNIFIED_HEADERS
${AWS_CLOUDSEARCHDOMAIN_HEADERS}
${AWS_CLOUDSEARCHDOMAIN_MODEL_HEADERS}
)
file(GLOB CLOUDSEARCHDOMAIN_UNITY_SRC
${AWS_CLOUDSEARCHDOMAIN_SOURCE}
${AWS_CLOUDSEARCHDOMAIN_MODEL_SOURCE}
)
if(ENABLE_UNITY_BUILD)
enable_unity_build("CLOUDSEARCHDOMAIN" CLOUDSEARCHDOMAIN_UNITY_SRC)
endif()
file(GLOB CLOUDSEARCHDOMAIN_SRC
${CLOUDSEARCHDOMAIN_UNIFIED_HEADERS}
${CLOUDSEARCHDOMAIN_UNITY_SRC}
)
if(WIN32)
#if we are compiling for visual studio, create a sane directory tree.
if(MSVC)
source_group("Header Files\\aws\\cloudsearchdomain" FILES ${AWS_CLOUDSEARCHDOMAIN_HEADERS})
source_group("Header Files\\aws\\cloudsearchdomain\\model" FILES ${AWS_CLOUDSEARCHDOMAIN_MODEL_HEADERS})
source_group("Source Files" FILES ${AWS_CLOUDSEARCHDOMAIN_SOURCE})
source_group("Source Files\\model" FILES ${AWS_CLOUDSEARCHDOMAIN_MODEL_SOURCE})
endif(MSVC)
endif()
set(CLOUDSEARCHDOMAIN_INCLUDES
"${CMAKE_CURRENT_SOURCE_DIR}/include/"
)
add_library(${PROJECT_NAME} ${CLOUDSEARCHDOMAIN_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_CLOUDSEARCHDOMAIN_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_CLOUDSEARCHDOMAIN_HEADERS} DESTINATION ${INCLUDE_DIRECTORY}/aws/cloudsearchdomain)
install (FILES ${AWS_CLOUDSEARCHDOMAIN_MODEL_HEADERS} DESTINATION ${INCLUDE_DIRECTORY}/aws/cloudsearchdomain/model)
do_packaging()

View File

@@ -0,0 +1,368 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/cloudsearchdomain/CloudSearchDomain_EXPORTS.h>
#include <aws/cloudsearchdomain/CloudSearchDomainErrors.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/cloudsearchdomain/model/SearchResult.h>
#include <aws/cloudsearchdomain/model/SuggestResult.h>
#include <aws/cloudsearchdomain/model/UploadDocumentsResult.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 CloudSearchDomain
{
namespace Model
{
class SearchRequest;
class SuggestRequest;
class UploadDocumentsRequest;
typedef Aws::Utils::Outcome<SearchResult, CloudSearchDomainError> SearchOutcome;
typedef Aws::Utils::Outcome<SuggestResult, CloudSearchDomainError> SuggestOutcome;
typedef Aws::Utils::Outcome<UploadDocumentsResult, CloudSearchDomainError> UploadDocumentsOutcome;
typedef std::future<SearchOutcome> SearchOutcomeCallable;
typedef std::future<SuggestOutcome> SuggestOutcomeCallable;
typedef std::future<UploadDocumentsOutcome> UploadDocumentsOutcomeCallable;
} // namespace Model
class CloudSearchDomainClient;
typedef std::function<void(const CloudSearchDomainClient*, const Model::SearchRequest&, const Model::SearchOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > SearchResponseReceivedHandler;
typedef std::function<void(const CloudSearchDomainClient*, const Model::SuggestRequest&, const Model::SuggestOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > SuggestResponseReceivedHandler;
typedef std::function<void(const CloudSearchDomainClient*, const Model::UploadDocumentsRequest&, const Model::UploadDocumentsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > UploadDocumentsResponseReceivedHandler;
/**
* <p>You use the AmazonCloudSearch2013 API to upload documents to a search domain
* and search those documents. </p> <p>The endpoints for submitting
* <code>UploadDocuments</code>, <code>Search</code>, and <code>Suggest</code>
* requests are domain-specific. To get the endpoints for your domain, use the
* Amazon CloudSearch configuration service <code>DescribeDomains</code> action.
* The domain endpoints are also displayed on the domain dashboard in the Amazon
* CloudSearch console. You submit suggest requests to the search endpoint. </p>
* <p>For more information, see the <a
* href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide">Amazon
* CloudSearch Developer Guide</a>.</p>
*/
class AWS_CLOUDSEARCHDOMAIN_API CloudSearchDomainClient : 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.
*/
CloudSearchDomainClient(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.
*/
CloudSearchDomainClient(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
*/
CloudSearchDomainClient(const std::shared_ptr<Aws::Auth::AWSCredentialsProvider>& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
virtual ~CloudSearchDomainClient();
/**
* <p>Retrieves a list of documents that match the specified search criteria. How
* you specify the search criteria depends on which query parser you use. Amazon
* CloudSearch supports four query parsers:</p> <ul> <li><code>simple</code>:
* search all <code>text</code> and <code>text-array</code> fields for the
* specified string. Search for phrases, individual terms, and prefixes. </li>
* <li><code>structured</code>: search specific fields, construct compound queries
* using Boolean operators, and use advanced features such as term boosting and
* proximity searching.</li> <li><code>lucene</code>: specify search criteria using
* the Apache Lucene query parser syntax.</li> <li><code>dismax</code>: specify
* search criteria using the simplified subset of the Apache Lucene query parser
* syntax defined by the DisMax query parser.</li> </ul> <p>For more information,
* see <a
* href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching.html">Searching
* Your Data</a> in the <i>Amazon CloudSearch Developer Guide</i>.</p> <p>The
* endpoint for submitting <code>Search</code> requests is domain-specific. You
* submit search requests to a domain's search endpoint. To get the search endpoint
* for your domain, use the Amazon CloudSearch configuration service
* <code>DescribeDomains</code> action. A domain's endpoints are also displayed on
* the domain dashboard in the Amazon CloudSearch console. </p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/cloudsearchdomain-2013-01-01/Search">AWS
* API Reference</a></p>
*/
virtual Model::SearchOutcome Search(const Model::SearchRequest& request) const;
/**
* <p>Retrieves a list of documents that match the specified search criteria. How
* you specify the search criteria depends on which query parser you use. Amazon
* CloudSearch supports four query parsers:</p> <ul> <li><code>simple</code>:
* search all <code>text</code> and <code>text-array</code> fields for the
* specified string. Search for phrases, individual terms, and prefixes. </li>
* <li><code>structured</code>: search specific fields, construct compound queries
* using Boolean operators, and use advanced features such as term boosting and
* proximity searching.</li> <li><code>lucene</code>: specify search criteria using
* the Apache Lucene query parser syntax.</li> <li><code>dismax</code>: specify
* search criteria using the simplified subset of the Apache Lucene query parser
* syntax defined by the DisMax query parser.</li> </ul> <p>For more information,
* see <a
* href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching.html">Searching
* Your Data</a> in the <i>Amazon CloudSearch Developer Guide</i>.</p> <p>The
* endpoint for submitting <code>Search</code> requests is domain-specific. You
* submit search requests to a domain's search endpoint. To get the search endpoint
* for your domain, use the Amazon CloudSearch configuration service
* <code>DescribeDomains</code> action. A domain's endpoints are also displayed on
* the domain dashboard in the Amazon CloudSearch console. </p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/cloudsearchdomain-2013-01-01/Search">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::SearchOutcomeCallable SearchCallable(const Model::SearchRequest& request) const;
/**
* <p>Retrieves a list of documents that match the specified search criteria. How
* you specify the search criteria depends on which query parser you use. Amazon
* CloudSearch supports four query parsers:</p> <ul> <li><code>simple</code>:
* search all <code>text</code> and <code>text-array</code> fields for the
* specified string. Search for phrases, individual terms, and prefixes. </li>
* <li><code>structured</code>: search specific fields, construct compound queries
* using Boolean operators, and use advanced features such as term boosting and
* proximity searching.</li> <li><code>lucene</code>: specify search criteria using
* the Apache Lucene query parser syntax.</li> <li><code>dismax</code>: specify
* search criteria using the simplified subset of the Apache Lucene query parser
* syntax defined by the DisMax query parser.</li> </ul> <p>For more information,
* see <a
* href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/searching.html">Searching
* Your Data</a> in the <i>Amazon CloudSearch Developer Guide</i>.</p> <p>The
* endpoint for submitting <code>Search</code> requests is domain-specific. You
* submit search requests to a domain's search endpoint. To get the search endpoint
* for your domain, use the Amazon CloudSearch configuration service
* <code>DescribeDomains</code> action. A domain's endpoints are also displayed on
* the domain dashboard in the Amazon CloudSearch console. </p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/cloudsearchdomain-2013-01-01/Search">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void SearchAsync(const Model::SearchRequest& request, const SearchResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Retrieves autocomplete suggestions for a partial query string. You can use
* suggestions enable you to display likely matches before users finish typing. In
* Amazon CloudSearch, suggestions are based on the contents of a particular text
* field. When you request suggestions, Amazon CloudSearch finds all of the
* documents whose values in the suggester field start with the specified query
* string. The beginning of the field must match the query string to be considered
* a match. </p> <p>For more information about configuring suggesters and
* retrieving suggestions, see <a
* href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/getting-suggestions.html">Getting
* Suggestions</a> in the <i>Amazon CloudSearch Developer Guide</i>. </p> <p>The
* endpoint for submitting <code>Suggest</code> requests is domain-specific. You
* submit suggest requests to a domain's search endpoint. To get the search
* endpoint for your domain, use the Amazon CloudSearch configuration service
* <code>DescribeDomains</code> action. A domain's endpoints are also displayed on
* the domain dashboard in the Amazon CloudSearch console. </p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/cloudsearchdomain-2013-01-01/Suggest">AWS
* API Reference</a></p>
*/
virtual Model::SuggestOutcome Suggest(const Model::SuggestRequest& request) const;
/**
* <p>Retrieves autocomplete suggestions for a partial query string. You can use
* suggestions enable you to display likely matches before users finish typing. In
* Amazon CloudSearch, suggestions are based on the contents of a particular text
* field. When you request suggestions, Amazon CloudSearch finds all of the
* documents whose values in the suggester field start with the specified query
* string. The beginning of the field must match the query string to be considered
* a match. </p> <p>For more information about configuring suggesters and
* retrieving suggestions, see <a
* href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/getting-suggestions.html">Getting
* Suggestions</a> in the <i>Amazon CloudSearch Developer Guide</i>. </p> <p>The
* endpoint for submitting <code>Suggest</code> requests is domain-specific. You
* submit suggest requests to a domain's search endpoint. To get the search
* endpoint for your domain, use the Amazon CloudSearch configuration service
* <code>DescribeDomains</code> action. A domain's endpoints are also displayed on
* the domain dashboard in the Amazon CloudSearch console. </p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/cloudsearchdomain-2013-01-01/Suggest">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::SuggestOutcomeCallable SuggestCallable(const Model::SuggestRequest& request) const;
/**
* <p>Retrieves autocomplete suggestions for a partial query string. You can use
* suggestions enable you to display likely matches before users finish typing. In
* Amazon CloudSearch, suggestions are based on the contents of a particular text
* field. When you request suggestions, Amazon CloudSearch finds all of the
* documents whose values in the suggester field start with the specified query
* string. The beginning of the field must match the query string to be considered
* a match. </p> <p>For more information about configuring suggesters and
* retrieving suggestions, see <a
* href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/getting-suggestions.html">Getting
* Suggestions</a> in the <i>Amazon CloudSearch Developer Guide</i>. </p> <p>The
* endpoint for submitting <code>Suggest</code> requests is domain-specific. You
* submit suggest requests to a domain's search endpoint. To get the search
* endpoint for your domain, use the Amazon CloudSearch configuration service
* <code>DescribeDomains</code> action. A domain's endpoints are also displayed on
* the domain dashboard in the Amazon CloudSearch console. </p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/cloudsearchdomain-2013-01-01/Suggest">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void SuggestAsync(const Model::SuggestRequest& request, const SuggestResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>Posts a batch of documents to a search domain for indexing. A document batch
* is a collection of add and delete operations that represent the documents you
* want to add, update, or delete from your domain. Batches can be described in
* either JSON or XML. Each item that you want Amazon CloudSearch to return as a
* search result (such as a product) is represented as a document. Every document
* has a unique ID and one or more fields that contain the data that you want to
* search and return in results. Individual documents cannot contain more than 1 MB
* of data. The entire batch cannot exceed 5 MB. To get the best possible upload
* performance, group add and delete operations in batches that are close the 5 MB
* limit. Submitting a large volume of single-document batches can overload a
* domain's document service. </p> <p>The endpoint for submitting
* <code>UploadDocuments</code> requests is domain-specific. To get the document
* endpoint for your domain, use the Amazon CloudSearch configuration service
* <code>DescribeDomains</code> action. A domain's endpoints are also displayed on
* the domain dashboard in the Amazon CloudSearch console. </p> <p>For more
* information about formatting your data for Amazon CloudSearch, see <a
* href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/preparing-data.html">Preparing
* Your Data</a> in the <i>Amazon CloudSearch Developer Guide</i>. For more
* information about uploading data for indexing, see <a
* href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/uploading-data.html">Uploading
* Data</a> in the <i>Amazon CloudSearch Developer Guide</i>. </p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/cloudsearchdomain-2013-01-01/UploadDocuments">AWS
* API Reference</a></p>
*/
virtual Model::UploadDocumentsOutcome UploadDocuments(const Model::UploadDocumentsRequest& request) const;
/**
* <p>Posts a batch of documents to a search domain for indexing. A document batch
* is a collection of add and delete operations that represent the documents you
* want to add, update, or delete from your domain. Batches can be described in
* either JSON or XML. Each item that you want Amazon CloudSearch to return as a
* search result (such as a product) is represented as a document. Every document
* has a unique ID and one or more fields that contain the data that you want to
* search and return in results. Individual documents cannot contain more than 1 MB
* of data. The entire batch cannot exceed 5 MB. To get the best possible upload
* performance, group add and delete operations in batches that are close the 5 MB
* limit. Submitting a large volume of single-document batches can overload a
* domain's document service. </p> <p>The endpoint for submitting
* <code>UploadDocuments</code> requests is domain-specific. To get the document
* endpoint for your domain, use the Amazon CloudSearch configuration service
* <code>DescribeDomains</code> action. A domain's endpoints are also displayed on
* the domain dashboard in the Amazon CloudSearch console. </p> <p>For more
* information about formatting your data for Amazon CloudSearch, see <a
* href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/preparing-data.html">Preparing
* Your Data</a> in the <i>Amazon CloudSearch Developer Guide</i>. For more
* information about uploading data for indexing, see <a
* href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/uploading-data.html">Uploading
* Data</a> in the <i>Amazon CloudSearch Developer Guide</i>. </p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/cloudsearchdomain-2013-01-01/UploadDocuments">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::UploadDocumentsOutcomeCallable UploadDocumentsCallable(const Model::UploadDocumentsRequest& request) const;
/**
* <p>Posts a batch of documents to a search domain for indexing. A document batch
* is a collection of add and delete operations that represent the documents you
* want to add, update, or delete from your domain. Batches can be described in
* either JSON or XML. Each item that you want Amazon CloudSearch to return as a
* search result (such as a product) is represented as a document. Every document
* has a unique ID and one or more fields that contain the data that you want to
* search and return in results. Individual documents cannot contain more than 1 MB
* of data. The entire batch cannot exceed 5 MB. To get the best possible upload
* performance, group add and delete operations in batches that are close the 5 MB
* limit. Submitting a large volume of single-document batches can overload a
* domain's document service. </p> <p>The endpoint for submitting
* <code>UploadDocuments</code> requests is domain-specific. To get the document
* endpoint for your domain, use the Amazon CloudSearch configuration service
* <code>DescribeDomains</code> action. A domain's endpoints are also displayed on
* the domain dashboard in the Amazon CloudSearch console. </p> <p>For more
* information about formatting your data for Amazon CloudSearch, see <a
* href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/preparing-data.html">Preparing
* Your Data</a> in the <i>Amazon CloudSearch Developer Guide</i>. For more
* information about uploading data for indexing, see <a
* href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/uploading-data.html">Uploading
* Data</a> in the <i>Amazon CloudSearch Developer Guide</i>. </p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/cloudsearchdomain-2013-01-01/UploadDocuments">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void UploadDocumentsAsync(const Model::UploadDocumentsRequest& request, const UploadDocumentsResponseReceivedHandler& 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 SearchAsyncHelper(const Model::SearchRequest& request, const SearchResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void SuggestAsyncHelper(const Model::SuggestRequest& request, const SuggestResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void UploadDocumentsAsyncHelper(const Model::UploadDocumentsRequest& request, const UploadDocumentsResponseReceivedHandler& 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 CloudSearchDomain
} // 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/cloudsearchdomain/CloudSearchDomain_EXPORTS.h>
#include <aws/core/Region.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace CloudSearchDomain
{
namespace CloudSearchDomainEndpoint
{
AWS_CLOUDSEARCHDOMAIN_API Aws::String ForRegion(const Aws::String& regionName, bool useDualStack = false);
} // namespace CloudSearchDomainEndpoint
} // namespace CloudSearchDomain
} // 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/cloudsearchdomain/CloudSearchDomain_EXPORTS.h>
#include <aws/core/client/AWSErrorMarshaller.h>
namespace Aws
{
namespace Client
{
class AWS_CLOUDSEARCHDOMAIN_API CloudSearchDomainErrorMarshaller : 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,73 @@
/**
* 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/cloudsearchdomain/CloudSearchDomain_EXPORTS.h>
namespace Aws
{
namespace CloudSearchDomain
{
enum class CloudSearchDomainErrors
{
//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,
///////////////////////////////////////////////////////////////////////////////////////////
DOCUMENT_SERVICE= static_cast<int>(Aws::Client::CoreErrors::SERVICE_EXTENSION_START_RANGE) + 1,
SEARCH
};
class AWS_CLOUDSEARCHDOMAIN_API CloudSearchDomainError : public Aws::Client::AWSError<CloudSearchDomainErrors>
{
public:
CloudSearchDomainError() {}
CloudSearchDomainError(const Aws::Client::AWSError<Aws::Client::CoreErrors>& rhs) : Aws::Client::AWSError<CloudSearchDomainErrors>(rhs) {}
CloudSearchDomainError(Aws::Client::AWSError<Aws::Client::CoreErrors>&& rhs) : Aws::Client::AWSError<CloudSearchDomainErrors>(rhs) {}
CloudSearchDomainError(const Aws::Client::AWSError<CloudSearchDomainErrors>& rhs) : Aws::Client::AWSError<CloudSearchDomainErrors>(rhs) {}
CloudSearchDomainError(Aws::Client::AWSError<CloudSearchDomainErrors>&& rhs) : Aws::Client::AWSError<CloudSearchDomainErrors>(rhs) {}
template <typename T>
T GetModeledError();
};
namespace CloudSearchDomainErrorMapper
{
AWS_CLOUDSEARCHDOMAIN_API Aws::Client::AWSError<Aws::Client::CoreErrors> GetErrorForName(const char* errorName);
}
} // namespace CloudSearchDomain
} // namespace Aws

View File

@@ -0,0 +1,44 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/cloudsearchdomain/CloudSearchDomain_EXPORTS.h>
#include <aws/core/AmazonSerializableWebServiceRequest.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <aws/core/http/HttpRequest.h>
#include <aws/core/AmazonStreamingWebServiceRequest.h>
namespace Aws
{
namespace CloudSearchDomain
{
class AWS_CLOUDSEARCHDOMAIN_API CloudSearchDomainRequest : public Aws::AmazonSerializableWebServiceRequest
{
public:
virtual ~CloudSearchDomainRequest () {}
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, "2013-01-01"));
return headers;
}
protected:
virtual Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const { return Aws::Http::HeaderValueCollection(); }
};
typedef Aws::AmazonStreamingWebServiceRequest StreamingCloudSearchDomainRequest;
} // namespace CloudSearchDomain
} // 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_CLOUDSEARCHDOMAIN_EXPORTS
#define AWS_CLOUDSEARCHDOMAIN_API __declspec(dllexport)
#else
#define AWS_CLOUDSEARCHDOMAIN_API __declspec(dllimport)
#endif /* AWS_CLOUDSEARCHDOMAIN_EXPORTS */
#else
#define AWS_CLOUDSEARCHDOMAIN_API
#endif // USE_IMPORT_EXPORT
#else // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)
#define AWS_CLOUDSEARCHDOMAIN_API
#endif // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)

View File

@@ -0,0 +1,116 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/cloudsearchdomain/CloudSearchDomain_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace CloudSearchDomain
{
namespace Model
{
/**
* <p>A container for facet information. </p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/cloudsearchdomain-2013-01-01/Bucket">AWS
* API Reference</a></p>
*/
class AWS_CLOUDSEARCHDOMAIN_API Bucket
{
public:
Bucket();
Bucket(Aws::Utils::Json::JsonView jsonValue);
Bucket& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The facet value being counted.</p>
*/
inline const Aws::String& GetValue() const{ return m_value; }
/**
* <p>The facet value being counted.</p>
*/
inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
/**
* <p>The facet value being counted.</p>
*/
inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; }
/**
* <p>The facet value being counted.</p>
*/
inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = std::move(value); }
/**
* <p>The facet value being counted.</p>
*/
inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); }
/**
* <p>The facet value being counted.</p>
*/
inline Bucket& WithValue(const Aws::String& value) { SetValue(value); return *this;}
/**
* <p>The facet value being counted.</p>
*/
inline Bucket& WithValue(Aws::String&& value) { SetValue(std::move(value)); return *this;}
/**
* <p>The facet value being counted.</p>
*/
inline Bucket& WithValue(const char* value) { SetValue(value); return *this;}
/**
* <p>The number of hits that contain the facet value in the specified facet
* field.</p>
*/
inline long long GetCount() const{ return m_count; }
/**
* <p>The number of hits that contain the facet value in the specified facet
* field.</p>
*/
inline bool CountHasBeenSet() const { return m_countHasBeenSet; }
/**
* <p>The number of hits that contain the facet value in the specified facet
* field.</p>
*/
inline void SetCount(long long value) { m_countHasBeenSet = true; m_count = value; }
/**
* <p>The number of hits that contain the facet value in the specified facet
* field.</p>
*/
inline Bucket& WithCount(long long value) { SetCount(value); return *this;}
private:
Aws::String m_value;
bool m_valueHasBeenSet;
long long m_count;
bool m_countHasBeenSet;
};
} // namespace Model
} // namespace CloudSearchDomain
} // namespace Aws

View File

@@ -0,0 +1,90 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/cloudsearchdomain/CloudSearchDomain_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/cloudsearchdomain/model/Bucket.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace CloudSearchDomain
{
namespace Model
{
/**
* <p>A container for the calculated facet values and counts.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/cloudsearchdomain-2013-01-01/BucketInfo">AWS
* API Reference</a></p>
*/
class AWS_CLOUDSEARCHDOMAIN_API BucketInfo
{
public:
BucketInfo();
BucketInfo(Aws::Utils::Json::JsonView jsonValue);
BucketInfo& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>A list of the calculated facet values and counts.</p>
*/
inline const Aws::Vector<Bucket>& GetBuckets() const{ return m_buckets; }
/**
* <p>A list of the calculated facet values and counts.</p>
*/
inline bool BucketsHasBeenSet() const { return m_bucketsHasBeenSet; }
/**
* <p>A list of the calculated facet values and counts.</p>
*/
inline void SetBuckets(const Aws::Vector<Bucket>& value) { m_bucketsHasBeenSet = true; m_buckets = value; }
/**
* <p>A list of the calculated facet values and counts.</p>
*/
inline void SetBuckets(Aws::Vector<Bucket>&& value) { m_bucketsHasBeenSet = true; m_buckets = std::move(value); }
/**
* <p>A list of the calculated facet values and counts.</p>
*/
inline BucketInfo& WithBuckets(const Aws::Vector<Bucket>& value) { SetBuckets(value); return *this;}
/**
* <p>A list of the calculated facet values and counts.</p>
*/
inline BucketInfo& WithBuckets(Aws::Vector<Bucket>&& value) { SetBuckets(std::move(value)); return *this;}
/**
* <p>A list of the calculated facet values and counts.</p>
*/
inline BucketInfo& AddBuckets(const Bucket& value) { m_bucketsHasBeenSet = true; m_buckets.push_back(value); return *this; }
/**
* <p>A list of the calculated facet values and counts.</p>
*/
inline BucketInfo& AddBuckets(Bucket&& value) { m_bucketsHasBeenSet = true; m_buckets.push_back(std::move(value)); return *this; }
private:
Aws::Vector<Bucket> m_buckets;
bool m_bucketsHasBeenSet;
};
} // namespace Model
} // namespace CloudSearchDomain
} // 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/cloudsearchdomain/CloudSearchDomain_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace CloudSearchDomain
{
namespace Model
{
enum class ContentType
{
NOT_SET,
application_json,
application_xml
};
namespace ContentTypeMapper
{
AWS_CLOUDSEARCHDOMAIN_API ContentType GetContentTypeForName(const Aws::String& name);
AWS_CLOUDSEARCHDOMAIN_API Aws::String GetNameForContentType(ContentType value);
} // namespace ContentTypeMapper
} // namespace Model
} // namespace CloudSearchDomain
} // namespace Aws

View File

@@ -0,0 +1,141 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/cloudsearchdomain/CloudSearchDomain_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace CloudSearchDomain
{
namespace Model
{
/**
* <p>Information about any problems encountered while processing an upload
* request.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/cloudsearchdomain-2013-01-01/DocumentServiceException">AWS
* API Reference</a></p>
*/
class AWS_CLOUDSEARCHDOMAIN_API DocumentServiceException
{
public:
DocumentServiceException();
DocumentServiceException(Aws::Utils::Json::JsonView jsonValue);
DocumentServiceException& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The return status of a document upload request, <code>error</code> or
* <code>success</code>.</p>
*/
inline const Aws::String& GetStatus() const{ return m_status; }
/**
* <p>The return status of a document upload request, <code>error</code> or
* <code>success</code>.</p>
*/
inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
/**
* <p>The return status of a document upload request, <code>error</code> or
* <code>success</code>.</p>
*/
inline void SetStatus(const Aws::String& value) { m_statusHasBeenSet = true; m_status = value; }
/**
* <p>The return status of a document upload request, <code>error</code> or
* <code>success</code>.</p>
*/
inline void SetStatus(Aws::String&& value) { m_statusHasBeenSet = true; m_status = std::move(value); }
/**
* <p>The return status of a document upload request, <code>error</code> or
* <code>success</code>.</p>
*/
inline void SetStatus(const char* value) { m_statusHasBeenSet = true; m_status.assign(value); }
/**
* <p>The return status of a document upload request, <code>error</code> or
* <code>success</code>.</p>
*/
inline DocumentServiceException& WithStatus(const Aws::String& value) { SetStatus(value); return *this;}
/**
* <p>The return status of a document upload request, <code>error</code> or
* <code>success</code>.</p>
*/
inline DocumentServiceException& WithStatus(Aws::String&& value) { SetStatus(std::move(value)); return *this;}
/**
* <p>The return status of a document upload request, <code>error</code> or
* <code>success</code>.</p>
*/
inline DocumentServiceException& WithStatus(const char* value) { SetStatus(value); return *this;}
/**
* <p>The description of the errors returned by the document service.</p>
*/
inline const Aws::String& GetMessage() const{ return m_message; }
/**
* <p>The description of the errors returned by the document service.</p>
*/
inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
/**
* <p>The description of the errors returned by the document service.</p>
*/
inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; }
/**
* <p>The description of the errors returned by the document service.</p>
*/
inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = std::move(value); }
/**
* <p>The description of the errors returned by the document service.</p>
*/
inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); }
/**
* <p>The description of the errors returned by the document service.</p>
*/
inline DocumentServiceException& WithMessage(const Aws::String& value) { SetMessage(value); return *this;}
/**
* <p>The description of the errors returned by the document service.</p>
*/
inline DocumentServiceException& WithMessage(Aws::String&& value) { SetMessage(std::move(value)); return *this;}
/**
* <p>The description of the errors returned by the document service.</p>
*/
inline DocumentServiceException& WithMessage(const char* value) { SetMessage(value); return *this;}
private:
Aws::String m_status;
bool m_statusHasBeenSet;
Aws::String m_message;
bool m_messageHasBeenSet;
};
} // namespace Model
} // namespace CloudSearchDomain
} // namespace Aws

View File

@@ -0,0 +1,89 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/cloudsearchdomain/CloudSearchDomain_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace CloudSearchDomain
{
namespace Model
{
/**
* <p>A warning returned by the document service when an issue is discovered while
* processing an upload request.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/cloudsearchdomain-2013-01-01/DocumentServiceWarning">AWS
* API Reference</a></p>
*/
class AWS_CLOUDSEARCHDOMAIN_API DocumentServiceWarning
{
public:
DocumentServiceWarning();
DocumentServiceWarning(Aws::Utils::Json::JsonView jsonValue);
DocumentServiceWarning& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The description for a warning returned by the document service.</p>
*/
inline const Aws::String& GetMessage() const{ return m_message; }
/**
* <p>The description for a warning returned by the document service.</p>
*/
inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
/**
* <p>The description for a warning returned by the document service.</p>
*/
inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; }
/**
* <p>The description for a warning returned by the document service.</p>
*/
inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = std::move(value); }
/**
* <p>The description for a warning returned by the document service.</p>
*/
inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); }
/**
* <p>The description for a warning returned by the document service.</p>
*/
inline DocumentServiceWarning& WithMessage(const Aws::String& value) { SetMessage(value); return *this;}
/**
* <p>The description for a warning returned by the document service.</p>
*/
inline DocumentServiceWarning& WithMessage(Aws::String&& value) { SetMessage(std::move(value)); return *this;}
/**
* <p>The description for a warning returned by the document service.</p>
*/
inline DocumentServiceWarning& WithMessage(const char* value) { SetMessage(value); return *this;}
private:
Aws::String m_message;
bool m_messageHasBeenSet;
};
} // namespace Model
} // namespace CloudSearchDomain
} // namespace Aws

View File

@@ -0,0 +1,481 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/cloudsearchdomain/CloudSearchDomain_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace CloudSearchDomain
{
namespace Model
{
/**
* <p>The statistics for a field calculated in the request.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/cloudsearchdomain-2013-01-01/FieldStats">AWS
* API Reference</a></p>
*/
class AWS_CLOUDSEARCHDOMAIN_API FieldStats
{
public:
FieldStats();
FieldStats(Aws::Utils::Json::JsonView jsonValue);
FieldStats& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The minimum value found in the specified field in the result set.</p> <p>If
* the field is numeric (<code>int</code>, <code>int-array</code>,
* <code>double</code>, or <code>double-array</code>), <code>min</code> is the
* string representation of a double-precision 64-bit floating point value. If the
* field is <code>date</code> or <code>date-array</code>, <code>min</code> is the
* string representation of a date with the format specified in <a
* href="http://tools.ietf.org/html/rfc3339">IETF RFC3339</a>:
* yyyy-mm-ddTHH:mm:ss.SSSZ.</p>
*/
inline const Aws::String& GetMin() const{ return m_min; }
/**
* <p>The minimum value found in the specified field in the result set.</p> <p>If
* the field is numeric (<code>int</code>, <code>int-array</code>,
* <code>double</code>, or <code>double-array</code>), <code>min</code> is the
* string representation of a double-precision 64-bit floating point value. If the
* field is <code>date</code> or <code>date-array</code>, <code>min</code> is the
* string representation of a date with the format specified in <a
* href="http://tools.ietf.org/html/rfc3339">IETF RFC3339</a>:
* yyyy-mm-ddTHH:mm:ss.SSSZ.</p>
*/
inline bool MinHasBeenSet() const { return m_minHasBeenSet; }
/**
* <p>The minimum value found in the specified field in the result set.</p> <p>If
* the field is numeric (<code>int</code>, <code>int-array</code>,
* <code>double</code>, or <code>double-array</code>), <code>min</code> is the
* string representation of a double-precision 64-bit floating point value. If the
* field is <code>date</code> or <code>date-array</code>, <code>min</code> is the
* string representation of a date with the format specified in <a
* href="http://tools.ietf.org/html/rfc3339">IETF RFC3339</a>:
* yyyy-mm-ddTHH:mm:ss.SSSZ.</p>
*/
inline void SetMin(const Aws::String& value) { m_minHasBeenSet = true; m_min = value; }
/**
* <p>The minimum value found in the specified field in the result set.</p> <p>If
* the field is numeric (<code>int</code>, <code>int-array</code>,
* <code>double</code>, or <code>double-array</code>), <code>min</code> is the
* string representation of a double-precision 64-bit floating point value. If the
* field is <code>date</code> or <code>date-array</code>, <code>min</code> is the
* string representation of a date with the format specified in <a
* href="http://tools.ietf.org/html/rfc3339">IETF RFC3339</a>:
* yyyy-mm-ddTHH:mm:ss.SSSZ.</p>
*/
inline void SetMin(Aws::String&& value) { m_minHasBeenSet = true; m_min = std::move(value); }
/**
* <p>The minimum value found in the specified field in the result set.</p> <p>If
* the field is numeric (<code>int</code>, <code>int-array</code>,
* <code>double</code>, or <code>double-array</code>), <code>min</code> is the
* string representation of a double-precision 64-bit floating point value. If the
* field is <code>date</code> or <code>date-array</code>, <code>min</code> is the
* string representation of a date with the format specified in <a
* href="http://tools.ietf.org/html/rfc3339">IETF RFC3339</a>:
* yyyy-mm-ddTHH:mm:ss.SSSZ.</p>
*/
inline void SetMin(const char* value) { m_minHasBeenSet = true; m_min.assign(value); }
/**
* <p>The minimum value found in the specified field in the result set.</p> <p>If
* the field is numeric (<code>int</code>, <code>int-array</code>,
* <code>double</code>, or <code>double-array</code>), <code>min</code> is the
* string representation of a double-precision 64-bit floating point value. If the
* field is <code>date</code> or <code>date-array</code>, <code>min</code> is the
* string representation of a date with the format specified in <a
* href="http://tools.ietf.org/html/rfc3339">IETF RFC3339</a>:
* yyyy-mm-ddTHH:mm:ss.SSSZ.</p>
*/
inline FieldStats& WithMin(const Aws::String& value) { SetMin(value); return *this;}
/**
* <p>The minimum value found in the specified field in the result set.</p> <p>If
* the field is numeric (<code>int</code>, <code>int-array</code>,
* <code>double</code>, or <code>double-array</code>), <code>min</code> is the
* string representation of a double-precision 64-bit floating point value. If the
* field is <code>date</code> or <code>date-array</code>, <code>min</code> is the
* string representation of a date with the format specified in <a
* href="http://tools.ietf.org/html/rfc3339">IETF RFC3339</a>:
* yyyy-mm-ddTHH:mm:ss.SSSZ.</p>
*/
inline FieldStats& WithMin(Aws::String&& value) { SetMin(std::move(value)); return *this;}
/**
* <p>The minimum value found in the specified field in the result set.</p> <p>If
* the field is numeric (<code>int</code>, <code>int-array</code>,
* <code>double</code>, or <code>double-array</code>), <code>min</code> is the
* string representation of a double-precision 64-bit floating point value. If the
* field is <code>date</code> or <code>date-array</code>, <code>min</code> is the
* string representation of a date with the format specified in <a
* href="http://tools.ietf.org/html/rfc3339">IETF RFC3339</a>:
* yyyy-mm-ddTHH:mm:ss.SSSZ.</p>
*/
inline FieldStats& WithMin(const char* value) { SetMin(value); return *this;}
/**
* <p>The maximum value found in the specified field in the result set.</p> <p>If
* the field is numeric (<code>int</code>, <code>int-array</code>,
* <code>double</code>, or <code>double-array</code>), <code>max</code> is the
* string representation of a double-precision 64-bit floating point value. If the
* field is <code>date</code> or <code>date-array</code>, <code>max</code> is the
* string representation of a date with the format specified in <a
* href="http://tools.ietf.org/html/rfc3339">IETF RFC3339</a>:
* yyyy-mm-ddTHH:mm:ss.SSSZ.</p>
*/
inline const Aws::String& GetMax() const{ return m_max; }
/**
* <p>The maximum value found in the specified field in the result set.</p> <p>If
* the field is numeric (<code>int</code>, <code>int-array</code>,
* <code>double</code>, or <code>double-array</code>), <code>max</code> is the
* string representation of a double-precision 64-bit floating point value. If the
* field is <code>date</code> or <code>date-array</code>, <code>max</code> is the
* string representation of a date with the format specified in <a
* href="http://tools.ietf.org/html/rfc3339">IETF RFC3339</a>:
* yyyy-mm-ddTHH:mm:ss.SSSZ.</p>
*/
inline bool MaxHasBeenSet() const { return m_maxHasBeenSet; }
/**
* <p>The maximum value found in the specified field in the result set.</p> <p>If
* the field is numeric (<code>int</code>, <code>int-array</code>,
* <code>double</code>, or <code>double-array</code>), <code>max</code> is the
* string representation of a double-precision 64-bit floating point value. If the
* field is <code>date</code> or <code>date-array</code>, <code>max</code> is the
* string representation of a date with the format specified in <a
* href="http://tools.ietf.org/html/rfc3339">IETF RFC3339</a>:
* yyyy-mm-ddTHH:mm:ss.SSSZ.</p>
*/
inline void SetMax(const Aws::String& value) { m_maxHasBeenSet = true; m_max = value; }
/**
* <p>The maximum value found in the specified field in the result set.</p> <p>If
* the field is numeric (<code>int</code>, <code>int-array</code>,
* <code>double</code>, or <code>double-array</code>), <code>max</code> is the
* string representation of a double-precision 64-bit floating point value. If the
* field is <code>date</code> or <code>date-array</code>, <code>max</code> is the
* string representation of a date with the format specified in <a
* href="http://tools.ietf.org/html/rfc3339">IETF RFC3339</a>:
* yyyy-mm-ddTHH:mm:ss.SSSZ.</p>
*/
inline void SetMax(Aws::String&& value) { m_maxHasBeenSet = true; m_max = std::move(value); }
/**
* <p>The maximum value found in the specified field in the result set.</p> <p>If
* the field is numeric (<code>int</code>, <code>int-array</code>,
* <code>double</code>, or <code>double-array</code>), <code>max</code> is the
* string representation of a double-precision 64-bit floating point value. If the
* field is <code>date</code> or <code>date-array</code>, <code>max</code> is the
* string representation of a date with the format specified in <a
* href="http://tools.ietf.org/html/rfc3339">IETF RFC3339</a>:
* yyyy-mm-ddTHH:mm:ss.SSSZ.</p>
*/
inline void SetMax(const char* value) { m_maxHasBeenSet = true; m_max.assign(value); }
/**
* <p>The maximum value found in the specified field in the result set.</p> <p>If
* the field is numeric (<code>int</code>, <code>int-array</code>,
* <code>double</code>, or <code>double-array</code>), <code>max</code> is the
* string representation of a double-precision 64-bit floating point value. If the
* field is <code>date</code> or <code>date-array</code>, <code>max</code> is the
* string representation of a date with the format specified in <a
* href="http://tools.ietf.org/html/rfc3339">IETF RFC3339</a>:
* yyyy-mm-ddTHH:mm:ss.SSSZ.</p>
*/
inline FieldStats& WithMax(const Aws::String& value) { SetMax(value); return *this;}
/**
* <p>The maximum value found in the specified field in the result set.</p> <p>If
* the field is numeric (<code>int</code>, <code>int-array</code>,
* <code>double</code>, or <code>double-array</code>), <code>max</code> is the
* string representation of a double-precision 64-bit floating point value. If the
* field is <code>date</code> or <code>date-array</code>, <code>max</code> is the
* string representation of a date with the format specified in <a
* href="http://tools.ietf.org/html/rfc3339">IETF RFC3339</a>:
* yyyy-mm-ddTHH:mm:ss.SSSZ.</p>
*/
inline FieldStats& WithMax(Aws::String&& value) { SetMax(std::move(value)); return *this;}
/**
* <p>The maximum value found in the specified field in the result set.</p> <p>If
* the field is numeric (<code>int</code>, <code>int-array</code>,
* <code>double</code>, or <code>double-array</code>), <code>max</code> is the
* string representation of a double-precision 64-bit floating point value. If the
* field is <code>date</code> or <code>date-array</code>, <code>max</code> is the
* string representation of a date with the format specified in <a
* href="http://tools.ietf.org/html/rfc3339">IETF RFC3339</a>:
* yyyy-mm-ddTHH:mm:ss.SSSZ.</p>
*/
inline FieldStats& WithMax(const char* value) { SetMax(value); return *this;}
/**
* <p>The number of documents that contain a value in the specified field in the
* result set.</p>
*/
inline long long GetCount() const{ return m_count; }
/**
* <p>The number of documents that contain a value in the specified field in the
* result set.</p>
*/
inline bool CountHasBeenSet() const { return m_countHasBeenSet; }
/**
* <p>The number of documents that contain a value in the specified field in the
* result set.</p>
*/
inline void SetCount(long long value) { m_countHasBeenSet = true; m_count = value; }
/**
* <p>The number of documents that contain a value in the specified field in the
* result set.</p>
*/
inline FieldStats& WithCount(long long value) { SetCount(value); return *this;}
/**
* <p>The number of documents that do not contain a value in the specified field in
* the result set.</p>
*/
inline long long GetMissing() const{ return m_missing; }
/**
* <p>The number of documents that do not contain a value in the specified field in
* the result set.</p>
*/
inline bool MissingHasBeenSet() const { return m_missingHasBeenSet; }
/**
* <p>The number of documents that do not contain a value in the specified field in
* the result set.</p>
*/
inline void SetMissing(long long value) { m_missingHasBeenSet = true; m_missing = value; }
/**
* <p>The number of documents that do not contain a value in the specified field in
* the result set.</p>
*/
inline FieldStats& WithMissing(long long value) { SetMissing(value); return *this;}
/**
* <p>The sum of the field values across the documents in the result set.
* <code>null</code> for date fields.</p>
*/
inline double GetSum() const{ return m_sum; }
/**
* <p>The sum of the field values across the documents in the result set.
* <code>null</code> for date fields.</p>
*/
inline bool SumHasBeenSet() const { return m_sumHasBeenSet; }
/**
* <p>The sum of the field values across the documents in the result set.
* <code>null</code> for date fields.</p>
*/
inline void SetSum(double value) { m_sumHasBeenSet = true; m_sum = value; }
/**
* <p>The sum of the field values across the documents in the result set.
* <code>null</code> for date fields.</p>
*/
inline FieldStats& WithSum(double value) { SetSum(value); return *this;}
/**
* <p>The sum of all field values in the result set squared.</p>
*/
inline double GetSumOfSquares() const{ return m_sumOfSquares; }
/**
* <p>The sum of all field values in the result set squared.</p>
*/
inline bool SumOfSquaresHasBeenSet() const { return m_sumOfSquaresHasBeenSet; }
/**
* <p>The sum of all field values in the result set squared.</p>
*/
inline void SetSumOfSquares(double value) { m_sumOfSquaresHasBeenSet = true; m_sumOfSquares = value; }
/**
* <p>The sum of all field values in the result set squared.</p>
*/
inline FieldStats& WithSumOfSquares(double value) { SetSumOfSquares(value); return *this;}
/**
* <p>The average of the values found in the specified field in the result set.</p>
* <p>If the field is numeric (<code>int</code>, <code>int-array</code>,
* <code>double</code>, or <code>double-array</code>), <code>mean</code> is the
* string representation of a double-precision 64-bit floating point value. If the
* field is <code>date</code> or <code>date-array</code>, <code>mean</code> is the
* string representation of a date with the format specified in <a
* href="http://tools.ietf.org/html/rfc3339">IETF RFC3339</a>:
* yyyy-mm-ddTHH:mm:ss.SSSZ.</p>
*/
inline const Aws::String& GetMean() const{ return m_mean; }
/**
* <p>The average of the values found in the specified field in the result set.</p>
* <p>If the field is numeric (<code>int</code>, <code>int-array</code>,
* <code>double</code>, or <code>double-array</code>), <code>mean</code> is the
* string representation of a double-precision 64-bit floating point value. If the
* field is <code>date</code> or <code>date-array</code>, <code>mean</code> is the
* string representation of a date with the format specified in <a
* href="http://tools.ietf.org/html/rfc3339">IETF RFC3339</a>:
* yyyy-mm-ddTHH:mm:ss.SSSZ.</p>
*/
inline bool MeanHasBeenSet() const { return m_meanHasBeenSet; }
/**
* <p>The average of the values found in the specified field in the result set.</p>
* <p>If the field is numeric (<code>int</code>, <code>int-array</code>,
* <code>double</code>, or <code>double-array</code>), <code>mean</code> is the
* string representation of a double-precision 64-bit floating point value. If the
* field is <code>date</code> or <code>date-array</code>, <code>mean</code> is the
* string representation of a date with the format specified in <a
* href="http://tools.ietf.org/html/rfc3339">IETF RFC3339</a>:
* yyyy-mm-ddTHH:mm:ss.SSSZ.</p>
*/
inline void SetMean(const Aws::String& value) { m_meanHasBeenSet = true; m_mean = value; }
/**
* <p>The average of the values found in the specified field in the result set.</p>
* <p>If the field is numeric (<code>int</code>, <code>int-array</code>,
* <code>double</code>, or <code>double-array</code>), <code>mean</code> is the
* string representation of a double-precision 64-bit floating point value. If the
* field is <code>date</code> or <code>date-array</code>, <code>mean</code> is the
* string representation of a date with the format specified in <a
* href="http://tools.ietf.org/html/rfc3339">IETF RFC3339</a>:
* yyyy-mm-ddTHH:mm:ss.SSSZ.</p>
*/
inline void SetMean(Aws::String&& value) { m_meanHasBeenSet = true; m_mean = std::move(value); }
/**
* <p>The average of the values found in the specified field in the result set.</p>
* <p>If the field is numeric (<code>int</code>, <code>int-array</code>,
* <code>double</code>, or <code>double-array</code>), <code>mean</code> is the
* string representation of a double-precision 64-bit floating point value. If the
* field is <code>date</code> or <code>date-array</code>, <code>mean</code> is the
* string representation of a date with the format specified in <a
* href="http://tools.ietf.org/html/rfc3339">IETF RFC3339</a>:
* yyyy-mm-ddTHH:mm:ss.SSSZ.</p>
*/
inline void SetMean(const char* value) { m_meanHasBeenSet = true; m_mean.assign(value); }
/**
* <p>The average of the values found in the specified field in the result set.</p>
* <p>If the field is numeric (<code>int</code>, <code>int-array</code>,
* <code>double</code>, or <code>double-array</code>), <code>mean</code> is the
* string representation of a double-precision 64-bit floating point value. If the
* field is <code>date</code> or <code>date-array</code>, <code>mean</code> is the
* string representation of a date with the format specified in <a
* href="http://tools.ietf.org/html/rfc3339">IETF RFC3339</a>:
* yyyy-mm-ddTHH:mm:ss.SSSZ.</p>
*/
inline FieldStats& WithMean(const Aws::String& value) { SetMean(value); return *this;}
/**
* <p>The average of the values found in the specified field in the result set.</p>
* <p>If the field is numeric (<code>int</code>, <code>int-array</code>,
* <code>double</code>, or <code>double-array</code>), <code>mean</code> is the
* string representation of a double-precision 64-bit floating point value. If the
* field is <code>date</code> or <code>date-array</code>, <code>mean</code> is the
* string representation of a date with the format specified in <a
* href="http://tools.ietf.org/html/rfc3339">IETF RFC3339</a>:
* yyyy-mm-ddTHH:mm:ss.SSSZ.</p>
*/
inline FieldStats& WithMean(Aws::String&& value) { SetMean(std::move(value)); return *this;}
/**
* <p>The average of the values found in the specified field in the result set.</p>
* <p>If the field is numeric (<code>int</code>, <code>int-array</code>,
* <code>double</code>, or <code>double-array</code>), <code>mean</code> is the
* string representation of a double-precision 64-bit floating point value. If the
* field is <code>date</code> or <code>date-array</code>, <code>mean</code> is the
* string representation of a date with the format specified in <a
* href="http://tools.ietf.org/html/rfc3339">IETF RFC3339</a>:
* yyyy-mm-ddTHH:mm:ss.SSSZ.</p>
*/
inline FieldStats& WithMean(const char* value) { SetMean(value); return *this;}
/**
* <p>The standard deviation of the values in the specified field in the result
* set.</p>
*/
inline double GetStddev() const{ return m_stddev; }
/**
* <p>The standard deviation of the values in the specified field in the result
* set.</p>
*/
inline bool StddevHasBeenSet() const { return m_stddevHasBeenSet; }
/**
* <p>The standard deviation of the values in the specified field in the result
* set.</p>
*/
inline void SetStddev(double value) { m_stddevHasBeenSet = true; m_stddev = value; }
/**
* <p>The standard deviation of the values in the specified field in the result
* set.</p>
*/
inline FieldStats& WithStddev(double value) { SetStddev(value); return *this;}
private:
Aws::String m_min;
bool m_minHasBeenSet;
Aws::String m_max;
bool m_maxHasBeenSet;
long long m_count;
bool m_countHasBeenSet;
long long m_missing;
bool m_missingHasBeenSet;
double m_sum;
bool m_sumHasBeenSet;
double m_sumOfSquares;
bool m_sumOfSquaresHasBeenSet;
Aws::String m_mean;
bool m_meanHasBeenSet;
double m_stddev;
bool m_stddevHasBeenSet;
};
} // namespace Model
} // namespace CloudSearchDomain
} // namespace Aws

View File

@@ -0,0 +1,293 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/cloudsearchdomain/CloudSearchDomain_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSMap.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 CloudSearchDomain
{
namespace Model
{
/**
* <p>Information about a document that matches the search request.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/cloudsearchdomain-2013-01-01/Hit">AWS
* API Reference</a></p>
*/
class AWS_CLOUDSEARCHDOMAIN_API Hit
{
public:
Hit();
Hit(Aws::Utils::Json::JsonView jsonValue);
Hit& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The document ID of a document that matches the search request.</p>
*/
inline const Aws::String& GetId() const{ return m_id; }
/**
* <p>The document ID of a document that matches the search request.</p>
*/
inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
/**
* <p>The document ID of a document that matches the search request.</p>
*/
inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; }
/**
* <p>The document ID of a document that matches the search request.</p>
*/
inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); }
/**
* <p>The document ID of a document that matches the search request.</p>
*/
inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); }
/**
* <p>The document ID of a document that matches the search request.</p>
*/
inline Hit& WithId(const Aws::String& value) { SetId(value); return *this;}
/**
* <p>The document ID of a document that matches the search request.</p>
*/
inline Hit& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;}
/**
* <p>The document ID of a document that matches the search request.</p>
*/
inline Hit& WithId(const char* value) { SetId(value); return *this;}
/**
* <p>The fields returned from a document that matches the search request.</p>
*/
inline const Aws::Map<Aws::String, Aws::Vector<Aws::String>>& GetFields() const{ return m_fields; }
/**
* <p>The fields returned from a document that matches the search request.</p>
*/
inline bool FieldsHasBeenSet() const { return m_fieldsHasBeenSet; }
/**
* <p>The fields returned from a document that matches the search request.</p>
*/
inline void SetFields(const Aws::Map<Aws::String, Aws::Vector<Aws::String>>& value) { m_fieldsHasBeenSet = true; m_fields = value; }
/**
* <p>The fields returned from a document that matches the search request.</p>
*/
inline void SetFields(Aws::Map<Aws::String, Aws::Vector<Aws::String>>&& value) { m_fieldsHasBeenSet = true; m_fields = std::move(value); }
/**
* <p>The fields returned from a document that matches the search request.</p>
*/
inline Hit& WithFields(const Aws::Map<Aws::String, Aws::Vector<Aws::String>>& value) { SetFields(value); return *this;}
/**
* <p>The fields returned from a document that matches the search request.</p>
*/
inline Hit& WithFields(Aws::Map<Aws::String, Aws::Vector<Aws::String>>&& value) { SetFields(std::move(value)); return *this;}
/**
* <p>The fields returned from a document that matches the search request.</p>
*/
inline Hit& AddFields(const Aws::String& key, const Aws::Vector<Aws::String>& value) { m_fieldsHasBeenSet = true; m_fields.emplace(key, value); return *this; }
/**
* <p>The fields returned from a document that matches the search request.</p>
*/
inline Hit& AddFields(Aws::String&& key, const Aws::Vector<Aws::String>& value) { m_fieldsHasBeenSet = true; m_fields.emplace(std::move(key), value); return *this; }
/**
* <p>The fields returned from a document that matches the search request.</p>
*/
inline Hit& AddFields(const Aws::String& key, Aws::Vector<Aws::String>&& value) { m_fieldsHasBeenSet = true; m_fields.emplace(key, std::move(value)); return *this; }
/**
* <p>The fields returned from a document that matches the search request.</p>
*/
inline Hit& AddFields(Aws::String&& key, Aws::Vector<Aws::String>&& value) { m_fieldsHasBeenSet = true; m_fields.emplace(std::move(key), std::move(value)); return *this; }
/**
* <p>The fields returned from a document that matches the search request.</p>
*/
inline Hit& AddFields(const char* key, Aws::Vector<Aws::String>&& value) { m_fieldsHasBeenSet = true; m_fields.emplace(key, std::move(value)); return *this; }
/**
* <p>The fields returned from a document that matches the search request.</p>
*/
inline Hit& AddFields(const char* key, const Aws::Vector<Aws::String>& value) { m_fieldsHasBeenSet = true; m_fields.emplace(key, value); return *this; }
/**
* <p>The expressions returned from a document that matches the search request.</p>
*/
inline const Aws::Map<Aws::String, Aws::String>& GetExprs() const{ return m_exprs; }
/**
* <p>The expressions returned from a document that matches the search request.</p>
*/
inline bool ExprsHasBeenSet() const { return m_exprsHasBeenSet; }
/**
* <p>The expressions returned from a document that matches the search request.</p>
*/
inline void SetExprs(const Aws::Map<Aws::String, Aws::String>& value) { m_exprsHasBeenSet = true; m_exprs = value; }
/**
* <p>The expressions returned from a document that matches the search request.</p>
*/
inline void SetExprs(Aws::Map<Aws::String, Aws::String>&& value) { m_exprsHasBeenSet = true; m_exprs = std::move(value); }
/**
* <p>The expressions returned from a document that matches the search request.</p>
*/
inline Hit& WithExprs(const Aws::Map<Aws::String, Aws::String>& value) { SetExprs(value); return *this;}
/**
* <p>The expressions returned from a document that matches the search request.</p>
*/
inline Hit& WithExprs(Aws::Map<Aws::String, Aws::String>&& value) { SetExprs(std::move(value)); return *this;}
/**
* <p>The expressions returned from a document that matches the search request.</p>
*/
inline Hit& AddExprs(const Aws::String& key, const Aws::String& value) { m_exprsHasBeenSet = true; m_exprs.emplace(key, value); return *this; }
/**
* <p>The expressions returned from a document that matches the search request.</p>
*/
inline Hit& AddExprs(Aws::String&& key, const Aws::String& value) { m_exprsHasBeenSet = true; m_exprs.emplace(std::move(key), value); return *this; }
/**
* <p>The expressions returned from a document that matches the search request.</p>
*/
inline Hit& AddExprs(const Aws::String& key, Aws::String&& value) { m_exprsHasBeenSet = true; m_exprs.emplace(key, std::move(value)); return *this; }
/**
* <p>The expressions returned from a document that matches the search request.</p>
*/
inline Hit& AddExprs(Aws::String&& key, Aws::String&& value) { m_exprsHasBeenSet = true; m_exprs.emplace(std::move(key), std::move(value)); return *this; }
/**
* <p>The expressions returned from a document that matches the search request.</p>
*/
inline Hit& AddExprs(const char* key, Aws::String&& value) { m_exprsHasBeenSet = true; m_exprs.emplace(key, std::move(value)); return *this; }
/**
* <p>The expressions returned from a document that matches the search request.</p>
*/
inline Hit& AddExprs(Aws::String&& key, const char* value) { m_exprsHasBeenSet = true; m_exprs.emplace(std::move(key), value); return *this; }
/**
* <p>The expressions returned from a document that matches the search request.</p>
*/
inline Hit& AddExprs(const char* key, const char* value) { m_exprsHasBeenSet = true; m_exprs.emplace(key, value); return *this; }
/**
* <p>The highlights returned from a document that matches the search request.</p>
*/
inline const Aws::Map<Aws::String, Aws::String>& GetHighlights() const{ return m_highlights; }
/**
* <p>The highlights returned from a document that matches the search request.</p>
*/
inline bool HighlightsHasBeenSet() const { return m_highlightsHasBeenSet; }
/**
* <p>The highlights returned from a document that matches the search request.</p>
*/
inline void SetHighlights(const Aws::Map<Aws::String, Aws::String>& value) { m_highlightsHasBeenSet = true; m_highlights = value; }
/**
* <p>The highlights returned from a document that matches the search request.</p>
*/
inline void SetHighlights(Aws::Map<Aws::String, Aws::String>&& value) { m_highlightsHasBeenSet = true; m_highlights = std::move(value); }
/**
* <p>The highlights returned from a document that matches the search request.</p>
*/
inline Hit& WithHighlights(const Aws::Map<Aws::String, Aws::String>& value) { SetHighlights(value); return *this;}
/**
* <p>The highlights returned from a document that matches the search request.</p>
*/
inline Hit& WithHighlights(Aws::Map<Aws::String, Aws::String>&& value) { SetHighlights(std::move(value)); return *this;}
/**
* <p>The highlights returned from a document that matches the search request.</p>
*/
inline Hit& AddHighlights(const Aws::String& key, const Aws::String& value) { m_highlightsHasBeenSet = true; m_highlights.emplace(key, value); return *this; }
/**
* <p>The highlights returned from a document that matches the search request.</p>
*/
inline Hit& AddHighlights(Aws::String&& key, const Aws::String& value) { m_highlightsHasBeenSet = true; m_highlights.emplace(std::move(key), value); return *this; }
/**
* <p>The highlights returned from a document that matches the search request.</p>
*/
inline Hit& AddHighlights(const Aws::String& key, Aws::String&& value) { m_highlightsHasBeenSet = true; m_highlights.emplace(key, std::move(value)); return *this; }
/**
* <p>The highlights returned from a document that matches the search request.</p>
*/
inline Hit& AddHighlights(Aws::String&& key, Aws::String&& value) { m_highlightsHasBeenSet = true; m_highlights.emplace(std::move(key), std::move(value)); return *this; }
/**
* <p>The highlights returned from a document that matches the search request.</p>
*/
inline Hit& AddHighlights(const char* key, Aws::String&& value) { m_highlightsHasBeenSet = true; m_highlights.emplace(key, std::move(value)); return *this; }
/**
* <p>The highlights returned from a document that matches the search request.</p>
*/
inline Hit& AddHighlights(Aws::String&& key, const char* value) { m_highlightsHasBeenSet = true; m_highlights.emplace(std::move(key), value); return *this; }
/**
* <p>The highlights returned from a document that matches the search request.</p>
*/
inline Hit& AddHighlights(const char* key, const char* value) { m_highlightsHasBeenSet = true; m_highlights.emplace(key, value); return *this; }
private:
Aws::String m_id;
bool m_idHasBeenSet;
Aws::Map<Aws::String, Aws::Vector<Aws::String>> m_fields;
bool m_fieldsHasBeenSet;
Aws::Map<Aws::String, Aws::String> m_exprs;
bool m_exprsHasBeenSet;
Aws::Map<Aws::String, Aws::String> m_highlights;
bool m_highlightsHasBeenSet;
};
} // namespace Model
} // namespace CloudSearchDomain
} // namespace Aws

View File

@@ -0,0 +1,191 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/cloudsearchdomain/CloudSearchDomain_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/cloudsearchdomain/model/Hit.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace CloudSearchDomain
{
namespace Model
{
/**
* <p>The collection of documents that match the search request.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/cloudsearchdomain-2013-01-01/Hits">AWS
* API Reference</a></p>
*/
class AWS_CLOUDSEARCHDOMAIN_API Hits
{
public:
Hits();
Hits(Aws::Utils::Json::JsonView jsonValue);
Hits& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The total number of documents that match the search request.</p>
*/
inline long long GetFound() const{ return m_found; }
/**
* <p>The total number of documents that match the search request.</p>
*/
inline bool FoundHasBeenSet() const { return m_foundHasBeenSet; }
/**
* <p>The total number of documents that match the search request.</p>
*/
inline void SetFound(long long value) { m_foundHasBeenSet = true; m_found = value; }
/**
* <p>The total number of documents that match the search request.</p>
*/
inline Hits& WithFound(long long value) { SetFound(value); return *this;}
/**
* <p>The index of the first matching document.</p>
*/
inline long long GetStart() const{ return m_start; }
/**
* <p>The index of the first matching document.</p>
*/
inline bool StartHasBeenSet() const { return m_startHasBeenSet; }
/**
* <p>The index of the first matching document.</p>
*/
inline void SetStart(long long value) { m_startHasBeenSet = true; m_start = value; }
/**
* <p>The index of the first matching document.</p>
*/
inline Hits& WithStart(long long value) { SetStart(value); return *this;}
/**
* <p>A cursor that can be used to retrieve the next set of matching documents when
* you want to page through a large result set.</p>
*/
inline const Aws::String& GetCursor() const{ return m_cursor; }
/**
* <p>A cursor that can be used to retrieve the next set of matching documents when
* you want to page through a large result set.</p>
*/
inline bool CursorHasBeenSet() const { return m_cursorHasBeenSet; }
/**
* <p>A cursor that can be used to retrieve the next set of matching documents when
* you want to page through a large result set.</p>
*/
inline void SetCursor(const Aws::String& value) { m_cursorHasBeenSet = true; m_cursor = value; }
/**
* <p>A cursor that can be used to retrieve the next set of matching documents when
* you want to page through a large result set.</p>
*/
inline void SetCursor(Aws::String&& value) { m_cursorHasBeenSet = true; m_cursor = std::move(value); }
/**
* <p>A cursor that can be used to retrieve the next set of matching documents when
* you want to page through a large result set.</p>
*/
inline void SetCursor(const char* value) { m_cursorHasBeenSet = true; m_cursor.assign(value); }
/**
* <p>A cursor that can be used to retrieve the next set of matching documents when
* you want to page through a large result set.</p>
*/
inline Hits& WithCursor(const Aws::String& value) { SetCursor(value); return *this;}
/**
* <p>A cursor that can be used to retrieve the next set of matching documents when
* you want to page through a large result set.</p>
*/
inline Hits& WithCursor(Aws::String&& value) { SetCursor(std::move(value)); return *this;}
/**
* <p>A cursor that can be used to retrieve the next set of matching documents when
* you want to page through a large result set.</p>
*/
inline Hits& WithCursor(const char* value) { SetCursor(value); return *this;}
/**
* <p>A document that matches the search request.</p>
*/
inline const Aws::Vector<Hit>& GetHit() const{ return m_hit; }
/**
* <p>A document that matches the search request.</p>
*/
inline bool HitHasBeenSet() const { return m_hitHasBeenSet; }
/**
* <p>A document that matches the search request.</p>
*/
inline void SetHit(const Aws::Vector<Hit>& value) { m_hitHasBeenSet = true; m_hit = value; }
/**
* <p>A document that matches the search request.</p>
*/
inline void SetHit(Aws::Vector<Hit>&& value) { m_hitHasBeenSet = true; m_hit = std::move(value); }
/**
* <p>A document that matches the search request.</p>
*/
inline Hits& WithHit(const Aws::Vector<Hit>& value) { SetHit(value); return *this;}
/**
* <p>A document that matches the search request.</p>
*/
inline Hits& WithHit(Aws::Vector<Hit>&& value) { SetHit(std::move(value)); return *this;}
/**
* <p>A document that matches the search request.</p>
*/
inline Hits& AddHit(const Hit& value) { m_hitHasBeenSet = true; m_hit.push_back(value); return *this; }
/**
* <p>A document that matches the search request.</p>
*/
inline Hits& AddHit(Hit&& value) { m_hitHasBeenSet = true; m_hit.push_back(std::move(value)); return *this; }
private:
long long m_found;
bool m_foundHasBeenSet;
long long m_start;
bool m_startHasBeenSet;
Aws::String m_cursor;
bool m_cursorHasBeenSet;
Aws::Vector<Hit> m_hit;
bool m_hitHasBeenSet;
};
} // namespace Model
} // namespace CloudSearchDomain
} // namespace Aws

View File

@@ -0,0 +1,33 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/cloudsearchdomain/CloudSearchDomain_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace CloudSearchDomain
{
namespace Model
{
enum class QueryParser
{
NOT_SET,
simple,
structured,
lucene,
dismax
};
namespace QueryParserMapper
{
AWS_CLOUDSEARCHDOMAIN_API QueryParser GetQueryParserForName(const Aws::String& name);
AWS_CLOUDSEARCHDOMAIN_API Aws::String GetNameForQueryParser(QueryParser value);
} // namespace QueryParserMapper
} // namespace Model
} // namespace CloudSearchDomain
} // namespace Aws

View File

@@ -0,0 +1,223 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/cloudsearchdomain/CloudSearchDomain_EXPORTS.h>
#include <aws/cloudsearchdomain/model/SearchStatus.h>
#include <aws/cloudsearchdomain/model/Hits.h>
#include <aws/core/utils/memory/stl/AWSMap.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/cloudsearchdomain/model/BucketInfo.h>
#include <aws/cloudsearchdomain/model/FieldStats.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace CloudSearchDomain
{
namespace Model
{
/**
* <p>The result of a <code>Search</code> request. Contains the documents that
* match the specified search criteria and any requested fields, highlights, and
* facet information.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/cloudsearchdomain-2013-01-01/SearchResponse">AWS
* API Reference</a></p>
*/
class AWS_CLOUDSEARCHDOMAIN_API SearchResult
{
public:
SearchResult();
SearchResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
SearchResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>The status information returned for the search request.</p>
*/
inline const SearchStatus& GetStatus() const{ return m_status; }
/**
* <p>The status information returned for the search request.</p>
*/
inline void SetStatus(const SearchStatus& value) { m_status = value; }
/**
* <p>The status information returned for the search request.</p>
*/
inline void SetStatus(SearchStatus&& value) { m_status = std::move(value); }
/**
* <p>The status information returned for the search request.</p>
*/
inline SearchResult& WithStatus(const SearchStatus& value) { SetStatus(value); return *this;}
/**
* <p>The status information returned for the search request.</p>
*/
inline SearchResult& WithStatus(SearchStatus&& value) { SetStatus(std::move(value)); return *this;}
/**
* <p>The documents that match the search criteria.</p>
*/
inline const Hits& GetHits() const{ return m_hits; }
/**
* <p>The documents that match the search criteria.</p>
*/
inline void SetHits(const Hits& value) { m_hits = value; }
/**
* <p>The documents that match the search criteria.</p>
*/
inline void SetHits(Hits&& value) { m_hits = std::move(value); }
/**
* <p>The documents that match the search criteria.</p>
*/
inline SearchResult& WithHits(const Hits& value) { SetHits(value); return *this;}
/**
* <p>The documents that match the search criteria.</p>
*/
inline SearchResult& WithHits(Hits&& value) { SetHits(std::move(value)); return *this;}
/**
* <p>The requested facet information.</p>
*/
inline const Aws::Map<Aws::String, BucketInfo>& GetFacets() const{ return m_facets; }
/**
* <p>The requested facet information.</p>
*/
inline void SetFacets(const Aws::Map<Aws::String, BucketInfo>& value) { m_facets = value; }
/**
* <p>The requested facet information.</p>
*/
inline void SetFacets(Aws::Map<Aws::String, BucketInfo>&& value) { m_facets = std::move(value); }
/**
* <p>The requested facet information.</p>
*/
inline SearchResult& WithFacets(const Aws::Map<Aws::String, BucketInfo>& value) { SetFacets(value); return *this;}
/**
* <p>The requested facet information.</p>
*/
inline SearchResult& WithFacets(Aws::Map<Aws::String, BucketInfo>&& value) { SetFacets(std::move(value)); return *this;}
/**
* <p>The requested facet information.</p>
*/
inline SearchResult& AddFacets(const Aws::String& key, const BucketInfo& value) { m_facets.emplace(key, value); return *this; }
/**
* <p>The requested facet information.</p>
*/
inline SearchResult& AddFacets(Aws::String&& key, const BucketInfo& value) { m_facets.emplace(std::move(key), value); return *this; }
/**
* <p>The requested facet information.</p>
*/
inline SearchResult& AddFacets(const Aws::String& key, BucketInfo&& value) { m_facets.emplace(key, std::move(value)); return *this; }
/**
* <p>The requested facet information.</p>
*/
inline SearchResult& AddFacets(Aws::String&& key, BucketInfo&& value) { m_facets.emplace(std::move(key), std::move(value)); return *this; }
/**
* <p>The requested facet information.</p>
*/
inline SearchResult& AddFacets(const char* key, BucketInfo&& value) { m_facets.emplace(key, std::move(value)); return *this; }
/**
* <p>The requested facet information.</p>
*/
inline SearchResult& AddFacets(const char* key, const BucketInfo& value) { m_facets.emplace(key, value); return *this; }
/**
* <p>The requested field statistics information.</p>
*/
inline const Aws::Map<Aws::String, FieldStats>& GetStats() const{ return m_stats; }
/**
* <p>The requested field statistics information.</p>
*/
inline void SetStats(const Aws::Map<Aws::String, FieldStats>& value) { m_stats = value; }
/**
* <p>The requested field statistics information.</p>
*/
inline void SetStats(Aws::Map<Aws::String, FieldStats>&& value) { m_stats = std::move(value); }
/**
* <p>The requested field statistics information.</p>
*/
inline SearchResult& WithStats(const Aws::Map<Aws::String, FieldStats>& value) { SetStats(value); return *this;}
/**
* <p>The requested field statistics information.</p>
*/
inline SearchResult& WithStats(Aws::Map<Aws::String, FieldStats>&& value) { SetStats(std::move(value)); return *this;}
/**
* <p>The requested field statistics information.</p>
*/
inline SearchResult& AddStats(const Aws::String& key, const FieldStats& value) { m_stats.emplace(key, value); return *this; }
/**
* <p>The requested field statistics information.</p>
*/
inline SearchResult& AddStats(Aws::String&& key, const FieldStats& value) { m_stats.emplace(std::move(key), value); return *this; }
/**
* <p>The requested field statistics information.</p>
*/
inline SearchResult& AddStats(const Aws::String& key, FieldStats&& value) { m_stats.emplace(key, std::move(value)); return *this; }
/**
* <p>The requested field statistics information.</p>
*/
inline SearchResult& AddStats(Aws::String&& key, FieldStats&& value) { m_stats.emplace(std::move(key), std::move(value)); return *this; }
/**
* <p>The requested field statistics information.</p>
*/
inline SearchResult& AddStats(const char* key, FieldStats&& value) { m_stats.emplace(key, std::move(value)); return *this; }
/**
* <p>The requested field statistics information.</p>
*/
inline SearchResult& AddStats(const char* key, const FieldStats& value) { m_stats.emplace(key, value); return *this; }
private:
SearchStatus m_status;
Hits m_hits;
Aws::Map<Aws::String, BucketInfo> m_facets;
Aws::Map<Aws::String, FieldStats> m_stats;
};
} // namespace Model
} // namespace CloudSearchDomain
} // namespace Aws

View File

@@ -0,0 +1,113 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/cloudsearchdomain/CloudSearchDomain_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace CloudSearchDomain
{
namespace Model
{
/**
* <p>Contains the resource id (<code>rid</code>) and the time it took to process
* the request (<code>timems</code>).</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/cloudsearchdomain-2013-01-01/SearchStatus">AWS
* API Reference</a></p>
*/
class AWS_CLOUDSEARCHDOMAIN_API SearchStatus
{
public:
SearchStatus();
SearchStatus(Aws::Utils::Json::JsonView jsonValue);
SearchStatus& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>How long it took to process the request, in milliseconds.</p>
*/
inline long long GetTimems() const{ return m_timems; }
/**
* <p>How long it took to process the request, in milliseconds.</p>
*/
inline bool TimemsHasBeenSet() const { return m_timemsHasBeenSet; }
/**
* <p>How long it took to process the request, in milliseconds.</p>
*/
inline void SetTimems(long long value) { m_timemsHasBeenSet = true; m_timems = value; }
/**
* <p>How long it took to process the request, in milliseconds.</p>
*/
inline SearchStatus& WithTimems(long long value) { SetTimems(value); return *this;}
/**
* <p>The encrypted resource ID for the request.</p>
*/
inline const Aws::String& GetRid() const{ return m_rid; }
/**
* <p>The encrypted resource ID for the request.</p>
*/
inline bool RidHasBeenSet() const { return m_ridHasBeenSet; }
/**
* <p>The encrypted resource ID for the request.</p>
*/
inline void SetRid(const Aws::String& value) { m_ridHasBeenSet = true; m_rid = value; }
/**
* <p>The encrypted resource ID for the request.</p>
*/
inline void SetRid(Aws::String&& value) { m_ridHasBeenSet = true; m_rid = std::move(value); }
/**
* <p>The encrypted resource ID for the request.</p>
*/
inline void SetRid(const char* value) { m_ridHasBeenSet = true; m_rid.assign(value); }
/**
* <p>The encrypted resource ID for the request.</p>
*/
inline SearchStatus& WithRid(const Aws::String& value) { SetRid(value); return *this;}
/**
* <p>The encrypted resource ID for the request.</p>
*/
inline SearchStatus& WithRid(Aws::String&& value) { SetRid(std::move(value)); return *this;}
/**
* <p>The encrypted resource ID for the request.</p>
*/
inline SearchStatus& WithRid(const char* value) { SetRid(value); return *this;}
private:
long long m_timems;
bool m_timemsHasBeenSet;
Aws::String m_rid;
bool m_ridHasBeenSet;
};
} // namespace Model
} // namespace CloudSearchDomain
} // namespace Aws

View File

@@ -0,0 +1,159 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/cloudsearchdomain/CloudSearchDomain_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/cloudsearchdomain/model/SuggestionMatch.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace CloudSearchDomain
{
namespace Model
{
/**
* <p>Container for the suggestion information returned in a
* <code>SuggestResponse</code>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/cloudsearchdomain-2013-01-01/SuggestModel">AWS
* API Reference</a></p>
*/
class AWS_CLOUDSEARCHDOMAIN_API SuggestModel
{
public:
SuggestModel();
SuggestModel(Aws::Utils::Json::JsonView jsonValue);
SuggestModel& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The query string specified in the suggest request.</p>
*/
inline const Aws::String& GetQuery() const{ return m_query; }
/**
* <p>The query string specified in the suggest request.</p>
*/
inline bool QueryHasBeenSet() const { return m_queryHasBeenSet; }
/**
* <p>The query string specified in the suggest request.</p>
*/
inline void SetQuery(const Aws::String& value) { m_queryHasBeenSet = true; m_query = value; }
/**
* <p>The query string specified in the suggest request.</p>
*/
inline void SetQuery(Aws::String&& value) { m_queryHasBeenSet = true; m_query = std::move(value); }
/**
* <p>The query string specified in the suggest request.</p>
*/
inline void SetQuery(const char* value) { m_queryHasBeenSet = true; m_query.assign(value); }
/**
* <p>The query string specified in the suggest request.</p>
*/
inline SuggestModel& WithQuery(const Aws::String& value) { SetQuery(value); return *this;}
/**
* <p>The query string specified in the suggest request.</p>
*/
inline SuggestModel& WithQuery(Aws::String&& value) { SetQuery(std::move(value)); return *this;}
/**
* <p>The query string specified in the suggest request.</p>
*/
inline SuggestModel& WithQuery(const char* value) { SetQuery(value); return *this;}
/**
* <p>The number of documents that were found to match the query string.</p>
*/
inline long long GetFound() const{ return m_found; }
/**
* <p>The number of documents that were found to match the query string.</p>
*/
inline bool FoundHasBeenSet() const { return m_foundHasBeenSet; }
/**
* <p>The number of documents that were found to match the query string.</p>
*/
inline void SetFound(long long value) { m_foundHasBeenSet = true; m_found = value; }
/**
* <p>The number of documents that were found to match the query string.</p>
*/
inline SuggestModel& WithFound(long long value) { SetFound(value); return *this;}
/**
* <p>The documents that match the query string.</p>
*/
inline const Aws::Vector<SuggestionMatch>& GetSuggestions() const{ return m_suggestions; }
/**
* <p>The documents that match the query string.</p>
*/
inline bool SuggestionsHasBeenSet() const { return m_suggestionsHasBeenSet; }
/**
* <p>The documents that match the query string.</p>
*/
inline void SetSuggestions(const Aws::Vector<SuggestionMatch>& value) { m_suggestionsHasBeenSet = true; m_suggestions = value; }
/**
* <p>The documents that match the query string.</p>
*/
inline void SetSuggestions(Aws::Vector<SuggestionMatch>&& value) { m_suggestionsHasBeenSet = true; m_suggestions = std::move(value); }
/**
* <p>The documents that match the query string.</p>
*/
inline SuggestModel& WithSuggestions(const Aws::Vector<SuggestionMatch>& value) { SetSuggestions(value); return *this;}
/**
* <p>The documents that match the query string.</p>
*/
inline SuggestModel& WithSuggestions(Aws::Vector<SuggestionMatch>&& value) { SetSuggestions(std::move(value)); return *this;}
/**
* <p>The documents that match the query string.</p>
*/
inline SuggestModel& AddSuggestions(const SuggestionMatch& value) { m_suggestionsHasBeenSet = true; m_suggestions.push_back(value); return *this; }
/**
* <p>The documents that match the query string.</p>
*/
inline SuggestModel& AddSuggestions(SuggestionMatch&& value) { m_suggestionsHasBeenSet = true; m_suggestions.push_back(std::move(value)); return *this; }
private:
Aws::String m_query;
bool m_queryHasBeenSet;
long long m_found;
bool m_foundHasBeenSet;
Aws::Vector<SuggestionMatch> m_suggestions;
bool m_suggestionsHasBeenSet;
};
} // namespace Model
} // namespace CloudSearchDomain
} // namespace Aws

View File

@@ -0,0 +1,161 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/cloudsearchdomain/CloudSearchDomain_EXPORTS.h>
#include <aws/cloudsearchdomain/CloudSearchDomainRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Http
{
class URI;
} //namespace Http
namespace CloudSearchDomain
{
namespace Model
{
/**
* <p>Container for the parameters to the <code>Suggest</code>
* request.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/cloudsearchdomain-2013-01-01/SuggestRequest">AWS
* API Reference</a></p>
*/
class AWS_CLOUDSEARCHDOMAIN_API SuggestRequest : public CloudSearchDomainRequest
{
public:
SuggestRequest();
// 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 "Suggest"; }
Aws::String SerializePayload() const override;
void AddQueryStringParameters(Aws::Http::URI& uri) const override;
/**
* <p>Specifies the string for which you want to get suggestions.</p>
*/
inline const Aws::String& GetQuery() const{ return m_query; }
/**
* <p>Specifies the string for which you want to get suggestions.</p>
*/
inline bool QueryHasBeenSet() const { return m_queryHasBeenSet; }
/**
* <p>Specifies the string for which you want to get suggestions.</p>
*/
inline void SetQuery(const Aws::String& value) { m_queryHasBeenSet = true; m_query = value; }
/**
* <p>Specifies the string for which you want to get suggestions.</p>
*/
inline void SetQuery(Aws::String&& value) { m_queryHasBeenSet = true; m_query = std::move(value); }
/**
* <p>Specifies the string for which you want to get suggestions.</p>
*/
inline void SetQuery(const char* value) { m_queryHasBeenSet = true; m_query.assign(value); }
/**
* <p>Specifies the string for which you want to get suggestions.</p>
*/
inline SuggestRequest& WithQuery(const Aws::String& value) { SetQuery(value); return *this;}
/**
* <p>Specifies the string for which you want to get suggestions.</p>
*/
inline SuggestRequest& WithQuery(Aws::String&& value) { SetQuery(std::move(value)); return *this;}
/**
* <p>Specifies the string for which you want to get suggestions.</p>
*/
inline SuggestRequest& WithQuery(const char* value) { SetQuery(value); return *this;}
/**
* <p>Specifies the name of the suggester to use to find suggested matches.</p>
*/
inline const Aws::String& GetSuggester() const{ return m_suggester; }
/**
* <p>Specifies the name of the suggester to use to find suggested matches.</p>
*/
inline bool SuggesterHasBeenSet() const { return m_suggesterHasBeenSet; }
/**
* <p>Specifies the name of the suggester to use to find suggested matches.</p>
*/
inline void SetSuggester(const Aws::String& value) { m_suggesterHasBeenSet = true; m_suggester = value; }
/**
* <p>Specifies the name of the suggester to use to find suggested matches.</p>
*/
inline void SetSuggester(Aws::String&& value) { m_suggesterHasBeenSet = true; m_suggester = std::move(value); }
/**
* <p>Specifies the name of the suggester to use to find suggested matches.</p>
*/
inline void SetSuggester(const char* value) { m_suggesterHasBeenSet = true; m_suggester.assign(value); }
/**
* <p>Specifies the name of the suggester to use to find suggested matches.</p>
*/
inline SuggestRequest& WithSuggester(const Aws::String& value) { SetSuggester(value); return *this;}
/**
* <p>Specifies the name of the suggester to use to find suggested matches.</p>
*/
inline SuggestRequest& WithSuggester(Aws::String&& value) { SetSuggester(std::move(value)); return *this;}
/**
* <p>Specifies the name of the suggester to use to find suggested matches.</p>
*/
inline SuggestRequest& WithSuggester(const char* value) { SetSuggester(value); return *this;}
/**
* <p>Specifies the maximum number of suggestions to return. </p>
*/
inline long long GetSize() const{ return m_size; }
/**
* <p>Specifies the maximum number of suggestions to return. </p>
*/
inline bool SizeHasBeenSet() const { return m_sizeHasBeenSet; }
/**
* <p>Specifies the maximum number of suggestions to return. </p>
*/
inline void SetSize(long long value) { m_sizeHasBeenSet = true; m_size = value; }
/**
* <p>Specifies the maximum number of suggestions to return. </p>
*/
inline SuggestRequest& WithSize(long long value) { SetSize(value); return *this;}
private:
Aws::String m_query;
bool m_queryHasBeenSet;
Aws::String m_suggester;
bool m_suggesterHasBeenSet;
long long m_size;
bool m_sizeHasBeenSet;
};
} // namespace Model
} // namespace CloudSearchDomain
} // namespace Aws

View File

@@ -0,0 +1,112 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/cloudsearchdomain/CloudSearchDomain_EXPORTS.h>
#include <aws/cloudsearchdomain/model/SuggestStatus.h>
#include <aws/cloudsearchdomain/model/SuggestModel.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace CloudSearchDomain
{
namespace Model
{
/**
* <p>Contains the response to a <code>Suggest</code> request.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/cloudsearchdomain-2013-01-01/SuggestResponse">AWS
* API Reference</a></p>
*/
class AWS_CLOUDSEARCHDOMAIN_API SuggestResult
{
public:
SuggestResult();
SuggestResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
SuggestResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>The status of a <code>SuggestRequest</code>. Contains the resource ID
* (<code>rid</code>) and how long it took to process the request
* (<code>timems</code>).</p>
*/
inline const SuggestStatus& GetStatus() const{ return m_status; }
/**
* <p>The status of a <code>SuggestRequest</code>. Contains the resource ID
* (<code>rid</code>) and how long it took to process the request
* (<code>timems</code>).</p>
*/
inline void SetStatus(const SuggestStatus& value) { m_status = value; }
/**
* <p>The status of a <code>SuggestRequest</code>. Contains the resource ID
* (<code>rid</code>) and how long it took to process the request
* (<code>timems</code>).</p>
*/
inline void SetStatus(SuggestStatus&& value) { m_status = std::move(value); }
/**
* <p>The status of a <code>SuggestRequest</code>. Contains the resource ID
* (<code>rid</code>) and how long it took to process the request
* (<code>timems</code>).</p>
*/
inline SuggestResult& WithStatus(const SuggestStatus& value) { SetStatus(value); return *this;}
/**
* <p>The status of a <code>SuggestRequest</code>. Contains the resource ID
* (<code>rid</code>) and how long it took to process the request
* (<code>timems</code>).</p>
*/
inline SuggestResult& WithStatus(SuggestStatus&& value) { SetStatus(std::move(value)); return *this;}
/**
* <p>Container for the matching search suggestion information.</p>
*/
inline const SuggestModel& GetSuggest() const{ return m_suggest; }
/**
* <p>Container for the matching search suggestion information.</p>
*/
inline void SetSuggest(const SuggestModel& value) { m_suggest = value; }
/**
* <p>Container for the matching search suggestion information.</p>
*/
inline void SetSuggest(SuggestModel&& value) { m_suggest = std::move(value); }
/**
* <p>Container for the matching search suggestion information.</p>
*/
inline SuggestResult& WithSuggest(const SuggestModel& value) { SetSuggest(value); return *this;}
/**
* <p>Container for the matching search suggestion information.</p>
*/
inline SuggestResult& WithSuggest(SuggestModel&& value) { SetSuggest(std::move(value)); return *this;}
private:
SuggestStatus m_status;
SuggestModel m_suggest;
};
} // namespace Model
} // namespace CloudSearchDomain
} // namespace Aws

View File

@@ -0,0 +1,113 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/cloudsearchdomain/CloudSearchDomain_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace CloudSearchDomain
{
namespace Model
{
/**
* <p>Contains the resource id (<code>rid</code>) and the time it took to process
* the request (<code>timems</code>).</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/cloudsearchdomain-2013-01-01/SuggestStatus">AWS
* API Reference</a></p>
*/
class AWS_CLOUDSEARCHDOMAIN_API SuggestStatus
{
public:
SuggestStatus();
SuggestStatus(Aws::Utils::Json::JsonView jsonValue);
SuggestStatus& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>How long it took to process the request, in milliseconds.</p>
*/
inline long long GetTimems() const{ return m_timems; }
/**
* <p>How long it took to process the request, in milliseconds.</p>
*/
inline bool TimemsHasBeenSet() const { return m_timemsHasBeenSet; }
/**
* <p>How long it took to process the request, in milliseconds.</p>
*/
inline void SetTimems(long long value) { m_timemsHasBeenSet = true; m_timems = value; }
/**
* <p>How long it took to process the request, in milliseconds.</p>
*/
inline SuggestStatus& WithTimems(long long value) { SetTimems(value); return *this;}
/**
* <p>The encrypted resource ID for the request.</p>
*/
inline const Aws::String& GetRid() const{ return m_rid; }
/**
* <p>The encrypted resource ID for the request.</p>
*/
inline bool RidHasBeenSet() const { return m_ridHasBeenSet; }
/**
* <p>The encrypted resource ID for the request.</p>
*/
inline void SetRid(const Aws::String& value) { m_ridHasBeenSet = true; m_rid = value; }
/**
* <p>The encrypted resource ID for the request.</p>
*/
inline void SetRid(Aws::String&& value) { m_ridHasBeenSet = true; m_rid = std::move(value); }
/**
* <p>The encrypted resource ID for the request.</p>
*/
inline void SetRid(const char* value) { m_ridHasBeenSet = true; m_rid.assign(value); }
/**
* <p>The encrypted resource ID for the request.</p>
*/
inline SuggestStatus& WithRid(const Aws::String& value) { SetRid(value); return *this;}
/**
* <p>The encrypted resource ID for the request.</p>
*/
inline SuggestStatus& WithRid(Aws::String&& value) { SetRid(std::move(value)); return *this;}
/**
* <p>The encrypted resource ID for the request.</p>
*/
inline SuggestStatus& WithRid(const char* value) { SetRid(value); return *this;}
private:
long long m_timems;
bool m_timemsHasBeenSet;
Aws::String m_rid;
bool m_ridHasBeenSet;
};
} // namespace Model
} // namespace CloudSearchDomain
} // namespace Aws

View File

@@ -0,0 +1,165 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/cloudsearchdomain/CloudSearchDomain_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace CloudSearchDomain
{
namespace Model
{
/**
* <p>An autocomplete suggestion that matches the query string specified in a
* <code>SuggestRequest</code>. </p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/cloudsearchdomain-2013-01-01/SuggestionMatch">AWS
* API Reference</a></p>
*/
class AWS_CLOUDSEARCHDOMAIN_API SuggestionMatch
{
public:
SuggestionMatch();
SuggestionMatch(Aws::Utils::Json::JsonView jsonValue);
SuggestionMatch& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>The string that matches the query string specified in the
* <code>SuggestRequest</code>. </p>
*/
inline const Aws::String& GetSuggestion() const{ return m_suggestion; }
/**
* <p>The string that matches the query string specified in the
* <code>SuggestRequest</code>. </p>
*/
inline bool SuggestionHasBeenSet() const { return m_suggestionHasBeenSet; }
/**
* <p>The string that matches the query string specified in the
* <code>SuggestRequest</code>. </p>
*/
inline void SetSuggestion(const Aws::String& value) { m_suggestionHasBeenSet = true; m_suggestion = value; }
/**
* <p>The string that matches the query string specified in the
* <code>SuggestRequest</code>. </p>
*/
inline void SetSuggestion(Aws::String&& value) { m_suggestionHasBeenSet = true; m_suggestion = std::move(value); }
/**
* <p>The string that matches the query string specified in the
* <code>SuggestRequest</code>. </p>
*/
inline void SetSuggestion(const char* value) { m_suggestionHasBeenSet = true; m_suggestion.assign(value); }
/**
* <p>The string that matches the query string specified in the
* <code>SuggestRequest</code>. </p>
*/
inline SuggestionMatch& WithSuggestion(const Aws::String& value) { SetSuggestion(value); return *this;}
/**
* <p>The string that matches the query string specified in the
* <code>SuggestRequest</code>. </p>
*/
inline SuggestionMatch& WithSuggestion(Aws::String&& value) { SetSuggestion(std::move(value)); return *this;}
/**
* <p>The string that matches the query string specified in the
* <code>SuggestRequest</code>. </p>
*/
inline SuggestionMatch& WithSuggestion(const char* value) { SetSuggestion(value); return *this;}
/**
* <p>The relevance score of a suggested match.</p>
*/
inline long long GetScore() const{ return m_score; }
/**
* <p>The relevance score of a suggested match.</p>
*/
inline bool ScoreHasBeenSet() const { return m_scoreHasBeenSet; }
/**
* <p>The relevance score of a suggested match.</p>
*/
inline void SetScore(long long value) { m_scoreHasBeenSet = true; m_score = value; }
/**
* <p>The relevance score of a suggested match.</p>
*/
inline SuggestionMatch& WithScore(long long value) { SetScore(value); return *this;}
/**
* <p>The document ID of the suggested document.</p>
*/
inline const Aws::String& GetId() const{ return m_id; }
/**
* <p>The document ID of the suggested document.</p>
*/
inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
/**
* <p>The document ID of the suggested document.</p>
*/
inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; }
/**
* <p>The document ID of the suggested document.</p>
*/
inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); }
/**
* <p>The document ID of the suggested document.</p>
*/
inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); }
/**
* <p>The document ID of the suggested document.</p>
*/
inline SuggestionMatch& WithId(const Aws::String& value) { SetId(value); return *this;}
/**
* <p>The document ID of the suggested document.</p>
*/
inline SuggestionMatch& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;}
/**
* <p>The document ID of the suggested document.</p>
*/
inline SuggestionMatch& WithId(const char* value) { SetId(value); return *this;}
private:
Aws::String m_suggestion;
bool m_suggestionHasBeenSet;
long long m_score;
bool m_scoreHasBeenSet;
Aws::String m_id;
bool m_idHasBeenSet;
};
} // namespace Model
} // namespace CloudSearchDomain
} // 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/cloudsearchdomain/CloudSearchDomain_EXPORTS.h>
#include <aws/cloudsearchdomain/CloudSearchDomainRequest.h>
#include <aws/core/utils/Array.h>
#include <utility>
namespace Aws
{
namespace CloudSearchDomain
{
namespace Model
{
/**
* <p>Container for the parameters to the <code>UploadDocuments</code>
* request.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/cloudsearchdomain-2013-01-01/UploadDocumentsRequest">AWS
* API Reference</a></p>
*/
class AWS_CLOUDSEARCHDOMAIN_API UploadDocumentsRequest : public StreamingCloudSearchDomainRequest
{
public:
UploadDocumentsRequest();
// 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 "UploadDocuments"; }
private:
};
} // namespace Model
} // namespace CloudSearchDomain
} // namespace Aws

View File

@@ -0,0 +1,166 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/cloudsearchdomain/CloudSearchDomain_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/cloudsearchdomain/model/DocumentServiceWarning.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace CloudSearchDomain
{
namespace Model
{
/**
* <p>Contains the response to an <code>UploadDocuments</code>
* request.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/cloudsearchdomain-2013-01-01/UploadDocumentsResponse">AWS
* API Reference</a></p>
*/
class AWS_CLOUDSEARCHDOMAIN_API UploadDocumentsResult
{
public:
UploadDocumentsResult();
UploadDocumentsResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
UploadDocumentsResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>The status of an <code>UploadDocumentsRequest</code>.</p>
*/
inline const Aws::String& GetStatus() const{ return m_status; }
/**
* <p>The status of an <code>UploadDocumentsRequest</code>.</p>
*/
inline void SetStatus(const Aws::String& value) { m_status = value; }
/**
* <p>The status of an <code>UploadDocumentsRequest</code>.</p>
*/
inline void SetStatus(Aws::String&& value) { m_status = std::move(value); }
/**
* <p>The status of an <code>UploadDocumentsRequest</code>.</p>
*/
inline void SetStatus(const char* value) { m_status.assign(value); }
/**
* <p>The status of an <code>UploadDocumentsRequest</code>.</p>
*/
inline UploadDocumentsResult& WithStatus(const Aws::String& value) { SetStatus(value); return *this;}
/**
* <p>The status of an <code>UploadDocumentsRequest</code>.</p>
*/
inline UploadDocumentsResult& WithStatus(Aws::String&& value) { SetStatus(std::move(value)); return *this;}
/**
* <p>The status of an <code>UploadDocumentsRequest</code>.</p>
*/
inline UploadDocumentsResult& WithStatus(const char* value) { SetStatus(value); return *this;}
/**
* <p>The number of documents that were added to the search domain.</p>
*/
inline long long GetAdds() const{ return m_adds; }
/**
* <p>The number of documents that were added to the search domain.</p>
*/
inline void SetAdds(long long value) { m_adds = value; }
/**
* <p>The number of documents that were added to the search domain.</p>
*/
inline UploadDocumentsResult& WithAdds(long long value) { SetAdds(value); return *this;}
/**
* <p>The number of documents that were deleted from the search domain.</p>
*/
inline long long GetDeletes() const{ return m_deletes; }
/**
* <p>The number of documents that were deleted from the search domain.</p>
*/
inline void SetDeletes(long long value) { m_deletes = value; }
/**
* <p>The number of documents that were deleted from the search domain.</p>
*/
inline UploadDocumentsResult& WithDeletes(long long value) { SetDeletes(value); return *this;}
/**
* <p>Any warnings returned by the document service about the documents being
* uploaded.</p>
*/
inline const Aws::Vector<DocumentServiceWarning>& GetWarnings() const{ return m_warnings; }
/**
* <p>Any warnings returned by the document service about the documents being
* uploaded.</p>
*/
inline void SetWarnings(const Aws::Vector<DocumentServiceWarning>& value) { m_warnings = value; }
/**
* <p>Any warnings returned by the document service about the documents being
* uploaded.</p>
*/
inline void SetWarnings(Aws::Vector<DocumentServiceWarning>&& value) { m_warnings = std::move(value); }
/**
* <p>Any warnings returned by the document service about the documents being
* uploaded.</p>
*/
inline UploadDocumentsResult& WithWarnings(const Aws::Vector<DocumentServiceWarning>& value) { SetWarnings(value); return *this;}
/**
* <p>Any warnings returned by the document service about the documents being
* uploaded.</p>
*/
inline UploadDocumentsResult& WithWarnings(Aws::Vector<DocumentServiceWarning>&& value) { SetWarnings(std::move(value)); return *this;}
/**
* <p>Any warnings returned by the document service about the documents being
* uploaded.</p>
*/
inline UploadDocumentsResult& AddWarnings(const DocumentServiceWarning& value) { m_warnings.push_back(value); return *this; }
/**
* <p>Any warnings returned by the document service about the documents being
* uploaded.</p>
*/
inline UploadDocumentsResult& AddWarnings(DocumentServiceWarning&& value) { m_warnings.push_back(std::move(value)); return *this; }
private:
Aws::String m_status;
long long m_adds;
long long m_deletes;
Aws::Vector<DocumentServiceWarning> m_warnings;
};
} // namespace Model
} // namespace CloudSearchDomain
} // namespace Aws

View File

@@ -0,0 +1,201 @@
/**
* 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/cloudsearchdomain/CloudSearchDomainClient.h>
#include <aws/cloudsearchdomain/CloudSearchDomainEndpoint.h>
#include <aws/cloudsearchdomain/CloudSearchDomainErrorMarshaller.h>
#include <aws/cloudsearchdomain/model/SearchRequest.h>
#include <aws/cloudsearchdomain/model/SuggestRequest.h>
#include <aws/cloudsearchdomain/model/UploadDocumentsRequest.h>
using namespace Aws;
using namespace Aws::Auth;
using namespace Aws::Client;
using namespace Aws::CloudSearchDomain;
using namespace Aws::CloudSearchDomain::Model;
using namespace Aws::Http;
using namespace Aws::Utils::Json;
static const char* SERVICE_NAME = "cloudsearch";
static const char* ALLOCATION_TAG = "CloudSearchDomainClient";
CloudSearchDomainClient::CloudSearchDomainClient(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<CloudSearchDomainErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
CloudSearchDomainClient::CloudSearchDomainClient(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<CloudSearchDomainErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
CloudSearchDomainClient::CloudSearchDomainClient(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<CloudSearchDomainErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
CloudSearchDomainClient::~CloudSearchDomainClient()
{
}
void CloudSearchDomainClient::init(const ClientConfiguration& config)
{
SetServiceClientName("cloudsearchdomain");
m_configScheme = SchemeMapper::ToString(config.scheme);
if (config.endpointOverride.empty())
{
m_uri = m_configScheme + "://" + CloudSearchDomainEndpoint::ForRegion(config.region, config.useDualStack);
}
else
{
OverrideEndpoint(config.endpointOverride);
}
}
void CloudSearchDomainClient::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;
}
}
SearchOutcome CloudSearchDomainClient::Search(const SearchRequest& request) const
{
if (!request.QueryHasBeenSet())
{
AWS_LOGSTREAM_ERROR("Search", "Required field: Query, is not set");
return SearchOutcome(Aws::Client::AWSError<CloudSearchDomainErrors>(CloudSearchDomainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Query]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/2013-01-01/search";
uri.SetPath(uri.GetPath() + ss.str());
ss.str("?format=sdk&pretty=true");
uri.SetQueryString(ss.str());
return SearchOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
}
SearchOutcomeCallable CloudSearchDomainClient::SearchCallable(const SearchRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< SearchOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->Search(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void CloudSearchDomainClient::SearchAsync(const SearchRequest& request, const SearchResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->SearchAsyncHelper( request, handler, context ); } );
}
void CloudSearchDomainClient::SearchAsyncHelper(const SearchRequest& request, const SearchResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, Search(request), context);
}
SuggestOutcome CloudSearchDomainClient::Suggest(const SuggestRequest& request) const
{
if (!request.QueryHasBeenSet())
{
AWS_LOGSTREAM_ERROR("Suggest", "Required field: Query, is not set");
return SuggestOutcome(Aws::Client::AWSError<CloudSearchDomainErrors>(CloudSearchDomainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Query]", false));
}
if (!request.SuggesterHasBeenSet())
{
AWS_LOGSTREAM_ERROR("Suggest", "Required field: Suggester, is not set");
return SuggestOutcome(Aws::Client::AWSError<CloudSearchDomainErrors>(CloudSearchDomainErrors::MISSING_PARAMETER, "MISSING_PARAMETER", "Missing required field [Suggester]", false));
}
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/2013-01-01/suggest";
uri.SetPath(uri.GetPath() + ss.str());
ss.str("?format=sdk&pretty=true");
uri.SetQueryString(ss.str());
return SuggestOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_GET, Aws::Auth::SIGV4_SIGNER));
}
SuggestOutcomeCallable CloudSearchDomainClient::SuggestCallable(const SuggestRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< SuggestOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->Suggest(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void CloudSearchDomainClient::SuggestAsync(const SuggestRequest& request, const SuggestResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->SuggestAsyncHelper( request, handler, context ); } );
}
void CloudSearchDomainClient::SuggestAsyncHelper(const SuggestRequest& request, const SuggestResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, Suggest(request), context);
}
UploadDocumentsOutcome CloudSearchDomainClient::UploadDocuments(const UploadDocumentsRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/2013-01-01/documents/batch";
uri.SetPath(uri.GetPath() + ss.str());
ss.str("?format=sdk");
uri.SetQueryString(ss.str());
return UploadDocumentsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST, Aws::Auth::SIGV4_SIGNER));
}
UploadDocumentsOutcomeCallable CloudSearchDomainClient::UploadDocumentsCallable(const UploadDocumentsRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< UploadDocumentsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UploadDocuments(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void CloudSearchDomainClient::UploadDocumentsAsync(const UploadDocumentsRequest& request, const UploadDocumentsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->UploadDocumentsAsyncHelper( request, handler, context ); } );
}
void CloudSearchDomainClient::UploadDocumentsAsyncHelper(const UploadDocumentsRequest& request, const UploadDocumentsResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, UploadDocuments(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/cloudsearchdomain/CloudSearchDomainEndpoint.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/HashingUtils.h>
using namespace Aws;
using namespace Aws::CloudSearchDomain;
namespace Aws
{
namespace CloudSearchDomain
{
namespace CloudSearchDomainEndpoint
{
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 << "cloudsearchdomain" << ".";
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 CloudSearchDomainEndpoint
} // namespace CloudSearchDomain
} // 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/cloudsearchdomain/CloudSearchDomainErrorMarshaller.h>
#include <aws/cloudsearchdomain/CloudSearchDomainErrors.h>
using namespace Aws::Client;
using namespace Aws::CloudSearchDomain;
AWSError<CoreErrors> CloudSearchDomainErrorMarshaller::FindErrorByName(const char* errorName) const
{
AWSError<CoreErrors> error = CloudSearchDomainErrorMapper::GetErrorForName(errorName);
if(error.GetErrorType() != CoreErrors::UNKNOWN)
{
return error;
}
return AWSErrorMarshaller::FindErrorByName(errorName);
}

View File

@@ -0,0 +1,50 @@
/**
* 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/cloudsearchdomain/CloudSearchDomainErrors.h>
#include <aws/cloudsearchdomain/model/DocumentServiceException.h>
using namespace Aws::Client;
using namespace Aws::Utils;
using namespace Aws::CloudSearchDomain;
using namespace Aws::CloudSearchDomain::Model;
namespace Aws
{
namespace CloudSearchDomain
{
template<> AWS_CLOUDSEARCHDOMAIN_API DocumentServiceException CloudSearchDomainError::GetModeledError()
{
assert(this->GetErrorType() == CloudSearchDomainErrors::DOCUMENT_SERVICE);
return DocumentServiceException(this->GetJsonPayload().View());
}
namespace CloudSearchDomainErrorMapper
{
static const int DOCUMENT_SERVICE_HASH = HashingUtils::HashString("DocumentServiceException");
static const int SEARCH_HASH = HashingUtils::HashString("SearchException");
AWSError<CoreErrors> GetErrorForName(const char* errorName)
{
int hashCode = HashingUtils::HashString(errorName);
if (hashCode == DOCUMENT_SERVICE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudSearchDomainErrors::DOCUMENT_SERVICE), false);
}
else if (hashCode == SEARCH_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudSearchDomainErrors::SEARCH), false);
}
return AWSError<CoreErrors>(CoreErrors::UNKNOWN, false);
}
} // namespace CloudSearchDomainErrorMapper
} // namespace CloudSearchDomain
} // namespace Aws

View File

@@ -0,0 +1,76 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudsearchdomain/model/Bucket.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudSearchDomain
{
namespace Model
{
Bucket::Bucket() :
m_valueHasBeenSet(false),
m_count(0),
m_countHasBeenSet(false)
{
}
Bucket::Bucket(JsonView jsonValue) :
m_valueHasBeenSet(false),
m_count(0),
m_countHasBeenSet(false)
{
*this = jsonValue;
}
Bucket& Bucket::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("value"))
{
m_value = jsonValue.GetString("value");
m_valueHasBeenSet = true;
}
if(jsonValue.ValueExists("count"))
{
m_count = jsonValue.GetInt64("count");
m_countHasBeenSet = true;
}
return *this;
}
JsonValue Bucket::Jsonize() const
{
JsonValue payload;
if(m_valueHasBeenSet)
{
payload.WithString("value", m_value);
}
if(m_countHasBeenSet)
{
payload.WithInt64("count", m_count);
}
return payload;
}
} // namespace Model
} // namespace CloudSearchDomain
} // namespace Aws

View File

@@ -0,0 +1,67 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudsearchdomain/model/BucketInfo.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudSearchDomain
{
namespace Model
{
BucketInfo::BucketInfo() :
m_bucketsHasBeenSet(false)
{
}
BucketInfo::BucketInfo(JsonView jsonValue) :
m_bucketsHasBeenSet(false)
{
*this = jsonValue;
}
BucketInfo& BucketInfo::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("buckets"))
{
Array<JsonView> bucketsJsonList = jsonValue.GetArray("buckets");
for(unsigned bucketsIndex = 0; bucketsIndex < bucketsJsonList.GetLength(); ++bucketsIndex)
{
m_buckets.push_back(bucketsJsonList[bucketsIndex].AsObject());
}
m_bucketsHasBeenSet = true;
}
return *this;
}
JsonValue BucketInfo::Jsonize() const
{
JsonValue payload;
if(m_bucketsHasBeenSet)
{
Array<JsonValue> bucketsJsonList(m_buckets.size());
for(unsigned bucketsIndex = 0; bucketsIndex < bucketsJsonList.GetLength(); ++bucketsIndex)
{
bucketsJsonList[bucketsIndex].AsObject(m_buckets[bucketsIndex].Jsonize());
}
payload.WithArray("buckets", std::move(bucketsJsonList));
}
return payload;
}
} // namespace Model
} // namespace CloudSearchDomain
} // 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/cloudsearchdomain/model/ContentType.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 CloudSearchDomain
{
namespace Model
{
namespace ContentTypeMapper
{
static const int application_json_HASH = HashingUtils::HashString("application/json");
static const int application_xml_HASH = HashingUtils::HashString("application/xml");
ContentType GetContentTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == application_json_HASH)
{
return ContentType::application_json;
}
else if (hashCode == application_xml_HASH)
{
return ContentType::application_xml;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ContentType>(hashCode);
}
return ContentType::NOT_SET;
}
Aws::String GetNameForContentType(ContentType enumValue)
{
switch(enumValue)
{
case ContentType::application_json:
return "application/json";
case ContentType::application_xml:
return "application/xml";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ContentTypeMapper
} // namespace Model
} // namespace CloudSearchDomain
} // namespace Aws

View File

@@ -0,0 +1,74 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudsearchdomain/model/DocumentServiceException.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudSearchDomain
{
namespace Model
{
DocumentServiceException::DocumentServiceException() :
m_statusHasBeenSet(false),
m_messageHasBeenSet(false)
{
}
DocumentServiceException::DocumentServiceException(JsonView jsonValue) :
m_statusHasBeenSet(false),
m_messageHasBeenSet(false)
{
*this = jsonValue;
}
DocumentServiceException& DocumentServiceException::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("status"))
{
m_status = jsonValue.GetString("status");
m_statusHasBeenSet = true;
}
if(jsonValue.ValueExists("message"))
{
m_message = jsonValue.GetString("message");
m_messageHasBeenSet = true;
}
return *this;
}
JsonValue DocumentServiceException::Jsonize() const
{
JsonValue payload;
if(m_statusHasBeenSet)
{
payload.WithString("status", m_status);
}
if(m_messageHasBeenSet)
{
payload.WithString("message", m_message);
}
return payload;
}
} // namespace Model
} // namespace CloudSearchDomain
} // namespace Aws

View File

@@ -0,0 +1,59 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudsearchdomain/model/DocumentServiceWarning.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudSearchDomain
{
namespace Model
{
DocumentServiceWarning::DocumentServiceWarning() :
m_messageHasBeenSet(false)
{
}
DocumentServiceWarning::DocumentServiceWarning(JsonView jsonValue) :
m_messageHasBeenSet(false)
{
*this = jsonValue;
}
DocumentServiceWarning& DocumentServiceWarning::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("message"))
{
m_message = jsonValue.GetString("message");
m_messageHasBeenSet = true;
}
return *this;
}
JsonValue DocumentServiceWarning::Jsonize() const
{
JsonValue payload;
if(m_messageHasBeenSet)
{
payload.WithString("message", m_message);
}
return payload;
}
} // namespace Model
} // namespace CloudSearchDomain
} // namespace Aws

View File

@@ -0,0 +1,174 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudsearchdomain/model/FieldStats.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudSearchDomain
{
namespace Model
{
FieldStats::FieldStats() :
m_minHasBeenSet(false),
m_maxHasBeenSet(false),
m_count(0),
m_countHasBeenSet(false),
m_missing(0),
m_missingHasBeenSet(false),
m_sum(0.0),
m_sumHasBeenSet(false),
m_sumOfSquares(0.0),
m_sumOfSquaresHasBeenSet(false),
m_meanHasBeenSet(false),
m_stddev(0.0),
m_stddevHasBeenSet(false)
{
}
FieldStats::FieldStats(JsonView jsonValue) :
m_minHasBeenSet(false),
m_maxHasBeenSet(false),
m_count(0),
m_countHasBeenSet(false),
m_missing(0),
m_missingHasBeenSet(false),
m_sum(0.0),
m_sumHasBeenSet(false),
m_sumOfSquares(0.0),
m_sumOfSquaresHasBeenSet(false),
m_meanHasBeenSet(false),
m_stddev(0.0),
m_stddevHasBeenSet(false)
{
*this = jsonValue;
}
FieldStats& FieldStats::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("min"))
{
m_min = jsonValue.GetString("min");
m_minHasBeenSet = true;
}
if(jsonValue.ValueExists("max"))
{
m_max = jsonValue.GetString("max");
m_maxHasBeenSet = true;
}
if(jsonValue.ValueExists("count"))
{
m_count = jsonValue.GetInt64("count");
m_countHasBeenSet = true;
}
if(jsonValue.ValueExists("missing"))
{
m_missing = jsonValue.GetInt64("missing");
m_missingHasBeenSet = true;
}
if(jsonValue.ValueExists("sum"))
{
m_sum = jsonValue.GetDouble("sum");
m_sumHasBeenSet = true;
}
if(jsonValue.ValueExists("sumOfSquares"))
{
m_sumOfSquares = jsonValue.GetDouble("sumOfSquares");
m_sumOfSquaresHasBeenSet = true;
}
if(jsonValue.ValueExists("mean"))
{
m_mean = jsonValue.GetString("mean");
m_meanHasBeenSet = true;
}
if(jsonValue.ValueExists("stddev"))
{
m_stddev = jsonValue.GetDouble("stddev");
m_stddevHasBeenSet = true;
}
return *this;
}
JsonValue FieldStats::Jsonize() const
{
JsonValue payload;
if(m_minHasBeenSet)
{
payload.WithString("min", m_min);
}
if(m_maxHasBeenSet)
{
payload.WithString("max", m_max);
}
if(m_countHasBeenSet)
{
payload.WithInt64("count", m_count);
}
if(m_missingHasBeenSet)
{
payload.WithInt64("missing", m_missing);
}
if(m_sumHasBeenSet)
{
payload.WithDouble("sum", m_sum);
}
if(m_sumOfSquaresHasBeenSet)
{
payload.WithDouble("sumOfSquares", m_sumOfSquares);
}
if(m_meanHasBeenSet)
{
payload.WithString("mean", m_mean);
}
if(m_stddevHasBeenSet)
{
payload.WithDouble("stddev", m_stddev);
}
return payload;
}
} // namespace Model
} // namespace CloudSearchDomain
} // namespace Aws

View File

@@ -0,0 +1,140 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudsearchdomain/model/Hit.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudSearchDomain
{
namespace Model
{
Hit::Hit() :
m_idHasBeenSet(false),
m_fieldsHasBeenSet(false),
m_exprsHasBeenSet(false),
m_highlightsHasBeenSet(false)
{
}
Hit::Hit(JsonView jsonValue) :
m_idHasBeenSet(false),
m_fieldsHasBeenSet(false),
m_exprsHasBeenSet(false),
m_highlightsHasBeenSet(false)
{
*this = jsonValue;
}
Hit& Hit::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("id"))
{
m_id = jsonValue.GetString("id");
m_idHasBeenSet = true;
}
if(jsonValue.ValueExists("fields"))
{
Aws::Map<Aws::String, JsonView> fieldsJsonMap = jsonValue.GetObject("fields").GetAllObjects();
for(auto& fieldsItem : fieldsJsonMap)
{
Array<JsonView> fieldValueJsonList = fieldsItem.second.AsArray();
Aws::Vector<Aws::String> fieldValueList;
fieldValueList.reserve((size_t)fieldValueJsonList.GetLength());
for(unsigned fieldValueIndex = 0; fieldValueIndex < fieldValueJsonList.GetLength(); ++fieldValueIndex)
{
fieldValueList.push_back(fieldValueJsonList[fieldValueIndex].AsString());
}
m_fields[fieldsItem.first] = std::move(fieldValueList);
}
m_fieldsHasBeenSet = true;
}
if(jsonValue.ValueExists("exprs"))
{
Aws::Map<Aws::String, JsonView> exprsJsonMap = jsonValue.GetObject("exprs").GetAllObjects();
for(auto& exprsItem : exprsJsonMap)
{
m_exprs[exprsItem.first] = exprsItem.second.AsString();
}
m_exprsHasBeenSet = true;
}
if(jsonValue.ValueExists("highlights"))
{
Aws::Map<Aws::String, JsonView> highlightsJsonMap = jsonValue.GetObject("highlights").GetAllObjects();
for(auto& highlightsItem : highlightsJsonMap)
{
m_highlights[highlightsItem.first] = highlightsItem.second.AsString();
}
m_highlightsHasBeenSet = true;
}
return *this;
}
JsonValue Hit::Jsonize() const
{
JsonValue payload;
if(m_idHasBeenSet)
{
payload.WithString("id", m_id);
}
if(m_fieldsHasBeenSet)
{
JsonValue fieldsJsonMap;
for(auto& fieldsItem : m_fields)
{
Array<JsonValue> fieldValueJsonList(fieldsItem.second.size());
for(unsigned fieldValueIndex = 0; fieldValueIndex < fieldValueJsonList.GetLength(); ++fieldValueIndex)
{
fieldValueJsonList[fieldValueIndex].AsString(fieldsItem.second[fieldValueIndex]);
}
fieldsJsonMap.WithArray(fieldsItem.first, std::move(fieldValueJsonList));
}
payload.WithObject("fields", std::move(fieldsJsonMap));
}
if(m_exprsHasBeenSet)
{
JsonValue exprsJsonMap;
for(auto& exprsItem : m_exprs)
{
exprsJsonMap.WithString(exprsItem.first, exprsItem.second);
}
payload.WithObject("exprs", std::move(exprsJsonMap));
}
if(m_highlightsHasBeenSet)
{
JsonValue highlightsJsonMap;
for(auto& highlightsItem : m_highlights)
{
highlightsJsonMap.WithString(highlightsItem.first, highlightsItem.second);
}
payload.WithObject("highlights", std::move(highlightsJsonMap));
}
return payload;
}
} // namespace Model
} // namespace CloudSearchDomain
} // namespace Aws

View File

@@ -0,0 +1,116 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudsearchdomain/model/Hits.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudSearchDomain
{
namespace Model
{
Hits::Hits() :
m_found(0),
m_foundHasBeenSet(false),
m_start(0),
m_startHasBeenSet(false),
m_cursorHasBeenSet(false),
m_hitHasBeenSet(false)
{
}
Hits::Hits(JsonView jsonValue) :
m_found(0),
m_foundHasBeenSet(false),
m_start(0),
m_startHasBeenSet(false),
m_cursorHasBeenSet(false),
m_hitHasBeenSet(false)
{
*this = jsonValue;
}
Hits& Hits::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("found"))
{
m_found = jsonValue.GetInt64("found");
m_foundHasBeenSet = true;
}
if(jsonValue.ValueExists("start"))
{
m_start = jsonValue.GetInt64("start");
m_startHasBeenSet = true;
}
if(jsonValue.ValueExists("cursor"))
{
m_cursor = jsonValue.GetString("cursor");
m_cursorHasBeenSet = true;
}
if(jsonValue.ValueExists("hit"))
{
Array<JsonView> hitJsonList = jsonValue.GetArray("hit");
for(unsigned hitIndex = 0; hitIndex < hitJsonList.GetLength(); ++hitIndex)
{
m_hit.push_back(hitJsonList[hitIndex].AsObject());
}
m_hitHasBeenSet = true;
}
return *this;
}
JsonValue Hits::Jsonize() const
{
JsonValue payload;
if(m_foundHasBeenSet)
{
payload.WithInt64("found", m_found);
}
if(m_startHasBeenSet)
{
payload.WithInt64("start", m_start);
}
if(m_cursorHasBeenSet)
{
payload.WithString("cursor", m_cursor);
}
if(m_hitHasBeenSet)
{
Array<JsonValue> hitJsonList(m_hit.size());
for(unsigned hitIndex = 0; hitIndex < hitJsonList.GetLength(); ++hitIndex)
{
hitJsonList[hitIndex].AsObject(m_hit[hitIndex].Jsonize());
}
payload.WithArray("hit", std::move(hitJsonList));
}
return payload;
}
} // namespace Model
} // namespace CloudSearchDomain
} // namespace Aws

View File

@@ -0,0 +1,84 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudsearchdomain/model/QueryParser.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 CloudSearchDomain
{
namespace Model
{
namespace QueryParserMapper
{
static const int simple_HASH = HashingUtils::HashString("simple");
static const int structured_HASH = HashingUtils::HashString("structured");
static const int lucene_HASH = HashingUtils::HashString("lucene");
static const int dismax_HASH = HashingUtils::HashString("dismax");
QueryParser GetQueryParserForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == simple_HASH)
{
return QueryParser::simple;
}
else if (hashCode == structured_HASH)
{
return QueryParser::structured;
}
else if (hashCode == lucene_HASH)
{
return QueryParser::lucene;
}
else if (hashCode == dismax_HASH)
{
return QueryParser::dismax;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<QueryParser>(hashCode);
}
return QueryParser::NOT_SET;
}
Aws::String GetNameForQueryParser(QueryParser enumValue)
{
switch(enumValue)
{
case QueryParser::simple:
return "simple";
case QueryParser::structured:
return "structured";
case QueryParser::lucene:
return "lucene";
case QueryParser::dismax:
return "dismax";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace QueryParserMapper
} // namespace Model
} // namespace CloudSearchDomain
} // namespace Aws

View File

@@ -0,0 +1,149 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudsearchdomain/model/SearchRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudSearchDomain::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
SearchRequest::SearchRequest() :
m_cursorHasBeenSet(false),
m_exprHasBeenSet(false),
m_facetHasBeenSet(false),
m_filterQueryHasBeenSet(false),
m_highlightHasBeenSet(false),
m_partial(false),
m_partialHasBeenSet(false),
m_queryHasBeenSet(false),
m_queryOptionsHasBeenSet(false),
m_queryParser(QueryParser::NOT_SET),
m_queryParserHasBeenSet(false),
m_returnHasBeenSet(false),
m_size(0),
m_sizeHasBeenSet(false),
m_sortHasBeenSet(false),
m_start(0),
m_startHasBeenSet(false),
m_statsHasBeenSet(false)
{
}
Aws::String SearchRequest::SerializePayload() const
{
return {};
}
void SearchRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_cursorHasBeenSet)
{
ss << m_cursor;
uri.AddQueryStringParameter("cursor", ss.str());
ss.str("");
}
if(m_exprHasBeenSet)
{
ss << m_expr;
uri.AddQueryStringParameter("expr", ss.str());
ss.str("");
}
if(m_facetHasBeenSet)
{
ss << m_facet;
uri.AddQueryStringParameter("facet", ss.str());
ss.str("");
}
if(m_filterQueryHasBeenSet)
{
ss << m_filterQuery;
uri.AddQueryStringParameter("fq", ss.str());
ss.str("");
}
if(m_highlightHasBeenSet)
{
ss << m_highlight;
uri.AddQueryStringParameter("highlight", ss.str());
ss.str("");
}
if(m_partialHasBeenSet)
{
ss << m_partial;
uri.AddQueryStringParameter("partial", ss.str());
ss.str("");
}
if(m_queryHasBeenSet)
{
ss << m_query;
uri.AddQueryStringParameter("q", ss.str());
ss.str("");
}
if(m_queryOptionsHasBeenSet)
{
ss << m_queryOptions;
uri.AddQueryStringParameter("q.options", ss.str());
ss.str("");
}
if(m_queryParserHasBeenSet)
{
ss << QueryParserMapper::GetNameForQueryParser(m_queryParser);
uri.AddQueryStringParameter("q.parser", ss.str());
ss.str("");
}
if(m_returnHasBeenSet)
{
ss << m_return;
uri.AddQueryStringParameter("return", ss.str());
ss.str("");
}
if(m_sizeHasBeenSet)
{
ss << m_size;
uri.AddQueryStringParameter("size", ss.str());
ss.str("");
}
if(m_sortHasBeenSet)
{
ss << m_sort;
uri.AddQueryStringParameter("sort", ss.str());
ss.str("");
}
if(m_startHasBeenSet)
{
ss << m_start;
uri.AddQueryStringParameter("start", ss.str());
ss.str("");
}
if(m_statsHasBeenSet)
{
ss << m_stats;
uri.AddQueryStringParameter("stats", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,64 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudsearchdomain/model/SearchResult.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::CloudSearchDomain::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
SearchResult::SearchResult()
{
}
SearchResult::SearchResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
SearchResult& SearchResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("status"))
{
m_status = jsonValue.GetObject("status");
}
if(jsonValue.ValueExists("hits"))
{
m_hits = jsonValue.GetObject("hits");
}
if(jsonValue.ValueExists("facets"))
{
Aws::Map<Aws::String, JsonView> facetsJsonMap = jsonValue.GetObject("facets").GetAllObjects();
for(auto& facetsItem : facetsJsonMap)
{
m_facets[facetsItem.first] = facetsItem.second.AsObject();
}
}
if(jsonValue.ValueExists("stats"))
{
Aws::Map<Aws::String, JsonView> statsJsonMap = jsonValue.GetObject("stats").GetAllObjects();
for(auto& statsItem : statsJsonMap)
{
m_stats[statsItem.first] = statsItem.second.AsObject();
}
}
return *this;
}

View File

@@ -0,0 +1,76 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudsearchdomain/model/SearchStatus.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudSearchDomain
{
namespace Model
{
SearchStatus::SearchStatus() :
m_timems(0),
m_timemsHasBeenSet(false),
m_ridHasBeenSet(false)
{
}
SearchStatus::SearchStatus(JsonView jsonValue) :
m_timems(0),
m_timemsHasBeenSet(false),
m_ridHasBeenSet(false)
{
*this = jsonValue;
}
SearchStatus& SearchStatus::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("timems"))
{
m_timems = jsonValue.GetInt64("timems");
m_timemsHasBeenSet = true;
}
if(jsonValue.ValueExists("rid"))
{
m_rid = jsonValue.GetString("rid");
m_ridHasBeenSet = true;
}
return *this;
}
JsonValue SearchStatus::Jsonize() const
{
JsonValue payload;
if(m_timemsHasBeenSet)
{
payload.WithInt64("timems", m_timems);
}
if(m_ridHasBeenSet)
{
payload.WithString("rid", m_rid);
}
return payload;
}
} // namespace Model
} // namespace CloudSearchDomain
} // namespace Aws

View File

@@ -0,0 +1,99 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudsearchdomain/model/SuggestModel.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudSearchDomain
{
namespace Model
{
SuggestModel::SuggestModel() :
m_queryHasBeenSet(false),
m_found(0),
m_foundHasBeenSet(false),
m_suggestionsHasBeenSet(false)
{
}
SuggestModel::SuggestModel(JsonView jsonValue) :
m_queryHasBeenSet(false),
m_found(0),
m_foundHasBeenSet(false),
m_suggestionsHasBeenSet(false)
{
*this = jsonValue;
}
SuggestModel& SuggestModel::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("query"))
{
m_query = jsonValue.GetString("query");
m_queryHasBeenSet = true;
}
if(jsonValue.ValueExists("found"))
{
m_found = jsonValue.GetInt64("found");
m_foundHasBeenSet = true;
}
if(jsonValue.ValueExists("suggestions"))
{
Array<JsonView> suggestionsJsonList = jsonValue.GetArray("suggestions");
for(unsigned suggestionsIndex = 0; suggestionsIndex < suggestionsJsonList.GetLength(); ++suggestionsIndex)
{
m_suggestions.push_back(suggestionsJsonList[suggestionsIndex].AsObject());
}
m_suggestionsHasBeenSet = true;
}
return *this;
}
JsonValue SuggestModel::Jsonize() const
{
JsonValue payload;
if(m_queryHasBeenSet)
{
payload.WithString("query", m_query);
}
if(m_foundHasBeenSet)
{
payload.WithInt64("found", m_found);
}
if(m_suggestionsHasBeenSet)
{
Array<JsonValue> suggestionsJsonList(m_suggestions.size());
for(unsigned suggestionsIndex = 0; suggestionsIndex < suggestionsJsonList.GetLength(); ++suggestionsIndex)
{
suggestionsJsonList[suggestionsIndex].AsObject(m_suggestions[suggestionsIndex].Jsonize());
}
payload.WithArray("suggestions", std::move(suggestionsJsonList));
}
return payload;
}
} // namespace Model
} // namespace CloudSearchDomain
} // namespace Aws

View File

@@ -0,0 +1,58 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudsearchdomain/model/SuggestRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudSearchDomain::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
SuggestRequest::SuggestRequest() :
m_queryHasBeenSet(false),
m_suggesterHasBeenSet(false),
m_size(0),
m_sizeHasBeenSet(false)
{
}
Aws::String SuggestRequest::SerializePayload() const
{
return {};
}
void SuggestRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_queryHasBeenSet)
{
ss << m_query;
uri.AddQueryStringParameter("q", ss.str());
ss.str("");
}
if(m_suggesterHasBeenSet)
{
ss << m_suggester;
uri.AddQueryStringParameter("suggester", ss.str());
ss.str("");
}
if(m_sizeHasBeenSet)
{
ss << m_size;
uri.AddQueryStringParameter("size", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,46 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudsearchdomain/model/SuggestResult.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::CloudSearchDomain::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
SuggestResult::SuggestResult()
{
}
SuggestResult::SuggestResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
SuggestResult& SuggestResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("status"))
{
m_status = jsonValue.GetObject("status");
}
if(jsonValue.ValueExists("suggest"))
{
m_suggest = jsonValue.GetObject("suggest");
}
return *this;
}

View File

@@ -0,0 +1,76 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudsearchdomain/model/SuggestStatus.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudSearchDomain
{
namespace Model
{
SuggestStatus::SuggestStatus() :
m_timems(0),
m_timemsHasBeenSet(false),
m_ridHasBeenSet(false)
{
}
SuggestStatus::SuggestStatus(JsonView jsonValue) :
m_timems(0),
m_timemsHasBeenSet(false),
m_ridHasBeenSet(false)
{
*this = jsonValue;
}
SuggestStatus& SuggestStatus::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("timems"))
{
m_timems = jsonValue.GetInt64("timems");
m_timemsHasBeenSet = true;
}
if(jsonValue.ValueExists("rid"))
{
m_rid = jsonValue.GetString("rid");
m_ridHasBeenSet = true;
}
return *this;
}
JsonValue SuggestStatus::Jsonize() const
{
JsonValue payload;
if(m_timemsHasBeenSet)
{
payload.WithInt64("timems", m_timems);
}
if(m_ridHasBeenSet)
{
payload.WithString("rid", m_rid);
}
return payload;
}
} // namespace Model
} // namespace CloudSearchDomain
} // namespace Aws

View File

@@ -0,0 +1,91 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudsearchdomain/model/SuggestionMatch.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudSearchDomain
{
namespace Model
{
SuggestionMatch::SuggestionMatch() :
m_suggestionHasBeenSet(false),
m_score(0),
m_scoreHasBeenSet(false),
m_idHasBeenSet(false)
{
}
SuggestionMatch::SuggestionMatch(JsonView jsonValue) :
m_suggestionHasBeenSet(false),
m_score(0),
m_scoreHasBeenSet(false),
m_idHasBeenSet(false)
{
*this = jsonValue;
}
SuggestionMatch& SuggestionMatch::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("suggestion"))
{
m_suggestion = jsonValue.GetString("suggestion");
m_suggestionHasBeenSet = true;
}
if(jsonValue.ValueExists("score"))
{
m_score = jsonValue.GetInt64("score");
m_scoreHasBeenSet = true;
}
if(jsonValue.ValueExists("id"))
{
m_id = jsonValue.GetString("id");
m_idHasBeenSet = true;
}
return *this;
}
JsonValue SuggestionMatch::Jsonize() const
{
JsonValue payload;
if(m_suggestionHasBeenSet)
{
payload.WithString("suggestion", m_suggestion);
}
if(m_scoreHasBeenSet)
{
payload.WithInt64("score", m_score);
}
if(m_idHasBeenSet)
{
payload.WithString("id", m_id);
}
return payload;
}
} // namespace Model
} // namespace CloudSearchDomain
} // 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/cloudsearchdomain/model/UploadDocumentsRequest.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/HashingUtils.h>
#include <utility>
using namespace Aws::CloudSearchDomain::Model;
using namespace Aws::Utils::Stream;
using namespace Aws::Utils;
using namespace Aws;
UploadDocumentsRequest::UploadDocumentsRequest()
{
}

View File

@@ -0,0 +1,65 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudsearchdomain/model/UploadDocumentsResult.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::CloudSearchDomain::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
UploadDocumentsResult::UploadDocumentsResult() :
m_adds(0),
m_deletes(0)
{
}
UploadDocumentsResult::UploadDocumentsResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_adds(0),
m_deletes(0)
{
*this = result;
}
UploadDocumentsResult& UploadDocumentsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("status"))
{
m_status = jsonValue.GetString("status");
}
if(jsonValue.ValueExists("adds"))
{
m_adds = jsonValue.GetInt64("adds");
}
if(jsonValue.ValueExists("deletes"))
{
m_deletes = jsonValue.GetInt64("deletes");
}
if(jsonValue.ValueExists("warnings"))
{
Array<JsonView> warningsJsonList = jsonValue.GetArray("warnings");
for(unsigned warningsIndex = 0; warningsIndex < warningsJsonList.GetLength(); ++warningsIndex)
{
m_warnings.push_back(warningsJsonList[warningsIndex].AsObject());
}
}
return *this;
}