aws-sdk-codedeploy 1.99.0

AWS SDK for AWS CodeDeploy
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Represents the input of a <code>ListDeployments</code> operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ListDeploymentsInput {
    /// <p>The name of an CodeDeploy application associated with the user or Amazon Web Services account.</p><note>
    /// <p>If <code>applicationName</code> is specified, then <code>deploymentGroupName</code> must be specified. If it is not specified, then <code>deploymentGroupName</code> must not be specified.</p>
    /// </note>
    pub application_name: ::std::option::Option<::std::string::String>,
    /// <p>The name of a deployment group for the specified application.</p><note>
    /// <p>If <code>deploymentGroupName</code> is specified, then <code>applicationName</code> must be specified. If it is not specified, then <code>applicationName</code> must not be specified.</p>
    /// </note>
    pub deployment_group_name: ::std::option::Option<::std::string::String>,
    /// <p>The unique ID of an external resource for returning deployments linked to the external resource.</p>
    pub external_id: ::std::option::Option<::std::string::String>,
    /// <p>A subset of deployments to list by status:</p>
    /// <ul>
    /// <li>
    /// <p><code>Created</code>: Include created deployments in the resulting list.</p></li>
    /// <li>
    /// <p><code>Queued</code>: Include queued deployments in the resulting list.</p></li>
    /// <li>
    /// <p><code>In Progress</code>: Include in-progress deployments in the resulting list.</p></li>
    /// <li>
    /// <p><code>Succeeded</code>: Include successful deployments in the resulting list.</p></li>
    /// <li>
    /// <p><code>Failed</code>: Include failed deployments in the resulting list.</p></li>
    /// <li>
    /// <p><code>Stopped</code>: Include stopped deployments in the resulting list.</p></li>
    /// </ul>
    pub include_only_statuses: ::std::option::Option<::std::vec::Vec<crate::types::DeploymentStatus>>,
    /// <p>A time range (start and end) for returning a subset of the list of deployments.</p>
    pub create_time_range: ::std::option::Option<crate::types::TimeRange>,
    /// <p>An identifier returned from the previous list deployments call. It can be used to return the next set of deployments in the list.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
}
impl ListDeploymentsInput {
    /// <p>The name of an CodeDeploy application associated with the user or Amazon Web Services account.</p><note>
    /// <p>If <code>applicationName</code> is specified, then <code>deploymentGroupName</code> must be specified. If it is not specified, then <code>deploymentGroupName</code> must not be specified.</p>
    /// </note>
    pub fn application_name(&self) -> ::std::option::Option<&str> {
        self.application_name.as_deref()
    }
    /// <p>The name of a deployment group for the specified application.</p><note>
    /// <p>If <code>deploymentGroupName</code> is specified, then <code>applicationName</code> must be specified. If it is not specified, then <code>applicationName</code> must not be specified.</p>
    /// </note>
    pub fn deployment_group_name(&self) -> ::std::option::Option<&str> {
        self.deployment_group_name.as_deref()
    }
    /// <p>The unique ID of an external resource for returning deployments linked to the external resource.</p>
    pub fn external_id(&self) -> ::std::option::Option<&str> {
        self.external_id.as_deref()
    }
    /// <p>A subset of deployments to list by status:</p>
    /// <ul>
    /// <li>
    /// <p><code>Created</code>: Include created deployments in the resulting list.</p></li>
    /// <li>
    /// <p><code>Queued</code>: Include queued deployments in the resulting list.</p></li>
    /// <li>
    /// <p><code>In Progress</code>: Include in-progress deployments in the resulting list.</p></li>
    /// <li>
    /// <p><code>Succeeded</code>: Include successful deployments in the resulting list.</p></li>
    /// <li>
    /// <p><code>Failed</code>: Include failed deployments in the resulting list.</p></li>
    /// <li>
    /// <p><code>Stopped</code>: Include stopped deployments in the resulting list.</p></li>
    /// </ul>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.include_only_statuses.is_none()`.
    pub fn include_only_statuses(&self) -> &[crate::types::DeploymentStatus] {
        self.include_only_statuses.as_deref().unwrap_or_default()
    }
    /// <p>A time range (start and end) for returning a subset of the list of deployments.</p>
    pub fn create_time_range(&self) -> ::std::option::Option<&crate::types::TimeRange> {
        self.create_time_range.as_ref()
    }
    /// <p>An identifier returned from the previous list deployments call. It can be used to return the next set of deployments in the list.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl ListDeploymentsInput {
    /// Creates a new builder-style object to manufacture [`ListDeploymentsInput`](crate::operation::list_deployments::ListDeploymentsInput).
    pub fn builder() -> crate::operation::list_deployments::builders::ListDeploymentsInputBuilder {
        crate::operation::list_deployments::builders::ListDeploymentsInputBuilder::default()
    }
}

