aws_sdk_sagemaker/operation/create_model_package/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::create_model_package::_create_model_package_output::CreateModelPackageOutputBuilder;
3
4pub use crate::operation::create_model_package::_create_model_package_input::CreateModelPackageInputBuilder;
5
6impl crate::operation::create_model_package::builders::CreateModelPackageInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::create_model_package::CreateModelPackageOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::create_model_package::CreateModelPackageError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.create_model_package();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `CreateModelPackage`.
24///
25/// <p>Creates a model package that you can use to create SageMaker models or list on Amazon Web Services Marketplace, or a versioned model that is part of a model group. Buyers can subscribe to model packages listed on Amazon Web Services Marketplace to create models in SageMaker.</p>
26/// <p>To create a model package by specifying a Docker container that contains your inference code and the Amazon S3 location of your model artifacts, provide values for <code>InferenceSpecification</code>. To create a model from an algorithm resource that you created or subscribed to in Amazon Web Services Marketplace, provide a value for <code>SourceAlgorithmSpecification</code>.</p><note>
27/// <p>There are two types of model packages:</p>
28/// <ul>
29/// <li>
30/// <p>Versioned - a model that is part of a model group in the model registry.</p></li>
31/// <li>
32/// <p>Unversioned - a model package that is not part of a model group.</p></li>
33/// </ul>
34/// </note>
35#[derive(::std::clone::Clone, ::std::fmt::Debug)]
36pub struct CreateModelPackageFluentBuilder {
37 handle: ::std::sync::Arc<crate::client::Handle>,
38 inner: crate::operation::create_model_package::builders::CreateModelPackageInputBuilder,
39 config_override: ::std::option::Option<crate::config::Builder>,
40}
41impl
42 crate::client::customize::internal::CustomizableSend<
43 crate::operation::create_model_package::CreateModelPackageOutput,
44 crate::operation::create_model_package::CreateModelPackageError,
45 > for CreateModelPackageFluentBuilder
46{
47 fn send(
48 self,
49 config_override: crate::config::Builder,
50 ) -> crate::client::customize::internal::BoxFuture<
51 crate::client::customize::internal::SendResult<
52 crate::operation::create_model_package::CreateModelPackageOutput,
53 crate::operation::create_model_package::CreateModelPackageError,
54 >,
55 > {
56 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
57 }
58}
59impl CreateModelPackageFluentBuilder {
60 /// Creates a new `CreateModelPackageFluentBuilder`.
61 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
62 Self {
63 handle,
64 inner: ::std::default::Default::default(),
65 config_override: ::std::option::Option::None,
66 }
67 }
68 /// Access the CreateModelPackage as a reference.
69 pub fn as_input(&self) -> &crate::operation::create_model_package::builders::CreateModelPackageInputBuilder {
70 &self.inner
71 }
72 /// Sends the request and returns the response.
73 ///
74 /// If an error occurs, an `SdkError` will be returned with additional details that
75 /// can be matched against.
76 ///
77 /// By default, any retryable failures will be retried twice. Retry behavior
78 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
79 /// set when configuring the client.
80 pub async fn send(
81 self,
82 ) -> ::std::result::Result<
83 crate::operation::create_model_package::CreateModelPackageOutput,
84 ::aws_smithy_runtime_api::client::result::SdkError<
85 crate::operation::create_model_package::CreateModelPackageError,
86 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
87 >,
88 > {
89 let input = self
90 .inner
91 .build()
92 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
93 let runtime_plugins = crate::operation::create_model_package::CreateModelPackage::operation_runtime_plugins(
94 self.handle.runtime_plugins.clone(),
95 &self.handle.conf,
96 self.config_override,
97 );
98 crate::operation::create_model_package::CreateModelPackage::orchestrate(&runtime_plugins, input).await
99 }
100
101 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
102 pub fn customize(
103 self,
104 ) -> crate::client::customize::CustomizableOperation<
105 crate::operation::create_model_package::CreateModelPackageOutput,
106 crate::operation::create_model_package::CreateModelPackageError,
107 Self,
108 > {
109 crate::client::customize::CustomizableOperation::new(self)
110 }
111 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
112 self.set_config_override(::std::option::Option::Some(config_override.into()));
113 self
114 }
115
116 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
117 self.config_override = config_override;
118 self
119 }
120 /// <p>The name of the model package. The name must have 1 to 63 characters. Valid characters are a-z, A-Z, 0-9, and - (hyphen).</p>
121 /// <p>This parameter is required for unversioned models. It is not applicable to versioned models.</p>
122 pub fn model_package_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
123 self.inner = self.inner.model_package_name(input.into());
124 self
125 }
126 /// <p>The name of the model package. The name must have 1 to 63 characters. Valid characters are a-z, A-Z, 0-9, and - (hyphen).</p>
127 /// <p>This parameter is required for unversioned models. It is not applicable to versioned models.</p>
128 pub fn set_model_package_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129 self.inner = self.inner.set_model_package_name(input);
130 self
131 }
132 /// <p>The name of the model package. The name must have 1 to 63 characters. Valid characters are a-z, A-Z, 0-9, and - (hyphen).</p>
133 /// <p>This parameter is required for unversioned models. It is not applicable to versioned models.</p>
134 pub fn get_model_package_name(&self) -> &::std::option::Option<::std::string::String> {
135 self.inner.get_model_package_name()
136 }
137 /// <p>The name or Amazon Resource Name (ARN) of the model package group that this model version belongs to.</p>
138 /// <p>This parameter is required for versioned models, and does not apply to unversioned models.</p>
139 pub fn model_package_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
140 self.inner = self.inner.model_package_group_name(input.into());
141 self
142 }
143 /// <p>The name or Amazon Resource Name (ARN) of the model package group that this model version belongs to.</p>
144 /// <p>This parameter is required for versioned models, and does not apply to unversioned models.</p>
145 pub fn set_model_package_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146 self.inner = self.inner.set_model_package_group_name(input);
147 self
148 }
149 /// <p>The name or Amazon Resource Name (ARN) of the model package group that this model version belongs to.</p>
150 /// <p>This parameter is required for versioned models, and does not apply to unversioned models.</p>
151 pub fn get_model_package_group_name(&self) -> &::std::option::Option<::std::string::String> {
152 self.inner.get_model_package_group_name()
153 }
154 /// <p>A description of the model package.</p>
155 pub fn model_package_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
156 self.inner = self.inner.model_package_description(input.into());
157 self
158 }
159 /// <p>A description of the model package.</p>
160 pub fn set_model_package_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
161 self.inner = self.inner.set_model_package_description(input);
162 self
163 }
164 /// <p>A description of the model package.</p>
165 pub fn get_model_package_description(&self) -> &::std::option::Option<::std::string::String> {
166 self.inner.get_model_package_description()
167 }
168 /// <p>The package registration type of the model package input.</p>
169 pub fn model_package_registration_type(mut self, input: crate::types::ModelPackageRegistrationType) -> Self {
170 self.inner = self.inner.model_package_registration_type(input);
171 self
172 }
173 /// <p>The package registration type of the model package input.</p>
174 pub fn set_model_package_registration_type(mut self, input: ::std::option::Option<crate::types::ModelPackageRegistrationType>) -> Self {
175 self.inner = self.inner.set_model_package_registration_type(input);
176 self
177 }
178 /// <p>The package registration type of the model package input.</p>
179 pub fn get_model_package_registration_type(&self) -> &::std::option::Option<crate::types::ModelPackageRegistrationType> {
180 self.inner.get_model_package_registration_type()
181 }
182 /// <p>Specifies details about inference jobs that you can run with models based on this model package, including the following information:</p>
183 /// <ul>
184 /// <li>
185 /// <p>The Amazon ECR paths of containers that contain the inference code and model artifacts.</p></li>
186 /// <li>
187 /// <p>The instance types that the model package supports for transform jobs and real-time endpoints used for inference.</p></li>
188 /// <li>
189 /// <p>The input and output content formats that the model package supports for inference.</p></li>
190 /// </ul>
191 pub fn inference_specification(mut self, input: crate::types::InferenceSpecification) -> Self {
192 self.inner = self.inner.inference_specification(input);
193 self
194 }
195 /// <p>Specifies details about inference jobs that you can run with models based on this model package, including the following information:</p>
196 /// <ul>
197 /// <li>
198 /// <p>The Amazon ECR paths of containers that contain the inference code and model artifacts.</p></li>
199 /// <li>
200 /// <p>The instance types that the model package supports for transform jobs and real-time endpoints used for inference.</p></li>
201 /// <li>
202 /// <p>The input and output content formats that the model package supports for inference.</p></li>
203 /// </ul>
204 pub fn set_inference_specification(mut self, input: ::std::option::Option<crate::types::InferenceSpecification>) -> Self {
205 self.inner = self.inner.set_inference_specification(input);
206 self
207 }
208 /// <p>Specifies details about inference jobs that you can run with models based on this model package, including the following information:</p>
209 /// <ul>
210 /// <li>
211 /// <p>The Amazon ECR paths of containers that contain the inference code and model artifacts.</p></li>
212 /// <li>
213 /// <p>The instance types that the model package supports for transform jobs and real-time endpoints used for inference.</p></li>
214 /// <li>
215 /// <p>The input and output content formats that the model package supports for inference.</p></li>
216 /// </ul>
217 pub fn get_inference_specification(&self) -> &::std::option::Option<crate::types::InferenceSpecification> {
218 self.inner.get_inference_specification()
219 }
220 /// <p>Specifies configurations for one or more transform jobs that SageMaker runs to test the model package.</p>
221 pub fn validation_specification(mut self, input: crate::types::ModelPackageValidationSpecification) -> Self {
222 self.inner = self.inner.validation_specification(input);
223 self
224 }
225 /// <p>Specifies configurations for one or more transform jobs that SageMaker runs to test the model package.</p>
226 pub fn set_validation_specification(mut self, input: ::std::option::Option<crate::types::ModelPackageValidationSpecification>) -> Self {
227 self.inner = self.inner.set_validation_specification(input);
228 self
229 }
230 /// <p>Specifies configurations for one or more transform jobs that SageMaker runs to test the model package.</p>
231 pub fn get_validation_specification(&self) -> &::std::option::Option<crate::types::ModelPackageValidationSpecification> {
232 self.inner.get_validation_specification()
233 }
234 /// <p>Details about the algorithm that was used to create the model package.</p>
235 pub fn source_algorithm_specification(mut self, input: crate::types::SourceAlgorithmSpecification) -> Self {
236 self.inner = self.inner.source_algorithm_specification(input);
237 self
238 }
239 /// <p>Details about the algorithm that was used to create the model package.</p>
240 pub fn set_source_algorithm_specification(mut self, input: ::std::option::Option<crate::types::SourceAlgorithmSpecification>) -> Self {
241 self.inner = self.inner.set_source_algorithm_specification(input);
242 self
243 }
244 /// <p>Details about the algorithm that was used to create the model package.</p>
245 pub fn get_source_algorithm_specification(&self) -> &::std::option::Option<crate::types::SourceAlgorithmSpecification> {
246 self.inner.get_source_algorithm_specification()
247 }
248 /// <p>Whether to certify the model package for listing on Amazon Web Services Marketplace.</p>
249 /// <p>This parameter is optional for unversioned models, and does not apply to versioned models.</p>
250 pub fn certify_for_marketplace(mut self, input: bool) -> Self {
251 self.inner = self.inner.certify_for_marketplace(input);
252 self
253 }
254 /// <p>Whether to certify the model package for listing on Amazon Web Services Marketplace.</p>
255 /// <p>This parameter is optional for unversioned models, and does not apply to versioned models.</p>
256 pub fn set_certify_for_marketplace(mut self, input: ::std::option::Option<bool>) -> Self {
257 self.inner = self.inner.set_certify_for_marketplace(input);
258 self
259 }
260 /// <p>Whether to certify the model package for listing on Amazon Web Services Marketplace.</p>
261 /// <p>This parameter is optional for unversioned models, and does not apply to versioned models.</p>
262 pub fn get_certify_for_marketplace(&self) -> &::std::option::Option<bool> {
263 self.inner.get_certify_for_marketplace()
264 }
265 ///
266 /// Appends an item to `Tags`.
267 ///
268 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
269 ///
270 /// <p>A list of key value pairs associated with the model. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in the <i>Amazon Web Services General Reference Guide</i>.</p>
271 /// <p>If you supply <code>ModelPackageGroupName</code>, your model package belongs to the model group you specify and uses the tags associated with the model group. In this case, you cannot supply a <code>tag</code> argument.</p>
272 pub fn tags(mut self, input: crate::types::Tag) -> Self {
273 self.inner = self.inner.tags(input);
274 self
275 }
276 /// <p>A list of key value pairs associated with the model. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in the <i>Amazon Web Services General Reference Guide</i>.</p>
277 /// <p>If you supply <code>ModelPackageGroupName</code>, your model package belongs to the model group you specify and uses the tags associated with the model group. In this case, you cannot supply a <code>tag</code> argument.</p>
278 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
279 self.inner = self.inner.set_tags(input);
280 self
281 }
282 /// <p>A list of key value pairs associated with the model. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html">Tagging Amazon Web Services resources</a> in the <i>Amazon Web Services General Reference Guide</i>.</p>
283 /// <p>If you supply <code>ModelPackageGroupName</code>, your model package belongs to the model group you specify and uses the tags associated with the model group. In this case, you cannot supply a <code>tag</code> argument.</p>
284 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
285 self.inner.get_tags()
286 }
287 /// <p>Whether the model is approved for deployment.</p>
288 /// <p>This parameter is optional for versioned models, and does not apply to unversioned models.</p>
289 /// <p>For versioned models, the value of this parameter must be set to <code>Approved</code> to deploy the model.</p>
290 pub fn model_approval_status(mut self, input: crate::types::ModelApprovalStatus) -> Self {
291 self.inner = self.inner.model_approval_status(input);
292 self
293 }
294 /// <p>Whether the model is approved for deployment.</p>
295 /// <p>This parameter is optional for versioned models, and does not apply to unversioned models.</p>
296 /// <p>For versioned models, the value of this parameter must be set to <code>Approved</code> to deploy the model.</p>
297 pub fn set_model_approval_status(mut self, input: ::std::option::Option<crate::types::ModelApprovalStatus>) -> Self {
298 self.inner = self.inner.set_model_approval_status(input);
299 self
300 }
301 /// <p>Whether the model is approved for deployment.</p>
302 /// <p>This parameter is optional for versioned models, and does not apply to unversioned models.</p>
303 /// <p>For versioned models, the value of this parameter must be set to <code>Approved</code> to deploy the model.</p>
304 pub fn get_model_approval_status(&self) -> &::std::option::Option<crate::types::ModelApprovalStatus> {
305 self.inner.get_model_approval_status()
306 }
307 /// <p>Metadata properties of the tracking entity, trial, or trial component.</p>
308 pub fn metadata_properties(mut self, input: crate::types::MetadataProperties) -> Self {
309 self.inner = self.inner.metadata_properties(input);
310 self
311 }
312 /// <p>Metadata properties of the tracking entity, trial, or trial component.</p>
313 pub fn set_metadata_properties(mut self, input: ::std::option::Option<crate::types::MetadataProperties>) -> Self {
314 self.inner = self.inner.set_metadata_properties(input);
315 self
316 }
317 /// <p>Metadata properties of the tracking entity, trial, or trial component.</p>
318 pub fn get_metadata_properties(&self) -> &::std::option::Option<crate::types::MetadataProperties> {
319 self.inner.get_metadata_properties()
320 }
321 /// <p>A structure that contains model metrics reports.</p>
322 pub fn model_metrics(mut self, input: crate::types::ModelMetrics) -> Self {
323 self.inner = self.inner.model_metrics(input);
324 self
325 }
326 /// <p>A structure that contains model metrics reports.</p>
327 pub fn set_model_metrics(mut self, input: ::std::option::Option<crate::types::ModelMetrics>) -> Self {
328 self.inner = self.inner.set_model_metrics(input);
329 self
330 }
331 /// <p>A structure that contains model metrics reports.</p>
332 pub fn get_model_metrics(&self) -> &::std::option::Option<crate::types::ModelMetrics> {
333 self.inner.get_model_metrics()
334 }
335 /// <p>A unique token that guarantees that the call to this API is idempotent.</p>
336 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
337 self.inner = self.inner.client_token(input.into());
338 self
339 }
340 /// <p>A unique token that guarantees that the call to this API is idempotent.</p>
341 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
342 self.inner = self.inner.set_client_token(input);
343 self
344 }
345 /// <p>A unique token that guarantees that the call to this API is idempotent.</p>
346 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
347 self.inner.get_client_token()
348 }
349 /// <p>The machine learning domain of your model package and its components. Common machine learning domains include computer vision and natural language processing.</p>
350 pub fn domain(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
351 self.inner = self.inner.domain(input.into());
352 self
353 }
354 /// <p>The machine learning domain of your model package and its components. Common machine learning domains include computer vision and natural language processing.</p>
355 pub fn set_domain(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
356 self.inner = self.inner.set_domain(input);
357 self
358 }
359 /// <p>The machine learning domain of your model package and its components. Common machine learning domains include computer vision and natural language processing.</p>
360 pub fn get_domain(&self) -> &::std::option::Option<::std::string::String> {
361 self.inner.get_domain()
362 }
363 /// <p>The machine learning task your model package accomplishes. Common machine learning tasks include object detection and image classification. The following tasks are supported by Inference Recommender: <code>"IMAGE_CLASSIFICATION"</code> | <code>"OBJECT_DETECTION"</code> | <code>"TEXT_GENERATION"</code> |<code>"IMAGE_SEGMENTATION"</code> | <code>"FILL_MASK"</code> | <code>"CLASSIFICATION"</code> | <code>"REGRESSION"</code> | <code>"OTHER"</code>.</p>
364 /// <p>Specify "OTHER" if none of the tasks listed fit your use case.</p>
365 pub fn task(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
366 self.inner = self.inner.task(input.into());
367 self
368 }
369 /// <p>The machine learning task your model package accomplishes. Common machine learning tasks include object detection and image classification. The following tasks are supported by Inference Recommender: <code>"IMAGE_CLASSIFICATION"</code> | <code>"OBJECT_DETECTION"</code> | <code>"TEXT_GENERATION"</code> |<code>"IMAGE_SEGMENTATION"</code> | <code>"FILL_MASK"</code> | <code>"CLASSIFICATION"</code> | <code>"REGRESSION"</code> | <code>"OTHER"</code>.</p>
370 /// <p>Specify "OTHER" if none of the tasks listed fit your use case.</p>
371 pub fn set_task(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
372 self.inner = self.inner.set_task(input);
373 self
374 }
375 /// <p>The machine learning task your model package accomplishes. Common machine learning tasks include object detection and image classification. The following tasks are supported by Inference Recommender: <code>"IMAGE_CLASSIFICATION"</code> | <code>"OBJECT_DETECTION"</code> | <code>"TEXT_GENERATION"</code> |<code>"IMAGE_SEGMENTATION"</code> | <code>"FILL_MASK"</code> | <code>"CLASSIFICATION"</code> | <code>"REGRESSION"</code> | <code>"OTHER"</code>.</p>
376 /// <p>Specify "OTHER" if none of the tasks listed fit your use case.</p>
377 pub fn get_task(&self) -> &::std::option::Option<::std::string::String> {
378 self.inner.get_task()
379 }
380 /// <p>The Amazon Simple Storage Service (Amazon S3) path where the sample payload is stored. This path must point to a single gzip compressed tar archive (.tar.gz suffix). This archive can hold multiple files that are all equally used in the load test. Each file in the archive must satisfy the size constraints of the <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html#API_runtime_InvokeEndpoint_RequestSyntax">InvokeEndpoint</a> call.</p>
381 pub fn sample_payload_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
382 self.inner = self.inner.sample_payload_url(input.into());
383 self
384 }
385 /// <p>The Amazon Simple Storage Service (Amazon S3) path where the sample payload is stored. This path must point to a single gzip compressed tar archive (.tar.gz suffix). This archive can hold multiple files that are all equally used in the load test. Each file in the archive must satisfy the size constraints of the <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html#API_runtime_InvokeEndpoint_RequestSyntax">InvokeEndpoint</a> call.</p>
386 pub fn set_sample_payload_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
387 self.inner = self.inner.set_sample_payload_url(input);
388 self
389 }
390 /// <p>The Amazon Simple Storage Service (Amazon S3) path where the sample payload is stored. This path must point to a single gzip compressed tar archive (.tar.gz suffix). This archive can hold multiple files that are all equally used in the load test. Each file in the archive must satisfy the size constraints of the <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_runtime_InvokeEndpoint.html#API_runtime_InvokeEndpoint_RequestSyntax">InvokeEndpoint</a> call.</p>
391 pub fn get_sample_payload_url(&self) -> &::std::option::Option<::std::string::String> {
392 self.inner.get_sample_payload_url()
393 }
394 ///
395 /// Adds a key-value pair to `CustomerMetadataProperties`.
396 ///
397 /// To override the contents of this collection use [`set_customer_metadata_properties`](Self::set_customer_metadata_properties).
398 ///
399 /// <p>The metadata properties associated with the model package versions.</p>
400 pub fn customer_metadata_properties(
401 mut self,
402 k: impl ::std::convert::Into<::std::string::String>,
403 v: impl ::std::convert::Into<::std::string::String>,
404 ) -> Self {
405 self.inner = self.inner.customer_metadata_properties(k.into(), v.into());
406 self
407 }
408 /// <p>The metadata properties associated with the model package versions.</p>
409 pub fn set_customer_metadata_properties(
410 mut self,
411 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
412 ) -> Self {
413 self.inner = self.inner.set_customer_metadata_properties(input);
414 self
415 }
416 /// <p>The metadata properties associated with the model package versions.</p>
417 pub fn get_customer_metadata_properties(
418 &self,
419 ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
420 self.inner.get_customer_metadata_properties()
421 }
422 /// <p>Represents the drift check baselines that can be used when the model monitor is set using the model package. For more information, see the topic on <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/pipelines-quality-clarify-baseline-lifecycle.html#pipelines-quality-clarify-baseline-drift-detection">Drift Detection against Previous Baselines in SageMaker Pipelines</a> in the <i>Amazon SageMaker Developer Guide</i>.</p>
423 pub fn drift_check_baselines(mut self, input: crate::types::DriftCheckBaselines) -> Self {
424 self.inner = self.inner.drift_check_baselines(input);
425 self
426 }
427 /// <p>Represents the drift check baselines that can be used when the model monitor is set using the model package. For more information, see the topic on <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/pipelines-quality-clarify-baseline-lifecycle.html#pipelines-quality-clarify-baseline-drift-detection">Drift Detection against Previous Baselines in SageMaker Pipelines</a> in the <i>Amazon SageMaker Developer Guide</i>.</p>
428 pub fn set_drift_check_baselines(mut self, input: ::std::option::Option<crate::types::DriftCheckBaselines>) -> Self {
429 self.inner = self.inner.set_drift_check_baselines(input);
430 self
431 }
432 /// <p>Represents the drift check baselines that can be used when the model monitor is set using the model package. For more information, see the topic on <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/pipelines-quality-clarify-baseline-lifecycle.html#pipelines-quality-clarify-baseline-drift-detection">Drift Detection against Previous Baselines in SageMaker Pipelines</a> in the <i>Amazon SageMaker Developer Guide</i>.</p>
433 pub fn get_drift_check_baselines(&self) -> &::std::option::Option<crate::types::DriftCheckBaselines> {
434 self.inner.get_drift_check_baselines()
435 }
436 ///
437 /// Appends an item to `AdditionalInferenceSpecifications`.
438 ///
439 /// To override the contents of this collection use [`set_additional_inference_specifications`](Self::set_additional_inference_specifications).
440 ///
441 /// <p>An array of additional Inference Specification objects. Each additional Inference Specification specifies artifacts based on this model package that can be used on inference endpoints. Generally used with SageMaker Neo to store the compiled artifacts.</p>
442 pub fn additional_inference_specifications(mut self, input: crate::types::AdditionalInferenceSpecificationDefinition) -> Self {
443 self.inner = self.inner.additional_inference_specifications(input);
444 self
445 }
446 /// <p>An array of additional Inference Specification objects. Each additional Inference Specification specifies artifacts based on this model package that can be used on inference endpoints. Generally used with SageMaker Neo to store the compiled artifacts.</p>
447 pub fn set_additional_inference_specifications(
448 mut self,
449 input: ::std::option::Option<::std::vec::Vec<crate::types::AdditionalInferenceSpecificationDefinition>>,
450 ) -> Self {
451 self.inner = self.inner.set_additional_inference_specifications(input);
452 self
453 }
454 /// <p>An array of additional Inference Specification objects. Each additional Inference Specification specifies artifacts based on this model package that can be used on inference endpoints. Generally used with SageMaker Neo to store the compiled artifacts.</p>
455 pub fn get_additional_inference_specifications(
456 &self,
457 ) -> &::std::option::Option<::std::vec::Vec<crate::types::AdditionalInferenceSpecificationDefinition>> {
458 self.inner.get_additional_inference_specifications()
459 }
460 /// <p>Indicates if you want to skip model validation.</p>
461 pub fn skip_model_validation(mut self, input: crate::types::SkipModelValidation) -> Self {
462 self.inner = self.inner.skip_model_validation(input);
463 self
464 }
465 /// <p>Indicates if you want to skip model validation.</p>
466 pub fn set_skip_model_validation(mut self, input: ::std::option::Option<crate::types::SkipModelValidation>) -> Self {
467 self.inner = self.inner.set_skip_model_validation(input);
468 self
469 }
470 /// <p>Indicates if you want to skip model validation.</p>
471 pub fn get_skip_model_validation(&self) -> &::std::option::Option<crate::types::SkipModelValidation> {
472 self.inner.get_skip_model_validation()
473 }
474 /// <p>The URI of the source for the model package. If you want to clone a model package, set it to the model package Amazon Resource Name (ARN). If you want to register a model, set it to the model ARN.</p>
475 pub fn source_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
476 self.inner = self.inner.source_uri(input.into());
477 self
478 }
479 /// <p>The URI of the source for the model package. If you want to clone a model package, set it to the model package Amazon Resource Name (ARN). If you want to register a model, set it to the model ARN.</p>
480 pub fn set_source_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
481 self.inner = self.inner.set_source_uri(input);
482 self
483 }
484 /// <p>The URI of the source for the model package. If you want to clone a model package, set it to the model package Amazon Resource Name (ARN). If you want to register a model, set it to the model ARN.</p>
485 pub fn get_source_uri(&self) -> &::std::option::Option<::std::string::String> {
486 self.inner.get_source_uri()
487 }
488 /// <p>The KMS Key ID (<code>KMSKeyId</code>) used for encryption of model package information.</p>
489 pub fn security_config(mut self, input: crate::types::ModelPackageSecurityConfig) -> Self {
490 self.inner = self.inner.security_config(input);
491 self
492 }
493 /// <p>The KMS Key ID (<code>KMSKeyId</code>) used for encryption of model package information.</p>
494 pub fn set_security_config(mut self, input: ::std::option::Option<crate::types::ModelPackageSecurityConfig>) -> Self {
495 self.inner = self.inner.set_security_config(input);
496 self
497 }
498 /// <p>The KMS Key ID (<code>KMSKeyId</code>) used for encryption of model package information.</p>
499 pub fn get_security_config(&self) -> &::std::option::Option<crate::types::ModelPackageSecurityConfig> {
500 self.inner.get_security_config()
501 }
502 /// <p>The model card associated with the model package. Since <code>ModelPackageModelCard</code> is tied to a model package, it is a specific usage of a model card and its schema is simplified compared to the schema of <code>ModelCard</code>. The <code>ModelPackageModelCard</code> schema does not include <code>model_package_details</code>, and <code>model_overview</code> is composed of the <code>model_creator</code> and <code>model_artifact</code> properties. For more information about the model package model card schema, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/model-registry-details.html#model-card-schema">Model package model card schema</a>. For more information about the model card associated with the model package, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/model-registry-details.html">View the Details of a Model Version</a>.</p>
503 pub fn model_card(mut self, input: crate::types::ModelPackageModelCard) -> Self {
504 self.inner = self.inner.model_card(input);
505 self
506 }
507 /// <p>The model card associated with the model package. Since <code>ModelPackageModelCard</code> is tied to a model package, it is a specific usage of a model card and its schema is simplified compared to the schema of <code>ModelCard</code>. The <code>ModelPackageModelCard</code> schema does not include <code>model_package_details</code>, and <code>model_overview</code> is composed of the <code>model_creator</code> and <code>model_artifact</code> properties. For more information about the model package model card schema, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/model-registry-details.html#model-card-schema">Model package model card schema</a>. For more information about the model card associated with the model package, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/model-registry-details.html">View the Details of a Model Version</a>.</p>
508 pub fn set_model_card(mut self, input: ::std::option::Option<crate::types::ModelPackageModelCard>) -> Self {
509 self.inner = self.inner.set_model_card(input);
510 self
511 }
512 /// <p>The model card associated with the model package. Since <code>ModelPackageModelCard</code> is tied to a model package, it is a specific usage of a model card and its schema is simplified compared to the schema of <code>ModelCard</code>. The <code>ModelPackageModelCard</code> schema does not include <code>model_package_details</code>, and <code>model_overview</code> is composed of the <code>model_creator</code> and <code>model_artifact</code> properties. For more information about the model package model card schema, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/model-registry-details.html#model-card-schema">Model package model card schema</a>. For more information about the model card associated with the model package, see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/model-registry-details.html">View the Details of a Model Version</a>.</p>
513 pub fn get_model_card(&self) -> &::std::option::Option<crate::types::ModelPackageModelCard> {
514 self.inner.get_model_card()
515 }
516 /// <p>A structure describing the current state of the model in its life cycle.</p>
517 pub fn model_life_cycle(mut self, input: crate::types::ModelLifeCycle) -> Self {
518 self.inner = self.inner.model_life_cycle(input);
519 self
520 }
521 /// <p>A structure describing the current state of the model in its life cycle.</p>
522 pub fn set_model_life_cycle(mut self, input: ::std::option::Option<crate::types::ModelLifeCycle>) -> Self {
523 self.inner = self.inner.set_model_life_cycle(input);
524 self
525 }
526 /// <p>A structure describing the current state of the model in its life cycle.</p>
527 pub fn get_model_life_cycle(&self) -> &::std::option::Option<crate::types::ModelLifeCycle> {
528 self.inner.get_model_life_cycle()
529 }
530}