/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include namespace Aws { template class AmazonWebServiceResult; namespace Utils { namespace Json { class JsonValue; } // namespace Json } // namespace Utils namespace CloudSearchDomain { namespace Model { /** *

The result of a Search request. Contains the documents that * match the specified search criteria and any requested fields, highlights, and * facet information.

See Also:

AWS * API Reference

*/ class SearchResult { public: AWS_CLOUDSEARCHDOMAIN_API SearchResult(); AWS_CLOUDSEARCHDOMAIN_API SearchResult(const Aws::AmazonWebServiceResult& result); AWS_CLOUDSEARCHDOMAIN_API SearchResult& operator=(const Aws::AmazonWebServiceResult& result); /** *

The status information returned for the search request.

*/ inline const SearchStatus& GetStatus() const{ return m_status; } /** *

The status information returned for the search request.

*/ inline void SetStatus(const SearchStatus& value) { m_status = value; } /** *

The status information returned for the search request.

*/ inline void SetStatus(SearchStatus&& value) { m_status = std::move(value); } /** *

The status information returned for the search request.

*/ inline SearchResult& WithStatus(const SearchStatus& value) { SetStatus(value); return *this;} /** *

The status information returned for the search request.

*/ inline SearchResult& WithStatus(SearchStatus&& value) { SetStatus(std::move(value)); return *this;} /** *

The documents that match the search criteria.

*/ inline const Hits& GetHits() const{ return m_hits; } /** *

The documents that match the search criteria.

*/ inline void SetHits(const Hits& value) { m_hits = value; } /** *

The documents that match the search criteria.

*/ inline void SetHits(Hits&& value) { m_hits = std::move(value); } /** *

The documents that match the search criteria.

*/ inline SearchResult& WithHits(const Hits& value) { SetHits(value); return *this;} /** *

The documents that match the search criteria.

*/ inline SearchResult& WithHits(Hits&& value) { SetHits(std::move(value)); return *this;} /** *

The requested facet information.

*/ inline const Aws::Map& GetFacets() const{ return m_facets; } /** *

The requested facet information.

*/ inline void SetFacets(const Aws::Map& value) { m_facets = value; } /** *

The requested facet information.

*/ inline void SetFacets(Aws::Map&& value) { m_facets = std::move(value); } /** *

The requested facet information.

*/ inline SearchResult& WithFacets(const Aws::Map& value) { SetFacets(value); return *this;} /** *

The requested facet information.

*/ inline SearchResult& WithFacets(Aws::Map&& value) { SetFacets(std::move(value)); return *this;} /** *

The requested facet information.

*/ inline SearchResult& AddFacets(const Aws::String& key, const BucketInfo& value) { m_facets.emplace(key, value); return *this; } /** *

The requested facet information.

*/ inline SearchResult& AddFacets(Aws::String&& key, const BucketInfo& value) { m_facets.emplace(std::move(key), value); return *this; } /** *

The requested facet information.

*/ inline SearchResult& AddFacets(const Aws::String& key, BucketInfo&& value) { m_facets.emplace(key, std::move(value)); return *this; } /** *

The requested facet information.

*/ inline SearchResult& AddFacets(Aws::String&& key, BucketInfo&& value) { m_facets.emplace(std::move(key), std::move(value)); return *this; } /** *

The requested facet information.

*/ inline SearchResult& AddFacets(const char* key, BucketInfo&& value) { m_facets.emplace(key, std::move(value)); return *this; } /** *

The requested facet information.

*/ inline SearchResult& AddFacets(const char* key, const BucketInfo& value) { m_facets.emplace(key, value); return *this; } /** *

The requested field statistics information.

*/ inline const Aws::Map& GetStats() const{ return m_stats; } /** *

The requested field statistics information.

*/ inline void SetStats(const Aws::Map& value) { m_stats = value; } /** *

The requested field statistics information.

*/ inline void SetStats(Aws::Map&& value) { m_stats = std::move(value); } /** *

The requested field statistics information.

*/ inline SearchResult& WithStats(const Aws::Map& value) { SetStats(value); return *this;} /** *

The requested field statistics information.

*/ inline SearchResult& WithStats(Aws::Map&& value) { SetStats(std::move(value)); return *this;} /** *

The requested field statistics information.

*/ inline SearchResult& AddStats(const Aws::String& key, const FieldStats& value) { m_stats.emplace(key, value); return *this; } /** *

The requested field statistics information.

*/ inline SearchResult& AddStats(Aws::String&& key, const FieldStats& value) { m_stats.emplace(std::move(key), value); return *this; } /** *

The requested field statistics information.

*/ inline SearchResult& AddStats(const Aws::String& key, FieldStats&& value) { m_stats.emplace(key, std::move(value)); return *this; } /** *

The requested field statistics information.

*/ inline SearchResult& AddStats(Aws::String&& key, FieldStats&& value) { m_stats.emplace(std::move(key), std::move(value)); return *this; } /** *

The requested field statistics information.

*/ inline SearchResult& AddStats(const char* key, FieldStats&& value) { m_stats.emplace(key, std::move(value)); return *this; } /** *

The requested field statistics information.

*/ inline SearchResult& AddStats(const char* key, const FieldStats& value) { m_stats.emplace(key, value); return *this; } inline const Aws::String& GetRequestId() const{ return m_requestId; } inline void SetRequestId(const Aws::String& value) { m_requestId = value; } inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); } inline void SetRequestId(const char* value) { m_requestId.assign(value); } inline SearchResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;} inline SearchResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;} inline SearchResult& WithRequestId(const char* value) { SetRequestId(value); return *this;} private: SearchStatus m_status; Hits m_hits; Aws::Map m_facets; Aws::Map m_stats; Aws::String m_requestId; }; } // namespace Model } // namespace CloudSearchDomain } // namespace Aws