/// A builder for [`ListDeploymentsInput`](crate::operation::list_deployments::ListDeploymentsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListDeploymentsInputBuilder {
    pub(crate) application_name: ::std::option::Option<::std::string::String>,
    pub(crate) deployment_group_name: ::std::option::Option<::std::string::String>,
    pub(crate) external_id: ::std::option::Option<::std::string::String>,
    pub(crate) include_only_statuses: ::std::option::Option<::std::vec::Vec<crate::types::DeploymentStatus>>,
    pub(crate) create_time_range: ::std::option::Option<crate::types::TimeRange>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
}
impl ListDeploymentsInputBuilder {
    /// <p>The name of an CodeDeploy application associated with the user or Amazon Web Services account.</p><note>
    /// <p>If <code>applicationName</code> is specified, then <code>deploymentGroupName</code> must be specified. If it is not specified, then <code>deploymentGroupName</code> must not be specified.</p>
    /// </note>
    pub fn application_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.application_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of an CodeDeploy application associated with the user or Amazon Web Services account.</p><note>
    /// <p>If <code>applicationName</code> is specified, then <code>deploymentGroupName</code> must be specified. If it is not specified, then <code>deploymentGroupName</code> must not be specified.</p>
    /// </note>
    pub fn set_application_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.application_name = input;
        self
    }
    /// <p>The name of an CodeDeploy application associated with the user or Amazon Web Services account.</p><note>
    /// <p>If <code>applicationName</code> is specified, then <code>deploymentGroupName</code> must be specified. If it is not specified, then <code>deploymentGroupName</code> must not be specified.</p>
    /// </note>
    pub fn get_application_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.application_name
    }
    /// <p>The name of a deployment group for the specified application.</p><note>
    /// <p>If <code>deploymentGroupName</code> is specified, then <code>applicationName</code> must be specified. If it is not specified, then <code>applicationName</code> must not be specified.</p>
    /// </note>
    pub fn deployment_group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.deployment_group_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of a deployment group for the specified application.</p><note>
    /// <p>If <code>deploymentGroupName</code> is specified, then <code>applicationName</code> must be specified. If it is not specified, then <code>applicationName</code> must not be specified.</p>
    /// </note>
    pub fn set_deployment_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.deployment_group_name = input;
        self
    }
    /// <p>The name of a deployment group for the specified application.</p><note>
    /// <p>If <code>deploymentGroupName</code> is specified, then <code>applicationName</code> must be specified. If it is not specified, then <code>applicationName</code> must not be specified.</p>
    /// </note>
    pub fn get_deployment_group_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.deployment_group_name
    }
    /// <p>The unique ID of an external resource for returning deployments linked to the external resource.</p>
    pub fn external_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.external_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique ID of an external resource for returning deployments linked to the external resource.</p>
    pub fn set_external_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.external_id = input;
        self
    }
    /// <p>The unique ID of an external resource for returning deployments linked to the external resource.</p>
    pub fn get_external_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.external_id
    }
    /// Appends an item to `include_only_statuses`.
    ///
    /// To override the contents of this collection use [`set_include_only_statuses`](Self::set_include_only_statuses).
    ///
    /// <p>A subset of deployments to list by status:</p>
    /// <ul>
    /// <li>
    /// <p><code>Created</code>: Include created deployments in the resulting list.</p></li>
    /// <li>
    /// <p><code>Queued</code>: Include queued deployments in the resulting list.</p></li>
    /// <li>
    /// <p><code>In Progress</code>: Include in-progress deployments in the resulting list.</p></li>
    /// <li>
    /// <p><code>Succeeded</code>: Include successful deployments in the resulting list.</p></li>
    /// <li>
    /// <p><code>Failed</code>: Include failed deployments in the resulting list.</p></li>
    /// <li>
    /// <p><code>Stopped</code>: Include stopped deployments in the resulting list.</p></li>
    /// </ul>
    pub fn include_only_statuses(mut self, input: crate::types::DeploymentStatus) -> Self {
        let mut v = self.include_only_statuses.unwrap_or_default();
        v.push(input);
        self.include_only_statuses = ::std::option::Option::Some(v);
        self
    }
    /// <p>A subset of deployments to list by status:</p>
    /// <ul>
    /// <li>
    /// <p><code>Created</code>: Include created deployments in the resulting list.</p></li>
    /// <li>
    /// <p><code>Queued</code>: Include queued deployments in the resulting list.</p></li>
    /// <li>
    /// <p><code>In Progress</code>: Include in-progress deployments in the resulting list.</p></li>
    /// <li>
    /// <p><code>Succeeded</code>: Include successful deployments in the resulting list.</p></li>
    /// <li>
    /// <p><code>Failed</code>: Include failed deployments in the resulting list.</p></li>
    /// <li>
    /// <p><code>Stopped</code>: Include stopped deployments in the resulting list.</p></li>
    /// </ul>
    pub fn set_include_only_statuses(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DeploymentStatus>>) -> Self {
        self.include_only_statuses = input;
        self
    }
    /// <p>A subset of deployments to list by status:</p>
    /// <ul>
    /// <li>
    /// <p><code>Created</code>: Include created deployments in the resulting list.</p></li>
    /// <li>
    /// <p><code>Queued</code>: Include queued deployments in the resulting list.</p></li>
    /// <li>
    /// <p><code>In Progress</code>: Include in-progress deployments in the resulting list.</p></li>
    /// <li>
    /// <p><code>Succeeded</code>: Include successful deployments in the resulting list.</p></li>
    /// <li>
    /// <p><code>Failed</code>: Include failed deployments in the resulting list.</p></li>
    /// <li>
    /// <p><code>Stopped</code>: Include stopped deployments in the resulting list.</p></li>
    /// </ul>
    pub fn get_include_only_statuses(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DeploymentStatus>> {
        &self.include_only_statuses
    }
    /// <p>A time range (start and end) for returning a subset of the list of deployments.</p>
    pub fn create_time_range(mut self, input: crate::types::TimeRange) -> Self {
        self.create_time_range = ::std::option::Option::Some(input);
        self
    }
    /// <p>A time range (start and end) for returning a subset of the list of deployments.</p>
    pub fn set_create_time_range(mut self, input: ::std::option::Option<crate::types::TimeRange>) -> Self {
        self.create_time_range = input;
        self
    }
    /// <p>A time range (start and end) for returning a subset of the list of deployments.</p>
    pub fn get_create_time_range(&self) -> &::std::option::Option<crate::types::TimeRange> {
        &self.create_time_range
    }
    /// <p>An identifier returned from the previous list deployments call. It can be used to return the next set of deployments in the list.</p>
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.next_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An identifier returned from the previous list deployments call. It can be used to return the next set of deployments in the list.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>An identifier returned from the previous list deployments call. It can be used to return the next set of deployments in the list.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// Consumes the builder and constructs a [`ListDeploymentsInput`](crate::operation::list_deployments::ListDeploymentsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::list_deployments::ListDeploymentsInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::list_deployments::ListDeploymentsInput {
            application_name: self.application_name,
            deployment_group_name: self.deployment_group_name,
            external_id: self.external_id,
            include_only_statuses: self.include_only_statuses,
            create_time_range: self.create_time_range,
            next_token: self.next_token,
        })
    }
}