AWS SDK for C++

AWS SDK for C++ Version 1.11.718

Loading...
Searching...
No Matches
CreateModelRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/sagemaker/SageMakerRequest.h>
10#include <aws/sagemaker/SageMaker_EXPORTS.h>
11#include <aws/sagemaker/model/ContainerDefinition.h>
12#include <aws/sagemaker/model/InferenceExecutionConfig.h>
13#include <aws/sagemaker/model/Tag.h>
14#include <aws/sagemaker/model/VpcConfig.h>
15
16#include <utility>
17
18namespace Aws {
19namespace SageMaker {
20namespace Model {
21
25 public:
26 AWS_SAGEMAKER_API CreateModelRequest() = default;
27
28 // Service request name is the Operation name which will send this request out,
29 // each operation should has unique request name, so that we can get operation's name from this request.
30 // Note: this is not true for response, multiple operations may have the same response name,
31 // so we can not get operation's name from response.
32 inline virtual const char* GetServiceRequestName() const override { return "CreateModel"; }
33
34 AWS_SAGEMAKER_API Aws::String SerializePayload() const override;
35
37
39
42 inline const Aws::String& GetModelName() const { return m_modelName; }
43 inline bool ModelNameHasBeenSet() const { return m_modelNameHasBeenSet; }
44 template <typename ModelNameT = Aws::String>
45 void SetModelName(ModelNameT&& value) {
46 m_modelNameHasBeenSet = true;
47 m_modelName = std::forward<ModelNameT>(value);
48 }
49 template <typename ModelNameT = Aws::String>
50 CreateModelRequest& WithModelName(ModelNameT&& value) {
51 SetModelName(std::forward<ModelNameT>(value));
52 return *this;
53 }
55
57
62 inline const ContainerDefinition& GetPrimaryContainer() const { return m_primaryContainer; }
63 inline bool PrimaryContainerHasBeenSet() const { return m_primaryContainerHasBeenSet; }
64 template <typename PrimaryContainerT = ContainerDefinition>
65 void SetPrimaryContainer(PrimaryContainerT&& value) {
66 m_primaryContainerHasBeenSet = true;
67 m_primaryContainer = std::forward<PrimaryContainerT>(value);
68 }
69 template <typename PrimaryContainerT = ContainerDefinition>
70 CreateModelRequest& WithPrimaryContainer(PrimaryContainerT&& value) {
71 SetPrimaryContainer(std::forward<PrimaryContainerT>(value));
72 return *this;
73 }
75
77
80 inline const Aws::Vector<ContainerDefinition>& GetContainers() const { return m_containers; }
81 inline bool ContainersHasBeenSet() const { return m_containersHasBeenSet; }
82 template <typename ContainersT = Aws::Vector<ContainerDefinition>>
83 void SetContainers(ContainersT&& value) {
84 m_containersHasBeenSet = true;
85 m_containers = std::forward<ContainersT>(value);
86 }
87 template <typename ContainersT = Aws::Vector<ContainerDefinition>>
88 CreateModelRequest& WithContainers(ContainersT&& value) {
89 SetContainers(std::forward<ContainersT>(value));
90 return *this;
91 }
92 template <typename ContainersT = ContainerDefinition>
93 CreateModelRequest& AddContainers(ContainersT&& value) {
94 m_containersHasBeenSet = true;
95 m_containers.emplace_back(std::forward<ContainersT>(value));
96 return *this;
97 }
99
101
105 inline const InferenceExecutionConfig& GetInferenceExecutionConfig() const { return m_inferenceExecutionConfig; }
106 inline bool InferenceExecutionConfigHasBeenSet() const { return m_inferenceExecutionConfigHasBeenSet; }
107 template <typename InferenceExecutionConfigT = InferenceExecutionConfig>
108 void SetInferenceExecutionConfig(InferenceExecutionConfigT&& value) {
109 m_inferenceExecutionConfigHasBeenSet = true;
110 m_inferenceExecutionConfig = std::forward<InferenceExecutionConfigT>(value);
111 }
112 template <typename InferenceExecutionConfigT = InferenceExecutionConfig>
113 CreateModelRequest& WithInferenceExecutionConfig(InferenceExecutionConfigT&& value) {
114 SetInferenceExecutionConfig(std::forward<InferenceExecutionConfigT>(value));
115 return *this;
116 }
118
120
129 inline const Aws::String& GetExecutionRoleArn() const { return m_executionRoleArn; }
130 inline bool ExecutionRoleArnHasBeenSet() const { return m_executionRoleArnHasBeenSet; }
131 template <typename ExecutionRoleArnT = Aws::String>
132 void SetExecutionRoleArn(ExecutionRoleArnT&& value) {
133 m_executionRoleArnHasBeenSet = true;
134 m_executionRoleArn = std::forward<ExecutionRoleArnT>(value);
135 }
136 template <typename ExecutionRoleArnT = Aws::String>
137 CreateModelRequest& WithExecutionRoleArn(ExecutionRoleArnT&& value) {
138 SetExecutionRoleArn(std::forward<ExecutionRoleArnT>(value));
139 return *this;
140 }
142
144
151 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
152 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
153 template <typename TagsT = Aws::Vector<Tag>>
154 void SetTags(TagsT&& value) {
155 m_tagsHasBeenSet = true;
156 m_tags = std::forward<TagsT>(value);
157 }
158 template <typename TagsT = Aws::Vector<Tag>>
159 CreateModelRequest& WithTags(TagsT&& value) {
160 SetTags(std::forward<TagsT>(value));
161 return *this;
162 }
163 template <typename TagsT = Tag>
164 CreateModelRequest& AddTags(TagsT&& value) {
165 m_tagsHasBeenSet = true;
166 m_tags.emplace_back(std::forward<TagsT>(value));
167 return *this;
168 }
170
172
184 inline const VpcConfig& GetVpcConfig() const { return m_vpcConfig; }
185 inline bool VpcConfigHasBeenSet() const { return m_vpcConfigHasBeenSet; }
186 template <typename VpcConfigT = VpcConfig>
187 void SetVpcConfig(VpcConfigT&& value) {
188 m_vpcConfigHasBeenSet = true;
189 m_vpcConfig = std::forward<VpcConfigT>(value);
190 }
191 template <typename VpcConfigT = VpcConfig>
192 CreateModelRequest& WithVpcConfig(VpcConfigT&& value) {
193 SetVpcConfig(std::forward<VpcConfigT>(value));
194 return *this;
195 }
197
199
203 inline bool GetEnableNetworkIsolation() const { return m_enableNetworkIsolation; }
204 inline bool EnableNetworkIsolationHasBeenSet() const { return m_enableNetworkIsolationHasBeenSet; }
205 inline void SetEnableNetworkIsolation(bool value) {
206 m_enableNetworkIsolationHasBeenSet = true;
207 m_enableNetworkIsolation = value;
208 }
211 return *this;
212 }
214 private:
215 Aws::String m_modelName;
216
217 ContainerDefinition m_primaryContainer;
218
220
221 InferenceExecutionConfig m_inferenceExecutionConfig;
222
223 Aws::String m_executionRoleArn;
224
225 Aws::Vector<Tag> m_tags;
226
227 VpcConfig m_vpcConfig;
228
229 bool m_enableNetworkIsolation{false};
230 bool m_modelNameHasBeenSet = false;
231 bool m_primaryContainerHasBeenSet = false;
232 bool m_containersHasBeenSet = false;
233 bool m_inferenceExecutionConfigHasBeenSet = false;
234 bool m_executionRoleArnHasBeenSet = false;
235 bool m_tagsHasBeenSet = false;
236 bool m_vpcConfigHasBeenSet = false;
237 bool m_enableNetworkIsolationHasBeenSet = false;
238};
239
240} // namespace Model
241} // namespace SageMaker
242} // namespace Aws
const ContainerDefinition & GetPrimaryContainer() const
CreateModelRequest & AddContainers(ContainersT &&value)
CreateModelRequest & WithPrimaryContainer(PrimaryContainerT &&value)
const Aws::Vector< ContainerDefinition > & GetContainers() const
void SetInferenceExecutionConfig(InferenceExecutionConfigT &&value)
CreateModelRequest & WithExecutionRoleArn(ExecutionRoleArnT &&value)
AWS_SAGEMAKER_API Aws::String SerializePayload() const override
const Aws::Vector< Tag > & GetTags() const
CreateModelRequest & WithTags(TagsT &&value)
CreateModelRequest & WithInferenceExecutionConfig(InferenceExecutionConfigT &&value)
CreateModelRequest & AddTags(TagsT &&value)
CreateModelRequest & WithContainers(ContainersT &&value)
const Aws::String & GetExecutionRoleArn() const
CreateModelRequest & WithEnableNetworkIsolation(bool value)
virtual const char * GetServiceRequestName() const override
void SetPrimaryContainer(PrimaryContainerT &&value)
CreateModelRequest & WithVpcConfig(VpcConfigT &&value)
void SetExecutionRoleArn(ExecutionRoleArnT &&value)
const InferenceExecutionConfig & GetInferenceExecutionConfig() const
AWS_SAGEMAKER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
AWS_SAGEMAKER_API CreateModelRequest()=default
CreateModelRequest & WithModelName(ModelNameT &&value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector