aws_sdk_cognitosync/operation/describe_dataset/_describe_dataset_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// A request for meta data about a dataset (creation date, number of records, size) by owner and dataset name.
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DescribeDatasetInput {
7 /// A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
8 pub identity_pool_id: ::std::option::Option<::std::string::String>,
9 /// A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
10 pub identity_id: ::std::option::Option<::std::string::String>,
11 /// A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash), and '.' (dot).
12 pub dataset_name: ::std::option::Option<::std::string::String>,
13}
14impl DescribeDatasetInput {
15 /// A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
16 pub fn identity_pool_id(&self) -> ::std::option::Option<&str> {
17 self.identity_pool_id.as_deref()
18 }
19 /// A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
20 pub fn identity_id(&self) -> ::std::option::Option<&str> {
21 self.identity_id.as_deref()
22 }
23 /// A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash), and '.' (dot).
24 pub fn dataset_name(&self) -> ::std::option::Option<&str> {
25 self.dataset_name.as_deref()
26 }
27}
28impl DescribeDatasetInput {
29 /// Creates a new builder-style object to manufacture [`DescribeDatasetInput`](crate::operation::describe_dataset::DescribeDatasetInput).
30 pub fn builder() -> crate::operation::describe_dataset::builders::DescribeDatasetInputBuilder {
31 crate::operation::describe_dataset::builders::DescribeDatasetInputBuilder::default()
32 }
33}
34
35/// A builder for [`DescribeDatasetInput`](crate::operation::describe_dataset::DescribeDatasetInput).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct DescribeDatasetInputBuilder {
39 pub(crate) identity_pool_id: ::std::option::Option<::std::string::String>,
40 pub(crate) identity_id: ::std::option::Option<::std::string::String>,
41 pub(crate) dataset_name: ::std::option::Option<::std::string::String>,
42}
43impl DescribeDatasetInputBuilder {
44 /// A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
45 /// This field is required.
46 pub fn identity_pool_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47 self.identity_pool_id = ::std::option::Option::Some(input.into());
48 self
49 }
50 /// A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
51 pub fn set_identity_pool_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52 self.identity_pool_id = input;
53 self
54 }
55 /// A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
56 pub fn get_identity_pool_id(&self) -> &::std::option::Option<::std::string::String> {
57 &self.identity_pool_id
58 }
59 /// A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
60 /// This field is required.
61 pub fn identity_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62 self.identity_id = ::std::option::Option::Some(input.into());
63 self
64 }
65 /// A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
66 pub fn set_identity_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67 self.identity_id = input;
68 self
69 }
70 /// A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. GUID generation is unique within a region.
71 pub fn get_identity_id(&self) -> &::std::option::Option<::std::string::String> {
72 &self.identity_id
73 }
74 /// A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash), and '.' (dot).
75 /// This field is required.
76 pub fn dataset_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
77 self.dataset_name = ::std::option::Option::Some(input.into());
78 self
79 }
80 /// A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash), and '.' (dot).
81 pub fn set_dataset_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
82 self.dataset_name = input;
83 self
84 }
85 /// A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash), and '.' (dot).
86 pub fn get_dataset_name(&self) -> &::std::option::Option<::std::string::String> {
87 &self.dataset_name
88 }
89 /// Consumes the builder and constructs a [`DescribeDatasetInput`](crate::operation::describe_dataset::DescribeDatasetInput).
90 pub fn build(
91 self,
92 ) -> ::std::result::Result<crate::operation::describe_dataset::DescribeDatasetInput, ::aws_smithy_types::error::operation::BuildError> {
93 ::std::result::Result::Ok(crate::operation::describe_dataset::DescribeDatasetInput {
94 identity_pool_id: self.identity_pool_id,
95 identity_id: self.identity_id,
96 dataset_name: self.dataset_name,
97 })
98 }
99}