aws_sdk_lookoutvision/operation/delete_model/_delete_model_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteModelInput {
6 /// <p>The name of the project that contains the model that you want to delete.</p>
7 pub project_name: ::std::option::Option<::std::string::String>,
8 /// <p>The version of the model that you want to delete.</p>
9 pub model_version: ::std::option::Option<::std::string::String>,
10 /// <p>ClientToken is an idempotency token that ensures a call to <code>DeleteModel</code> completes only once. You choose the value to pass. For example, an issue might prevent you from getting a response from <code>DeleteModel</code>. In this case, safely retry your call to <code>DeleteModel</code> by using the same <code>ClientToken</code> parameter value.</p>
11 /// <p>If you don't supply a value for ClientToken, the AWS SDK you are using inserts a value for you. This prevents retries after a network error from making multiple model deletion requests. You'll need to provide your own value for other use cases.</p>
12 /// <p>An error occurs if the other input parameters are not the same as in the first request. Using a different value for <code>ClientToken</code> is considered a new call to <code>DeleteModel</code>. An idempotency token is active for 8 hours.</p>
13 pub client_token: ::std::option::Option<::std::string::String>,
14}
15impl DeleteModelInput {
16 /// <p>The name of the project that contains the model that you want to delete.</p>
17 pub fn project_name(&self) -> ::std::option::Option<&str> {
18 self.project_name.as_deref()
19 }
20 /// <p>The version of the model that you want to delete.</p>
21 pub fn model_version(&self) -> ::std::option::Option<&str> {
22 self.model_version.as_deref()
23 }
24 /// <p>ClientToken is an idempotency token that ensures a call to <code>DeleteModel</code> completes only once. You choose the value to pass. For example, an issue might prevent you from getting a response from <code>DeleteModel</code>. In this case, safely retry your call to <code>DeleteModel</code> by using the same <code>ClientToken</code> parameter value.</p>
25 /// <p>If you don't supply a value for ClientToken, the AWS SDK you are using inserts a value for you. This prevents retries after a network error from making multiple model deletion requests. You'll need to provide your own value for other use cases.</p>
26 /// <p>An error occurs if the other input parameters are not the same as in the first request. Using a different value for <code>ClientToken</code> is considered a new call to <code>DeleteModel</code>. An idempotency token is active for 8 hours.</p>
27 pub fn client_token(&self) -> ::std::option::Option<&str> {
28 self.client_token.as_deref()
29 }
30}
31impl DeleteModelInput {
32 /// Creates a new builder-style object to manufacture [`DeleteModelInput`](crate::operation::delete_model::DeleteModelInput).
33 pub fn builder() -> crate::operation::delete_model::builders::DeleteModelInputBuilder {
34 crate::operation::delete_model::builders::DeleteModelInputBuilder::default()
35 }
36}
37
38/// A builder for [`DeleteModelInput`](crate::operation::delete_model::DeleteModelInput).
39#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
40#[non_exhaustive]
41pub struct DeleteModelInputBuilder {
42 pub(crate) project_name: ::std::option::Option<::std::string::String>,
43 pub(crate) model_version: ::std::option::Option<::std::string::String>,
44 pub(crate) client_token: ::std::option::Option<::std::string::String>,
45}
46impl DeleteModelInputBuilder {
47 /// <p>The name of the project that contains the model that you want to delete.</p>
48 /// This field is required.
49 pub fn project_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
50 self.project_name = ::std::option::Option::Some(input.into());
51 self
52 }
53 /// <p>The name of the project that contains the model that you want to delete.</p>
54 pub fn set_project_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
55 self.project_name = input;
56 self
57 }
58 /// <p>The name of the project that contains the model that you want to delete.</p>
59 pub fn get_project_name(&self) -> &::std::option::Option<::std::string::String> {
60 &self.project_name
61 }
62 /// <p>The version of the model that you want to delete.</p>
63 /// This field is required.
64 pub fn model_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
65 self.model_version = ::std::option::Option::Some(input.into());
66 self
67 }
68 /// <p>The version of the model that you want to delete.</p>
69 pub fn set_model_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
70 self.model_version = input;
71 self
72 }
73 /// <p>The version of the model that you want to delete.</p>
74 pub fn get_model_version(&self) -> &::std::option::Option<::std::string::String> {
75 &self.model_version
76 }
77 /// <p>ClientToken is an idempotency token that ensures a call to <code>DeleteModel</code> completes only once. You choose the value to pass. For example, an issue might prevent you from getting a response from <code>DeleteModel</code>. In this case, safely retry your call to <code>DeleteModel</code> by using the same <code>ClientToken</code> parameter value.</p>
78 /// <p>If you don't supply a value for ClientToken, the AWS SDK you are using inserts a value for you. This prevents retries after a network error from making multiple model deletion requests. You'll need to provide your own value for other use cases.</p>
79 /// <p>An error occurs if the other input parameters are not the same as in the first request. Using a different value for <code>ClientToken</code> is considered a new call to <code>DeleteModel</code>. An idempotency token is active for 8 hours.</p>
80 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81 self.client_token = ::std::option::Option::Some(input.into());
82 self
83 }
84 /// <p>ClientToken is an idempotency token that ensures a call to <code>DeleteModel</code> completes only once. You choose the value to pass. For example, an issue might prevent you from getting a response from <code>DeleteModel</code>. In this case, safely retry your call to <code>DeleteModel</code> by using the same <code>ClientToken</code> parameter value.</p>
85 /// <p>If you don't supply a value for ClientToken, the AWS SDK you are using inserts a value for you. This prevents retries after a network error from making multiple model deletion requests. You'll need to provide your own value for other use cases.</p>
86 /// <p>An error occurs if the other input parameters are not the same as in the first request. Using a different value for <code>ClientToken</code> is considered a new call to <code>DeleteModel</code>. An idempotency token is active for 8 hours.</p>
87 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88 self.client_token = input;
89 self
90 }
91 /// <p>ClientToken is an idempotency token that ensures a call to <code>DeleteModel</code> completes only once. You choose the value to pass. For example, an issue might prevent you from getting a response from <code>DeleteModel</code>. In this case, safely retry your call to <code>DeleteModel</code> by using the same <code>ClientToken</code> parameter value.</p>
92 /// <p>If you don't supply a value for ClientToken, the AWS SDK you are using inserts a value for you. This prevents retries after a network error from making multiple model deletion requests. You'll need to provide your own value for other use cases.</p>
93 /// <p>An error occurs if the other input parameters are not the same as in the first request. Using a different value for <code>ClientToken</code> is considered a new call to <code>DeleteModel</code>. An idempotency token is active for 8 hours.</p>
94 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
95 &self.client_token
96 }
97 /// Consumes the builder and constructs a [`DeleteModelInput`](crate::operation::delete_model::DeleteModelInput).
98 pub fn build(self) -> ::std::result::Result<crate::operation::delete_model::DeleteModelInput, ::aws_smithy_types::error::operation::BuildError> {
99 ::std::result::Result::Ok(crate::operation::delete_model::DeleteModelInput {
100 project_name: self.project_name,
101 model_version: self.model_version,
102 client_token: self.client_token,
103 })
104 }
105}