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/model/BatchStrategy.h> 9 #include <aws/core/utils/memory/stl/AWSMap.h> 10 #include <aws/sagemaker/model/TransformInput.h> 11 #include <aws/sagemaker/model/TransformOutput.h> 12 #include <aws/sagemaker/model/TransformResources.h> 13 #include <aws/core/utils/memory/stl/AWSString.h> 14 #include <utility> 15 16 namespace Aws 17 { 18 namespace Utils 19 { 20 namespace Json 21 { 22 class JsonValue; 23 class JsonView; 24 } // namespace Json 25 } // namespace Utils 26 namespace SageMaker 27 { 28 namespace Model 29 { 30 31 /** 32 * <p>Defines the input needed to run a transform job using the inference 33 * specification specified in the algorithm.</p><p><h3>See Also:</h3> <a 34 * href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/TransformJobDefinition">AWS 35 * API Reference</a></p> 36 */ 37 class AWS_SAGEMAKER_API TransformJobDefinition 38 { 39 public: 40 TransformJobDefinition(); 41 TransformJobDefinition(Aws::Utils::Json::JsonView jsonValue); 42 TransformJobDefinition& operator=(Aws::Utils::Json::JsonView jsonValue); 43 Aws::Utils::Json::JsonValue Jsonize() const; 44 45 46 /** 47 * <p>The maximum number of parallel requests that can be sent to each instance in 48 * a transform job. The default value is 1.</p> 49 */ GetMaxConcurrentTransforms()50 inline int GetMaxConcurrentTransforms() const{ return m_maxConcurrentTransforms; } 51 52 /** 53 * <p>The maximum number of parallel requests that can be sent to each instance in 54 * a transform job. The default value is 1.</p> 55 */ MaxConcurrentTransformsHasBeenSet()56 inline bool MaxConcurrentTransformsHasBeenSet() const { return m_maxConcurrentTransformsHasBeenSet; } 57 58 /** 59 * <p>The maximum number of parallel requests that can be sent to each instance in 60 * a transform job. The default value is 1.</p> 61 */ SetMaxConcurrentTransforms(int value)62 inline void SetMaxConcurrentTransforms(int value) { m_maxConcurrentTransformsHasBeenSet = true; m_maxConcurrentTransforms = value; } 63 64 /** 65 * <p>The maximum number of parallel requests that can be sent to each instance in 66 * a transform job. The default value is 1.</p> 67 */ WithMaxConcurrentTransforms(int value)68 inline TransformJobDefinition& WithMaxConcurrentTransforms(int value) { SetMaxConcurrentTransforms(value); return *this;} 69 70 71 /** 72 * <p>The maximum payload size allowed, in MB. A payload is the data portion of a 73 * record (without metadata).</p> 74 */ GetMaxPayloadInMB()75 inline int GetMaxPayloadInMB() const{ return m_maxPayloadInMB; } 76 77 /** 78 * <p>The maximum payload size allowed, in MB. A payload is the data portion of a 79 * record (without metadata).</p> 80 */ MaxPayloadInMBHasBeenSet()81 inline bool MaxPayloadInMBHasBeenSet() const { return m_maxPayloadInMBHasBeenSet; } 82 83 /** 84 * <p>The maximum payload size allowed, in MB. A payload is the data portion of a 85 * record (without metadata).</p> 86 */ SetMaxPayloadInMB(int value)87 inline void SetMaxPayloadInMB(int value) { m_maxPayloadInMBHasBeenSet = true; m_maxPayloadInMB = value; } 88 89 /** 90 * <p>The maximum payload size allowed, in MB. A payload is the data portion of a 91 * record (without metadata).</p> 92 */ WithMaxPayloadInMB(int value)93 inline TransformJobDefinition& WithMaxPayloadInMB(int value) { SetMaxPayloadInMB(value); return *this;} 94 95 96 /** 97 * <p>A string that determines the number of records included in a single 98 * mini-batch.</p> <p> <code>SingleRecord</code> means only one record is used per 99 * mini-batch. <code>MultiRecord</code> means a mini-batch is set to contain as 100 * many records that can fit within the <code>MaxPayloadInMB</code> limit.</p> 101 */ GetBatchStrategy()102 inline const BatchStrategy& GetBatchStrategy() const{ return m_batchStrategy; } 103 104 /** 105 * <p>A string that determines the number of records included in a single 106 * mini-batch.</p> <p> <code>SingleRecord</code> means only one record is used per 107 * mini-batch. <code>MultiRecord</code> means a mini-batch is set to contain as 108 * many records that can fit within the <code>MaxPayloadInMB</code> limit.</p> 109 */ BatchStrategyHasBeenSet()110 inline bool BatchStrategyHasBeenSet() const { return m_batchStrategyHasBeenSet; } 111 112 /** 113 * <p>A string that determines the number of records included in a single 114 * mini-batch.</p> <p> <code>SingleRecord</code> means only one record is used per 115 * mini-batch. <code>MultiRecord</code> means a mini-batch is set to contain as 116 * many records that can fit within the <code>MaxPayloadInMB</code> limit.</p> 117 */ SetBatchStrategy(const BatchStrategy & value)118 inline void SetBatchStrategy(const BatchStrategy& value) { m_batchStrategyHasBeenSet = true; m_batchStrategy = value; } 119 120 /** 121 * <p>A string that determines the number of records included in a single 122 * mini-batch.</p> <p> <code>SingleRecord</code> means only one record is used per 123 * mini-batch. <code>MultiRecord</code> means a mini-batch is set to contain as 124 * many records that can fit within the <code>MaxPayloadInMB</code> limit.</p> 125 */ SetBatchStrategy(BatchStrategy && value)126 inline void SetBatchStrategy(BatchStrategy&& value) { m_batchStrategyHasBeenSet = true; m_batchStrategy = std::move(value); } 127 128 /** 129 * <p>A string that determines the number of records included in a single 130 * mini-batch.</p> <p> <code>SingleRecord</code> means only one record is used per 131 * mini-batch. <code>MultiRecord</code> means a mini-batch is set to contain as 132 * many records that can fit within the <code>MaxPayloadInMB</code> limit.</p> 133 */ WithBatchStrategy(const BatchStrategy & value)134 inline TransformJobDefinition& WithBatchStrategy(const BatchStrategy& value) { SetBatchStrategy(value); return *this;} 135 136 /** 137 * <p>A string that determines the number of records included in a single 138 * mini-batch.</p> <p> <code>SingleRecord</code> means only one record is used per 139 * mini-batch. <code>MultiRecord</code> means a mini-batch is set to contain as 140 * many records that can fit within the <code>MaxPayloadInMB</code> limit.</p> 141 */ WithBatchStrategy(BatchStrategy && value)142 inline TransformJobDefinition& WithBatchStrategy(BatchStrategy&& value) { SetBatchStrategy(std::move(value)); return *this;} 143 144 145 /** 146 * <p>The environment variables to set in the Docker container. We support up to 16 147 * key and values entries in the map.</p> 148 */ GetEnvironment()149 inline const Aws::Map<Aws::String, Aws::String>& GetEnvironment() const{ return m_environment; } 150 151 /** 152 * <p>The environment variables to set in the Docker container. We support up to 16 153 * key and values entries in the map.</p> 154 */ EnvironmentHasBeenSet()155 inline bool EnvironmentHasBeenSet() const { return m_environmentHasBeenSet; } 156 157 /** 158 * <p>The environment variables to set in the Docker container. We support up to 16 159 * key and values entries in the map.</p> 160 */ SetEnvironment(const Aws::Map<Aws::String,Aws::String> & value)161 inline void SetEnvironment(const Aws::Map<Aws::String, Aws::String>& value) { m_environmentHasBeenSet = true; m_environment = value; } 162 163 /** 164 * <p>The environment variables to set in the Docker container. We support up to 16 165 * key and values entries in the map.</p> 166 */ SetEnvironment(Aws::Map<Aws::String,Aws::String> && value)167 inline void SetEnvironment(Aws::Map<Aws::String, Aws::String>&& value) { m_environmentHasBeenSet = true; m_environment = std::move(value); } 168 169 /** 170 * <p>The environment variables to set in the Docker container. We support up to 16 171 * key and values entries in the map.</p> 172 */ WithEnvironment(const Aws::Map<Aws::String,Aws::String> & value)173 inline TransformJobDefinition& WithEnvironment(const Aws::Map<Aws::String, Aws::String>& value) { SetEnvironment(value); return *this;} 174 175 /** 176 * <p>The environment variables to set in the Docker container. We support up to 16 177 * key and values entries in the map.</p> 178 */ WithEnvironment(Aws::Map<Aws::String,Aws::String> && value)179 inline TransformJobDefinition& WithEnvironment(Aws::Map<Aws::String, Aws::String>&& value) { SetEnvironment(std::move(value)); return *this;} 180 181 /** 182 * <p>The environment variables to set in the Docker container. We support up to 16 183 * key and values entries in the map.</p> 184 */ AddEnvironment(const Aws::String & key,const Aws::String & value)185 inline TransformJobDefinition& AddEnvironment(const Aws::String& key, const Aws::String& value) { m_environmentHasBeenSet = true; m_environment.emplace(key, value); return *this; } 186 187 /** 188 * <p>The environment variables to set in the Docker container. We support up to 16 189 * key and values entries in the map.</p> 190 */ AddEnvironment(Aws::String && key,const Aws::String & value)191 inline TransformJobDefinition& AddEnvironment(Aws::String&& key, const Aws::String& value) { m_environmentHasBeenSet = true; m_environment.emplace(std::move(key), value); return *this; } 192 193 /** 194 * <p>The environment variables to set in the Docker container. We support up to 16 195 * key and values entries in the map.</p> 196 */ AddEnvironment(const Aws::String & key,Aws::String && value)197 inline TransformJobDefinition& AddEnvironment(const Aws::String& key, Aws::String&& value) { m_environmentHasBeenSet = true; m_environment.emplace(key, std::move(value)); return *this; } 198 199 /** 200 * <p>The environment variables to set in the Docker container. We support up to 16 201 * key and values entries in the map.</p> 202 */ AddEnvironment(Aws::String && key,Aws::String && value)203 inline TransformJobDefinition& AddEnvironment(Aws::String&& key, Aws::String&& value) { m_environmentHasBeenSet = true; m_environment.emplace(std::move(key), std::move(value)); return *this; } 204 205 /** 206 * <p>The environment variables to set in the Docker container. We support up to 16 207 * key and values entries in the map.</p> 208 */ AddEnvironment(const char * key,Aws::String && value)209 inline TransformJobDefinition& AddEnvironment(const char* key, Aws::String&& value) { m_environmentHasBeenSet = true; m_environment.emplace(key, std::move(value)); return *this; } 210 211 /** 212 * <p>The environment variables to set in the Docker container. We support up to 16 213 * key and values entries in the map.</p> 214 */ AddEnvironment(Aws::String && key,const char * value)215 inline TransformJobDefinition& AddEnvironment(Aws::String&& key, const char* value) { m_environmentHasBeenSet = true; m_environment.emplace(std::move(key), value); return *this; } 216 217 /** 218 * <p>The environment variables to set in the Docker container. We support up to 16 219 * key and values entries in the map.</p> 220 */ AddEnvironment(const char * key,const char * value)221 inline TransformJobDefinition& AddEnvironment(const char* key, const char* value) { m_environmentHasBeenSet = true; m_environment.emplace(key, value); return *this; } 222 223 224 /** 225 * <p>A description of the input source and the way the transform job consumes 226 * it.</p> 227 */ GetTransformInput()228 inline const TransformInput& GetTransformInput() const{ return m_transformInput; } 229 230 /** 231 * <p>A description of the input source and the way the transform job consumes 232 * it.</p> 233 */ TransformInputHasBeenSet()234 inline bool TransformInputHasBeenSet() const { return m_transformInputHasBeenSet; } 235 236 /** 237 * <p>A description of the input source and the way the transform job consumes 238 * it.</p> 239 */ SetTransformInput(const TransformInput & value)240 inline void SetTransformInput(const TransformInput& value) { m_transformInputHasBeenSet = true; m_transformInput = value; } 241 242 /** 243 * <p>A description of the input source and the way the transform job consumes 244 * it.</p> 245 */ SetTransformInput(TransformInput && value)246 inline void SetTransformInput(TransformInput&& value) { m_transformInputHasBeenSet = true; m_transformInput = std::move(value); } 247 248 /** 249 * <p>A description of the input source and the way the transform job consumes 250 * it.</p> 251 */ WithTransformInput(const TransformInput & value)252 inline TransformJobDefinition& WithTransformInput(const TransformInput& value) { SetTransformInput(value); return *this;} 253 254 /** 255 * <p>A description of the input source and the way the transform job consumes 256 * it.</p> 257 */ WithTransformInput(TransformInput && value)258 inline TransformJobDefinition& WithTransformInput(TransformInput&& value) { SetTransformInput(std::move(value)); return *this;} 259 260 261 /** 262 * <p>Identifies the Amazon S3 location where you want Amazon SageMaker to save the 263 * results from the transform job.</p> 264 */ GetTransformOutput()265 inline const TransformOutput& GetTransformOutput() const{ return m_transformOutput; } 266 267 /** 268 * <p>Identifies the Amazon S3 location where you want Amazon SageMaker to save the 269 * results from the transform job.</p> 270 */ TransformOutputHasBeenSet()271 inline bool TransformOutputHasBeenSet() const { return m_transformOutputHasBeenSet; } 272 273 /** 274 * <p>Identifies the Amazon S3 location where you want Amazon SageMaker to save the 275 * results from the transform job.</p> 276 */ SetTransformOutput(const TransformOutput & value)277 inline void SetTransformOutput(const TransformOutput& value) { m_transformOutputHasBeenSet = true; m_transformOutput = value; } 278 279 /** 280 * <p>Identifies the Amazon S3 location where you want Amazon SageMaker to save the 281 * results from the transform job.</p> 282 */ SetTransformOutput(TransformOutput && value)283 inline void SetTransformOutput(TransformOutput&& value) { m_transformOutputHasBeenSet = true; m_transformOutput = std::move(value); } 284 285 /** 286 * <p>Identifies the Amazon S3 location where you want Amazon SageMaker to save the 287 * results from the transform job.</p> 288 */ WithTransformOutput(const TransformOutput & value)289 inline TransformJobDefinition& WithTransformOutput(const TransformOutput& value) { SetTransformOutput(value); return *this;} 290 291 /** 292 * <p>Identifies the Amazon S3 location where you want Amazon SageMaker to save the 293 * results from the transform job.</p> 294 */ WithTransformOutput(TransformOutput && value)295 inline TransformJobDefinition& WithTransformOutput(TransformOutput&& value) { SetTransformOutput(std::move(value)); return *this;} 296 297 298 /** 299 * <p>Identifies the ML compute instances for the transform job.</p> 300 */ GetTransformResources()301 inline const TransformResources& GetTransformResources() const{ return m_transformResources; } 302 303 /** 304 * <p>Identifies the ML compute instances for the transform job.</p> 305 */ TransformResourcesHasBeenSet()306 inline bool TransformResourcesHasBeenSet() const { return m_transformResourcesHasBeenSet; } 307 308 /** 309 * <p>Identifies the ML compute instances for the transform job.</p> 310 */ SetTransformResources(const TransformResources & value)311 inline void SetTransformResources(const TransformResources& value) { m_transformResourcesHasBeenSet = true; m_transformResources = value; } 312 313 /** 314 * <p>Identifies the ML compute instances for the transform job.</p> 315 */ SetTransformResources(TransformResources && value)316 inline void SetTransformResources(TransformResources&& value) { m_transformResourcesHasBeenSet = true; m_transformResources = std::move(value); } 317 318 /** 319 * <p>Identifies the ML compute instances for the transform job.</p> 320 */ WithTransformResources(const TransformResources & value)321 inline TransformJobDefinition& WithTransformResources(const TransformResources& value) { SetTransformResources(value); return *this;} 322 323 /** 324 * <p>Identifies the ML compute instances for the transform job.</p> 325 */ WithTransformResources(TransformResources && value)326 inline TransformJobDefinition& WithTransformResources(TransformResources&& value) { SetTransformResources(std::move(value)); return *this;} 327 328 private: 329 330 int m_maxConcurrentTransforms; 331 bool m_maxConcurrentTransformsHasBeenSet; 332 333 int m_maxPayloadInMB; 334 bool m_maxPayloadInMBHasBeenSet; 335 336 BatchStrategy m_batchStrategy; 337 bool m_batchStrategyHasBeenSet; 338 339 Aws::Map<Aws::String, Aws::String> m_environment; 340 bool m_environmentHasBeenSet; 341 342 TransformInput m_transformInput; 343 bool m_transformInputHasBeenSet; 344 345 TransformOutput m_transformOutput; 346 bool m_transformOutputHasBeenSet; 347 348 TransformResources m_transformResources; 349 bool m_transformResourcesHasBeenSet; 350 }; 351 352 } // namespace Model 353 } // namespace SageMaker 354 } // namespace Aws 355