aws-sdk-customerprofiles 1.119.0

AWS SDK for Amazon Connect Customer Profiles
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 GetSegmentSnapshotOutput {
    /// <p>The unique identifier of the segment snapshot.</p>
    pub snapshot_id: ::std::string::String,
    /// <p>The status of the asynchronous job for exporting the segment snapshot.</p>
    pub status: crate::types::SegmentSnapshotStatus,
    /// <p>The status message of the asynchronous job for exporting the segment snapshot.</p>
    pub status_message: ::std::option::Option<::std::string::String>,
    /// <p>The format in which the segment will be exported.</p>
    pub data_format: crate::types::DataFormat,
    /// <p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the exported segment.</p>
    pub encryption_key: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the IAM role that allows Customer Profiles service principal to assume the role for conducting KMS and S3 operations.</p>
    pub role_arn: ::std::option::Option<::std::string::String>,
    /// <p>The destination to which the segment will be exported. This field must be provided if the request is not submitted from the Connect Customer Admin Website.</p>
    pub destination_uri: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetSegmentSnapshotOutput {
    /// <p>The unique identifier of the segment snapshot.</p>
    pub fn snapshot_id(&self) -> &str {
        use std::ops::Deref;
        self.snapshot_id.deref()
    }
    /// <p>The status of the asynchronous job for exporting the segment snapshot.</p>
    pub fn status(&self) -> &crate::types::SegmentSnapshotStatus {
        &self.status
    }
    /// <p>The status message of the asynchronous job for exporting the segment snapshot.</p>
    pub fn status_message(&self) -> ::std::option::Option<&str> {
        self.status_message.as_deref()
    }
    /// <p>The format in which the segment will be exported.</p>
    pub fn data_format(&self) -> &crate::types::DataFormat {
        &self.data_format
    }
    /// <p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the exported segment.</p>
    pub fn encryption_key(&self) -> ::std::option::Option<&str> {
        self.encryption_key.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role that allows Customer Profiles service principal to assume the role for conducting KMS and S3 operations.</p>
    pub fn role_arn(&self) -> ::std::option::Option<&str> {
        self.role_arn.as_deref()
    }
    /// <p>The destination to which the segment will be exported. This field must be provided if the request is not submitted from the Connect Customer Admin Website.</p>
    pub fn destination_uri(&self) -> ::std::option::Option<&str> {
        self.destination_uri.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for GetSegmentSnapshotOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetSegmentSnapshotOutput {
    /// Creates a new builder-style object to manufacture [`GetSegmentSnapshotOutput`](crate::operation::get_segment_snapshot::GetSegmentSnapshotOutput).
    pub fn builder() -> crate::operation::get_segment_snapshot::builders::GetSegmentSnapshotOutputBuilder {
        crate::operation::get_segment_snapshot::builders::GetSegmentSnapshotOutputBuilder::default()
    }
}

/// A builder for [`GetSegmentSnapshotOutput`](crate::operation::get_segment_snapshot::GetSegmentSnapshotOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetSegmentSnapshotOutputBuilder {
    pub(crate) snapshot_id: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::SegmentSnapshotStatus>,
    pub(crate) status_message: ::std::option::Option<::std::string::String>,
    pub(crate) data_format: ::std::option::Option<crate::types::DataFormat>,
    pub(crate) encryption_key: ::std::option::Option<::std::string::String>,
    pub(crate) role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) destination_uri: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl GetSegmentSnapshotOutputBuilder {
    /// <p>The unique identifier of the segment snapshot.</p>
    /// This field is required.
    pub fn snapshot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.snapshot_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the segment snapshot.</p>
    pub fn set_snapshot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.snapshot_id = input;
        self
    }
    /// <p>The unique identifier of the segment snapshot.</p>
    pub fn get_snapshot_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.snapshot_id
    }
    /// <p>The status of the asynchronous job for exporting the segment snapshot.</p>
    /// This field is required.
    pub fn status(mut self, input: crate::types::SegmentSnapshotStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the asynchronous job for exporting the segment snapshot.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::SegmentSnapshotStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The status of the asynchronous job for exporting the segment snapshot.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::SegmentSnapshotStatus> {
        &self.status
    }
    /// <p>The status message of the asynchronous job for exporting the segment snapshot.</p>
    pub fn status_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status_message = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The status message of the asynchronous job for exporting the segment snapshot.</p>
    pub fn set_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status_message = input;
        self
    }
    /// <p>The status message of the asynchronous job for exporting the segment snapshot.</p>
    pub fn get_status_message(&self) -> &::std::option::Option<::std::string::String> {
        &self.status_message
    }
    /// <p>The format in which the segment will be exported.</p>
    /// This field is required.
    pub fn data_format(mut self, input: crate::types::DataFormat) -> Self {
        self.data_format = ::std::option::Option::Some(input);
        self
    }
    /// <p>The format in which the segment will be exported.</p>
    pub fn set_data_format(mut self, input: ::std::option::Option<crate::types::DataFormat>) -> Self {
        self.data_format = input;
        self
    }
    /// <p>The format in which the segment will be exported.</p>
    pub fn get_data_format(&self) -> &::std::option::Option<crate::types::DataFormat> {
        &self.data_format
    }
    /// <p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the exported segment.</p>
    pub fn encryption_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.encryption_key = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the exported segment.</p>
    pub fn set_encryption_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.encryption_key = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the exported segment.</p>
    pub fn get_encryption_key(&self) -> &::std::option::Option<::std::string::String> {
        &self.encryption_key
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role that allows Customer Profiles service principal to assume the role for conducting KMS and S3 operations.</p>
    pub fn role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role that allows Customer Profiles service principal to assume the role for conducting KMS and S3 operations.</p>
    pub fn set_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.role_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the IAM role that allows Customer Profiles service principal to assume the role for conducting KMS and S3 operations.</p>
    pub fn get_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.role_arn
    }
    /// <p>The destination to which the segment will be exported. This field must be provided if the request is not submitted from the Connect Customer Admin Website.</p>
    pub fn destination_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.destination_uri = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The destination to which the segment will be exported. This field must be provided if the request is not submitted from the Connect Customer Admin Website.</p>
    pub fn set_destination_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.destination_uri = input;
        self
    }
    /// <p>The destination to which the segment will be exported. This field must be provided if the request is not submitted from the Connect Customer Admin Website.</p>
    pub fn get_destination_uri(&self) -> &::std::option::Option<::std::string::String> {
        &self.destination_uri
    }
    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 [`GetSegmentSnapshotOutput`](crate::operation::get_segment_snapshot::GetSegmentSnapshotOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`snapshot_id`](crate::operation::get_segment_snapshot::builders::GetSegmentSnapshotOutputBuilder::snapshot_id)
    /// - [`status`](crate::operation::get_segment_snapshot::builders::GetSegmentSnapshotOutputBuilder::status)
    /// - [`data_format`](crate::operation::get_segment_snapshot::builders::GetSegmentSnapshotOutputBuilder::data_format)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_segment_snapshot::GetSegmentSnapshotOutput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::get_segment_snapshot::GetSegmentSnapshotOutput {
            snapshot_id: self.snapshot_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "snapshot_id",
                    "snapshot_id was not specified but it is required when building GetSegmentSnapshotOutput",
                )
            })?,
            status: self.status.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "status",
                    "status was not specified but it is required when building GetSegmentSnapshotOutput",
                )
            })?,
            status_message: self.status_message,
            data_format: self.data_format.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "data_format",
                    "data_format was not specified but it is required when building GetSegmentSnapshotOutput",
                )
            })?,
            encryption_key: self.encryption_key,
            role_arn: self.role_arn,
            destination_uri: self.destination_uri,
            _request_id: self._request_id,
        })
    }
}