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 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Information about a resource property whose actual value differs from its expected value, as defined in the stack template and any values specified as template parameters. These will be present only for resources whose <code>StackResourceDriftStatus</code> is <code>MODIFIED</code>. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html">Detecting Unregulated Configuration Changes to Stacks and Resources</a>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PropertyDifference {
/// <p>The fully-qualified path to the resource property.</p>
pub property_path: ::std::option::Option<::std::string::String>,
/// <p>The expected property value of the resource property, as defined in the stack template and any values specified as template parameters.</p>
pub expected_value: ::std::option::Option<::std::string::String>,
/// <p>The actual property value of the resource property.</p>
pub actual_value: ::std::option::Option<::std::string::String>,
/// <p>The type of property difference.</p>
/// <ul>
/// <li>
/// <p><code>ADD</code>: A value has been added to a resource property that's an array or list data type.</p></li>
/// <li>
/// <p><code>REMOVE</code>: The property has been removed from the current resource configuration.</p></li>
/// <li>
/// <p><code>NOT_EQUAL</code>: The current property value differs from its expected value (as defined in the stack template and any values specified as template parameters).</p></li>
/// </ul>
pub difference_type: ::std::option::Option<crate::types::DifferenceType>,
}
impl PropertyDifference {
/// <p>The fully-qualified path to the resource property.</p>
pub fn property_path(&self) -> ::std::option::Option<&str> {
self.property_path.as_deref()
}
/// <p>The expected property value of the resource property, as defined in the stack template and any values specified as template parameters.</p>
pub fn expected_value(&self) -> ::std::option::Option<&str> {
self.expected_value.as_deref()
}
/// <p>The actual property value of the resource property.</p>
pub fn actual_value(&self) -> ::std::option::Option<&str> {
self.actual_value.as_deref()
}
/// <p>The type of property difference.</p>
/// <ul>
/// <li>
/// <p><code>ADD</code>: A value has been added to a resource property that's an array or list data type.</p></li>
/// <li>
/// <p><code>REMOVE</code>: The property has been removed from the current resource configuration.</p></li>
/// <li>
/// <p><code>NOT_EQUAL</code>: The current property value differs from its expected value (as defined in the stack template and any values specified as template parameters).</p></li>
/// </ul>
pub fn difference_type(&self) -> ::std::option::Option<&crate::types::DifferenceType> {
self.difference_type.as_ref()
}
}
impl PropertyDifference {
/// Creates a new builder-style object to manufacture [`PropertyDifference`](crate::types::PropertyDifference).
pub fn builder() -> crate::types::builders::PropertyDifferenceBuilder {
crate::types::builders::PropertyDifferenceBuilder::default()
}
}
/// A builder for [`PropertyDifference`](crate::types::PropertyDifference).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct PropertyDifferenceBuilder {
pub(crate) property_path: ::std::option::Option<::std::string::String>,
pub(crate) expected_value: ::std::option::Option<::std::string::String>,
pub(crate) actual_value: ::std::option::Option<::std::string::String>,
pub(crate) difference_type: ::std::option::Option<crate::types::DifferenceType>,
}
impl PropertyDifferenceBuilder {
/// <p>The fully-qualified path to the resource property.</p>
/// This field is required.
pub fn property_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.property_path = ::std::option::Option::Some(input.into());
self
}
/// <p>The fully-qualified path to the resource property.</p>
pub fn set_property_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.property_path = input;
self
}
/// <p>The fully-qualified path to the resource property.</p>
pub fn get_property_path(&self) -> &::std::option::Option<::std::string::String> {
&self.property_path
}
/// <p>The expected property value of the resource property, as defined in the stack template and any values specified as template parameters.</p>
/// This field is required.
pub fn expected_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.expected_value = ::std::option::Option::Some(input.into());
self
}
/// <p>The expected property value of the resource property, as defined in the stack template and any values specified as template parameters.</p>
pub fn set_expected_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.expected_value = input;
self
}
/// <p>The expected property value of the resource property, as defined in the stack template and any values specified as template parameters.</p>
pub fn get_expected_value(&self) -> &::std::option::Option<::std::string::String> {
&self.expected_value
}
/// <p>The actual property value of the resource property.</p>
/// This field is required.
pub fn actual_value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.actual_value = ::std::option::Option::Some(input.into());
self
}
/// <p>The actual property value of the resource property.</p>
pub fn set_actual_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.actual_value = input;
self
}
/// <p>The actual property value of the resource property.</p>
pub fn get_actual_value(&self) -> &::std::option::Option<::std::string::String> {
&self.actual_value
}
/// <p>The type of property difference.</p>
/// <ul>
/// <li>
/// <p><code>ADD</code>: A value has been added to a resource property that's an array or list data type.</p></li>
/// <li>
/// <p><code>REMOVE</code>: The property has been removed from the current resource configuration.</p></li>
/// <li>
/// <p><code>NOT_EQUAL</code>: The current property value differs from its expected value (as defined in the stack template and any values specified as template parameters).</p></li>
/// </ul>
/// This field is required.
pub fn difference_type(mut self, input: crate::types::DifferenceType) -> Self {
self.difference_type = ::std::option::Option::Some(input);
self
}
/// <p>The type of property difference.</p>
/// <ul>
/// <li>
/// <p><code>ADD</code>: A value has been added to a resource property that's an array or list data type.</p></li>
/// <li>
/// <p><code>REMOVE</code>: The property has been removed from the current resource configuration.</p></li>
/// <li>
/// <p><code>NOT_EQUAL</code>: The current property value differs from its expected value (as defined in the stack template and any values specified as template parameters).</p></li>
/// </ul>
pub fn set_difference_type(mut self, input: ::std::option::Option<crate::types::DifferenceType>) -> Self {
self.difference_type = input;
self
}
/// <p>The type of property difference.</p>
/// <ul>
/// <li>
/// <p><code>ADD</code>: A value has been added to a resource property that's an array or list data type.</p></li>
/// <li>
/// <p><code>REMOVE</code>: The property has been removed from the current resource configuration.</p></li>
/// <li>
/// <p><code>NOT_EQUAL</code>: The current property value differs from its expected value (as defined in the stack template and any values specified as template parameters).</p></li>
/// </ul>
pub fn get_difference_type(&self) -> &::std::option::Option<crate::types::DifferenceType> {
&self.difference_type
}
/// Consumes the builder and constructs a [`PropertyDifference`](crate::types::PropertyDifference).
pub fn build(self) -> crate::types::PropertyDifference {
crate::types::PropertyDifference {
property_path: self.property_path,
expected_value: self.expected_value,
actual_value: self.actual_value,
difference_type: self.difference_type,
}
}
}