aws-sdk-lightsail 1.105.0

AWS SDK for Amazon Lightsail
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 ExportSnapshotInput {
    /// <p>The name of the instance or disk snapshot to be exported to Amazon EC2.</p>
    pub source_snapshot_name: ::std::option::Option<::std::string::String>,
}
impl ExportSnapshotInput {
    /// <p>The name of the instance or disk snapshot to be exported to Amazon EC2.</p>
    pub fn source_snapshot_name(&self) -> ::std::option::Option<&str> {
        self.source_snapshot_name.as_deref()
    }
}
impl ExportSnapshotInput {
    /// Creates a new builder-style object to manufacture [`ExportSnapshotInput`](crate::operation::export_snapshot::ExportSnapshotInput).
    pub fn builder() -> crate::operation::export_snapshot::builders::ExportSnapshotInputBuilder {
        crate::operation::export_snapshot::builders::ExportSnapshotInputBuilder::default()
    }
}

/// A builder for [`ExportSnapshotInput`](crate::operation::export_snapshot::ExportSnapshotInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ExportSnapshotInputBuilder {
    pub(crate) source_snapshot_name: ::std::option::Option<::std::string::String>,
}
impl ExportSnapshotInputBuilder {
    /// <p>The name of the instance or disk snapshot to be exported to Amazon EC2.</p>
    /// This field is required.
    pub fn source_snapshot_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source_snapshot_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the instance or disk snapshot to be exported to Amazon EC2.</p>
    pub fn set_source_snapshot_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source_snapshot_name = input;
        self
    }
    /// <p>The name of the instance or disk snapshot to be exported to Amazon EC2.</p>
    pub fn get_source_snapshot_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.source_snapshot_name
    }
    /// Consumes the builder and constructs a [`ExportSnapshotInput`](crate::operation::export_snapshot::ExportSnapshotInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::export_snapshot::ExportSnapshotInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::export_snapshot::ExportSnapshotInput {
            source_snapshot_name: self.source_snapshot_name,
        })
    }
}