Skip to main content

aws_sdk_backup/operation/export_backup_plan_template/
_export_backup_plan_template_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 ExportBackupPlanTemplateOutput {
6    /// <p>The body of a backup plan template in JSON format.</p><note>
7    /// <p>This is a signed JSON document that cannot be modified before being passed to <code>GetBackupPlanFromJSON.</code></p>
8    /// </note>
9    pub backup_plan_template_json: ::std::option::Option<::std::string::String>,
10    _request_id: Option<String>,
11}
12impl ExportBackupPlanTemplateOutput {
13    /// <p>The body of a backup plan template in JSON format.</p><note>
14    /// <p>This is a signed JSON document that cannot be modified before being passed to <code>GetBackupPlanFromJSON.</code></p>
15    /// </note>
16    pub fn backup_plan_template_json(&self) -> ::std::option::Option<&str> {
17        self.backup_plan_template_json.as_deref()
18    }
19}
20impl ::aws_types::request_id::RequestId for ExportBackupPlanTemplateOutput {
21    fn request_id(&self) -> Option<&str> {
22        self._request_id.as_deref()
23    }
24}
25impl ExportBackupPlanTemplateOutput {
26    /// Creates a new builder-style object to manufacture [`ExportBackupPlanTemplateOutput`](crate::operation::export_backup_plan_template::ExportBackupPlanTemplateOutput).
27    pub fn builder() -> crate::operation::export_backup_plan_template::builders::ExportBackupPlanTemplateOutputBuilder {
28        crate::operation::export_backup_plan_template::builders::ExportBackupPlanTemplateOutputBuilder::default()
29    }
30}
31
32/// A builder for [`ExportBackupPlanTemplateOutput`](crate::operation::export_backup_plan_template::ExportBackupPlanTemplateOutput).
33#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
34#[non_exhaustive]
35pub struct ExportBackupPlanTemplateOutputBuilder {
36    pub(crate) backup_plan_template_json: ::std::option::Option<::std::string::String>,
37    _request_id: Option<String>,
38}
39impl ExportBackupPlanTemplateOutputBuilder {
40    /// <p>The body of a backup plan template in JSON format.</p><note>
41    /// <p>This is a signed JSON document that cannot be modified before being passed to <code>GetBackupPlanFromJSON.</code></p>
42    /// </note>
43    pub fn backup_plan_template_json(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
44        self.backup_plan_template_json = ::std::option::Option::Some(input.into());
45        self
46    }
47    /// <p>The body of a backup plan template in JSON format.</p><note>
48    /// <p>This is a signed JSON document that cannot be modified before being passed to <code>GetBackupPlanFromJSON.</code></p>
49    /// </note>
50    pub fn set_backup_plan_template_json(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.backup_plan_template_json = input;
52        self
53    }
54    /// <p>The body of a backup plan template in JSON format.</p><note>
55    /// <p>This is a signed JSON document that cannot be modified before being passed to <code>GetBackupPlanFromJSON.</code></p>
56    /// </note>
57    pub fn get_backup_plan_template_json(&self) -> &::std::option::Option<::std::string::String> {
58        &self.backup_plan_template_json
59    }
60    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
61        self._request_id = Some(request_id.into());
62        self
63    }
64
65    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
66        self._request_id = request_id;
67        self
68    }
69    /// Consumes the builder and constructs a [`ExportBackupPlanTemplateOutput`](crate::operation::export_backup_plan_template::ExportBackupPlanTemplateOutput).
70    pub fn build(self) -> crate::operation::export_backup_plan_template::ExportBackupPlanTemplateOutput {
71        crate::operation::export_backup_plan_template::ExportBackupPlanTemplateOutput {
72            backup_plan_template_json: self.backup_plan_template_json,
73            _request_id: self._request_id,
74        }
75    }
76}