aws_sdk_cloudformation/types/_module_info.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Contains information about the module from which the resource was created, if the resource was created from a module included in the stack template.</p>
4/// <p>For more information about modules, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/modules.html">Create reusable resource configurations that can be included across templates with CloudFormation modules</a> in the <i>CloudFormation User Guide</i>.</p>
5#[non_exhaustive]
6#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
7pub struct ModuleInfo {
8 /// <p>A concatenated list of the module type or types that contains the resource. Module types are listed starting with the inner-most nested module, and separated by <code>/</code>.</p>
9 /// <p>In the following example, the resource was created from a module of type <code>AWS::First::Example::MODULE</code>, that's nested inside a parent module of type <code>AWS::Second::Example::MODULE</code>.</p>
10 /// <p><code>AWS::First::Example::MODULE/AWS::Second::Example::MODULE</code></p>
11 pub type_hierarchy: ::std::option::Option<::std::string::String>,
12 /// <p>A concatenated list of the logical IDs of the module or modules that contains the resource. Modules are listed starting with the inner-most nested module, and separated by <code>/</code>.</p>
13 /// <p>In the following example, the resource was created from a module, <code>moduleA</code>, that's nested inside a parent module, <code>moduleB</code>.</p>
14 /// <p><code>moduleA/moduleB</code></p>
15 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/module-ref-resources.html">Reference module resources in CloudFormation templates</a> in the <i>CloudFormation User Guide</i>.</p>
16 pub logical_id_hierarchy: ::std::option::Option<::std::string::String>,
17}
18impl ModuleInfo {
19 /// <p>A concatenated list of the module type or types that contains the resource. Module types are listed starting with the inner-most nested module, and separated by <code>/</code>.</p>
20 /// <p>In the following example, the resource was created from a module of type <code>AWS::First::Example::MODULE</code>, that's nested inside a parent module of type <code>AWS::Second::Example::MODULE</code>.</p>
21 /// <p><code>AWS::First::Example::MODULE/AWS::Second::Example::MODULE</code></p>
22 pub fn type_hierarchy(&self) -> ::std::option::Option<&str> {
23 self.type_hierarchy.as_deref()
24 }
25 /// <p>A concatenated list of the logical IDs of the module or modules that contains the resource. Modules are listed starting with the inner-most nested module, and separated by <code>/</code>.</p>
26 /// <p>In the following example, the resource was created from a module, <code>moduleA</code>, that's nested inside a parent module, <code>moduleB</code>.</p>
27 /// <p><code>moduleA/moduleB</code></p>
28 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/module-ref-resources.html">Reference module resources in CloudFormation templates</a> in the <i>CloudFormation User Guide</i>.</p>
29 pub fn logical_id_hierarchy(&self) -> ::std::option::Option<&str> {
30 self.logical_id_hierarchy.as_deref()
31 }
32}
33impl ModuleInfo {
34 /// Creates a new builder-style object to manufacture [`ModuleInfo`](crate::types::ModuleInfo).
35 pub fn builder() -> crate::types::builders::ModuleInfoBuilder {
36 crate::types::builders::ModuleInfoBuilder::default()
37 }
38}
39
40/// A builder for [`ModuleInfo`](crate::types::ModuleInfo).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct ModuleInfoBuilder {
44 pub(crate) type_hierarchy: ::std::option::Option<::std::string::String>,
45 pub(crate) logical_id_hierarchy: ::std::option::Option<::std::string::String>,
46}
47impl ModuleInfoBuilder {
48 /// <p>A concatenated list of the module type or types that contains the resource. Module types are listed starting with the inner-most nested module, and separated by <code>/</code>.</p>
49 /// <p>In the following example, the resource was created from a module of type <code>AWS::First::Example::MODULE</code>, that's nested inside a parent module of type <code>AWS::Second::Example::MODULE</code>.</p>
50 /// <p><code>AWS::First::Example::MODULE/AWS::Second::Example::MODULE</code></p>
51 pub fn type_hierarchy(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
52 self.type_hierarchy = ::std::option::Option::Some(input.into());
53 self
54 }
55 /// <p>A concatenated list of the module type or types that contains the resource. Module types are listed starting with the inner-most nested module, and separated by <code>/</code>.</p>
56 /// <p>In the following example, the resource was created from a module of type <code>AWS::First::Example::MODULE</code>, that's nested inside a parent module of type <code>AWS::Second::Example::MODULE</code>.</p>
57 /// <p><code>AWS::First::Example::MODULE/AWS::Second::Example::MODULE</code></p>
58 pub fn set_type_hierarchy(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59 self.type_hierarchy = input;
60 self
61 }
62 /// <p>A concatenated list of the module type or types that contains the resource. Module types are listed starting with the inner-most nested module, and separated by <code>/</code>.</p>
63 /// <p>In the following example, the resource was created from a module of type <code>AWS::First::Example::MODULE</code>, that's nested inside a parent module of type <code>AWS::Second::Example::MODULE</code>.</p>
64 /// <p><code>AWS::First::Example::MODULE/AWS::Second::Example::MODULE</code></p>
65 pub fn get_type_hierarchy(&self) -> &::std::option::Option<::std::string::String> {
66 &self.type_hierarchy
67 }
68 /// <p>A concatenated list of the logical IDs of the module or modules that contains the resource. Modules are listed starting with the inner-most nested module, and separated by <code>/</code>.</p>
69 /// <p>In the following example, the resource was created from a module, <code>moduleA</code>, that's nested inside a parent module, <code>moduleB</code>.</p>
70 /// <p><code>moduleA/moduleB</code></p>
71 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/module-ref-resources.html">Reference module resources in CloudFormation templates</a> in the <i>CloudFormation User Guide</i>.</p>
72 pub fn logical_id_hierarchy(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73 self.logical_id_hierarchy = ::std::option::Option::Some(input.into());
74 self
75 }
76 /// <p>A concatenated list of the logical IDs of the module or modules that contains the resource. Modules are listed starting with the inner-most nested module, and separated by <code>/</code>.</p>
77 /// <p>In the following example, the resource was created from a module, <code>moduleA</code>, that's nested inside a parent module, <code>moduleB</code>.</p>
78 /// <p><code>moduleA/moduleB</code></p>
79 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/module-ref-resources.html">Reference module resources in CloudFormation templates</a> in the <i>CloudFormation User Guide</i>.</p>
80 pub fn set_logical_id_hierarchy(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81 self.logical_id_hierarchy = input;
82 self
83 }
84 /// <p>A concatenated list of the logical IDs of the module or modules that contains the resource. Modules are listed starting with the inner-most nested module, and separated by <code>/</code>.</p>
85 /// <p>In the following example, the resource was created from a module, <code>moduleA</code>, that's nested inside a parent module, <code>moduleB</code>.</p>
86 /// <p><code>moduleA/moduleB</code></p>
87 /// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/module-ref-resources.html">Reference module resources in CloudFormation templates</a> in the <i>CloudFormation User Guide</i>.</p>
88 pub fn get_logical_id_hierarchy(&self) -> &::std::option::Option<::std::string::String> {
89 &self.logical_id_hierarchy
90 }
91 /// Consumes the builder and constructs a [`ModuleInfo`](crate::types::ModuleInfo).
92 pub fn build(self) -> crate::types::ModuleInfo {
93 crate::types::ModuleInfo {
94 type_hierarchy: self.type_hierarchy,
95 logical_id_hierarchy: self.logical_id_hierarchy,
96 }
97 }
98}