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