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

Auto-Tune settings when updating a domain. For more information, see Auto-Tune * for Amazon OpenSearch Service.

See Also:

AWS * API Reference

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

Whether Auto-Tune is enabled or disabled.

*/ inline const AutoTuneDesiredState& GetDesiredState() const{ return m_desiredState; } /** *

Whether Auto-Tune is enabled or disabled.

*/ inline bool DesiredStateHasBeenSet() const { return m_desiredStateHasBeenSet; } /** *

Whether Auto-Tune is enabled or disabled.

*/ inline void SetDesiredState(const AutoTuneDesiredState& value) { m_desiredStateHasBeenSet = true; m_desiredState = value; } /** *

Whether Auto-Tune is enabled or disabled.

*/ inline void SetDesiredState(AutoTuneDesiredState&& value) { m_desiredStateHasBeenSet = true; m_desiredState = std::move(value); } /** *

Whether Auto-Tune is enabled or disabled.

*/ inline AutoTuneOptions& WithDesiredState(const AutoTuneDesiredState& value) { SetDesiredState(value); return *this;} /** *

Whether Auto-Tune is enabled or disabled.

*/ inline AutoTuneOptions& WithDesiredState(AutoTuneDesiredState&& value) { SetDesiredState(std::move(value)); return *this;} /** *

When disabling Auto-Tune, specify NO_ROLLBACK to retain all * prior Auto-Tune settings or DEFAULT_ROLLBACK to revert to the * OpenSearch Service defaults. If you specify DEFAULT_ROLLBACK, you * must include a MaintenanceSchedule in the request. Otherwise, * OpenSearch Service is unable to perform the rollback.

*/ inline const RollbackOnDisable& GetRollbackOnDisable() const{ return m_rollbackOnDisable; } /** *

When disabling Auto-Tune, specify NO_ROLLBACK to retain all * prior Auto-Tune settings or DEFAULT_ROLLBACK to revert to the * OpenSearch Service defaults. If you specify DEFAULT_ROLLBACK, you * must include a MaintenanceSchedule in the request. Otherwise, * OpenSearch Service is unable to perform the rollback.

*/ inline bool RollbackOnDisableHasBeenSet() const { return m_rollbackOnDisableHasBeenSet; } /** *

When disabling Auto-Tune, specify NO_ROLLBACK to retain all * prior Auto-Tune settings or DEFAULT_ROLLBACK to revert to the * OpenSearch Service defaults. If you specify DEFAULT_ROLLBACK, you * must include a MaintenanceSchedule in the request. Otherwise, * OpenSearch Service is unable to perform the rollback.

*/ inline void SetRollbackOnDisable(const RollbackOnDisable& value) { m_rollbackOnDisableHasBeenSet = true; m_rollbackOnDisable = value; } /** *

When disabling Auto-Tune, specify NO_ROLLBACK to retain all * prior Auto-Tune settings or DEFAULT_ROLLBACK to revert to the * OpenSearch Service defaults. If you specify DEFAULT_ROLLBACK, you * must include a MaintenanceSchedule in the request. Otherwise, * OpenSearch Service is unable to perform the rollback.

*/ inline void SetRollbackOnDisable(RollbackOnDisable&& value) { m_rollbackOnDisableHasBeenSet = true; m_rollbackOnDisable = std::move(value); } /** *

When disabling Auto-Tune, specify NO_ROLLBACK to retain all * prior Auto-Tune settings or DEFAULT_ROLLBACK to revert to the * OpenSearch Service defaults. If you specify DEFAULT_ROLLBACK, you * must include a MaintenanceSchedule in the request. Otherwise, * OpenSearch Service is unable to perform the rollback.

*/ inline AutoTuneOptions& WithRollbackOnDisable(const RollbackOnDisable& value) { SetRollbackOnDisable(value); return *this;} /** *

When disabling Auto-Tune, specify NO_ROLLBACK to retain all * prior Auto-Tune settings or DEFAULT_ROLLBACK to revert to the * OpenSearch Service defaults. If you specify DEFAULT_ROLLBACK, you * must include a MaintenanceSchedule in the request. Otherwise, * OpenSearch Service is unable to perform the rollback.

*/ inline AutoTuneOptions& WithRollbackOnDisable(RollbackOnDisable&& value) { SetRollbackOnDisable(std::move(value)); return *this;} /** *

DEPRECATED. Use off-peak * window instead.

A list of maintenance schedules during which * Auto-Tune can deploy changes.

*/ inline const Aws::Vector& GetMaintenanceSchedules() const{ return m_maintenanceSchedules; } /** *

DEPRECATED. Use off-peak * window instead.

A list of maintenance schedules during which * Auto-Tune can deploy changes.

*/ inline bool MaintenanceSchedulesHasBeenSet() const { return m_maintenanceSchedulesHasBeenSet; } /** *

DEPRECATED. Use off-peak * window instead.

A list of maintenance schedules during which * Auto-Tune can deploy changes.

*/ inline void SetMaintenanceSchedules(const Aws::Vector& value) { m_maintenanceSchedulesHasBeenSet = true; m_maintenanceSchedules = value; } /** *

DEPRECATED. Use off-peak * window instead.

A list of maintenance schedules during which * Auto-Tune can deploy changes.

*/ inline void SetMaintenanceSchedules(Aws::Vector&& value) { m_maintenanceSchedulesHasBeenSet = true; m_maintenanceSchedules = std::move(value); } /** *

DEPRECATED. Use off-peak * window instead.

A list of maintenance schedules during which * Auto-Tune can deploy changes.

*/ inline AutoTuneOptions& WithMaintenanceSchedules(const Aws::Vector& value) { SetMaintenanceSchedules(value); return *this;} /** *

DEPRECATED. Use off-peak * window instead.

A list of maintenance schedules during which * Auto-Tune can deploy changes.

*/ inline AutoTuneOptions& WithMaintenanceSchedules(Aws::Vector&& value) { SetMaintenanceSchedules(std::move(value)); return *this;} /** *

DEPRECATED. Use off-peak * window instead.

A list of maintenance schedules during which * Auto-Tune can deploy changes.

*/ inline AutoTuneOptions& AddMaintenanceSchedules(const AutoTuneMaintenanceSchedule& value) { m_maintenanceSchedulesHasBeenSet = true; m_maintenanceSchedules.push_back(value); return *this; } /** *

DEPRECATED. Use off-peak * window instead.

A list of maintenance schedules during which * Auto-Tune can deploy changes.

*/ inline AutoTuneOptions& AddMaintenanceSchedules(AutoTuneMaintenanceSchedule&& value) { m_maintenanceSchedulesHasBeenSet = true; m_maintenanceSchedules.push_back(std::move(value)); return *this; } /** *

Whether to use the domain's off-peak * window to deploy configuration changes on the domain rather than a * maintenance schedule.

*/ inline bool GetUseOffPeakWindow() const{ return m_useOffPeakWindow; } /** *

Whether to use the domain's off-peak * window to deploy configuration changes on the domain rather than a * maintenance schedule.

*/ inline bool UseOffPeakWindowHasBeenSet() const { return m_useOffPeakWindowHasBeenSet; } /** *

Whether to use the domain's off-peak * window to deploy configuration changes on the domain rather than a * maintenance schedule.

*/ inline void SetUseOffPeakWindow(bool value) { m_useOffPeakWindowHasBeenSet = true; m_useOffPeakWindow = value; } /** *

Whether to use the domain's off-peak * window to deploy configuration changes on the domain rather than a * maintenance schedule.

*/ inline AutoTuneOptions& WithUseOffPeakWindow(bool value) { SetUseOffPeakWindow(value); return *this;} private: AutoTuneDesiredState m_desiredState; bool m_desiredStateHasBeenSet = false; RollbackOnDisable m_rollbackOnDisable; bool m_rollbackOnDisableHasBeenSet = false; Aws::Vector m_maintenanceSchedules; bool m_maintenanceSchedulesHasBeenSet = false; bool m_useOffPeakWindow; bool m_useOffPeakWindowHasBeenSet = false; }; } // namespace Model } // namespace OpenSearchService } // namespace Aws