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

Information about a document that matches the search request.

See * Also:

AWS * API Reference

*/ class Hit { public: AWS_CLOUDSEARCHDOMAIN_API Hit(); AWS_CLOUDSEARCHDOMAIN_API Hit(Aws::Utils::Json::JsonView jsonValue); AWS_CLOUDSEARCHDOMAIN_API Hit& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_CLOUDSEARCHDOMAIN_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The document ID of a document that matches the search request.

*/ inline const Aws::String& GetId() const{ return m_id; } /** *

The document ID of a document that matches the search request.

*/ inline bool IdHasBeenSet() const { return m_idHasBeenSet; } /** *

The document ID of a document that matches the search request.

*/ inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } /** *

The document ID of a document that matches the search request.

*/ inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } /** *

The document ID of a document that matches the search request.

*/ inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } /** *

The document ID of a document that matches the search request.

*/ inline Hit& WithId(const Aws::String& value) { SetId(value); return *this;} /** *

The document ID of a document that matches the search request.

*/ inline Hit& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} /** *

The document ID of a document that matches the search request.

*/ inline Hit& WithId(const char* value) { SetId(value); return *this;} /** *

The fields returned from a document that matches the search request.

*/ inline const Aws::Map>& GetFields() const{ return m_fields; } /** *

The fields returned from a document that matches the search request.

*/ inline bool FieldsHasBeenSet() const { return m_fieldsHasBeenSet; } /** *

The fields returned from a document that matches the search request.

*/ inline void SetFields(const Aws::Map>& value) { m_fieldsHasBeenSet = true; m_fields = value; } /** *

The fields returned from a document that matches the search request.

*/ inline void SetFields(Aws::Map>&& value) { m_fieldsHasBeenSet = true; m_fields = std::move(value); } /** *

The fields returned from a document that matches the search request.

*/ inline Hit& WithFields(const Aws::Map>& value) { SetFields(value); return *this;} /** *

The fields returned from a document that matches the search request.

*/ inline Hit& WithFields(Aws::Map>&& value) { SetFields(std::move(value)); return *this;} /** *

The fields returned from a document that matches the search request.

*/ inline Hit& AddFields(const Aws::String& key, const Aws::Vector& value) { m_fieldsHasBeenSet = true; m_fields.emplace(key, value); return *this; } /** *

The fields returned from a document that matches the search request.

*/ inline Hit& AddFields(Aws::String&& key, const Aws::Vector& value) { m_fieldsHasBeenSet = true; m_fields.emplace(std::move(key), value); return *this; } /** *

The fields returned from a document that matches the search request.

*/ inline Hit& AddFields(const Aws::String& key, Aws::Vector&& value) { m_fieldsHasBeenSet = true; m_fields.emplace(key, std::move(value)); return *this; } /** *

The fields returned from a document that matches the search request.

*/ inline Hit& AddFields(Aws::String&& key, Aws::Vector&& value) { m_fieldsHasBeenSet = true; m_fields.emplace(std::move(key), std::move(value)); return *this; } /** *

The fields returned from a document that matches the search request.

*/ inline Hit& AddFields(const char* key, Aws::Vector&& value) { m_fieldsHasBeenSet = true; m_fields.emplace(key, std::move(value)); return *this; } /** *

The fields returned from a document that matches the search request.

*/ inline Hit& AddFields(const char* key, const Aws::Vector& value) { m_fieldsHasBeenSet = true; m_fields.emplace(key, value); return *this; } /** *

The expressions returned from a document that matches the search request.

*/ inline const Aws::Map& GetExprs() const{ return m_exprs; } /** *

The expressions returned from a document that matches the search request.

*/ inline bool ExprsHasBeenSet() const { return m_exprsHasBeenSet; } /** *

The expressions returned from a document that matches the search request.

*/ inline void SetExprs(const Aws::Map& value) { m_exprsHasBeenSet = true; m_exprs = value; } /** *

The expressions returned from a document that matches the search request.

*/ inline void SetExprs(Aws::Map&& value) { m_exprsHasBeenSet = true; m_exprs = std::move(value); } /** *

The expressions returned from a document that matches the search request.

*/ inline Hit& WithExprs(const Aws::Map& value) { SetExprs(value); return *this;} /** *

The expressions returned from a document that matches the search request.

*/ inline Hit& WithExprs(Aws::Map&& value) { SetExprs(std::move(value)); return *this;} /** *

The expressions returned from a document that matches the search request.

*/ inline Hit& AddExprs(const Aws::String& key, const Aws::String& value) { m_exprsHasBeenSet = true; m_exprs.emplace(key, value); return *this; } /** *

The expressions returned from a document that matches the search request.

*/ inline Hit& AddExprs(Aws::String&& key, const Aws::String& value) { m_exprsHasBeenSet = true; m_exprs.emplace(std::move(key), value); return *this; } /** *

The expressions returned from a document that matches the search request.

*/ inline Hit& AddExprs(const Aws::String& key, Aws::String&& value) { m_exprsHasBeenSet = true; m_exprs.emplace(key, std::move(value)); return *this; } /** *

The expressions returned from a document that matches the search request.

*/ inline Hit& AddExprs(Aws::String&& key, Aws::String&& value) { m_exprsHasBeenSet = true; m_exprs.emplace(std::move(key), std::move(value)); return *this; } /** *

The expressions returned from a document that matches the search request.

*/ inline Hit& AddExprs(const char* key, Aws::String&& value) { m_exprsHasBeenSet = true; m_exprs.emplace(key, std::move(value)); return *this; } /** *

The expressions returned from a document that matches the search request.

*/ inline Hit& AddExprs(Aws::String&& key, const char* value) { m_exprsHasBeenSet = true; m_exprs.emplace(std::move(key), value); return *this; } /** *

The expressions returned from a document that matches the search request.

*/ inline Hit& AddExprs(const char* key, const char* value) { m_exprsHasBeenSet = true; m_exprs.emplace(key, value); return *this; } /** *

The highlights returned from a document that matches the search request.

*/ inline const Aws::Map& GetHighlights() const{ return m_highlights; } /** *

The highlights returned from a document that matches the search request.

*/ inline bool HighlightsHasBeenSet() const { return m_highlightsHasBeenSet; } /** *

The highlights returned from a document that matches the search request.

*/ inline void SetHighlights(const Aws::Map& value) { m_highlightsHasBeenSet = true; m_highlights = value; } /** *

The highlights returned from a document that matches the search request.

*/ inline void SetHighlights(Aws::Map&& value) { m_highlightsHasBeenSet = true; m_highlights = std::move(value); } /** *

The highlights returned from a document that matches the search request.

*/ inline Hit& WithHighlights(const Aws::Map& value) { SetHighlights(value); return *this;} /** *

The highlights returned from a document that matches the search request.

*/ inline Hit& WithHighlights(Aws::Map&& value) { SetHighlights(std::move(value)); return *this;} /** *

The highlights returned from a document that matches the search request.

*/ inline Hit& AddHighlights(const Aws::String& key, const Aws::String& value) { m_highlightsHasBeenSet = true; m_highlights.emplace(key, value); return *this; } /** *

The highlights returned from a document that matches the search request.

*/ inline Hit& AddHighlights(Aws::String&& key, const Aws::String& value) { m_highlightsHasBeenSet = true; m_highlights.emplace(std::move(key), value); return *this; } /** *

The highlights returned from a document that matches the search request.

*/ inline Hit& AddHighlights(const Aws::String& key, Aws::String&& value) { m_highlightsHasBeenSet = true; m_highlights.emplace(key, std::move(value)); return *this; } /** *

The highlights returned from a document that matches the search request.

*/ inline Hit& AddHighlights(Aws::String&& key, Aws::String&& value) { m_highlightsHasBeenSet = true; m_highlights.emplace(std::move(key), std::move(value)); return *this; } /** *

The highlights returned from a document that matches the search request.

*/ inline Hit& AddHighlights(const char* key, Aws::String&& value) { m_highlightsHasBeenSet = true; m_highlights.emplace(key, std::move(value)); return *this; } /** *

The highlights returned from a document that matches the search request.

*/ inline Hit& AddHighlights(Aws::String&& key, const char* value) { m_highlightsHasBeenSet = true; m_highlights.emplace(std::move(key), value); return *this; } /** *

The highlights returned from a document that matches the search request.

*/ 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 = false; Aws::Map> m_fields; bool m_fieldsHasBeenSet = false; Aws::Map m_exprs; bool m_exprsHasBeenSet = false; Aws::Map m_highlights; bool m_highlightsHasBeenSet = false; }; } // namespace Model } // namespace CloudSearchDomain } // namespace Aws