aws-sdk-qapps 1.63.0

AWS SDK for QApps
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 CreatePresignedUrlInput {
    /// <p>The unique identifier of the Amazon Q Business application environment instance.</p>
    pub instance_id: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier of the card the file is associated with.</p>
    pub card_id: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier of the Q App the file is associated with.</p>
    pub app_id: ::std::option::Option<::std::string::String>,
    /// <p>The Base64-encoded SHA-256 digest of the contents of the file to be uploaded.</p>
    pub file_contents_sha256: ::std::option::Option<::std::string::String>,
    /// <p>The name of the file to be uploaded.</p>
    pub file_name: ::std::option::Option<::std::string::String>,
    /// <p>Whether the file is associated with a Q App definition or a specific Q App session.</p>
    pub scope: ::std::option::Option<crate::types::DocumentScope>,
    /// <p>The unique identifier of the Q App session the file is associated with, if applicable.</p>
    pub session_id: ::std::option::Option<::std::string::String>,
}
impl CreatePresignedUrlInput {
    /// <p>The unique identifier of the Amazon Q Business application environment instance.</p>
    pub fn instance_id(&self) -> ::std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The unique identifier of the card the file is associated with.</p>
    pub fn card_id(&self) -> ::std::option::Option<&str> {
        self.card_id.as_deref()
    }
    /// <p>The unique identifier of the Q App the file is associated with.</p>
    pub fn app_id(&self) -> ::std::option::Option<&str> {
        self.app_id.as_deref()
    }
    /// <p>The Base64-encoded SHA-256 digest of the contents of the file to be uploaded.</p>
    pub fn file_contents_sha256(&self) -> ::std::option::Option<&str> {
        self.file_contents_sha256.as_deref()
    }
    /// <p>The name of the file to be uploaded.</p>
    pub fn file_name(&self) -> ::std::option::Option<&str> {
        self.file_name.as_deref()
    }
    /// <p>Whether the file is associated with a Q App definition or a specific Q App session.</p>
    pub fn scope(&self) -> ::std::option::Option<&crate::types::DocumentScope> {
        self.scope.as_ref()
    }
    /// <p>The unique identifier of the Q App session the file is associated with, if applicable.</p>
    pub fn session_id(&self) -> ::std::option::Option<&str> {
        self.session_id.as_deref()
    }
}
impl CreatePresignedUrlInput {
    /// Creates a new builder-style object to manufacture [`CreatePresignedUrlInput`](crate::operation::create_presigned_url::CreatePresignedUrlInput).
    pub fn builder() -> crate::operation::create_presigned_url::builders::CreatePresignedUrlInputBuilder {
        crate::operation::create_presigned_url::builders::CreatePresignedUrlInputBuilder::default()
    }
}

/// A builder for [`CreatePresignedUrlInput`](crate::operation::create_presigned_url::CreatePresignedUrlInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreatePresignedUrlInputBuilder {
    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
    pub(crate) card_id: ::std::option::Option<::std::string::String>,
    pub(crate) app_id: ::std::option::Option<::std::string::String>,
    pub(crate) file_contents_sha256: ::std::option::Option<::std::string::String>,
    pub(crate) file_name: ::std::option::Option<::std::string::String>,
    pub(crate) scope: ::std::option::Option<crate::types::DocumentScope>,
    pub(crate) session_id: ::std::option::Option<::std::string::String>,
}
impl CreatePresignedUrlInputBuilder {
    /// <p>The unique identifier of the Amazon Q Business application environment instance.</p>
    /// This field is required.
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.instance_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the Amazon Q Business application environment instance.</p>
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.instance_id = input;
        self
    }
    /// <p>The unique identifier of the Amazon Q Business application environment instance.</p>
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.instance_id
    }
    /// <p>The unique identifier of the card the file is associated with.</p>
    /// This field is required.
    pub fn card_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.card_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the card the file is associated with.</p>
    pub fn set_card_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.card_id = input;
        self
    }
    /// <p>The unique identifier of the card the file is associated with.</p>
    pub fn get_card_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.card_id
    }
    /// <p>The unique identifier of the Q App the file is associated with.</p>
    /// This field is required.
    pub fn app_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.app_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the Q App the file is associated with.</p>
    pub fn set_app_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.app_id = input;
        self
    }
    /// <p>The unique identifier of the Q App the file is associated with.</p>
    pub fn get_app_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.app_id
    }
    /// <p>The Base64-encoded SHA-256 digest of the contents of the file to be uploaded.</p>
    /// This field is required.
    pub fn file_contents_sha256(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.file_contents_sha256 = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Base64-encoded SHA-256 digest of the contents of the file to be uploaded.</p>
    pub fn set_file_contents_sha256(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.file_contents_sha256 = input;
        self
    }
    /// <p>The Base64-encoded SHA-256 digest of the contents of the file to be uploaded.</p>
    pub fn get_file_contents_sha256(&self) -> &::std::option::Option<::std::string::String> {
        &self.file_contents_sha256
    }
    /// <p>The name of the file to be uploaded.</p>
    /// This field is required.
    pub fn file_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.file_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the file to be uploaded.</p>
    pub fn set_file_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.file_name = input;
        self
    }
    /// <p>The name of the file to be uploaded.</p>
    pub fn get_file_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.file_name
    }
    /// <p>Whether the file is associated with a Q App definition or a specific Q App session.</p>
    /// This field is required.
    pub fn scope(mut self, input: crate::types::DocumentScope) -> Self {
        self.scope = ::std::option::Option::Some(input);
        self
    }
    /// <p>Whether the file is associated with a Q App definition or a specific Q App session.</p>
    pub fn set_scope(mut self, input: ::std::option::Option<crate::types::DocumentScope>) -> Self {
        self.scope = input;
        self
    }
    /// <p>Whether the file is associated with a Q App definition or a specific Q App session.</p>
    pub fn get_scope(&self) -> &::std::option::Option<crate::types::DocumentScope> {
        &self.scope
    }
    /// <p>The unique identifier of the Q App session the file is associated with, if applicable.</p>
    pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.session_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the Q App session the file is associated with, if applicable.</p>
    pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.session_id = input;
        self
    }
    /// <p>The unique identifier of the Q App session the file is associated with, if applicable.</p>
    pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.session_id
    }
    /// Consumes the builder and constructs a [`CreatePresignedUrlInput`](crate::operation::create_presigned_url::CreatePresignedUrlInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_presigned_url::CreatePresignedUrlInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::create_presigned_url::CreatePresignedUrlInput {
            instance_id: self.instance_id,
            card_id: self.card_id,
            app_id: self.app_id,
            file_contents_sha256: self.file_contents_sha256,
            file_name: self.file_name,
            scope: self.scope,
            session_id: self.session_id,
        })
    }
}