aws-sdk-ebs 1.98.0

AWS SDK for Amazon Elastic Block Store
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 PutSnapshotBlockOutput {
    /// <p>The SHA256 checksum generated for the block data by Amazon EBS.</p>
    pub checksum: ::std::option::Option<::std::string::String>,
    /// <p>The algorithm used by Amazon EBS to generate the checksum.</p>
    pub checksum_algorithm: ::std::option::Option<crate::types::ChecksumAlgorithm>,
    _request_id: Option<String>,
}
impl PutSnapshotBlockOutput {
    /// <p>The SHA256 checksum generated for the block data by Amazon EBS.</p>
    pub fn checksum(&self) -> ::std::option::Option<&str> {
        self.checksum.as_deref()
    }
    /// <p>The algorithm used by Amazon EBS to generate the checksum.</p>
    pub fn checksum_algorithm(&self) -> ::std::option::Option<&crate::types::ChecksumAlgorithm> {
        self.checksum_algorithm.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for PutSnapshotBlockOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl PutSnapshotBlockOutput {
    /// Creates a new builder-style object to manufacture [`PutSnapshotBlockOutput`](crate::operation::put_snapshot_block::PutSnapshotBlockOutput).
    pub fn builder() -> crate::operation::put_snapshot_block::builders::PutSnapshotBlockOutputBuilder {
        crate::operation::put_snapshot_block::builders::PutSnapshotBlockOutputBuilder::default()
    }
}

/// A builder for [`PutSnapshotBlockOutput`](crate::operation::put_snapshot_block::PutSnapshotBlockOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PutSnapshotBlockOutputBuilder {
    pub(crate) checksum: ::std::option::Option<::std::string::String>,
    pub(crate) checksum_algorithm: ::std::option::Option<crate::types::ChecksumAlgorithm>,
    _request_id: Option<String>,
}
impl PutSnapshotBlockOutputBuilder {
    /// <p>The SHA256 checksum generated for the block data by Amazon EBS.</p>
    pub fn checksum(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.checksum = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The SHA256 checksum generated for the block data by Amazon EBS.</p>
    pub fn set_checksum(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.checksum = input;
        self
    }
    /// <p>The SHA256 checksum generated for the block data by Amazon EBS.</p>
    pub fn get_checksum(&self) -> &::std::option::Option<::std::string::String> {
        &self.checksum
    }
    /// <p>The algorithm used by Amazon EBS to generate the checksum.</p>
    pub fn checksum_algorithm(mut self, input: crate::types::ChecksumAlgorithm) -> Self {
        self.checksum_algorithm = ::std::option::Option::Some(input);
        self
    }
    /// <p>The algorithm used by Amazon EBS to generate the checksum.</p>
    pub fn set_checksum_algorithm(mut self, input: ::std::option::Option<crate::types::ChecksumAlgorithm>) -> Self {
        self.checksum_algorithm = input;
        self
    }
    /// <p>The algorithm used by Amazon EBS to generate the checksum.</p>
    pub fn get_checksum_algorithm(&self) -> &::std::option::Option<crate::types::ChecksumAlgorithm> {
        &self.checksum_algorithm
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`PutSnapshotBlockOutput`](crate::operation::put_snapshot_block::PutSnapshotBlockOutput).
    pub fn build(self) -> crate::operation::put_snapshot_block::PutSnapshotBlockOutput {
        crate::operation::put_snapshot_block::PutSnapshotBlockOutput {
            checksum: self.checksum,
            checksum_algorithm: self.checksum_algorithm,
            _request_id: self._request_id,
        }
    }
}