aws-sdk-outposts 1.110.0

AWS SDK for AWS Outposts
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 CancelCapacityTaskInput {
    /// <p>ID of the capacity task that you want to cancel.</p>
    pub capacity_task_id: ::std::option::Option<::std::string::String>,
    /// <p>ID or ARN of the Outpost associated with the capacity task that you want to cancel.</p>
    pub outpost_identifier: ::std::option::Option<::std::string::String>,
}
impl CancelCapacityTaskInput {
    /// <p>ID of the capacity task that you want to cancel.</p>
    pub fn capacity_task_id(&self) -> ::std::option::Option<&str> {
        self.capacity_task_id.as_deref()
    }
    /// <p>ID or ARN of the Outpost associated with the capacity task that you want to cancel.</p>
    pub fn outpost_identifier(&self) -> ::std::option::Option<&str> {
        self.outpost_identifier.as_deref()
    }
}
impl CancelCapacityTaskInput {
    /// Creates a new builder-style object to manufacture [`CancelCapacityTaskInput`](crate::operation::cancel_capacity_task::CancelCapacityTaskInput).
    pub fn builder() -> crate::operation::cancel_capacity_task::builders::CancelCapacityTaskInputBuilder {
        crate::operation::cancel_capacity_task::builders::CancelCapacityTaskInputBuilder::default()
    }
}

/// A builder for [`CancelCapacityTaskInput`](crate::operation::cancel_capacity_task::CancelCapacityTaskInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CancelCapacityTaskInputBuilder {
    pub(crate) capacity_task_id: ::std::option::Option<::std::string::String>,
    pub(crate) outpost_identifier: ::std::option::Option<::std::string::String>,
}
impl CancelCapacityTaskInputBuilder {
    /// <p>ID of the capacity task that you want to cancel.</p>
    /// This field is required.
    pub fn capacity_task_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.capacity_task_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>ID of the capacity task that you want to cancel.</p>
    pub fn set_capacity_task_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.capacity_task_id = input;
        self
    }
    /// <p>ID of the capacity task that you want to cancel.</p>
    pub fn get_capacity_task_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.capacity_task_id
    }
    /// <p>ID or ARN of the Outpost associated with the capacity task that you want to cancel.</p>
    /// This field is required.
    pub fn outpost_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.outpost_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>ID or ARN of the Outpost associated with the capacity task that you want to cancel.</p>
    pub fn set_outpost_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.outpost_identifier = input;
        self
    }
    /// <p>ID or ARN of the Outpost associated with the capacity task that you want to cancel.</p>
    pub fn get_outpost_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.outpost_identifier
    }
    /// Consumes the builder and constructs a [`CancelCapacityTaskInput`](crate::operation::cancel_capacity_task::CancelCapacityTaskInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::cancel_capacity_task::CancelCapacityTaskInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::cancel_capacity_task::CancelCapacityTaskInput {
            capacity_task_id: self.capacity_task_id,
            outpost_identifier: self.outpost_identifier,
        })
    }
}