aws-sdk-qapps 1.64.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 CreateQAppInput {
    /// <p>The unique identifier of the Amazon Q Business application environment instance.</p>
    pub instance_id: ::std::option::Option<::std::string::String>,
    /// <p>The title of the new Q App.</p>
    pub title: ::std::option::Option<::std::string::String>,
    /// <p>The description of the new Q App.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The definition of the new Q App, specifying the cards and flow.</p>
    pub app_definition: ::std::option::Option<crate::types::AppDefinitionInput>,
    /// <p>Optional tags to associate with the new Q App.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateQAppInput {
    /// <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 title of the new Q App.</p>
    pub fn title(&self) -> ::std::option::Option<&str> {
        self.title.as_deref()
    }
    /// <p>The description of the new Q App.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The definition of the new Q App, specifying the cards and flow.</p>
    pub fn app_definition(&self) -> ::std::option::Option<&crate::types::AppDefinitionInput> {
        self.app_definition.as_ref()
    }
    /// <p>Optional tags to associate with the new Q App.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
}
impl CreateQAppInput {
    /// Creates a new builder-style object to manufacture [`CreateQAppInput`](crate::operation::create_q_app::CreateQAppInput).
    pub fn builder() -> crate::operation::create_q_app::builders::CreateQAppInputBuilder {
        crate::operation::create_q_app::builders::CreateQAppInputBuilder::default()
    }
}

/// A builder for [`CreateQAppInput`](crate::operation::create_q_app::CreateQAppInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateQAppInputBuilder {
    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
    pub(crate) title: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) app_definition: ::std::option::Option<crate::types::AppDefinitionInput>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateQAppInputBuilder {
    /// <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 title of the new Q App.</p>
    /// This field is required.
    pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.title = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The title of the new Q App.</p>
    pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.title = input;
        self
    }
    /// <p>The title of the new Q App.</p>
    pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
        &self.title
    }
    /// <p>The description of the new Q App.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The description of the new Q App.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the new Q App.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The definition of the new Q App, specifying the cards and flow.</p>
    /// This field is required.
    pub fn app_definition(mut self, input: crate::types::AppDefinitionInput) -> Self {
        self.app_definition = ::std::option::Option::Some(input);
        self
    }
    /// <p>The definition of the new Q App, specifying the cards and flow.</p>
    pub fn set_app_definition(mut self, input: ::std::option::Option<crate::types::AppDefinitionInput>) -> Self {
        self.app_definition = input;
        self
    }
    /// <p>The definition of the new Q App, specifying the cards and flow.</p>
    pub fn get_app_definition(&self) -> &::std::option::Option<crate::types::AppDefinitionInput> {
        &self.app_definition
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>Optional tags to associate with the new Q App.</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>Optional tags to associate with the new Q App.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>Optional tags to associate with the new Q App.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`CreateQAppInput`](crate::operation::create_q_app::CreateQAppInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::create_q_app::CreateQAppInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_q_app::CreateQAppInput {
            instance_id: self.instance_id,
            title: self.title,
            description: self.description,
            app_definition: self.app_definition,
            tags: self.tags,
        })
    }
}