/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace AppStream { namespace Model { /** *

Describes an app block.

App blocks are an Amazon AppStream 2.0 * resource that stores the details about the virtual hard disk in an S3 bucket. It * also stores the setup script with details about how to mount the virtual hard * disk. The virtual hard disk includes the application binaries and other files * necessary to launch your applications. Multiple applications can be assigned to * a single app block.

This is only supported for Elastic * fleets.

See Also:

AWS * API Reference

*/ class AppBlock { public: AWS_APPSTREAM_API AppBlock(); AWS_APPSTREAM_API AppBlock(Aws::Utils::Json::JsonView jsonValue); AWS_APPSTREAM_API AppBlock& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_APPSTREAM_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The name of the app block.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the app block.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the app block.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the app block.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the app block.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the app block.

*/ inline AppBlock& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the app block.

*/ inline AppBlock& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the app block.

*/ inline AppBlock& WithName(const char* value) { SetName(value); return *this;} /** *

The ARN of the app block.

*/ inline const Aws::String& GetArn() const{ return m_arn; } /** *

The ARN of the app block.

*/ inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; } /** *

The ARN of the app block.

*/ inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; } /** *

The ARN of the app block.

*/ inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = std::move(value); } /** *

The ARN of the app block.

*/ inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); } /** *

The ARN of the app block.

*/ inline AppBlock& WithArn(const Aws::String& value) { SetArn(value); return *this;} /** *

The ARN of the app block.

*/ inline AppBlock& WithArn(Aws::String&& value) { SetArn(std::move(value)); return *this;} /** *

The ARN of the app block.

*/ inline AppBlock& WithArn(const char* value) { SetArn(value); return *this;} /** *

The description of the app block.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

The description of the app block.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

The description of the app block.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

The description of the app block.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

The description of the app block.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

The description of the app block.

*/ inline AppBlock& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

The description of the app block.

*/ inline AppBlock& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

The description of the app block.

*/ inline AppBlock& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

The display name of the app block.

