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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Information about the instances that belong to the replacement environment in a blue/green deployment.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GreenFleetProvisioningOption {
/// <p>The method used to add instances to a replacement environment.</p>
/// <ul>
/// <li>
/// <p><code>DISCOVER_EXISTING</code>: Use instances that already exist or will be created manually.</p></li>
/// <li>
/// <p><code>COPY_AUTO_SCALING_GROUP</code>: Use settings from a specified Auto Scaling group to define and create instances in a new Auto Scaling group.</p></li>
/// </ul>
pub action: ::std::option::Option<crate::types::GreenFleetProvisioningAction>,
}
impl GreenFleetProvisioningOption {
/// <p>The method used to add instances to a replacement environment.</p>
/// <ul>
/// <li>
/// <p><code>DISCOVER_EXISTING</code>: Use instances that already exist or will be created manually.</p></li>
/// <li>
/// <p><code>COPY_AUTO_SCALING_GROUP</code>: Use settings from a specified Auto Scaling group to define and create instances in a new Auto Scaling group.</p></li>
/// </ul>
pub fn action(&self) -> ::std::option::Option<&crate::types::GreenFleetProvisioningAction> {
self.action.as_ref()
}
}
impl GreenFleetProvisioningOption {
/// Creates a new builder-style object to manufacture [`GreenFleetProvisioningOption`](crate::types::GreenFleetProvisioningOption).
pub fn builder() -> crate::types::builders::GreenFleetProvisioningOptionBuilder {
crate::types::builders::GreenFleetProvisioningOptionBuilder::default()
}
}
/// A builder for [`GreenFleetProvisioningOption`](crate::types::GreenFleetProvisioningOption).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct GreenFleetProvisioningOptionBuilder {
pub(crate) action: ::std::option::Option<crate::types::GreenFleetProvisioningAction>,
}
impl GreenFleetProvisioningOptionBuilder {
/// <p>The method used to add instances to a replacement environment.</p>
/// <ul>
/// <li>
/// <p><code>DISCOVER_EXISTING</code>: Use instances that already exist or will be created manually.</p></li>
/// <li>
/// <p><code>COPY_AUTO_SCALING_GROUP</code>: Use settings from a specified Auto Scaling group to define and create instances in a new Auto Scaling group.</p></li>
/// </ul>
pub fn action(mut self, input: crate::types::GreenFleetProvisioningAction) -> Self {
self.action = ::std::option::Option::Some(input);
self
}
/// <p>The method used to add instances to a replacement environment.</p>
/// <ul>
/// <li>
/// <p><code>DISCOVER_EXISTING</code>: Use instances that already exist or will be created manually.</p></li>
/// <li>
/// <p><code>COPY_AUTO_SCALING_GROUP</code>: Use settings from a specified Auto Scaling group to define and create instances in a new Auto Scaling group.</p></li>
/// </ul>
pub fn set_action(mut self, input: ::std::option::Option<crate::types::GreenFleetProvisioningAction>) -> Self {
self.action = input;
self
}
/// <p>The method used to add instances to a replacement environment.</p>
/// <ul>
/// <li>
/// <p><code>DISCOVER_EXISTING</code>: Use instances that already exist or will be created manually.</p></li>
/// <li>
/// <p><code>COPY_AUTO_SCALING_GROUP</code>: Use settings from a specified Auto Scaling group to define and create instances in a new Auto Scaling group.</p></li>
/// </ul>
pub fn get_action(&self) -> &::std::option::Option<crate::types::GreenFleetProvisioningAction> {
&self.action
}
/// Consumes the builder and constructs a [`GreenFleetProvisioningOption`](crate::types::GreenFleetProvisioningOption).
pub fn build(self) -> crate::types::GreenFleetProvisioningOption {
crate::types::GreenFleetProvisioningOption { action: self.action }
}
}