aws-sdk-appstream 1.111.0

AWS SDK for Amazon AppStream
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 CreateApplicationInput {
    /// <p>The name of the application. This name is visible to users when display name is not specified.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The display name of the application. This name is visible to users in the application catalog.</p>
    pub display_name: ::std::option::Option<::std::string::String>,
    /// <p>The description of the application.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The location in S3 of the application icon.</p>
    pub icon_s3_location: ::std::option::Option<crate::types::S3Location>,
    /// <p>The launch path of the application.</p>
    pub launch_path: ::std::option::Option<::std::string::String>,
    /// <p>The working directory of the application.</p>
    pub working_directory: ::std::option::Option<::std::string::String>,
    /// <p>The launch parameters of the application.</p>
    pub launch_parameters: ::std::option::Option<::std::string::String>,
    /// <p>The platforms the application supports. WINDOWS_SERVER_2019, AMAZON_LINUX2 and UBUNTU_PRO_2404 are supported for Elastic fleets.</p>
    pub platforms: ::std::option::Option<::std::vec::Vec<crate::types::PlatformType>>,
    /// <p>The instance families the application supports. Valid values are GENERAL_PURPOSE and GRAPHICS_G4.</p>
    pub instance_families: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The app block ARN to which the application should be associated</p>
    pub app_block_arn: ::std::option::Option<::std::string::String>,
    /// <p>The tags assigned to the application.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateApplicationInput {
    /// <p>The name of the application. This name is visible to users when display name is not specified.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The display name of the application. This name is visible to users in the application catalog.</p>
    pub fn display_name(&self) -> ::std::option::Option<&str> {
        self.display_name.as_deref()
    }
    /// <p>The description of the application.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The location in S3 of the application icon.</p>
    pub fn icon_s3_location(&self) -> ::std::option::Option<&crate::types::S3Location> {
        self.icon_s3_location.as_ref()
    }
    /// <p>The launch path of the application.</p>
    pub fn launch_path(&self) -> ::std::option::Option<&str> {
        self.launch_path.as_deref()
    }
    /// <p>The working directory of the application.</p>
    pub fn working_directory(&self) -> ::std::option::Option<&str> {
        self.working_directory.as_deref()
    }
    /// <p>The launch parameters of the application.</p>
    pub fn launch_parameters(&self) -> ::std::option::Option<&str> {
        self.launch_parameters.as_deref()
    }
    /// <p>The platforms the application supports. WINDOWS_SERVER_2019, AMAZON_LINUX2 and UBUNTU_PRO_2404 are supported for Elastic fleets.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.platforms.is_none()`.
    pub fn platforms(&self) -> &[crate::types::PlatformType] {
        self.platforms.as_deref().unwrap_or_default()
    }
    /// <p>The instance families the application supports. Valid values are GENERAL_PURPOSE and GRAPHICS_G4.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.instance_families.is_none()`.
    pub fn instance_families(&self) -> &[::std::string::String] {
        self.instance_families.as_deref().unwrap_or_default()
    }
    /// <p>The app block ARN to which the application should be associated</p>
    pub fn app_block_arn(&self) -> ::std::option::Option<&str> {
        self.app_block_arn.as_deref()
    }
    /// <p>The tags assigned to the application.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
}
impl CreateApplicationInput {
    /// Creates a new builder-style object to manufacture [`CreateApplicationInput`](crate::operation::create_application::CreateApplicationInput).
    pub fn builder() -> crate::operation::create_application::builders::CreateApplicationInputBuilder {
        crate::operation::create_application::builders::CreateApplicationInputBuilder::default()
    }
}

