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

A map of OpenSearch or Elasticsearch versions and the versions you can * upgrade them to.

See Also:

AWS * API Reference

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

The current version that the OpenSearch Service domain is running.

*/ inline const Aws::String& GetSourceVersion() const{ return m_sourceVersion; } /** *

The current version that the OpenSearch Service domain is running.

*/ inline bool SourceVersionHasBeenSet() const { return m_sourceVersionHasBeenSet; } /** *

The current version that the OpenSearch Service domain is running.

*/ inline void SetSourceVersion(const Aws::String& value) { m_sourceVersionHasBeenSet = true; m_sourceVersion = value; } /** *

The current version that the OpenSearch Service domain is running.

*/ inline void SetSourceVersion(Aws::String&& value) { m_sourceVersionHasBeenSet = true; m_sourceVersion = std::move(value); } /** *

The current version that the OpenSearch Service domain is running.

*/ inline void SetSourceVersion(const char* value) { m_sourceVersionHasBeenSet = true; m_sourceVersion.assign(value); } /** *

The current version that the OpenSearch Service domain is running.

*/ inline CompatibleVersionsMap& WithSourceVersion(const Aws::String& value) { SetSourceVersion(value); return *this;} /** *

The current version that the OpenSearch Service domain is running.

*/ inline CompatibleVersionsMap& WithSourceVersion(Aws::String&& value) { SetSourceVersion(std::move(value)); return *this;} /** *

The current version that the OpenSearch Service domain is running.

*/ inline CompatibleVersionsMap& WithSourceVersion(const char* value) { SetSourceVersion(value); return *this;} /** *

The possible versions that you can upgrade the domain to.

*/ inline const Aws::Vector& GetTargetVersions() const{ return m_targetVersions; } /** *

The possible versions that you can upgrade the domain to.

*/ inline bool TargetVersionsHasBeenSet() const { return m_targetVersionsHasBeenSet; } /** *

The possible versions that you can upgrade the domain to.

*/ inline void SetTargetVersions(const Aws::Vector& value) { m_targetVersionsHasBeenSet = true; m_targetVersions = value; } /** *

The possible versions that you can upgrade the domain to.

*/ inline void SetTargetVersions(Aws::Vector&& value) { m_targetVersionsHasBeenSet = true; m_targetVersions = std::move(value); } /** *

The possible versions that you can upgrade the domain to.

*/ inline CompatibleVersionsMap& WithTargetVersions(const Aws::Vector& value) { SetTargetVersions(value); return *this;} /** *

The possible versions that you can upgrade the domain to.

*/ inline CompatibleVersionsMap& WithTargetVersions(Aws::Vector&& value) { SetTargetVersions(std::move(value)); return *this;} /** *

The possible versions that you can upgrade the domain to.

*/ inline CompatibleVersionsMap& AddTargetVersions(const Aws::String& value) { m_targetVersionsHasBeenSet = true; m_targetVersions.push_back(value); return *this; } /** *

The possible versions that you can upgrade the domain to.

*/ inline CompatibleVersionsMap& AddTargetVersions(Aws::String&& value) { m_targetVersionsHasBeenSet = true; m_targetVersions.push_back(std::move(value)); return *this; } /** *

The possible versions that you can upgrade the domain to.

*/ inline CompatibleVersionsMap& AddTargetVersions(const char* value) { m_targetVersionsHasBeenSet = true; m_targetVersions.push_back(value); return *this; } private: Aws::String m_sourceVersion; bool m_sourceVersionHasBeenSet = false; Aws::Vector m_targetVersions; bool m_targetVersionsHasBeenSet = false; }; } // namespace Model } // namespace OpenSearchService } // namespace Aws