aws_sdk_cognitosync/operation/delete_dataset/_delete_dataset_output.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// Response to a successful DeleteDataset request.
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DeleteDatasetOutput {
7 /// A collection of data for an identity pool. An identity pool can have multiple datasets. A dataset is per identity and can be general or associated with a particular entity in an application (like a saved game). Datasets are automatically created if they don't exist. Data is synced by dataset, and a dataset can hold up to 1MB of key-value pairs.
8 pub dataset: ::std::option::Option<crate::types::Dataset>,
9 _request_id: Option<String>,
10}
11impl DeleteDatasetOutput {
12 /// A collection of data for an identity pool. An identity pool can have multiple datasets. A dataset is per identity and can be general or associated with a particular entity in an application (like a saved game). Datasets are automatically created if they don't exist. Data is synced by dataset, and a dataset can hold up to 1MB of key-value pairs.
13 pub fn dataset(&self) -> ::std::option::Option<&crate::types::Dataset> {
14 self.dataset.as_ref()
15 }
16}
17impl ::aws_types::request_id::RequestId for DeleteDatasetOutput {
18 fn request_id(&self) -> Option<&str> {
19 self._request_id.as_deref()
20 }
21}
22impl DeleteDatasetOutput {
23 /// Creates a new builder-style object to manufacture [`DeleteDatasetOutput`](crate::operation::delete_dataset::DeleteDatasetOutput).
24 pub fn builder() -> crate::operation::delete_dataset::builders::DeleteDatasetOutputBuilder {
25 crate::operation::delete_dataset::builders::DeleteDatasetOutputBuilder::default()
26 }
27}
28
29/// A builder for [`DeleteDatasetOutput`](crate::operation::delete_dataset::DeleteDatasetOutput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct DeleteDatasetOutputBuilder {
33 pub(crate) dataset: ::std::option::Option<crate::types::Dataset>,
34 _request_id: Option<String>,
35}
36impl DeleteDatasetOutputBuilder {
37 /// A collection of data for an identity pool. An identity pool can have multiple datasets. A dataset is per identity and can be general or associated with a particular entity in an application (like a saved game). Datasets are automatically created if they don't exist. Data is synced by dataset, and a dataset can hold up to 1MB of key-value pairs.
38 pub fn dataset(mut self, input: crate::types::Dataset) -> Self {
39 self.dataset = ::std::option::Option::Some(input);
40 self
41 }
42 /// A collection of data for an identity pool. An identity pool can have multiple datasets. A dataset is per identity and can be general or associated with a particular entity in an application (like a saved game). Datasets are automatically created if they don't exist. Data is synced by dataset, and a dataset can hold up to 1MB of key-value pairs.
43 pub fn set_dataset(mut self, input: ::std::option::Option<crate::types::Dataset>) -> Self {
44 self.dataset = input;
45 self
46 }
47 /// A collection of data for an identity pool. An identity pool can have multiple datasets. A dataset is per identity and can be general or associated with a particular entity in an application (like a saved game). Datasets are automatically created if they don't exist. Data is synced by dataset, and a dataset can hold up to 1MB of key-value pairs.
48 pub fn get_dataset(&self) -> &::std::option::Option<crate::types::Dataset> {
49 &self.dataset
50 }
51 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
52 self._request_id = Some(request_id.into());
53 self
54 }
55
56 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
57 self._request_id = request_id;
58 self
59 }
60 /// Consumes the builder and constructs a [`DeleteDatasetOutput`](crate::operation::delete_dataset::DeleteDatasetOutput).
61 pub fn build(self) -> crate::operation::delete_dataset::DeleteDatasetOutput {
62 crate::operation::delete_dataset::DeleteDatasetOutput {
63 dataset: self.dataset,
64 _request_id: self._request_id,
65 }
66 }
67}