aws_sdk_quicksight/types/
_asset_bundle_import_job_folder_override_parameters.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The override parameters for a single folder that is being imported.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct AssetBundleImportJobFolderOverrideParameters {
7    /// <p>The ID of the folder that you want to apply overrides to.</p>
8    pub folder_id: ::std::string::String,
9    /// <p>A new name for the folder.</p>
10    pub name: ::std::option::Option<::std::string::String>,
11    /// <p>A new parent folder arn. This change can only be applied if the import creates a brand new folder. Existing folders cannot be moved.</p>
12    pub parent_folder_arn: ::std::option::Option<::std::string::String>,
13}
14impl AssetBundleImportJobFolderOverrideParameters {
15    /// <p>The ID of the folder that you want to apply overrides to.</p>
16    pub fn folder_id(&self) -> &str {
17        use std::ops::Deref;
18        self.folder_id.deref()
19    }
20    /// <p>A new name for the folder.</p>
21    pub fn name(&self) -> ::std::option::Option<&str> {
22        self.name.as_deref()
23    }
24    /// <p>A new parent folder arn. This change can only be applied if the import creates a brand new folder. Existing folders cannot be moved.</p>
25    pub fn parent_folder_arn(&self) -> ::std::option::Option<&str> {
26        self.parent_folder_arn.as_deref()
27    }
28}
29impl AssetBundleImportJobFolderOverrideParameters {
30    /// Creates a new builder-style object to manufacture [`AssetBundleImportJobFolderOverrideParameters`](crate::types::AssetBundleImportJobFolderOverrideParameters).
31    pub fn builder() -> crate::types::builders::AssetBundleImportJobFolderOverrideParametersBuilder {
32        crate::types::builders::AssetBundleImportJobFolderOverrideParametersBuilder::default()
33    }
34}
35
36/// A builder for [`AssetBundleImportJobFolderOverrideParameters`](crate::types::AssetBundleImportJobFolderOverrideParameters).
37#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct AssetBundleImportJobFolderOverrideParametersBuilder {
40    pub(crate) folder_id: ::std::option::Option<::std::string::String>,
41    pub(crate) name: ::std::option::Option<::std::string::String>,
42    pub(crate) parent_folder_arn: ::std::option::Option<::std::string::String>,
43}
44impl AssetBundleImportJobFolderOverrideParametersBuilder {
45    /// <p>The ID of the folder that you want to apply overrides to.</p>
46    /// This field is required.
47    pub fn folder_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
48        self.folder_id = ::std::option::Option::Some(input.into());
49        self
50    }
51    /// <p>The ID of the folder that you want to apply overrides to.</p>
52    pub fn set_folder_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
53        self.folder_id = input;
54        self
55    }
56    /// <p>The ID of the folder that you want to apply overrides to.</p>
57    pub fn get_folder_id(&self) -> &::std::option::Option<::std::string::String> {
58        &self.folder_id
59    }
60    /// <p>A new name for the folder.</p>
61    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62        self.name = ::std::option::Option::Some(input.into());
63        self
64    }
65    /// <p>A new name for the folder.</p>
66    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67        self.name = input;
68        self
69    }
70    /// <p>A new name for the folder.</p>
71    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
72        &self.name
73    }
74    /// <p>A new parent folder arn. This change can only be applied if the import creates a brand new folder. Existing folders cannot be moved.</p>
75    pub fn parent_folder_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76        self.parent_folder_arn = ::std::option::Option::Some(input.into());
77        self
78    }
79    /// <p>A new parent folder arn. This change can only be applied if the import creates a brand new folder. Existing folders cannot be moved.</p>
80    pub fn set_parent_folder_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81        self.parent_folder_arn = input;
82        self
83    }
84    /// <p>A new parent folder arn. This change can only be applied if the import creates a brand new folder. Existing folders cannot be moved.</p>
85    pub fn get_parent_folder_arn(&self) -> &::std::option::Option<::std::string::String> {
86        &self.parent_folder_arn
87    }
88    /// Consumes the builder and constructs a [`AssetBundleImportJobFolderOverrideParameters`](crate::types::AssetBundleImportJobFolderOverrideParameters).
89    /// This method will fail if any of the following fields are not set:
90    /// - [`folder_id`](crate::types::builders::AssetBundleImportJobFolderOverrideParametersBuilder::folder_id)
91    pub fn build(
92        self,
93    ) -> ::std::result::Result<crate::types::AssetBundleImportJobFolderOverrideParameters, ::aws_smithy_types::error::operation::BuildError> {
94        ::std::result::Result::Ok(crate::types::AssetBundleImportJobFolderOverrideParameters {
95            folder_id: self.folder_id.ok_or_else(|| {
96                ::aws_smithy_types::error::operation::BuildError::missing_field(
97                    "folder_id",
98                    "folder_id was not specified but it is required when building AssetBundleImportJobFolderOverrideParameters",
99                )
100            })?,
101            name: self.name,
102            parent_folder_arn: self.parent_folder_arn,
103        })
104    }
105}