aws-sdk-ecs 1.128.0

AWS SDK for Amazon EC2 Container Service
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 DescribeServiceRevisionsInput {
    /// <p>The ARN of the service revision.</p>
    /// <p>You can specify a maximum of 20 ARNs.</p>
    /// <p>You can call <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ListServiceDeployments.html">ListServiceDeployments</a> to get the ARNs.</p>
    pub service_revision_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl DescribeServiceRevisionsInput {
    /// <p>The ARN of the service revision.</p>
    /// <p>You can specify a maximum of 20 ARNs.</p>
    /// <p>You can call <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ListServiceDeployments.html">ListServiceDeployments</a> to get the ARNs.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.service_revision_arns.is_none()`.
    pub fn service_revision_arns(&self) -> &[::std::string::String] {
        self.service_revision_arns.as_deref().unwrap_or_default()
    }
}
impl DescribeServiceRevisionsInput {
    /// Creates a new builder-style object to manufacture [`DescribeServiceRevisionsInput`](crate::operation::describe_service_revisions::DescribeServiceRevisionsInput).
    pub fn builder() -> crate::operation::describe_service_revisions::builders::DescribeServiceRevisionsInputBuilder {
        crate::operation::describe_service_revisions::builders::DescribeServiceRevisionsInputBuilder::default()
    }
}

/// A builder for [`DescribeServiceRevisionsInput`](crate::operation::describe_service_revisions::DescribeServiceRevisionsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeServiceRevisionsInputBuilder {
    pub(crate) service_revision_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl DescribeServiceRevisionsInputBuilder {
    /// Appends an item to `service_revision_arns`.
    ///
    /// To override the contents of this collection use [`set_service_revision_arns`](Self::set_service_revision_arns).
    ///
    /// <p>The ARN of the service revision.</p>
    /// <p>You can specify a maximum of 20 ARNs.</p>
    /// <p>You can call <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ListServiceDeployments.html">ListServiceDeployments</a> to get the ARNs.</p>
    pub fn service_revision_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.service_revision_arns.unwrap_or_default();
        v.push(input.into());
        self.service_revision_arns = ::std::option::Option::Some(v);
        self
    }
    /// <p>The ARN of the service revision.</p>
    /// <p>You can specify a maximum of 20 ARNs.</p>
    /// <p>You can call <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ListServiceDeployments.html">ListServiceDeployments</a> to get the ARNs.</p>
    pub fn set_service_revision_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.service_revision_arns = input;
        self
    }
    /// <p>The ARN of the service revision.</p>
    /// <p>You can specify a maximum of 20 ARNs.</p>
    /// <p>You can call <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ListServiceDeployments.html">ListServiceDeployments</a> to get the ARNs.</p>
    pub fn get_service_revision_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.service_revision_arns
    }
    /// Consumes the builder and constructs a [`DescribeServiceRevisionsInput`](crate::operation::describe_service_revisions::DescribeServiceRevisionsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::describe_service_revisions::DescribeServiceRevisionsInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::describe_service_revisions::DescribeServiceRevisionsInput {
            service_revision_arns: self.service_revision_arns,
        })
    }
}