aws_sdk_cloudwatch/operation/get_dataset/_get_dataset_output.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 GetDatasetOutput {
6 /// <p>Returns the identifier of the dataset.</p>
7 pub dataset_id: ::std::option::Option<::std::string::String>,
8 /// <p>Returns the Amazon Resource Name (ARN) of the dataset, in the format <code>arn:aws:cloudwatch:<i>Region</i>:<i>account-id</i>:dataset/<i>dataset-id</i> </code>.</p>
9 pub arn: ::std::option::Option<::std::string::String>,
10 /// <p>Returns the Amazon Resource Name (ARN) of the customer managed Amazon Web Services KMS key that is currently associated with the dataset, if any. If the dataset is not associated with a customer managed KMS key, this field is not included in the response and the dataset is encrypted at rest using an Amazon Web Services owned key.</p>
11 pub kms_key_arn: ::std::option::Option<::std::string::String>,
12 _request_id: Option<String>,
13}
14impl GetDatasetOutput {
15 /// <p>Returns the identifier of the dataset.</p>
16 pub fn dataset_id(&self) -> ::std::option::Option<&str> {
17 self.dataset_id.as_deref()
18 }
19 /// <p>Returns the Amazon Resource Name (ARN) of the dataset, in the format <code>arn:aws:cloudwatch:<i>Region</i>:<i>account-id</i>:dataset/<i>dataset-id</i> </code>.</p>
20 pub fn arn(&self) -> ::std::option::Option<&str> {
21 self.arn.as_deref()
22 }
23 /// <p>Returns the Amazon Resource Name (ARN) of the customer managed Amazon Web Services KMS key that is currently associated with the dataset, if any. If the dataset is not associated with a customer managed KMS key, this field is not included in the response and the dataset is encrypted at rest using an Amazon Web Services owned key.</p>
24 pub fn kms_key_arn(&self) -> ::std::option::Option<&str> {
25 self.kms_key_arn.as_deref()
26 }
27}
28impl ::aws_types::request_id::RequestId for GetDatasetOutput {
29 fn request_id(&self) -> Option<&str> {
30 self._request_id.as_deref()
31 }
32}
33impl GetDatasetOutput {
34 /// Creates a new builder-style object to manufacture [`GetDatasetOutput`](crate::operation::get_dataset::GetDatasetOutput).
35 pub fn builder() -> crate::operation::get_dataset::builders::GetDatasetOutputBuilder {
36 crate::operation::get_dataset::builders::GetDatasetOutputBuilder::default()
37 }
38}
39
40/// A builder for [`GetDatasetOutput`](crate::operation::get_dataset::GetDatasetOutput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct GetDatasetOutputBuilder {
44 pub(crate) dataset_id: ::std::option::Option<::std::string::String>,
45 pub(crate) arn: ::std::option::Option<::std::string::String>,
46 pub(crate) kms_key_arn: ::std::option::Option<::std::string::String>,
47 _request_id: Option<String>,
48}
49impl GetDatasetOutputBuilder {
50 /// <p>Returns the identifier of the dataset.</p>
51 /// This field is required.
52 pub fn dataset_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.dataset_id = ::std::option::Option::Some(input.into());
54 self
55 }
56 /// <p>Returns the identifier of the dataset.</p>
57 pub fn set_dataset_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.dataset_id = input;
59 self
60 }
61 /// <p>Returns the identifier of the dataset.</p>
62 pub fn get_dataset_id(&self) -> &::std::option::Option<::std::string::String> {
63 &self.dataset_id
64 }
65 /// <p>Returns the Amazon Resource Name (ARN) of the dataset, in the format <code>arn:aws:cloudwatch:<i>Region</i>:<i>account-id</i>:dataset/<i>dataset-id</i> </code>.</p>
66 /// This field is required.
67 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68 self.arn = ::std::option::Option::Some(input.into());
69 self
70 }
71 /// <p>Returns the Amazon Resource Name (ARN) of the dataset, in the format <code>arn:aws:cloudwatch:<i>Region</i>:<i>account-id</i>:dataset/<i>dataset-id</i> </code>.</p>
72 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73 self.arn = input;
74 self
75 }
76 /// <p>Returns the Amazon Resource Name (ARN) of the dataset, in the format <code>arn:aws:cloudwatch:<i>Region</i>:<i>account-id</i>:dataset/<i>dataset-id</i> </code>.</p>
77 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
78 &self.arn
79 }
80 /// <p>Returns the Amazon Resource Name (ARN) of the customer managed Amazon Web Services KMS key that is currently associated with the dataset, if any. If the dataset is not associated with a customer managed KMS key, this field is not included in the response and the dataset is encrypted at rest using an Amazon Web Services owned key.</p>
81 pub fn kms_key_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82 self.kms_key_arn = ::std::option::Option::Some(input.into());
83 self
84 }
85 /// <p>Returns the Amazon Resource Name (ARN) of the customer managed Amazon Web Services KMS key that is currently associated with the dataset, if any. If the dataset is not associated with a customer managed KMS key, this field is not included in the response and the dataset is encrypted at rest using an Amazon Web Services owned key.</p>
86 pub fn set_kms_key_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87 self.kms_key_arn = input;
88 self
89 }
90 /// <p>Returns the Amazon Resource Name (ARN) of the customer managed Amazon Web Services KMS key that is currently associated with the dataset, if any. If the dataset is not associated with a customer managed KMS key, this field is not included in the response and the dataset is encrypted at rest using an Amazon Web Services owned key.</p>
91 pub fn get_kms_key_arn(&self) -> &::std::option::Option<::std::string::String> {
92 &self.kms_key_arn
93 }
94 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
95 self._request_id = Some(request_id.into());
96 self
97 }
98
99 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
100 self._request_id = request_id;
101 self
102 }
103 /// Consumes the builder and constructs a [`GetDatasetOutput`](crate::operation::get_dataset::GetDatasetOutput).
104 pub fn build(self) -> crate::operation::get_dataset::GetDatasetOutput {
105 crate::operation::get_dataset::GetDatasetOutput {
106 dataset_id: self.dataset_id,
107 arn: self.arn,
108 kms_key_arn: self.kms_key_arn,
109 _request_id: self._request_id,
110 }
111 }
112}