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

The duration of a maintenance schedule. For more information, see Auto-Tune * for Amazon OpenSearch Service.

See Also:

AWS * API Reference

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

Integer to specify the value of a maintenance schedule duration.

*/ inline long long GetValue() const{ return m_value; } /** *

Integer to specify the value of a maintenance schedule duration.

*/ inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; } /** *

Integer to specify the value of a maintenance schedule duration.

*/ inline void SetValue(long long value) { m_valueHasBeenSet = true; m_value = value; } /** *

Integer to specify the value of a maintenance schedule duration.

*/ inline Duration& WithValue(long long value) { SetValue(value); return *this;} /** *

The unit of measurement for the duration of a maintenance schedule.

*/ inline const TimeUnit& GetUnit() const{ return m_unit; } /** *

The unit of measurement for the duration of a maintenance schedule.

*/ inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; } /** *

The unit of measurement for the duration of a maintenance schedule.

*/ inline void SetUnit(const TimeUnit& value) { m_unitHasBeenSet = true; m_unit = value; } /** *

The unit of measurement for the duration of a maintenance schedule.

*/ inline void SetUnit(TimeUnit&& value) { m_unitHasBeenSet = true; m_unit = std::move(value); } /** *

The unit of measurement for the duration of a maintenance schedule.

*/ inline Duration& WithUnit(const TimeUnit& value) { SetUnit(value); return *this;} /** *

The unit of measurement for the duration of a maintenance schedule.

*/ inline Duration& WithUnit(TimeUnit&& value) { SetUnit(std::move(value)); return *this;} private: long long m_value; bool m_valueHasBeenSet = false; TimeUnit m_unit; bool m_unitHasBeenSet = false; }; } // namespace Model } // namespace OpenSearchService } // namespace Aws