/// A builder for [`CreateApplicationInput`](crate::operation::create_application::CreateApplicationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateApplicationInputBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) display_name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) icon_s3_location: ::std::option::Option<crate::types::S3Location>,
    pub(crate) launch_path: ::std::option::Option<::std::string::String>,
    pub(crate) working_directory: ::std::option::Option<::std::string::String>,
    pub(crate) launch_parameters: ::std::option::Option<::std::string::String>,
    pub(crate) platforms: ::std::option::Option<::std::vec::Vec<crate::types::PlatformType>>,
    pub(crate) instance_families: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) app_block_arn: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateApplicationInputBuilder {
    /// <p>The name of the application. This name is visible to users when display name is not specified.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the application. This name is visible to users when display name is not specified.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the application. This name is visible to users when display name is not specified.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The display name of the application. This name is visible to users in the application catalog.</p>
    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.display_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The display name of the application. This name is visible to users in the application catalog.</p>
    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.display_name = input;
        self
    }
    /// <p>The display name of the application. This name is visible to users in the application catalog.</p>
    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.display_name
    }
    /// <p>The description of the application.</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 application.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The description of the application.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The location in S3 of the application icon.</p>
    /// This field is required.
    pub fn icon_s3_location(mut self, input: crate::types::S3Location) -> Self {
        self.icon_s3_location = ::std::option::Option::Some(input);
        self
    }
    /// <p>The location in S3 of the application icon.</p>
    pub fn set_icon_s3_location(mut self, input: ::std::option::Option<crate::types::S3Location>) -> Self {
        self.icon_s3_location = input;
        self
    }
    /// <p>The location in S3 of the application icon.</p>
    pub fn get_icon_s3_location(&self) -> &::std::option::Option<crate::types::S3Location> {
        &self.icon_s3_location
    }
    /// <p>The launch path of the application.</p>
    /// This field is required.
    pub fn launch_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.launch_path = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The launch path of the application.</p>
    pub fn set_launch_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.launch_path = input;
        self
    }
    /// <p>The launch path of the application.</p>
    pub fn get_launch_path(&self) -> &::std::option::Option<::std::string::String> {
        &self.launch_path
    }
    /// <p>The working directory of the application.</p>
    pub fn working_directory(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.working_directory = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The working directory of the application.</p>
    pub fn set_working_directory(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.working_directory = input;
        self
    }
    /// <p>The working directory of the application.</p>
    pub fn get_working_directory(&self) -> &::std::option::Option<::std::string::String> {
        &self.working_directory
    }
    /// <p>The launch parameters of the application.</p>
    pub fn launch_parameters(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.launch_parameters = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The launch parameters of the application.</p>
    pub fn set_launch_parameters(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.launch_parameters = input;
        self
    }
    /// <p>The launch parameters of the application.</p>
    pub fn get_launch_parameters(&self) -> &::std::option::Option<::std::string::String> {
        &self.launch_parameters
    }
    /// Appends an item to `platforms`.
    ///
    /// To override the contents of this collection use [`set_platforms`](Self::set_platforms).
    ///
    /// <p>The platforms the application supports. WINDOWS_SERVER_2019, AMAZON_LINUX2 and UBUNTU_PRO_2404 are supported for Elastic fleets.</p>
    pub fn platforms(mut self, input: crate::types::PlatformType) -> Self {
        let mut v = self.platforms.unwrap_or_default();
        v.push(input);
        self.platforms = ::std::option::Option::Some(v);
        self
    }
    /// <p>The platforms the application supports. WINDOWS_SERVER_2019, AMAZON_LINUX2 and UBUNTU_PRO_2404 are supported for Elastic fleets.</p>
    pub fn set_platforms(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PlatformType>>) -> Self {
        self.platforms = input;
        self
    }
    /// <p>The platforms the application supports. WINDOWS_SERVER_2019, AMAZON_LINUX2 and UBUNTU_PRO_2404 are supported for Elastic fleets.</p>
    pub fn get_platforms(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PlatformType>> {
        &self.platforms
    }
    /// Appends an item to `instance_families`.
    ///
    /// To override the contents of this collection use [`set_instance_families`](Self::set_instance_families).
    ///
    /// <p>The instance families the application supports. Valid values are GENERAL_PURPOSE and GRAPHICS_G4.</p>
    pub fn instance_families(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.instance_families.unwrap_or_default();
        v.push(input.into());
        self.instance_families = ::std::option::Option::Some(v);
        self
    }
    /// <p>The instance families the application supports. Valid values are GENERAL_PURPOSE and GRAPHICS_G4.</p>
    pub fn set_instance_families(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.instance_families = input;
        self
    }
    /// <p>The instance families the application supports. Valid values are GENERAL_PURPOSE and GRAPHICS_G4.</p>
    pub fn get_instance_families(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.instance_families
    }
    /// <p>The app block ARN to which the application should be associated</p>
    /// This field is required.
    pub fn app_block_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.app_block_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The app block ARN to which the application should be associated</p>
    pub fn set_app_block_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.app_block_arn = input;
        self
    }
    /// <p>The app block ARN to which the application should be associated</p>
    pub fn get_app_block_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.app_block_arn
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The tags assigned to the application.</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>The tags assigned to the application.</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>The tags assigned to the application.</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 [`CreateApplicationInput`](crate::operation::create_application::CreateApplicationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_application::CreateApplicationInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_application::CreateApplicationInput {
            name: self.name,
            display_name: self.display_name,
            description: self.description,
            icon_s3_location: self.icon_s3_location,
            launch_path: self.launch_path,
            working_directory: self.working_directory,
            launch_parameters: self.launch_parameters,
            platforms: self.platforms,
            instance_families: self.instance_families,
            app_block_arn: self.app_block_arn,
            tags: self.tags,
        })
    }
}