/** * 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 ElasticsearchService { namespace Model { /** *

Specifies maintenance schedule duration: duration value and duration unit. * See the Developer Guide for more information.

See * Also:

AWS API * Reference

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

Integer to specify the value of a maintenance schedule duration. See the Developer Guide for more information.

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

Integer to specify the value of a maintenance schedule duration. See the Developer Guide for more information.

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

Integer to specify the value of a maintenance schedule duration. See the Developer Guide for more information.

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

Integer to specify the value of a maintenance schedule duration. See the Developer Guide for more information.

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

Specifies the unit of a maintenance schedule duration. Valid value is HOURS. * See the Developer Guide for more information.

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

Specifies the unit of a maintenance schedule duration. Valid value is HOURS. * See the Developer Guide for more information.

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

Specifies the unit of a maintenance schedule duration. Valid value is HOURS. * See the Developer Guide for more information.

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

Specifies the unit of a maintenance schedule duration. Valid value is HOURS. * See the Developer Guide for more information.

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

Specifies the unit of a maintenance schedule duration. Valid value is HOURS. * See the Developer Guide for more information.

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

Specifies the unit of a maintenance schedule duration. Valid value is HOURS. * See the Developer Guide for more information.

*/ 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 ElasticsearchService } // namespace Aws