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/sagemaker/SageMaker_EXPORTS.h> 8 #include <aws/sagemaker/SageMakerRequest.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/sagemaker/model/ActionSource.h> 11 #include <aws/sagemaker/model/ActionStatus.h> 12 #include <aws/core/utils/memory/stl/AWSMap.h> 13 #include <aws/sagemaker/model/MetadataProperties.h> 14 #include <aws/core/utils/memory/stl/AWSVector.h> 15 #include <aws/sagemaker/model/Tag.h> 16 #include <utility> 17 18 namespace Aws 19 { 20 namespace SageMaker 21 { 22 namespace Model 23 { 24 25 /** 26 */ 27 class AWS_SAGEMAKER_API CreateActionRequest : public SageMakerRequest 28 { 29 public: 30 CreateActionRequest(); 31 32 // Service request name is the Operation name which will send this request out, 33 // each operation should has unique request name, so that we can get operation's name from this request. 34 // Note: this is not true for response, multiple operations may have the same response name, 35 // so we can not get operation's name from response. GetServiceRequestName()36 inline virtual const char* GetServiceRequestName() const override { return "CreateAction"; } 37 38 Aws::String SerializePayload() const override; 39 40 Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; 41 42 43 /** 44 * <p>The name of the action. Must be unique to your account in an Amazon Web 45 * Services Region.</p> 46 */ GetActionName()47 inline const Aws::String& GetActionName() const{ return m_actionName; } 48 49 /** 50 * <p>The name of the action. Must be unique to your account in an Amazon Web 51 * Services Region.</p> 52 */ ActionNameHasBeenSet()53 inline bool ActionNameHasBeenSet() const { return m_actionNameHasBeenSet; } 54 55 /** 56 * <p>The name of the action. Must be unique to your account in an Amazon Web 57 * Services Region.</p> 58 */ SetActionName(const Aws::String & value)59 inline void SetActionName(const Aws::String& value) { m_actionNameHasBeenSet = true; m_actionName = value; } 60 61 /** 62 * <p>The name of the action. Must be unique to your account in an Amazon Web 63 * Services Region.</p> 64 */ SetActionName(Aws::String && value)65 inline void SetActionName(Aws::String&& value) { m_actionNameHasBeenSet = true; m_actionName = std::move(value); } 66 67 /** 68 * <p>The name of the action. Must be unique to your account in an Amazon Web 69 * Services Region.</p> 70 */ SetActionName(const char * value)71 inline void SetActionName(const char* value) { m_actionNameHasBeenSet = true; m_actionName.assign(value); } 72 73 /** 74 * <p>The name of the action. Must be unique to your account in an Amazon Web 75 * Services Region.</p> 76 */ WithActionName(const Aws::String & value)77 inline CreateActionRequest& WithActionName(const Aws::String& value) { SetActionName(value); return *this;} 78 79 /** 80 * <p>The name of the action. Must be unique to your account in an Amazon Web 81 * Services Region.</p> 82 */ WithActionName(Aws::String && value)83 inline CreateActionRequest& WithActionName(Aws::String&& value) { SetActionName(std::move(value)); return *this;} 84 85 /** 86 * <p>The name of the action. Must be unique to your account in an Amazon Web 87 * Services Region.</p> 88 */ WithActionName(const char * value)89 inline CreateActionRequest& WithActionName(const char* value) { SetActionName(value); return *this;} 90 91 92 /** 93 * <p>The source type, ID, and URI.</p> 94 */ GetSource()95 inline const ActionSource& GetSource() const{ return m_source; } 96 97 /** 98 * <p>The source type, ID, and URI.</p> 99 */ SourceHasBeenSet()100 inline bool SourceHasBeenSet() const { return m_sourceHasBeenSet; } 101 102 /** 103 * <p>The source type, ID, and URI.</p> 104 */ SetSource(const ActionSource & value)105 inline void SetSource(const ActionSource& value) { m_sourceHasBeenSet = true; m_source = value; } 106 107 /** 108 * <p>The source type, ID, and URI.</p> 109 */ SetSource(ActionSource && value)110 inline void SetSource(ActionSource&& value) { m_sourceHasBeenSet = true; m_source = std::move(value); } 111 112 /** 113 * <p>The source type, ID, and URI.</p> 114 */ WithSource(const ActionSource & value)115 inline CreateActionRequest& WithSource(const ActionSource& value) { SetSource(value); return *this;} 116 117 /** 118 * <p>The source type, ID, and URI.</p> 119 */ WithSource(ActionSource && value)120 inline CreateActionRequest& WithSource(ActionSource&& value) { SetSource(std::move(value)); return *this;} 121 122 123 /** 124 * <p>The action type.</p> 125 */ GetActionType()126 inline const Aws::String& GetActionType() const{ return m_actionType; } 127 128 /** 129 * <p>The action type.</p> 130 */ ActionTypeHasBeenSet()131 inline bool ActionTypeHasBeenSet() const { return m_actionTypeHasBeenSet; } 132 133 /** 134 * <p>The action type.</p> 135 */ SetActionType(const Aws::String & value)136 inline void SetActionType(const Aws::String& value) { m_actionTypeHasBeenSet = true; m_actionType = value; } 137 138 /** 139 * <p>The action type.</p> 140 */ SetActionType(Aws::String && value)141 inline void SetActionType(Aws::String&& value) { m_actionTypeHasBeenSet = true; m_actionType = std::move(value); } 142 143 /** 144 * <p>The action type.</p> 145 */ SetActionType(const char * value)146 inline void SetActionType(const char* value) { m_actionTypeHasBeenSet = true; m_actionType.assign(value); } 147 148 /** 149 * <p>The action type.</p> 150 */ WithActionType(const Aws::String & value)151 inline CreateActionRequest& WithActionType(const Aws::String& value) { SetActionType(value); return *this;} 152 153 /** 154 * <p>The action type.</p> 155 */ WithActionType(Aws::String && value)156 inline CreateActionRequest& WithActionType(Aws::String&& value) { SetActionType(std::move(value)); return *this;} 157 158 /** 159 * <p>The action type.</p> 160 */ WithActionType(const char * value)161 inline CreateActionRequest& WithActionType(const char* value) { SetActionType(value); return *this;} 162 163 164 /** 165 * <p>The description of the action.</p> 166 */ GetDescription()167 inline const Aws::String& GetDescription() const{ return m_description; } 168 169 /** 170 * <p>The description of the action.</p> 171 */ DescriptionHasBeenSet()172 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } 173 174 /** 175 * <p>The description of the action.</p> 176 */ SetDescription(const Aws::String & value)177 inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } 178 179 /** 180 * <p>The description of the action.</p> 181 */ SetDescription(Aws::String && value)182 inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } 183 184 /** 185 * <p>The description of the action.</p> 186 */ SetDescription(const char * value)187 inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } 188 189 /** 190 * <p>The description of the action.</p> 191 */ WithDescription(const Aws::String & value)192 inline CreateActionRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} 193 194 /** 195 * <p>The description of the action.</p> 196 */ WithDescription(Aws::String && value)197 inline CreateActionRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} 198 199 /** 200 * <p>The description of the action.</p> 201 */ WithDescription(const char * value)202 inline CreateActionRequest& WithDescription(const char* value) { SetDescription(value); return *this;} 203 204 205 /** 206 * <p>The status of the action.</p> 207 */ GetStatus()208 inline const ActionStatus& GetStatus() const{ return m_status; } 209 210 /** 211 * <p>The status of the action.</p> 212 */ StatusHasBeenSet()213 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } 214 215 /** 216 * <p>The status of the action.</p> 217 */ SetStatus(const ActionStatus & value)218 inline void SetStatus(const ActionStatus& value) { m_statusHasBeenSet = true; m_status = value; } 219 220 /** 221 * <p>The status of the action.</p> 222 */ SetStatus(ActionStatus && value)223 inline void SetStatus(ActionStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } 224 225 /** 226 * <p>The status of the action.</p> 227 */ WithStatus(const ActionStatus & value)228 inline CreateActionRequest& WithStatus(const ActionStatus& value) { SetStatus(value); return *this;} 229 230 /** 231 * <p>The status of the action.</p> 232 */ WithStatus(ActionStatus && value)233 inline CreateActionRequest& WithStatus(ActionStatus&& value) { SetStatus(std::move(value)); return *this;} 234 235 236 /** 237 * <p>A list of properties to add to the action.</p> 238 */ GetProperties()239 inline const Aws::Map<Aws::String, Aws::String>& GetProperties() const{ return m_properties; } 240 241 /** 242 * <p>A list of properties to add to the action.</p> 243 */ PropertiesHasBeenSet()244 inline bool PropertiesHasBeenSet() const { return m_propertiesHasBeenSet; } 245 246 /** 247 * <p>A list of properties to add to the action.</p> 248 */ SetProperties(const Aws::Map<Aws::String,Aws::String> & value)249 inline void SetProperties(const Aws::Map<Aws::String, Aws::String>& value) { m_propertiesHasBeenSet = true; m_properties = value; } 250 251 /** 252 * <p>A list of properties to add to the action.</p> 253 */ SetProperties(Aws::Map<Aws::String,Aws::String> && value)254 inline void SetProperties(Aws::Map<Aws::String, Aws::String>&& value) { m_propertiesHasBeenSet = true; m_properties = std::move(value); } 255 256 /** 257 * <p>A list of properties to add to the action.</p> 258 */ WithProperties(const Aws::Map<Aws::String,Aws::String> & value)259 inline CreateActionRequest& WithProperties(const Aws::Map<Aws::String, Aws::String>& value) { SetProperties(value); return *this;} 260 261 /** 262 * <p>A list of properties to add to the action.</p> 263 */ WithProperties(Aws::Map<Aws::String,Aws::String> && value)264 inline CreateActionRequest& WithProperties(Aws::Map<Aws::String, Aws::String>&& value) { SetProperties(std::move(value)); return *this;} 265 266 /** 267 * <p>A list of properties to add to the action.</p> 268 */ AddProperties(const Aws::String & key,const Aws::String & value)269 inline CreateActionRequest& AddProperties(const Aws::String& key, const Aws::String& value) { m_propertiesHasBeenSet = true; m_properties.emplace(key, value); return *this; } 270 271 /** 272 * <p>A list of properties to add to the action.</p> 273 */ AddProperties(Aws::String && key,const Aws::String & value)274 inline CreateActionRequest& AddProperties(Aws::String&& key, const Aws::String& value) { m_propertiesHasBeenSet = true; m_properties.emplace(std::move(key), value); return *this; } 275 276 /** 277 * <p>A list of properties to add to the action.</p> 278 */ AddProperties(const Aws::String & key,Aws::String && value)279 inline CreateActionRequest& AddProperties(const Aws::String& key, Aws::String&& value) { m_propertiesHasBeenSet = true; m_properties.emplace(key, std::move(value)); return *this; } 280 281 /** 282 * <p>A list of properties to add to the action.</p> 283 */ AddProperties(Aws::String && key,Aws::String && value)284 inline CreateActionRequest& AddProperties(Aws::String&& key, Aws::String&& value) { m_propertiesHasBeenSet = true; m_properties.emplace(std::move(key), std::move(value)); return *this; } 285 286 /** 287 * <p>A list of properties to add to the action.</p> 288 */ AddProperties(const char * key,Aws::String && value)289 inline CreateActionRequest& AddProperties(const char* key, Aws::String&& value) { m_propertiesHasBeenSet = true; m_properties.emplace(key, std::move(value)); return *this; } 290 291 /** 292 * <p>A list of properties to add to the action.</p> 293 */ AddProperties(Aws::String && key,const char * value)294 inline CreateActionRequest& AddProperties(Aws::String&& key, const char* value) { m_propertiesHasBeenSet = true; m_properties.emplace(std::move(key), value); return *this; } 295 296 /** 297 * <p>A list of properties to add to the action.</p> 298 */ AddProperties(const char * key,const char * value)299 inline CreateActionRequest& AddProperties(const char* key, const char* value) { m_propertiesHasBeenSet = true; m_properties.emplace(key, value); return *this; } 300 301 302 GetMetadataProperties()303 inline const MetadataProperties& GetMetadataProperties() const{ return m_metadataProperties; } 304 305 MetadataPropertiesHasBeenSet()306 inline bool MetadataPropertiesHasBeenSet() const { return m_metadataPropertiesHasBeenSet; } 307 308 SetMetadataProperties(const MetadataProperties & value)309 inline void SetMetadataProperties(const MetadataProperties& value) { m_metadataPropertiesHasBeenSet = true; m_metadataProperties = value; } 310 311 SetMetadataProperties(MetadataProperties && value)312 inline void SetMetadataProperties(MetadataProperties&& value) { m_metadataPropertiesHasBeenSet = true; m_metadataProperties = std::move(value); } 313 314 WithMetadataProperties(const MetadataProperties & value)315 inline CreateActionRequest& WithMetadataProperties(const MetadataProperties& value) { SetMetadataProperties(value); return *this;} 316 317 WithMetadataProperties(MetadataProperties && value)318 inline CreateActionRequest& WithMetadataProperties(MetadataProperties&& value) { SetMetadataProperties(std::move(value)); return *this;} 319 320 321 /** 322 * <p>A list of tags to apply to the action.</p> 323 */ GetTags()324 inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; } 325 326 /** 327 * <p>A list of tags to apply to the action.</p> 328 */ TagsHasBeenSet()329 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } 330 331 /** 332 * <p>A list of tags to apply to the action.</p> 333 */ SetTags(const Aws::Vector<Tag> & value)334 inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; } 335 336 /** 337 * <p>A list of tags to apply to the action.</p> 338 */ SetTags(Aws::Vector<Tag> && value)339 inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } 340 341 /** 342 * <p>A list of tags to apply to the action.</p> 343 */ WithTags(const Aws::Vector<Tag> & value)344 inline CreateActionRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;} 345 346 /** 347 * <p>A list of tags to apply to the action.</p> 348 */ WithTags(Aws::Vector<Tag> && value)349 inline CreateActionRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;} 350 351 /** 352 * <p>A list of tags to apply to the action.</p> 353 */ AddTags(const Tag & value)354 inline CreateActionRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } 355 356 /** 357 * <p>A list of tags to apply to the action.</p> 358 */ AddTags(Tag && value)359 inline CreateActionRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } 360 361 private: 362 363 Aws::String m_actionName; 364 bool m_actionNameHasBeenSet; 365 366 ActionSource m_source; 367 bool m_sourceHasBeenSet; 368 369 Aws::String m_actionType; 370 bool m_actionTypeHasBeenSet; 371 372 Aws::String m_description; 373 bool m_descriptionHasBeenSet; 374 375 ActionStatus m_status; 376 bool m_statusHasBeenSet; 377 378 Aws::Map<Aws::String, Aws::String> m_properties; 379 bool m_propertiesHasBeenSet; 380 381 MetadataProperties m_metadataProperties; 382 bool m_metadataPropertiesHasBeenSet; 383 384 Aws::Vector<Tag> m_tags; 385 bool m_tagsHasBeenSet; 386 }; 387 388 } // namespace Model 389 } // namespace SageMaker 390 } // namespace Aws 391