aws_sdk_backup/operation/create_report_plan/
_create_report_plan_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 CreateReportPlanInput {
6    /// <p>The unique name of the report plan. The name must be between 1 and 256 characters, starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_).</p>
7    pub report_plan_name: ::std::option::Option<::std::string::String>,
8    /// <p>An optional description of the report plan with a maximum of 1,024 characters.</p>
9    pub report_plan_description: ::std::option::Option<::std::string::String>,
10    /// <p>A structure that contains information about where and how to deliver your reports, specifically your Amazon S3 bucket name, S3 key prefix, and the formats of your reports.</p>
11    pub report_delivery_channel: ::std::option::Option<crate::types::ReportDeliveryChannel>,
12    /// <p>Identifies the report template for the report. Reports are built using a report template. The report templates are:</p>
13    /// <p><code>RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT</code></p>
14    /// <p>If the report template is <code>RESOURCE_COMPLIANCE_REPORT</code> or <code>CONTROL_COMPLIANCE_REPORT</code>, this API resource also describes the report coverage by Amazon Web Services Regions and frameworks.</p>
15    pub report_setting: ::std::option::Option<crate::types::ReportSetting>,
16    /// <p>The tags to assign to the report plan.</p>
17    pub report_plan_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
18    /// <p>A customer-chosen string that you can use to distinguish between otherwise identical calls to <code>CreateReportPlanInput</code>. Retrying a successful request with the same idempotency token results in a success message with no action taken.</p>
19    pub idempotency_token: ::std::option::Option<::std::string::String>,
20}
21impl CreateReportPlanInput {
22    /// <p>The unique name of the report plan. The name must be between 1 and 256 characters, starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_).</p>
23    pub fn report_plan_name(&self) -> ::std::option::Option<&str> {
24        self.report_plan_name.as_deref()
25    }
26    /// <p>An optional description of the report plan with a maximum of 1,024 characters.</p>
27    pub fn report_plan_description(&self) -> ::std::option::Option<&str> {
28        self.report_plan_description.as_deref()
29    }
30    /// <p>A structure that contains information about where and how to deliver your reports, specifically your Amazon S3 bucket name, S3 key prefix, and the formats of your reports.</p>
31    pub fn report_delivery_channel(&self) -> ::std::option::Option<&crate::types::ReportDeliveryChannel> {
32        self.report_delivery_channel.as_ref()
33    }
34    /// <p>Identifies the report template for the report. Reports are built using a report template. The report templates are:</p>
35    /// <p><code>RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT</code></p>
36    /// <p>If the report template is <code>RESOURCE_COMPLIANCE_REPORT</code> or <code>CONTROL_COMPLIANCE_REPORT</code>, this API resource also describes the report coverage by Amazon Web Services Regions and frameworks.</p>
37    pub fn report_setting(&self) -> ::std::option::Option<&crate::types::ReportSetting> {
38        self.report_setting.as_ref()
39    }
40    /// <p>The tags to assign to the report plan.</p>
41    pub fn report_plan_tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
42        self.report_plan_tags.as_ref()
43    }
44    /// <p>A customer-chosen string that you can use to distinguish between otherwise identical calls to <code>CreateReportPlanInput</code>. Retrying a successful request with the same idempotency token results in a success message with no action taken.</p>
45    pub fn idempotency_token(&self) -> ::std::option::Option<&str> {
46        self.idempotency_token.as_deref()
47    }
48}
49impl CreateReportPlanInput {
50    /// Creates a new builder-style object to manufacture [`CreateReportPlanInput`](crate::operation::create_report_plan::CreateReportPlanInput).
51    pub fn builder() -> crate::operation::create_report_plan::builders::CreateReportPlanInputBuilder {
52        crate::operation::create_report_plan::builders::CreateReportPlanInputBuilder::default()
53    }
54}
55
56/// A builder for [`CreateReportPlanInput`](crate::operation::create_report_plan::CreateReportPlanInput).
57#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
58#[non_exhaustive]
59pub struct CreateReportPlanInputBuilder {
60    pub(crate) report_plan_name: ::std::option::Option<::std::string::String>,
61    pub(crate) report_plan_description: ::std::option::Option<::std::string::String>,
62    pub(crate) report_delivery_channel: ::std::option::Option<crate::types::ReportDeliveryChannel>,
63    pub(crate) report_setting: ::std::option::Option<crate::types::ReportSetting>,
64    pub(crate) report_plan_tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
65    pub(crate) idempotency_token: ::std::option::Option<::std::string::String>,
66}
67impl CreateReportPlanInputBuilder {
68    /// <p>The unique name of the report plan. The name must be between 1 and 256 characters, starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_).</p>
69    /// This field is required.
70    pub fn report_plan_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
71        self.report_plan_name = ::std::option::Option::Some(input.into());
72        self
73    }
74    /// <p>The unique name of the report plan. The name must be between 1 and 256 characters, starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_).</p>
75    pub fn set_report_plan_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
76        self.report_plan_name = input;
77        self
78    }
79    /// <p>The unique name of the report plan. The name must be between 1 and 256 characters, starting with a letter, and consisting of letters (a-z, A-Z), numbers (0-9), and underscores (_).</p>
80    pub fn get_report_plan_name(&self) -> &::std::option::Option<::std::string::String> {
81        &self.report_plan_name
82    }
83    /// <p>An optional description of the report plan with a maximum of 1,024 characters.</p>
84    pub fn report_plan_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
85        self.report_plan_description = ::std::option::Option::Some(input.into());
86        self
87    }
88    /// <p>An optional description of the report plan with a maximum of 1,024 characters.</p>
89    pub fn set_report_plan_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
90        self.report_plan_description = input;
91        self
92    }
93    /// <p>An optional description of the report plan with a maximum of 1,024 characters.</p>
94    pub fn get_report_plan_description(&self) -> &::std::option::Option<::std::string::String> {
95        &self.report_plan_description
96    }
97    /// <p>A structure that contains information about where and how to deliver your reports, specifically your Amazon S3 bucket name, S3 key prefix, and the formats of your reports.</p>
98    /// This field is required.
99    pub fn report_delivery_channel(mut self, input: crate::types::ReportDeliveryChannel) -> Self {
100        self.report_delivery_channel = ::std::option::Option::Some(input);
101        self
102    }
103    /// <p>A structure that contains information about where and how to deliver your reports, specifically your Amazon S3 bucket name, S3 key prefix, and the formats of your reports.</p>
104    pub fn set_report_delivery_channel(mut self, input: ::std::option::Option<crate::types::ReportDeliveryChannel>) -> Self {
105        self.report_delivery_channel = input;
106        self
107    }
108    /// <p>A structure that contains information about where and how to deliver your reports, specifically your Amazon S3 bucket name, S3 key prefix, and the formats of your reports.</p>
109    pub fn get_report_delivery_channel(&self) -> &::std::option::Option<crate::types::ReportDeliveryChannel> {
110        &self.report_delivery_channel
111    }
112    /// <p>Identifies the report template for the report. Reports are built using a report template. The report templates are:</p>
113    /// <p><code>RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT</code></p>
114    /// <p>If the report template is <code>RESOURCE_COMPLIANCE_REPORT</code> or <code>CONTROL_COMPLIANCE_REPORT</code>, this API resource also describes the report coverage by Amazon Web Services Regions and frameworks.</p>
115    /// This field is required.
116    pub fn report_setting(mut self, input: crate::types::ReportSetting) -> Self {
117        self.report_setting = ::std::option::Option::Some(input);
118        self
119    }
120    /// <p>Identifies the report template for the report. Reports are built using a report template. The report templates are:</p>
121    /// <p><code>RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT</code></p>
122    /// <p>If the report template is <code>RESOURCE_COMPLIANCE_REPORT</code> or <code>CONTROL_COMPLIANCE_REPORT</code>, this API resource also describes the report coverage by Amazon Web Services Regions and frameworks.</p>
123    pub fn set_report_setting(mut self, input: ::std::option::Option<crate::types::ReportSetting>) -> Self {
124        self.report_setting = input;
125        self
126    }
127    /// <p>Identifies the report template for the report. Reports are built using a report template. The report templates are:</p>
128    /// <p><code>RESOURCE_COMPLIANCE_REPORT | CONTROL_COMPLIANCE_REPORT | BACKUP_JOB_REPORT | COPY_JOB_REPORT | RESTORE_JOB_REPORT</code></p>
129    /// <p>If the report template is <code>RESOURCE_COMPLIANCE_REPORT</code> or <code>CONTROL_COMPLIANCE_REPORT</code>, this API resource also describes the report coverage by Amazon Web Services Regions and frameworks.</p>
130    pub fn get_report_setting(&self) -> &::std::option::Option<crate::types::ReportSetting> {
131        &self.report_setting
132    }
133    /// Adds a key-value pair to `report_plan_tags`.
134    ///
135    /// To override the contents of this collection use [`set_report_plan_tags`](Self::set_report_plan_tags).
136    ///
137    /// <p>The tags to assign to the report plan.</p>
138    pub fn report_plan_tags(
139        mut self,
140        k: impl ::std::convert::Into<::std::string::String>,
141        v: impl ::std::convert::Into<::std::string::String>,
142    ) -> Self {
143        let mut hash_map = self.report_plan_tags.unwrap_or_default();
144        hash_map.insert(k.into(), v.into());
145        self.report_plan_tags = ::std::option::Option::Some(hash_map);
146        self
147    }
148    /// <p>The tags to assign to the report plan.</p>
149    pub fn set_report_plan_tags(
150        mut self,
151        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
152    ) -> Self {
153        self.report_plan_tags = input;
154        self
155    }
156    /// <p>The tags to assign to the report plan.</p>
157    pub fn get_report_plan_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
158        &self.report_plan_tags
159    }
160    /// <p>A customer-chosen string that you can use to distinguish between otherwise identical calls to <code>CreateReportPlanInput</code>. Retrying a successful request with the same idempotency token results in a success message with no action taken.</p>
161    pub fn idempotency_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
162        self.idempotency_token = ::std::option::Option::Some(input.into());
163        self
164    }
165    /// <p>A customer-chosen string that you can use to distinguish between otherwise identical calls to <code>CreateReportPlanInput</code>. Retrying a successful request with the same idempotency token results in a success message with no action taken.</p>
166    pub fn set_idempotency_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
167        self.idempotency_token = input;
168        self
169    }
170    /// <p>A customer-chosen string that you can use to distinguish between otherwise identical calls to <code>CreateReportPlanInput</code>. Retrying a successful request with the same idempotency token results in a success message with no action taken.</p>
171    pub fn get_idempotency_token(&self) -> &::std::option::Option<::std::string::String> {
172        &self.idempotency_token
173    }
174    /// Consumes the builder and constructs a [`CreateReportPlanInput`](crate::operation::create_report_plan::CreateReportPlanInput).
175    pub fn build(
176        self,
177    ) -> ::std::result::Result<crate::operation::create_report_plan::CreateReportPlanInput, ::aws_smithy_types::error::operation::BuildError> {
178        ::std::result::Result::Ok(crate::operation::create_report_plan::CreateReportPlanInput {
179            report_plan_name: self.report_plan_name,
180            report_plan_description: self.report_plan_description,
181            report_delivery_channel: self.report_delivery_channel,
182            report_setting: self.report_setting,
183            report_plan_tags: self.report_plan_tags,
184            idempotency_token: self.idempotency_token,
185        })
186    }
187}