aws-sdk-connect 1.196.0

AWS SDK for Amazon Connect Service
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 CreateExtractionDefinitionOutput {
    /// <p>The Amazon Resource Name (ARN) of the extraction definition.</p>
    pub extraction_definition_arn: ::std::string::String,
    /// <p>The identifier of the extraction definition.</p>
    pub extraction_definition_id: ::std::string::String,
    _request_id: Option<String>,
}
impl CreateExtractionDefinitionOutput {
    /// <p>The Amazon Resource Name (ARN) of the extraction definition.</p>
    pub fn extraction_definition_arn(&self) -> &str {
        use std::ops::Deref;
        self.extraction_definition_arn.deref()
    }
    /// <p>The identifier of the extraction definition.</p>
    pub fn extraction_definition_id(&self) -> &str {
        use std::ops::Deref;
        self.extraction_definition_id.deref()
    }
}
impl ::aws_types::request_id::RequestId for CreateExtractionDefinitionOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CreateExtractionDefinitionOutput {
    /// Creates a new builder-style object to manufacture [`CreateExtractionDefinitionOutput`](crate::operation::create_extraction_definition::CreateExtractionDefinitionOutput).
    pub fn builder() -> crate::operation::create_extraction_definition::builders::CreateExtractionDefinitionOutputBuilder {
        crate::operation::create_extraction_definition::builders::CreateExtractionDefinitionOutputBuilder::default()
    }
}

/// A builder for [`CreateExtractionDefinitionOutput`](crate::operation::create_extraction_definition::CreateExtractionDefinitionOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateExtractionDefinitionOutputBuilder {
    pub(crate) extraction_definition_arn: ::std::option::Option<::std::string::String>,
    pub(crate) extraction_definition_id: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl CreateExtractionDefinitionOutputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the extraction definition.</p>
    /// This field is required.
    pub fn extraction_definition_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.extraction_definition_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the extraction definition.</p>
    pub fn set_extraction_definition_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.extraction_definition_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the extraction definition.</p>
    pub fn get_extraction_definition_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.extraction_definition_arn
    }
    /// <p>The identifier of the extraction definition.</p>
    /// This field is required.
    pub fn extraction_definition_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.extraction_definition_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the extraction definition.</p>
    pub fn set_extraction_definition_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.extraction_definition_id = input;
        self
    }
    /// <p>The identifier of the extraction definition.</p>
    pub fn get_extraction_definition_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.extraction_definition_id
    }
    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 [`CreateExtractionDefinitionOutput`](crate::operation::create_extraction_definition::CreateExtractionDefinitionOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`extraction_definition_arn`](crate::operation::create_extraction_definition::builders::CreateExtractionDefinitionOutputBuilder::extraction_definition_arn)
    /// - [`extraction_definition_id`](crate::operation::create_extraction_definition::builders::CreateExtractionDefinitionOutputBuilder::extraction_definition_id)
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::create_extraction_definition::CreateExtractionDefinitionOutput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::create_extraction_definition::CreateExtractionDefinitionOutput {
            extraction_definition_arn: self.extraction_definition_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "extraction_definition_arn",
                    "extraction_definition_arn was not specified but it is required when building CreateExtractionDefinitionOutput",
                )
            })?,
            extraction_definition_id: self.extraction_definition_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "extraction_definition_id",
                    "extraction_definition_id was not specified but it is required when building CreateExtractionDefinitionOutput",
                )
            })?,
            _request_id: self._request_id,
        })
    }
}