aws_sdk_lookoutvision/operation/delete_dataset/
_delete_dataset_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 DeleteDatasetInput {
6    /// <p>The name of the project that contains the dataset that you want to delete.</p>
7    pub project_name: ::std::option::Option<::std::string::String>,
8    /// <p>The type of the dataset to delete. Specify <code>train</code> to delete the training dataset. Specify <code>test</code> to delete the test dataset. To delete the dataset in a single dataset project, specify <code>train</code>.</p>
9    pub dataset_type: ::std::option::Option<::std::string::String>,
10    /// <p>ClientToken is an idempotency token that ensures a call to <code>DeleteDataset</code> completes only once. You choose the value to pass. For example, An issue might prevent you from getting a response from <code>DeleteDataset</code>. In this case, safely retry your call to <code>DeleteDataset</code> by using the same <code>ClientToken</code> parameter value.</p>
11    /// <p>If you don't supply a value for <code>ClientToken</code>, the AWS SDK you are using inserts a value for you. This prevents retries after a network error from making multiple deletetion 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>DeleteDataset</code>. An idempotency token is active for 8 hours.</p>
13    pub client_token: ::std::option::Option<::std::string::String>,
14}
15impl DeleteDatasetInput {
16    /// <p>The name of the project that contains the dataset 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 type of the dataset to delete. Specify <code>train</code> to delete the training dataset. Specify <code>test</code> to delete the test dataset. To delete the dataset in a single dataset project, specify <code>train</code>.</p>
21    pub fn dataset_type(&self) -> ::std::option::Option<&str> {
22        self.dataset_type.as_deref()
23    }
24    /// <p>ClientToken is an idempotency token that ensures a call to <code>DeleteDataset</code> completes only once. You choose the value to pass. For example, An issue might prevent you from getting a response from <code>DeleteDataset</code>. In this case, safely retry your call to <code>DeleteDataset</code> by using the same <code>ClientToken</code> parameter value.</p>
25    /// <p>If you don't supply a value for <code>ClientToken</code>, the AWS SDK you are using inserts a value for you. This prevents retries after a network error from making multiple deletetion 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>DeleteDataset</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 DeleteDatasetInput {
32    /// Creates a new builder-style object to manufacture [`DeleteDatasetInput`](crate::operation::delete_dataset::DeleteDatasetInput).
33    pub fn builder() -> crate::operation::delete_dataset::builders::DeleteDatasetInputBuilder {
34        crate::operation::delete_dataset::builders::DeleteDatasetInputBuilder::default()
35    }
36}
37
38/// A builder for [`DeleteDatasetInput`](crate::operation::delete_dataset::DeleteDatasetInput).
39#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
40#[non_exhaustive]
41pub struct DeleteDatasetInputBuilder {
42    pub(crate) project_name: ::std::option::Option<::std::string::String>,
43    pub(crate) dataset_type: ::std::option::Option<::std::string::String>,
44    pub(crate) client_token: ::std::option::Option<::std::string::String>,
45}
46impl DeleteDatasetInputBuilder {
47    /// <p>The name of the project that contains the dataset 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 dataset 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 dataset 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 type of the dataset to delete. Specify <code>train</code> to delete the training dataset. Specify <code>test</code> to delete the test dataset. To delete the dataset in a single dataset project, specify <code>train</code>.</p>
63    /// This field is required.
64    pub fn dataset_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
65        self.dataset_type = ::std::option::Option::Some(input.into());
66        self
67    }
68    /// <p>The type of the dataset to delete. Specify <code>train</code> to delete the training dataset. Specify <code>test</code> to delete the test dataset. To delete the dataset in a single dataset project, specify <code>train</code>.</p>
69    pub fn set_dataset_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
70        self.dataset_type = input;
71        self
72    }
73    /// <p>The type of the dataset to delete. Specify <code>train</code> to delete the training dataset. Specify <code>test</code> to delete the test dataset. To delete the dataset in a single dataset project, specify <code>train</code>.</p>
74    pub fn get_dataset_type(&self) -> &::std::option::Option<::std::string::String> {
75        &self.dataset_type
76    }
77    /// <p>ClientToken is an idempotency token that ensures a call to <code>DeleteDataset</code> completes only once. You choose the value to pass. For example, An issue might prevent you from getting a response from <code>DeleteDataset</code>. In this case, safely retry your call to <code>DeleteDataset</code> by using the same <code>ClientToken</code> parameter value.</p>
78    /// <p>If you don't supply a value for <code>ClientToken</code>, the AWS SDK you are using inserts a value for you. This prevents retries after a network error from making multiple deletetion 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>DeleteDataset</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>DeleteDataset</code> completes only once. You choose the value to pass. For example, An issue might prevent you from getting a response from <code>DeleteDataset</code>. In this case, safely retry your call to <code>DeleteDataset</code> by using the same <code>ClientToken</code> parameter value.</p>
85    /// <p>If you don't supply a value for <code>ClientToken</code>, the AWS SDK you are using inserts a value for you. This prevents retries after a network error from making multiple deletetion 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>DeleteDataset</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>DeleteDataset</code> completes only once. You choose the value to pass. For example, An issue might prevent you from getting a response from <code>DeleteDataset</code>. In this case, safely retry your call to <code>DeleteDataset</code> by using the same <code>ClientToken</code> parameter value.</p>
92    /// <p>If you don't supply a value for <code>ClientToken</code>, the AWS SDK you are using inserts a value for you. This prevents retries after a network error from making multiple deletetion 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>DeleteDataset</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 [`DeleteDatasetInput`](crate::operation::delete_dataset::DeleteDatasetInput).
98    pub fn build(
99        self,
100    ) -> ::std::result::Result<crate::operation::delete_dataset::DeleteDatasetInput, ::aws_smithy_types::error::operation::BuildError> {
101        ::std::result::Result::Ok(crate::operation::delete_dataset::DeleteDatasetInput {
102            project_name: self.project_name,
103            dataset_type: self.dataset_type,
104            client_token: self.client_token,
105        })
106    }
107}