1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/redshift/Redshift_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSStreamFwd.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/core/utils/memory/stl/AWSVector.h> 11 #include <aws/redshift/model/UpdateTarget.h> 12 #include <utility> 13 14 namespace Aws 15 { 16 namespace Utils 17 { 18 namespace Xml 19 { 20 class XmlNode; 21 } // namespace Xml 22 } // namespace Utils 23 namespace Redshift 24 { 25 namespace Model 26 { 27 28 /** 29 * <p>Defines a maintenance track that determines which Amazon Redshift version to 30 * apply during a maintenance window. If the value for 31 * <code>MaintenanceTrack</code> is <code>current</code>, the cluster is updated to 32 * the most recently certified maintenance release. If the value is 33 * <code>trailing</code>, the cluster is updated to the previously certified 34 * maintenance release. </p><p><h3>See Also:</h3> <a 35 * href="http://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/MaintenanceTrack">AWS 36 * API Reference</a></p> 37 */ 38 class AWS_REDSHIFT_API MaintenanceTrack 39 { 40 public: 41 MaintenanceTrack(); 42 MaintenanceTrack(const Aws::Utils::Xml::XmlNode& xmlNode); 43 MaintenanceTrack& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); 44 45 void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; 46 void OutputToStream(Aws::OStream& oStream, const char* location) const; 47 48 49 /** 50 * <p>The name of the maintenance track. Possible values are <code>current</code> 51 * and <code>trailing</code>.</p> 52 */ GetMaintenanceTrackName()53 inline const Aws::String& GetMaintenanceTrackName() const{ return m_maintenanceTrackName; } 54 55 /** 56 * <p>The name of the maintenance track. Possible values are <code>current</code> 57 * and <code>trailing</code>.</p> 58 */ MaintenanceTrackNameHasBeenSet()59 inline bool MaintenanceTrackNameHasBeenSet() const { return m_maintenanceTrackNameHasBeenSet; } 60 61 /** 62 * <p>The name of the maintenance track. Possible values are <code>current</code> 63 * and <code>trailing</code>.</p> 64 */ SetMaintenanceTrackName(const Aws::String & value)65 inline void SetMaintenanceTrackName(const Aws::String& value) { m_maintenanceTrackNameHasBeenSet = true; m_maintenanceTrackName = value; } 66 67 /** 68 * <p>The name of the maintenance track. Possible values are <code>current</code> 69 * and <code>trailing</code>.</p> 70 */ SetMaintenanceTrackName(Aws::String && value)71 inline void SetMaintenanceTrackName(Aws::String&& value) { m_maintenanceTrackNameHasBeenSet = true; m_maintenanceTrackName = std::move(value); } 72 73 /** 74 * <p>The name of the maintenance track. Possible values are <code>current</code> 75 * and <code>trailing</code>.</p> 76 */ SetMaintenanceTrackName(const char * value)77 inline void SetMaintenanceTrackName(const char* value) { m_maintenanceTrackNameHasBeenSet = true; m_maintenanceTrackName.assign(value); } 78 79 /** 80 * <p>The name of the maintenance track. Possible values are <code>current</code> 81 * and <code>trailing</code>.</p> 82 */ WithMaintenanceTrackName(const Aws::String & value)83 inline MaintenanceTrack& WithMaintenanceTrackName(const Aws::String& value) { SetMaintenanceTrackName(value); return *this;} 84 85 /** 86 * <p>The name of the maintenance track. Possible values are <code>current</code> 87 * and <code>trailing</code>.</p> 88 */ WithMaintenanceTrackName(Aws::String && value)89 inline MaintenanceTrack& WithMaintenanceTrackName(Aws::String&& value) { SetMaintenanceTrackName(std::move(value)); return *this;} 90 91 /** 92 * <p>The name of the maintenance track. Possible values are <code>current</code> 93 * and <code>trailing</code>.</p> 94 */ WithMaintenanceTrackName(const char * value)95 inline MaintenanceTrack& WithMaintenanceTrackName(const char* value) { SetMaintenanceTrackName(value); return *this;} 96 97 98 /** 99 * <p>The version number for the cluster release.</p> 100 */ GetDatabaseVersion()101 inline const Aws::String& GetDatabaseVersion() const{ return m_databaseVersion; } 102 103 /** 104 * <p>The version number for the cluster release.</p> 105 */ DatabaseVersionHasBeenSet()106 inline bool DatabaseVersionHasBeenSet() const { return m_databaseVersionHasBeenSet; } 107 108 /** 109 * <p>The version number for the cluster release.</p> 110 */ SetDatabaseVersion(const Aws::String & value)111 inline void SetDatabaseVersion(const Aws::String& value) { m_databaseVersionHasBeenSet = true; m_databaseVersion = value; } 112 113 /** 114 * <p>The version number for the cluster release.</p> 115 */ SetDatabaseVersion(Aws::String && value)116 inline void SetDatabaseVersion(Aws::String&& value) { m_databaseVersionHasBeenSet = true; m_databaseVersion = std::move(value); } 117 118 /** 119 * <p>The version number for the cluster release.</p> 120 */ SetDatabaseVersion(const char * value)121 inline void SetDatabaseVersion(const char* value) { m_databaseVersionHasBeenSet = true; m_databaseVersion.assign(value); } 122 123 /** 124 * <p>The version number for the cluster release.</p> 125 */ WithDatabaseVersion(const Aws::String & value)126 inline MaintenanceTrack& WithDatabaseVersion(const Aws::String& value) { SetDatabaseVersion(value); return *this;} 127 128 /** 129 * <p>The version number for the cluster release.</p> 130 */ WithDatabaseVersion(Aws::String && value)131 inline MaintenanceTrack& WithDatabaseVersion(Aws::String&& value) { SetDatabaseVersion(std::move(value)); return *this;} 132 133 /** 134 * <p>The version number for the cluster release.</p> 135 */ WithDatabaseVersion(const char * value)136 inline MaintenanceTrack& WithDatabaseVersion(const char* value) { SetDatabaseVersion(value); return *this;} 137 138 139 /** 140 * <p>An array of <a>UpdateTarget</a> objects to update with the maintenance track. 141 * </p> 142 */ GetUpdateTargets()143 inline const Aws::Vector<UpdateTarget>& GetUpdateTargets() const{ return m_updateTargets; } 144 145 /** 146 * <p>An array of <a>UpdateTarget</a> objects to update with the maintenance track. 147 * </p> 148 */ UpdateTargetsHasBeenSet()149 inline bool UpdateTargetsHasBeenSet() const { return m_updateTargetsHasBeenSet; } 150 151 /** 152 * <p>An array of <a>UpdateTarget</a> objects to update with the maintenance track. 153 * </p> 154 */ SetUpdateTargets(const Aws::Vector<UpdateTarget> & value)155 inline void SetUpdateTargets(const Aws::Vector<UpdateTarget>& value) { m_updateTargetsHasBeenSet = true; m_updateTargets = value; } 156 157 /** 158 * <p>An array of <a>UpdateTarget</a> objects to update with the maintenance track. 159 * </p> 160 */ SetUpdateTargets(Aws::Vector<UpdateTarget> && value)161 inline void SetUpdateTargets(Aws::Vector<UpdateTarget>&& value) { m_updateTargetsHasBeenSet = true; m_updateTargets = std::move(value); } 162 163 /** 164 * <p>An array of <a>UpdateTarget</a> objects to update with the maintenance track. 165 * </p> 166 */ WithUpdateTargets(const Aws::Vector<UpdateTarget> & value)167 inline MaintenanceTrack& WithUpdateTargets(const Aws::Vector<UpdateTarget>& value) { SetUpdateTargets(value); return *this;} 168 169 /** 170 * <p>An array of <a>UpdateTarget</a> objects to update with the maintenance track. 171 * </p> 172 */ WithUpdateTargets(Aws::Vector<UpdateTarget> && value)173 inline MaintenanceTrack& WithUpdateTargets(Aws::Vector<UpdateTarget>&& value) { SetUpdateTargets(std::move(value)); return *this;} 174 175 /** 176 * <p>An array of <a>UpdateTarget</a> objects to update with the maintenance track. 177 * </p> 178 */ AddUpdateTargets(const UpdateTarget & value)179 inline MaintenanceTrack& AddUpdateTargets(const UpdateTarget& value) { m_updateTargetsHasBeenSet = true; m_updateTargets.push_back(value); return *this; } 180 181 /** 182 * <p>An array of <a>UpdateTarget</a> objects to update with the maintenance track. 183 * </p> 184 */ AddUpdateTargets(UpdateTarget && value)185 inline MaintenanceTrack& AddUpdateTargets(UpdateTarget&& value) { m_updateTargetsHasBeenSet = true; m_updateTargets.push_back(std::move(value)); return *this; } 186 187 private: 188 189 Aws::String m_maintenanceTrackName; 190 bool m_maintenanceTrackNameHasBeenSet; 191 192 Aws::String m_databaseVersion; 193 bool m_databaseVersionHasBeenSet; 194 195 Aws::Vector<UpdateTarget> m_updateTargets; 196 bool m_updateTargetsHasBeenSet; 197 }; 198 199 } // namespace Model 200 } // namespace Redshift 201 } // namespace Aws 202