aws-sdk-migrationhub 1.102.0

AWS SDK for AWS Migration Hub
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 AssociateCreatedArtifactInput {
    /// <p>The name of the ProgressUpdateStream.</p>
    pub progress_update_stream: ::std::option::Option<::std::string::String>,
    /// <p>Unique identifier that references the migration task. <i>Do not store personal data in this field.</i></p>
    pub migration_task_name: ::std::option::Option<::std::string::String>,
    /// <p>An ARN of the AWS resource related to the migration (e.g., AMI, EC2 instance, RDS instance, etc.)</p>
    pub created_artifact: ::std::option::Option<crate::types::CreatedArtifact>,
    /// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
    pub dry_run: ::std::option::Option<bool>,
}
impl AssociateCreatedArtifactInput {
    /// <p>The name of the ProgressUpdateStream.</p>
    pub fn progress_update_stream(&self) -> ::std::option::Option<&str> {
        self.progress_update_stream.as_deref()
    }
    /// <p>Unique identifier that references the migration task. <i>Do not store personal data in this field.</i></p>
    pub fn migration_task_name(&self) -> ::std::option::Option<&str> {
        self.migration_task_name.as_deref()
    }
    /// <p>An ARN of the AWS resource related to the migration (e.g., AMI, EC2 instance, RDS instance, etc.)</p>
    pub fn created_artifact(&self) -> ::std::option::Option<&crate::types::CreatedArtifact> {
        self.created_artifact.as_ref()
    }
    /// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
    pub fn dry_run(&self) -> ::std::option::Option<bool> {
        self.dry_run
    }
}
impl AssociateCreatedArtifactInput {
    /// Creates a new builder-style object to manufacture [`AssociateCreatedArtifactInput`](crate::operation::associate_created_artifact::AssociateCreatedArtifactInput).
    pub fn builder() -> crate::operation::associate_created_artifact::builders::AssociateCreatedArtifactInputBuilder {
        crate::operation::associate_created_artifact::builders::AssociateCreatedArtifactInputBuilder::default()
    }
}

/// A builder for [`AssociateCreatedArtifactInput`](crate::operation::associate_created_artifact::AssociateCreatedArtifactInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AssociateCreatedArtifactInputBuilder {
    pub(crate) progress_update_stream: ::std::option::Option<::std::string::String>,
    pub(crate) migration_task_name: ::std::option::Option<::std::string::String>,
    pub(crate) created_artifact: ::std::option::Option<crate::types::CreatedArtifact>,
    pub(crate) dry_run: ::std::option::Option<bool>,
}
impl AssociateCreatedArtifactInputBuilder {
    /// <p>The name of the ProgressUpdateStream.</p>
    /// This field is required.
    pub fn progress_update_stream(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.progress_update_stream = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the ProgressUpdateStream.</p>
    pub fn set_progress_update_stream(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.progress_update_stream = input;
        self
    }
    /// <p>The name of the ProgressUpdateStream.</p>
    pub fn get_progress_update_stream(&self) -> &::std::option::Option<::std::string::String> {
        &self.progress_update_stream
    }
    /// <p>Unique identifier that references the migration task. <i>Do not store personal data in this field.</i></p>
    /// This field is required.
    pub fn migration_task_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.migration_task_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Unique identifier that references the migration task. <i>Do not store personal data in this field.</i></p>
    pub fn set_migration_task_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.migration_task_name = input;
        self
    }
    /// <p>Unique identifier that references the migration task. <i>Do not store personal data in this field.</i></p>
    pub fn get_migration_task_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.migration_task_name
    }
    /// <p>An ARN of the AWS resource related to the migration (e.g., AMI, EC2 instance, RDS instance, etc.)</p>
    /// This field is required.
    pub fn created_artifact(mut self, input: crate::types::CreatedArtifact) -> Self {
        self.created_artifact = ::std::option::Option::Some(input);
        self
    }
    /// <p>An ARN of the AWS resource related to the migration (e.g., AMI, EC2 instance, RDS instance, etc.)</p>
    pub fn set_created_artifact(mut self, input: ::std::option::Option<crate::types::CreatedArtifact>) -> Self {
        self.created_artifact = input;
        self
    }
    /// <p>An ARN of the AWS resource related to the migration (e.g., AMI, EC2 instance, RDS instance, etc.)</p>
    pub fn get_created_artifact(&self) -> &::std::option::Option<crate::types::CreatedArtifact> {
        &self.created_artifact
    }
    /// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
    pub fn dry_run(mut self, input: bool) -> Self {
        self.dry_run = ::std::option::Option::Some(input);
        self
    }
    /// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
    pub fn set_dry_run(mut self, input: ::std::option::Option<bool>) -> Self {
        self.dry_run = input;
        self
    }
    /// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
    pub fn get_dry_run(&self) -> &::std::option::Option<bool> {
        &self.dry_run
    }
    /// Consumes the builder and constructs a [`AssociateCreatedArtifactInput`](crate::operation::associate_created_artifact::AssociateCreatedArtifactInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::associate_created_artifact::AssociateCreatedArtifactInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::associate_created_artifact::AssociateCreatedArtifactInput {
            progress_update_stream: self.progress_update_stream,
            migration_task_name: self.migration_task_name,
            created_artifact: self.created_artifact,
            dry_run: self.dry_run,
        })
    }
}