*/ inline const Aws::String& GetDisplayName() const{ return m_displayName; } /** *

The display name of the app block.

*/ inline bool DisplayNameHasBeenSet() const { return m_displayNameHasBeenSet; } /** *

The display name of the app block.

*/ inline void SetDisplayName(const Aws::String& value) { m_displayNameHasBeenSet = true; m_displayName = value; } /** *

The display name of the app block.

*/ inline void SetDisplayName(Aws::String&& value) { m_displayNameHasBeenSet = true; m_displayName = std::move(value); } /** *

The display name of the app block.

*/ inline void SetDisplayName(const char* value) { m_displayNameHasBeenSet = true; m_displayName.assign(value); } /** *

The display name of the app block.

*/ inline AppBlock& WithDisplayName(const Aws::String& value) { SetDisplayName(value); return *this;} /** *

The display name of the app block.

*/ inline AppBlock& WithDisplayName(Aws::String&& value) { SetDisplayName(std::move(value)); return *this;} /** *

The display name of the app block.

*/ inline AppBlock& WithDisplayName(const char* value) { SetDisplayName(value); return *this;} /** *

The source S3 location of the app block.

*/ inline const S3Location& GetSourceS3Location() const{ return m_sourceS3Location; } /** *

The source S3 location of the app block.

*/ inline bool SourceS3LocationHasBeenSet() const { return m_sourceS3LocationHasBeenSet; } /** *

The source S3 location of the app block.

*/ inline void SetSourceS3Location(const S3Location& value) { m_sourceS3LocationHasBeenSet = true; m_sourceS3Location = value; } /** *

The source S3 location of the app block.

*/ inline void SetSourceS3Location(S3Location&& value) { m_sourceS3LocationHasBeenSet = true; m_sourceS3Location = std::move(value); } /** *

The source S3 location of the app block.

*/ inline AppBlock& WithSourceS3Location(const S3Location& value) { SetSourceS3Location(value); return *this;} /** *

The source S3 location of the app block.

*/ inline AppBlock& WithSourceS3Location(S3Location&& value) { SetSourceS3Location(std::move(value)); return *this;} /** *

The setup script details of the app block.

This only applies to app * blocks with PackagingType CUSTOM.

*/ inline const ScriptDetails& GetSetupScriptDetails() const{ return m_setupScriptDetails; } /** *

The setup script details of the app block.

This only applies to app * blocks with PackagingType CUSTOM.

*/ inline bool SetupScriptDetailsHasBeenSet() const { return m_setupScriptDetailsHasBeenSet; } /** *

The setup script details of the app block.

This only applies to app * blocks with PackagingType CUSTOM.

*/ inline void SetSetupScriptDetails(const ScriptDetails& value) { m_setupScriptDetailsHasBeenSet = true; m_setupScriptDetails = value; } /** *

The setup script details of the app block.

This only applies to app * blocks with PackagingType CUSTOM.

*/ inline void SetSetupScriptDetails(ScriptDetails&& value) { m_setupScriptDetailsHasBeenSet = true; m_setupScriptDetails = std::move(value); } /** *

The setup script details of the app block.

This only applies to app * blocks with PackagingType CUSTOM.

*/ inline AppBlock& WithSetupScriptDetails(const ScriptDetails& value) { SetSetupScriptDetails(value); return *this;} /** *

The setup script details of the app block.

This only applies to app * blocks with PackagingType CUSTOM.

*/ inline AppBlock& WithSetupScriptDetails(ScriptDetails&& value) { SetSetupScriptDetails(std::move(value)); return *this;} /** *

The created time of the app block.

*/ inline const Aws::Utils::DateTime& GetCreatedTime() const{ return m_createdTime; } /** *

The created time of the app block.

*/ inline bool CreatedTimeHasBeenSet() const { return m_createdTimeHasBeenSet; } /** *

The created time of the app block.

*/ inline void SetCreatedTime(const Aws::Utils::DateTime& value) { m_createdTimeHasBeenSet = true; m_createdTime = value; } /** *

The created time of the app block.

*/ inline void SetCreatedTime(Aws::Utils::DateTime&& value) { m_createdTimeHasBeenSet = true; m_createdTime = std::move(value); } /** *

The created time of the app block.

*/ inline AppBlock& WithCreatedTime(const Aws::Utils::DateTime& value) { SetCreatedTime(value); return *this;} /** *

The created time of the app block.

*/ inline AppBlock& WithCreatedTime(Aws::Utils::DateTime&& value) { SetCreatedTime(std::move(value)); return *this;} /** *

The post setup script details of the app block.

This only applies to * app blocks with PackagingType APPSTREAM2.

*/ inline const ScriptDetails& GetPostSetupScriptDetails() const{ return m_postSetupScriptDetails; } /** *

The post setup script details of the app block.

This only applies to * app blocks with PackagingType APPSTREAM2.

*/ inline bool PostSetupScriptDetailsHasBeenSet() const { return m_postSetupScriptDetailsHasBeenSet; } /** *

The post setup script details of the app block.

This only applies to * app blocks with PackagingType APPSTREAM2.

*/ inline void SetPostSetupScriptDetails(const ScriptDetails& value) { m_postSetupScriptDetailsHasBeenSet = true; m_postSetupScriptDetails = value; } /** *

The post setup script details of the app block.

This only applies to * app blocks with PackagingType APPSTREAM2.

*/ inline void SetPostSetupScriptDetails(ScriptDetails&& value) { m_postSetupScriptDetailsHasBeenSet = true; m_postSetupScriptDetails = std::move(value); } /** *

The post setup script details of the app block.

This only applies to * app blocks with PackagingType APPSTREAM2.

*/ inline AppBlock& WithPostSetupScriptDetails(const ScriptDetails& value) { SetPostSetupScriptDetails(value); return *this;} /** *

The post setup script details of the app block.

This only applies to * app blocks with PackagingType APPSTREAM2.

*/ inline AppBlock& WithPostSetupScriptDetails(ScriptDetails&& value) { SetPostSetupScriptDetails(std::move(value)); return *this;} /** *

The packaging type of the app block.

*/ inline const PackagingType& GetPackagingType() const{ return m_packagingType; } /** *

The packaging type of the app block.

*/ inline bool PackagingTypeHasBeenSet() const { return m_packagingTypeHasBeenSet; } /** *

The packaging type of the app block.

*/ inline void SetPackagingType(const PackagingType& value) { m_packagingTypeHasBeenSet = true; m_packagingType = value; } /** *

The packaging type of the app block.

*/ inline void SetPackagingType(PackagingType&& value) { m_packagingTypeHasBeenSet = true; m_packagingType = std::move(value); } /** *

The packaging type of the app block.

*/ inline AppBlock& WithPackagingType(const PackagingType& value) { SetPackagingType(value); return *this;} /** *

The packaging type of the app block.

*/ inline AppBlock& WithPackagingType(PackagingType&& value) { SetPackagingType(std::move(value)); return *this;} /** *

The state of the app block.

An app block with AppStream 2.0 packaging * will be in the INACTIVE state if no application package (VHD) is * assigned to it. After an application package (VHD) is created by an app block * builder for an app block, it becomes ACTIVE.

Custom app * blocks are always in the ACTIVE state and no action is required to * use them.

*/ inline const AppBlockState& GetState() const{ return m_state; } /** *

The state of the app block.

An app block with AppStream 2.0 packaging * will be in the INACTIVE state if no application package (VHD) is * assigned to it. After an application package (VHD) is created by an app block * builder for an app block, it becomes ACTIVE.

Custom app * blocks are always in the ACTIVE state and no action is required to * use them.

*/ inline bool StateHasBeenSet() const { return m_stateHasBeenSet; } /** *

The state of the app block.

An app block with AppStream 2.0 packaging * will be in the INACTIVE state if no application package (VHD) is * assigned to it. After an application package (VHD) is created by an app block * builder for an app block, it becomes ACTIVE.

Custom app * blocks are always in the ACTIVE state and no action is required to * use them.

*/ inline void SetState(const AppBlockState& value) { m_stateHasBeenSet = true; m_state = value; } /** *

The state of the app block.

An app block with AppStream 2.0 packaging * will be in the INACTIVE state if no application package (VHD) is * assigned to it. After an application package (VHD) is created by an app block * builder for an app block, it becomes ACTIVE.

Custom app * blocks are always in the ACTIVE state and no action is required to * use them.

*/ inline void SetState(AppBlockState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); } /** *

The state of the app block.

An app block with AppStream 2.0 packaging * will be in the INACTIVE state if no application package (VHD) is * assigned to it. After an application package (VHD) is created by an app block * builder for an app block, it becomes ACTIVE.

Custom app * blocks are always in the ACTIVE state and no action is required to * use them.

*/ inline AppBlock& WithState(const AppBlockState& value) { SetState(value); return *this;} /** *

The state of the app block.

An app block with AppStream 2.0 packaging * will be in the INACTIVE state if no application package (VHD) is * assigned to it. After an application package (VHD) is created by an app block * builder for an app block, it becomes ACTIVE.

Custom app * blocks are always in the ACTIVE state and no action is required to * use them.

*/ inline AppBlock& WithState(AppBlockState&& value) { SetState(std::move(value)); return *this;} /** *

The errors of the app block.

*/ inline const Aws::Vector& GetAppBlockErrors() const{ return m_appBlockErrors; } /** *

The errors of the app block.

*/ inline bool AppBlockErrorsHasBeenSet() const { return m_appBlockErrorsHasBeenSet; } /** *

The errors of the app block.

*/ inline void SetAppBlockErrors(const Aws::Vector& value) { m_appBlockErrorsHasBeenSet = true; m_appBlockErrors = value; } /** *

The errors of the app block.

*/ inline void SetAppBlockErrors(Aws::Vector&& value) { m_appBlockErrorsHasBeenSet = true; m_appBlockErrors = std::move(value); } /** *

The errors of the app block.

*/ inline AppBlock& WithAppBlockErrors(const Aws::Vector& value) { SetAppBlockErrors(value); return *this;} /** *

The errors of the app block.

*/ inline AppBlock& WithAppBlockErrors(Aws::Vector&& value) { SetAppBlockErrors(std::move(value)); return *this;} /** *

The errors of the app block.

*/ inline AppBlock& AddAppBlockErrors(const ErrorDetails& value) { m_appBlockErrorsHasBeenSet = true; m_appBlockErrors.push_back(value); return *this; } /** *

The errors of the app block.

*/ inline AppBlock& AddAppBlockErrors(ErrorDetails&& value) { m_appBlockErrorsHasBeenSet = true; m_appBlockErrors.push_back(std::move(value)); return *this; } private: Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_arn; bool m_arnHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; Aws::String m_displayName; bool m_displayNameHasBeenSet = false; S3Location m_sourceS3Location; bool m_sourceS3LocationHasBeenSet = false; ScriptDetails m_setupScriptDetails; bool m_setupScriptDetailsHasBeenSet = false; Aws::Utils::DateTime m_createdTime; bool m_createdTimeHasBeenSet = false; ScriptDetails m_postSetupScriptDetails; bool m_postSetupScriptDetailsHasBeenSet = false; PackagingType m_packagingType; bool m_packagingTypeHasBeenSet = false; AppBlockState m_state; bool m_stateHasBeenSet = false; Aws::Vector m_appBlockErrors; bool m_appBlockErrorsHasBeenSet = false; }; } // namespace Model } // namespace AppStream } // namespace Aws