aws-sdk-evidently 1.95.0

AWS SDK for Amazon CloudWatch Evidently
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct StopLaunchInput {
    /// <p>The name or ARN of the project that contains the launch that you want to stop.</p>
    pub project: ::std::option::Option<::std::string::String>,
    /// <p>The name of the launch to stop.</p>
    pub launch: ::std::option::Option<::std::string::String>,
    /// <p>Specify whether to consider the launch as <code>COMPLETED</code> or <code>CANCELLED</code> after it stops.</p>
    pub desired_state: ::std::option::Option<crate::types::LaunchStopDesiredState>,
    /// <p>A string that describes why you are stopping the launch.</p>
    pub reason: ::std::option::Option<::std::string::String>,
}
impl StopLaunchInput {
    /// <p>The name or ARN of the project that contains the launch that you want to stop.</p>
    pub fn project(&self) -> ::std::option::Option<&str> {
        self.project.as_deref()
    }
    /// <p>The name of the launch to stop.</p>
    pub fn launch(&self) -> ::std::option::Option<&str> {
        self.launch.as_deref()
    }
    /// <p>Specify whether to consider the launch as <code>COMPLETED</code> or <code>CANCELLED</code> after it stops.</p>
    pub fn desired_state(&self) -> ::std::option::Option<&crate::types::LaunchStopDesiredState> {
        self.desired_state.as_ref()
    }
    /// <p>A string that describes why you are stopping the launch.</p>
    pub fn reason(&self) -> ::std::option::Option<&str> {
        self.reason.as_deref()
    }
}
impl StopLaunchInput {
    /// Creates a new builder-style object to manufacture [`StopLaunchInput`](crate::operation::stop_launch::StopLaunchInput).
    pub fn builder() -> crate::operation::stop_launch::builders::StopLaunchInputBuilder {
        crate::operation::stop_launch::builders::StopLaunchInputBuilder::default()
    }
}

/// A builder for [`StopLaunchInput`](crate::operation::stop_launch::StopLaunchInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StopLaunchInputBuilder {
    pub(crate) project: ::std::option::Option<::std::string::String>,
    pub(crate) launch: ::std::option::Option<::std::string::String>,
    pub(crate) desired_state: ::std::option::Option<crate::types::LaunchStopDesiredState>,
    pub(crate) reason: ::std::option::Option<::std::string::String>,
}
impl StopLaunchInputBuilder {
    /// <p>The name or ARN of the project that contains the launch that you want to stop.</p>
    /// This field is required.
    pub fn project(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.project = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name or ARN of the project that contains the launch that you want to stop.</p>
    pub fn set_project(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.project = input;
        self
    }
    /// <p>The name or ARN of the project that contains the launch that you want to stop.</p>
    pub fn get_project(&self) -> &::std::option::Option<::std::string::String> {
        &self.project
    }
    /// <p>The name of the launch to stop.</p>
    /// This field is required.
    pub fn launch(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.launch = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the launch to stop.</p>
    pub fn set_launch(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.launch = input;
        self
    }
    /// <p>The name of the launch to stop.</p>
    pub fn get_launch(&self) -> &::std::option::Option<::std::string::String> {
        &self.launch
    }
    /// <p>Specify whether to consider the launch as <code>COMPLETED</code> or <code>CANCELLED</code> after it stops.</p>
    pub fn desired_state(mut self, input: crate::types::LaunchStopDesiredState) -> Self {
        self.desired_state = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specify whether to consider the launch as <code>COMPLETED</code> or <code>CANCELLED</code> after it stops.</p>
    pub fn set_desired_state(mut self, input: ::std::option::Option<crate::types::LaunchStopDesiredState>) -> Self {
        self.desired_state = input;
        self
    }
    /// <p>Specify whether to consider the launch as <code>COMPLETED</code> or <code>CANCELLED</code> after it stops.</p>
    pub fn get_desired_state(&self) -> &::std::option::Option<crate::types::LaunchStopDesiredState> {
        &self.desired_state
    }
    /// <p>A string that describes why you are stopping the launch.</p>
    pub fn reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.reason = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A string that describes why you are stopping the launch.</p>
    pub fn set_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.reason = input;
        self
    }
    /// <p>A string that describes why you are stopping the launch.</p>
    pub fn get_reason(&self) -> &::std::option::Option<::std::string::String> {
        &self.reason
    }
    /// Consumes the builder and constructs a [`StopLaunchInput`](crate::operation::stop_launch::StopLaunchInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::stop_launch::StopLaunchInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::stop_launch::StopLaunchInput {
            project: self.project,
            launch: self.launch,
            desired_state: self.desired_state,
            reason: self.reason,
        })
    }
}