aws-sdk-quicksight 1.145.0

AWS SDK for Amazon QuickSight
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 CreateKnowledgeBaseOutput {
    /// <p>The Amazon Resource Name (ARN) of the knowledge base.</p>
    pub knowledge_base_arn: ::std::string::String,
    /// <p>The unique identifier for the knowledge base.</p>
    pub knowledge_base_id: ::std::string::String,
    /// <p>The creation status of the knowledge base.</p>
    pub creation_status: crate::types::DataSetStatus,
    /// <p>The Amazon Web Services request ID for this operation.</p>
    pub request_id: ::std::option::Option<::std::string::String>,
    /// <p>The HTTP status of the request.</p>
    pub status: ::std::option::Option<i32>,
    _request_id: Option<String>,
}
impl CreateKnowledgeBaseOutput {
    /// <p>The Amazon Resource Name (ARN) of the knowledge base.</p>
    pub fn knowledge_base_arn(&self) -> &str {
        use std::ops::Deref;
        self.knowledge_base_arn.deref()
    }
    /// <p>The unique identifier for the knowledge base.</p>
    pub fn knowledge_base_id(&self) -> &str {
        use std::ops::Deref;
        self.knowledge_base_id.deref()
    }
    /// <p>The creation status of the knowledge base.</p>
    pub fn creation_status(&self) -> &crate::types::DataSetStatus {
        &self.creation_status
    }
    /// <p>The Amazon Web Services request ID for this operation.</p>
    pub fn request_id(&self) -> ::std::option::Option<&str> {
        self.request_id.as_deref()
    }
    /// <p>The HTTP status of the request.</p>
    pub fn status(&self) -> ::std::option::Option<i32> {
        self.status
    }
}
impl ::aws_types::request_id::RequestId for CreateKnowledgeBaseOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CreateKnowledgeBaseOutput {
    /// Creates a new builder-style object to manufacture [`CreateKnowledgeBaseOutput`](crate::operation::create_knowledge_base::CreateKnowledgeBaseOutput).
    pub fn builder() -> crate::operation::create_knowledge_base::builders::CreateKnowledgeBaseOutputBuilder {
        crate::operation::create_knowledge_base::builders::CreateKnowledgeBaseOutputBuilder::default()
    }
}

/// A builder for [`CreateKnowledgeBaseOutput`](crate::operation::create_knowledge_base::CreateKnowledgeBaseOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateKnowledgeBaseOutputBuilder {
    pub(crate) knowledge_base_arn: ::std::option::Option<::std::string::String>,
    pub(crate) knowledge_base_id: ::std::option::Option<::std::string::String>,
    pub(crate) creation_status: ::std::option::Option<crate::types::DataSetStatus>,
    pub(crate) request_id: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<i32>,
    _request_id: Option<String>,
}
impl CreateKnowledgeBaseOutputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the knowledge base.</p>
    /// This field is required.
    pub fn knowledge_base_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.knowledge_base_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the knowledge base.</p>
    pub fn set_knowledge_base_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.knowledge_base_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the knowledge base.</p>
    pub fn get_knowledge_base_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.knowledge_base_arn
    }
    /// <p>The unique identifier for the knowledge base.</p>
    /// This field is required.
    pub fn knowledge_base_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.knowledge_base_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier for the knowledge base.</p>
    pub fn set_knowledge_base_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.knowledge_base_id = input;
        self
    }
    /// <p>The unique identifier for the knowledge base.</p>
    pub fn get_knowledge_base_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.knowledge_base_id
    }
    /// <p>The creation status of the knowledge base.</p>
    /// This field is required.
    pub fn creation_status(mut self, input: crate::types::DataSetStatus) -> Self {
        self.creation_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The creation status of the knowledge base.</p>
    pub fn set_creation_status(mut self, input: ::std::option::Option<crate::types::DataSetStatus>) -> Self {
        self.creation_status = input;
        self
    }
    /// <p>The creation status of the knowledge base.</p>
    pub fn get_creation_status(&self) -> &::std::option::Option<crate::types::DataSetStatus> {
        &self.creation_status
    }
    /// <p>The Amazon Web Services request ID for this operation.</p>
    pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.request_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services request ID for this operation.</p>
    pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.request_id = input;
        self
    }
    /// <p>The Amazon Web Services request ID for this operation.</p>
    pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.request_id
    }
    /// <p>The HTTP status of the request.</p>
    pub fn status(mut self, input: i32) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The HTTP status of the request.</p>
    pub fn set_status(mut self, input: ::std::option::Option<i32>) -> Self {
        self.status = input;
        self
    }
    /// <p>The HTTP status of the request.</p>
    pub fn get_status(&self) -> &::std::option::Option<i32> {
        &self.status
    }
    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 [`CreateKnowledgeBaseOutput`](crate::operation::create_knowledge_base::CreateKnowledgeBaseOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`knowledge_base_arn`](crate::operation::create_knowledge_base::builders::CreateKnowledgeBaseOutputBuilder::knowledge_base_arn)
    /// - [`knowledge_base_id`](crate::operation::create_knowledge_base::builders::CreateKnowledgeBaseOutputBuilder::knowledge_base_id)
    /// - [`creation_status`](crate::operation::create_knowledge_base::builders::CreateKnowledgeBaseOutputBuilder::creation_status)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_knowledge_base::CreateKnowledgeBaseOutput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::create_knowledge_base::CreateKnowledgeBaseOutput {
            knowledge_base_arn: self.knowledge_base_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "knowledge_base_arn",
                    "knowledge_base_arn was not specified but it is required when building CreateKnowledgeBaseOutput",
                )
            })?,
            knowledge_base_id: self.knowledge_base_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "knowledge_base_id",
                    "knowledge_base_id was not specified but it is required when building CreateKnowledgeBaseOutput",
                )
            })?,
            creation_status: self.creation_status.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "creation_status",
                    "creation_status was not specified but it is required when building CreateKnowledgeBaseOutput",
                )
            })?,
            request_id: self.request_id,
            status: self.status,
            _request_id: self._request_id,
        })
    }
}