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>The warnings generated for a specific resource for this generated template.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct WarningDetail {
/// <p>The type of this warning. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC-write-only-properties.html">IaC generator and write-only properties</a> in the <i>CloudFormation User Guide</i>.</p>
/// <ul>
/// <li>
/// <p><code>MUTUALLY_EXCLUSIVE_PROPERTIES</code> - The resource requires mutually-exclusive write-only properties. The IaC generator selects one set of mutually exclusive properties and converts the included properties into parameters. The parameter names have a suffix <code>OneOf</code> and the parameter descriptions indicate that the corresponding property can be replaced with other exclusive properties.</p></li>
/// <li>
/// <p><code>UNSUPPORTED_PROPERTIES</code> - Unsupported properties are present in the resource. One example of unsupported properties would be a required write-only property that is an array, because a parameter cannot be an array. Another example is an optional write-only property.</p></li>
/// <li>
/// <p><code>MUTUALLY_EXCLUSIVE_TYPES</code> - One or more required write-only properties are found in the resource, and the type of that property can be any of several types.</p></li>
/// </ul><note>
/// <p>Currently the resource and property reference documentation does not indicate if a property uses a type of <code>oneOf</code> or <code>anyOf</code>. You need to look at the resource provider schema.</p>
/// </note>
pub r#type: ::std::option::Option<crate::types::WarningType>,
/// <p>The properties of the resource that are impacted by this warning.</p>
pub properties: ::std::option::Option<::std::vec::Vec<crate::types::WarningProperty>>,
}
impl WarningDetail {
/// <p>The type of this warning. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC-write-only-properties.html">IaC generator and write-only properties</a> in the <i>CloudFormation User Guide</i>.</p>
/// <ul>
/// <li>
/// <p><code>MUTUALLY_EXCLUSIVE_PROPERTIES</code> - The resource requires mutually-exclusive write-only properties. The IaC generator selects one set of mutually exclusive properties and converts the included properties into parameters. The parameter names have a suffix <code>OneOf</code> and the parameter descriptions indicate that the corresponding property can be replaced with other exclusive properties.</p></li>
/// <li>
/// <p><code>UNSUPPORTED_PROPERTIES</code> - Unsupported properties are present in the resource. One example of unsupported properties would be a required write-only property that is an array, because a parameter cannot be an array. Another example is an optional write-only property.</p></li>
/// <li>
/// <p><code>MUTUALLY_EXCLUSIVE_TYPES</code> - One or more required write-only properties are found in the resource, and the type of that property can be any of several types.</p></li>
/// </ul><note>
/// <p>Currently the resource and property reference documentation does not indicate if a property uses a type of <code>oneOf</code> or <code>anyOf</code>. You need to look at the resource provider schema.</p>
/// </note>
pub fn r#type(&self) -> ::std::option::Option<&crate::types::WarningType> {
self.r#type.as_ref()
}
/// <p>The properties of the resource that are impacted by this warning.</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 `.properties.is_none()`.
pub fn properties(&self) -> &[crate::types::WarningProperty] {
self.properties.as_deref().unwrap_or_default()
}
}
impl WarningDetail {
/// Creates a new builder-style object to manufacture [`WarningDetail`](crate::types::WarningDetail).
pub fn builder() -> crate::types::builders::WarningDetailBuilder {
crate::types::builders::WarningDetailBuilder::default()
}
}
/// A builder for [`WarningDetail`](crate::types::WarningDetail).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct WarningDetailBuilder {
pub(crate) r#type: ::std::option::Option<crate::types::WarningType>,
pub(crate) properties: ::std::option::Option<::std::vec::Vec<crate::types::WarningProperty>>,
}
impl WarningDetailBuilder {
/// <p>The type of this warning. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC-write-only-properties.html">IaC generator and write-only properties</a> in the <i>CloudFormation User Guide</i>.</p>
/// <ul>
/// <li>
/// <p><code>MUTUALLY_EXCLUSIVE_PROPERTIES</code> - The resource requires mutually-exclusive write-only properties. The IaC generator selects one set of mutually exclusive properties and converts the included properties into parameters. The parameter names have a suffix <code>OneOf</code> and the parameter descriptions indicate that the corresponding property can be replaced with other exclusive properties.</p></li>
/// <li>
/// <p><code>UNSUPPORTED_PROPERTIES</code> - Unsupported properties are present in the resource. One example of unsupported properties would be a required write-only property that is an array, because a parameter cannot be an array. Another example is an optional write-only property.</p></li>
/// <li>
/// <p><code>MUTUALLY_EXCLUSIVE_TYPES</code> - One or more required write-only properties are found in the resource, and the type of that property can be any of several types.</p></li>
/// </ul><note>
/// <p>Currently the resource and property reference documentation does not indicate if a property uses a type of <code>oneOf</code> or <code>anyOf</code>. You need to look at the resource provider schema.</p>
/// </note>
pub fn r#type(mut self, input: crate::types::WarningType) -> Self {
self.r#type = ::std::option::Option::Some(input);
self
}
/// <p>The type of this warning. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC-write-only-properties.html">IaC generator and write-only properties</a> in the <i>CloudFormation User Guide</i>.</p>
/// <ul>
/// <li>
/// <p><code>MUTUALLY_EXCLUSIVE_PROPERTIES</code> - The resource requires mutually-exclusive write-only properties. The IaC generator selects one set of mutually exclusive properties and converts the included properties into parameters. The parameter names have a suffix <code>OneOf</code> and the parameter descriptions indicate that the corresponding property can be replaced with other exclusive properties.</p></li>
/// <li>
/// <p><code>UNSUPPORTED_PROPERTIES</code> - Unsupported properties are present in the resource. One example of unsupported properties would be a required write-only property that is an array, because a parameter cannot be an array. Another example is an optional write-only property.</p></li>
/// <li>
/// <p><code>MUTUALLY_EXCLUSIVE_TYPES</code> - One or more required write-only properties are found in the resource, and the type of that property can be any of several types.</p></li>
/// </ul><note>
/// <p>Currently the resource and property reference documentation does not indicate if a property uses a type of <code>oneOf</code> or <code>anyOf</code>. You need to look at the resource provider schema.</p>
/// </note>
pub fn set_type(mut self, input: ::std::option::Option<crate::types::WarningType>) -> Self {
self.r#type = input;
self
}
/// <p>The type of this warning. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/generate-IaC-write-only-properties.html">IaC generator and write-only properties</a> in the <i>CloudFormation User Guide</i>.</p>
/// <ul>
/// <li>
/// <p><code>MUTUALLY_EXCLUSIVE_PROPERTIES</code> - The resource requires mutually-exclusive write-only properties. The IaC generator selects one set of mutually exclusive properties and converts the included properties into parameters. The parameter names have a suffix <code>OneOf</code> and the parameter descriptions indicate that the corresponding property can be replaced with other exclusive properties.</p></li>
/// <li>
/// <p><code>UNSUPPORTED_PROPERTIES</code> - Unsupported properties are present in the resource. One example of unsupported properties would be a required write-only property that is an array, because a parameter cannot be an array. Another example is an optional write-only property.</p></li>
/// <li>
/// <p><code>MUTUALLY_EXCLUSIVE_TYPES</code> - One or more required write-only properties are found in the resource, and the type of that property can be any of several types.</p></li>
/// </ul><note>
/// <p>Currently the resource and property reference documentation does not indicate if a property uses a type of <code>oneOf</code> or <code>anyOf</code>. You need to look at the resource provider schema.</p>
/// </note>
pub fn get_type(&self) -> &::std::option::Option<crate::types::WarningType> {
&self.r#type
}
/// Appends an item to `properties`.
///
/// To override the contents of this collection use [`set_properties`](Self::set_properties).
///
/// <p>The properties of the resource that are impacted by this warning.</p>
pub fn properties(mut self, input: crate::types::WarningProperty) -> Self {
let mut v = self.properties.unwrap_or_default();
v.push(input);
self.properties = ::std::option::Option::Some(v);
self
}
/// <p>The properties of the resource that are impacted by this warning.</p>
pub fn set_properties(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::WarningProperty>>) -> Self {
self.properties = input;
self
}
/// <p>The properties of the resource that are impacted by this warning.</p>
pub fn get_properties(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::WarningProperty>> {
&self.properties
}
/// Consumes the builder and constructs a [`WarningDetail`](crate::types::WarningDetail).
pub fn build(self) -> crate::types::WarningDetail {
crate::types::WarningDetail {
r#type: self.r#type,
properties: self.properties,
}
}
}