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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The <code>Change</code> structure describes the changes CloudFormation will perform if you execute the change set.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Change {
/// <p>The type of entity that CloudFormation changes.</p>
/// <ul>
/// <li>
/// <p><code>Resource</code> This change is for a resource.</p></li>
/// </ul>
pub r#type: ::std::option::Option<crate::types::ChangeType>,
/// <p>Is either <code>null</code>, if no hooks invoke for the resource, or contains the number of hooks that will invoke for the resource.</p>
pub hook_invocation_count: ::std::option::Option<i32>,
/// <p>A <code>ResourceChange</code> structure that describes the resource and action that CloudFormation will perform.</p>
pub resource_change: ::std::option::Option<crate::types::ResourceChange>,
}
impl Change {
/// <p>The type of entity that CloudFormation changes.</p>
/// <ul>
/// <li>
/// <p><code>Resource</code> This change is for a resource.</p></li>
/// </ul>
pub fn r#type(&self) -> ::std::option::Option<&crate::types::ChangeType> {
self.r#type.as_ref()
}
/// <p>Is either <code>null</code>, if no hooks invoke for the resource, or contains the number of hooks that will invoke for the resource.</p>
pub fn hook_invocation_count(&self) -> ::std::option::Option<i32> {
self.hook_invocation_count
}
/// <p>A <code>ResourceChange</code> structure that describes the resource and action that CloudFormation will perform.</p>
pub fn resource_change(&self) -> ::std::option::Option<&crate::types::ResourceChange> {
self.resource_change.as_ref()
}
}
impl Change {
/// Creates a new builder-style object to manufacture [`Change`](crate::types::Change).
pub fn builder() -> crate::types::builders::ChangeBuilder {
crate::types::builders::ChangeBuilder::default()
}
}
/// A builder for [`Change`](crate::types::Change).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ChangeBuilder {
pub(crate) r#type: ::std::option::Option<crate::types::ChangeType>,
pub(crate) hook_invocation_count: ::std::option::Option<i32>,
pub(crate) resource_change: ::std::option::Option<crate::types::ResourceChange>,
}
impl ChangeBuilder {
/// <p>The type of entity that CloudFormation changes.</p>
/// <ul>
/// <li>
/// <p><code>Resource</code> This change is for a resource.</p></li>
/// </ul>
pub fn r#type(mut self, input: crate::types::ChangeType) -> Self {
self.r#type = ::std::option::Option::Some(input);
self
}
/// <p>The type of entity that CloudFormation changes.</p>
/// <ul>
/// <li>
/// <p><code>Resource</code> This change is for a resource.</p></li>
/// </ul>
pub fn set_type(mut self, input: ::std::option::Option<crate::types::ChangeType>) -> Self {
self.r#type = input;
self
}
/// <p>The type of entity that CloudFormation changes.</p>
/// <ul>
/// <li>
/// <p><code>Resource</code> This change is for a resource.</p></li>
/// </ul>
pub fn get_type(&self) -> &::std::option::Option<crate::types::ChangeType> {
&self.r#type
}
/// <p>Is either <code>null</code>, if no hooks invoke for the resource, or contains the number of hooks that will invoke for the resource.</p>
pub fn hook_invocation_count(mut self, input: i32) -> Self {
self.hook_invocation_count = ::std::option::Option::Some(input);
self
}
/// <p>Is either <code>null</code>, if no hooks invoke for the resource, or contains the number of hooks that will invoke for the resource.</p>
pub fn set_hook_invocation_count(mut self, input: ::std::option::Option<i32>) -> Self {
self.hook_invocation_count = input;
self
}
/// <p>Is either <code>null</code>, if no hooks invoke for the resource, or contains the number of hooks that will invoke for the resource.</p>
pub fn get_hook_invocation_count(&self) -> &::std::option::Option<i32> {
&self.hook_invocation_count
}
/// <p>A <code>ResourceChange</code> structure that describes the resource and action that CloudFormation will perform.</p>
pub fn resource_change(mut self, input: crate::types::ResourceChange) -> Self {
self.resource_change = ::std::option::Option::Some(input);
self
}
/// <p>A <code>ResourceChange</code> structure that describes the resource and action that CloudFormation will perform.</p>
pub fn set_resource_change(mut self, input: ::std::option::Option<crate::types::ResourceChange>) -> Self {
self.resource_change = input;
self
}
/// <p>A <code>ResourceChange</code> structure that describes the resource and action that CloudFormation will perform.</p>
pub fn get_resource_change(&self) -> &::std::option::Option<crate::types::ResourceChange> {
&self.resource_change
}
/// Consumes the builder and constructs a [`Change`](crate::types::Change).
pub fn build(self) -> crate::types::Change {
crate::types::Change {
r#type: self.r#type,
hook_invocation_count: self.hook_invocation_count,
resource_change: self.resource_change,
}
}
}