aws-sdk-codedeploy 1.100.0

AWS SDK for AWS CodeDeploy
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 GetDeploymentTargetInput {
    /// <p>The unique ID of a deployment.</p>
    pub deployment_id: ::std::option::Option<::std::string::String>,
    /// <p>The unique ID of a deployment target.</p>
    pub target_id: ::std::option::Option<::std::string::String>,
}
impl GetDeploymentTargetInput {
    /// <p>The unique ID of a deployment.</p>
    pub fn deployment_id(&self) -> ::std::option::Option<&str> {
        self.deployment_id.as_deref()
    }
    /// <p>The unique ID of a deployment target.</p>
    pub fn target_id(&self) -> ::std::option::Option<&str> {
        self.target_id.as_deref()
    }
}
impl GetDeploymentTargetInput {
    /// Creates a new builder-style object to manufacture [`GetDeploymentTargetInput`](crate::operation::get_deployment_target::GetDeploymentTargetInput).
    pub fn builder() -> crate::operation::get_deployment_target::builders::GetDeploymentTargetInputBuilder {
        crate::operation::get_deployment_target::builders::GetDeploymentTargetInputBuilder::default()
    }
}

/// A builder for [`GetDeploymentTargetInput`](crate::operation::get_deployment_target::GetDeploymentTargetInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetDeploymentTargetInputBuilder {
    pub(crate) deployment_id: ::std::option::Option<::std::string::String>,
    pub(crate) target_id: ::std::option::Option<::std::string::String>,
}
impl GetDeploymentTargetInputBuilder {
    /// <p>The unique ID of a deployment.</p>
    /// This field is required.
    pub fn deployment_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.deployment_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique ID of a deployment.</p>
    pub fn set_deployment_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.deployment_id = input;
        self
    }
    /// <p>The unique ID of a deployment.</p>
    pub fn get_deployment_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.deployment_id
    }
    /// <p>The unique ID of a deployment target.</p>
    /// This field is required.
    pub fn target_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.target_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique ID of a deployment target.</p>
    pub fn set_target_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.target_id = input;
        self
    }
    /// <p>The unique ID of a deployment target.</p>
    pub fn get_target_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.target_id
    }
    /// Consumes the builder and constructs a [`GetDeploymentTargetInput`](crate::operation::get_deployment_target::GetDeploymentTargetInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_deployment_target::GetDeploymentTargetInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::get_deployment_target::GetDeploymentTargetInput {
            deployment_id: self.deployment_id,
            target_id: self.target_id,
        })
    }
}