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 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>For extensions that are modules, a public third-party extension that must be activated in your account in order for the module itself to be activated.</p>
/// <p>For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/modules.html#module-enabling">Activating public modules for use in your account</a> in the <i>CloudFormation User Guide</i>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct RequiredActivatedType {
/// <p>An alias assigned to the public extension, in this account and Region. If you specify an alias for the extension, CloudFormation treats the alias as the extension type name within this account and Region. You must use the alias to refer to the extension in your templates, API calls, and CloudFormation console.</p>
pub type_name_alias: ::std::option::Option<::std::string::String>,
/// <p>The type name of the public extension.</p>
/// <p>If you specified a <code>TypeNameAlias</code> when enabling the extension in this account and Region, CloudFormation treats that alias as the extension's type name within the account and Region, not the type name of the public extension. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-public.html#registry-public-enable-alias">Specifying aliases to refer to extensions</a> in the <i>CloudFormation User Guide</i>.</p>
pub original_type_name: ::std::option::Option<::std::string::String>,
/// <p>The publisher ID of the extension publisher.</p>
pub publisher_id: ::std::option::Option<::std::string::String>,
/// <p>A list of the major versions of the extension type that the macro supports.</p>
pub supported_major_versions: ::std::option::Option<::std::vec::Vec<i32>>,
}
impl RequiredActivatedType {
/// <p>An alias assigned to the public extension, in this account and Region. If you specify an alias for the extension, CloudFormation treats the alias as the extension type name within this account and Region. You must use the alias to refer to the extension in your templates, API calls, and CloudFormation console.</p>
pub fn type_name_alias(&self) -> ::std::option::Option<&str> {
self.type_name_alias.as_deref()
}
/// <p>The type name of the public extension.</p>
/// <p>If you specified a <code>TypeNameAlias</code> when enabling the extension in this account and Region, CloudFormation treats that alias as the extension's type name within the account and Region, not the type name of the public extension. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-public.html#registry-public-enable-alias">Specifying aliases to refer to extensions</a> in the <i>CloudFormation User Guide</i>.</p>
pub fn original_type_name(&self) -> ::std::option::Option<&str> {
self.original_type_name.as_deref()
}
/// <p>The publisher ID of the extension publisher.</p>
pub fn publisher_id(&self) -> ::std::option::Option<&str> {
self.publisher_id.as_deref()
}
/// <p>A list of the major versions of the extension type that the macro supports.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.supported_major_versions.is_none()`.
pub fn supported_major_versions(&self) -> &[i32] {
self.supported_major_versions.as_deref().unwrap_or_default()
}
}
impl RequiredActivatedType {
/// Creates a new builder-style object to manufacture [`RequiredActivatedType`](crate::types::RequiredActivatedType).
pub fn builder() -> crate::types::builders::RequiredActivatedTypeBuilder {
crate::types::builders::RequiredActivatedTypeBuilder::default()
}
}
/// A builder for [`RequiredActivatedType`](crate::types::RequiredActivatedType).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct RequiredActivatedTypeBuilder {
pub(crate) type_name_alias: ::std::option::Option<::std::string::String>,
pub(crate) original_type_name: ::std::option::Option<::std::string::String>,
pub(crate) publisher_id: ::std::option::Option<::std::string::String>,
pub(crate) supported_major_versions: ::std::option::Option<::std::vec::Vec<i32>>,
}
impl RequiredActivatedTypeBuilder {
/// <p>An alias assigned to the public extension, in this account and Region. If you specify an alias for the extension, CloudFormation treats the alias as the extension type name within this account and Region. You must use the alias to refer to the extension in your templates, API calls, and CloudFormation console.</p>
pub fn type_name_alias(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.type_name_alias = ::std::option::Option::Some(input.into());
self
}
/// <p>An alias assigned to the public extension, in this account and Region. If you specify an alias for the extension, CloudFormation treats the alias as the extension type name within this account and Region. You must use the alias to refer to the extension in your templates, API calls, and CloudFormation console.</p>
pub fn set_type_name_alias(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.type_name_alias = input;
self
}
/// <p>An alias assigned to the public extension, in this account and Region. If you specify an alias for the extension, CloudFormation treats the alias as the extension type name within this account and Region. You must use the alias to refer to the extension in your templates, API calls, and CloudFormation console.</p>
pub fn get_type_name_alias(&self) -> &::std::option::Option<::std::string::String> {
&self.type_name_alias
}
/// <p>The type name of the public extension.</p>
/// <p>If you specified a <code>TypeNameAlias</code> when enabling the extension in this account and Region, CloudFormation treats that alias as the extension's type name within the account and Region, not the type name of the public extension. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-public.html#registry-public-enable-alias">Specifying aliases to refer to extensions</a> in the <i>CloudFormation User Guide</i>.</p>
pub fn original_type_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.original_type_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The type name of the public extension.</p>
/// <p>If you specified a <code>TypeNameAlias</code> when enabling the extension in this account and Region, CloudFormation treats that alias as the extension's type name within the account and Region, not the type name of the public extension. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-public.html#registry-public-enable-alias">Specifying aliases to refer to extensions</a> in the <i>CloudFormation User Guide</i>.</p>
pub fn set_original_type_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.original_type_name = input;
self
}
/// <p>The type name of the public extension.</p>
/// <p>If you specified a <code>TypeNameAlias</code> when enabling the extension in this account and Region, CloudFormation treats that alias as the extension's type name within the account and Region, not the type name of the public extension. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-public.html#registry-public-enable-alias">Specifying aliases to refer to extensions</a> in the <i>CloudFormation User Guide</i>.</p>
pub fn get_original_type_name(&self) -> &::std::option::Option<::std::string::String> {
&self.original_type_name
}
/// <p>The publisher ID of the extension publisher.</p>
pub fn publisher_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.publisher_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The publisher ID of the extension publisher.</p>
pub fn set_publisher_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.publisher_id = input;
self
}
/// <p>The publisher ID of the extension publisher.</p>
pub fn get_publisher_id(&self) -> &::std::option::Option<::std::string::String> {
&self.publisher_id
}
/// Appends an item to `supported_major_versions`.
///
/// To override the contents of this collection use [`set_supported_major_versions`](Self::set_supported_major_versions).
///
/// <p>A list of the major versions of the extension type that the macro supports.</p>
pub fn supported_major_versions(mut self, input: i32) -> Self {
let mut v = self.supported_major_versions.unwrap_or_default();
v.push(input);
self.supported_major_versions = ::std::option::Option::Some(v);
self
}
/// <p>A list of the major versions of the extension type that the macro supports.</p>
pub fn set_supported_major_versions(mut self, input: ::std::option::Option<::std::vec::Vec<i32>>) -> Self {
self.supported_major_versions = input;
self
}
/// <p>A list of the major versions of the extension type that the macro supports.</p>
pub fn get_supported_major_versions(&self) -> &::std::option::Option<::std::vec::Vec<i32>> {
&self.supported_major_versions
}
/// Consumes the builder and constructs a [`RequiredActivatedType`](crate::types::RequiredActivatedType).
pub fn build(self) -> crate::types::RequiredActivatedType {
crate::types::RequiredActivatedType {
type_name_alias: self.type_name_alias,
original_type_name: self.original_type_name,
publisher_id: self.publisher_id,
supported_major_versions: self.supported_major_versions,
}
}
}