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

Describes the configuration for the file uploader field.

See * Also:

AWS * API Reference

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

The access level to assign to the uploaded files in the Amazon S3 bucket * where they are stored. The valid values for this property are * private, protected, or public. For * detailed information about the permissions associated with each access level, * see File * access levels in the Amplify documentation.

*/ inline const StorageAccessLevel& GetAccessLevel() const{ return m_accessLevel; } /** *

The access level to assign to the uploaded files in the Amazon S3 bucket * where they are stored. The valid values for this property are * private, protected, or public. For * detailed information about the permissions associated with each access level, * see File * access levels in the Amplify documentation.

*/ inline bool AccessLevelHasBeenSet() const { return m_accessLevelHasBeenSet; } /** *

The access level to assign to the uploaded files in the Amazon S3 bucket * where they are stored. The valid values for this property are * private, protected, or public. For * detailed information about the permissions associated with each access level, * see File * access levels in the Amplify documentation.

*/ inline void SetAccessLevel(const StorageAccessLevel& value) { m_accessLevelHasBeenSet = true; m_accessLevel = value; } /** *

The access level to assign to the uploaded files in the Amazon S3 bucket * where they are stored. The valid values for this property are * private, protected, or public. For * detailed information about the permissions associated with each access level, * see File * access levels in the Amplify documentation.

*/ inline void SetAccessLevel(StorageAccessLevel&& value) { m_accessLevelHasBeenSet = true; m_accessLevel = std::move(value); } /** *

The access level to assign to the uploaded files in the Amazon S3 bucket * where they are stored. The valid values for this property are * private, protected, or public. For * detailed information about the permissions associated with each access level, * see File * access levels in the Amplify documentation.

*/ inline FileUploaderFieldConfig& WithAccessLevel(const StorageAccessLevel& value) { SetAccessLevel(value); return *this;} /** *

The access level to assign to the uploaded files in the Amazon S3 bucket * where they are stored. The valid values for this property are * private, protected, or public. For * detailed information about the permissions associated with each access level, * see File * access levels in the Amplify documentation.

*/ inline FileUploaderFieldConfig& WithAccessLevel(StorageAccessLevel&& value) { SetAccessLevel(std::move(value)); return *this;} /** *

The file types that are allowed to be uploaded by the file uploader. Provide * this information in an array of strings specifying the valid file * extensions.

*/ inline const Aws::Vector& GetAcceptedFileTypes() const{ return m_acceptedFileTypes; } /** *

The file types that are allowed to be uploaded by the file uploader. Provide * this information in an array of strings specifying the valid file * extensions.

*/ inline bool AcceptedFileTypesHasBeenSet() const { return m_acceptedFileTypesHasBeenSet; } /** *

The file types that are allowed to be uploaded by the file uploader. Provide * this information in an array of strings specifying the valid file * extensions.

*/ inline void SetAcceptedFileTypes(const Aws::Vector& value) { m_acceptedFileTypesHasBeenSet = true; m_acceptedFileTypes = value; } /** *

The file types that are allowed to be uploaded by the file uploader. Provide * this information in an array of strings specifying the valid file * extensions.

*/ inline void SetAcceptedFileTypes(Aws::Vector&& value) { m_acceptedFileTypesHasBeenSet = true; m_acceptedFileTypes = std::move(value); } /** *

The file types that are allowed to be uploaded by the file uploader. Provide * this information in an array of strings specifying the valid file * extensions.

*/ inline FileUploaderFieldConfig& WithAcceptedFileTypes(const Aws::Vector& value) { SetAcceptedFileTypes(value); return *this;} /** *

The file types that are allowed to be uploaded by the file uploader. Provide * this information in an array of strings specifying the valid file * extensions.

*/ inline FileUploaderFieldConfig& WithAcceptedFileTypes(Aws::Vector&& value) { SetAcceptedFileTypes(std::move(value)); return *this;} /** *

The file types that are allowed to be uploaded by the file uploader. Provide * this information in an array of strings specifying the valid file * extensions.

*/ inline FileUploaderFieldConfig& AddAcceptedFileTypes(const Aws::String& value) { m_acceptedFileTypesHasBeenSet = true; m_acceptedFileTypes.push_back(value); return *this; } /** *

The file types that are allowed to be uploaded by the file uploader. Provide * this information in an array of strings specifying the valid file * extensions.

*/ inline FileUploaderFieldConfig& AddAcceptedFileTypes(Aws::String&& value) { m_acceptedFileTypesHasBeenSet = true; m_acceptedFileTypes.push_back(std::move(value)); return *this; } /** *

The file types that are allowed to be uploaded by the file uploader. Provide * this information in an array of strings specifying the valid file * extensions.

*/ inline FileUploaderFieldConfig& AddAcceptedFileTypes(const char* value) { m_acceptedFileTypesHasBeenSet = true; m_acceptedFileTypes.push_back(value); return *this; } /** *

Specifies whether to display or hide the image preview after selecting a file * for upload. The default value is true to display the image * preview.

*/ inline bool GetShowThumbnails() const{ return m_showThumbnails; } /** *

Specifies whether to display or hide the image preview after selecting a file * for upload. The default value is true to display the image * preview.

*/ inline bool ShowThumbnailsHasBeenSet() const { return m_showThumbnailsHasBeenSet; } /** *

Specifies whether to display or hide the image preview after selecting a file * for upload. The default value is true to display the image * preview.

*/ inline void SetShowThumbnails(bool value) { m_showThumbnailsHasBeenSet = true; m_showThumbnails = value; } /** *

Specifies whether to display or hide the image preview after selecting a file * for upload. The default value is true to display the image * preview.

*/ inline FileUploaderFieldConfig& WithShowThumbnails(bool value) { SetShowThumbnails(value); return *this;} /** *

Allows the file upload operation to be paused and resumed. The default value * is false.

When isResumable is set to * true, the file uploader uses a multipart upload to break the files * into chunks before upload. The progress of the upload isn't continuous, because * the file uploader uploads a chunk at a time.

*/ inline bool GetIsResumable() const{ return m_isResumable; } /** *

Allows the file upload operation to be paused and resumed. The default value * is false.

When isResumable is set to * true, the file uploader uses a multipart upload to break the files * into chunks before upload. The progress of the upload isn't continuous, because * the file uploader uploads a chunk at a time.

*/ inline bool IsResumableHasBeenSet() const { return m_isResumableHasBeenSet; } /** *

Allows the file upload operation to be paused and resumed. The default value * is false.

When isResumable is set to * true, the file uploader uses a multipart upload to break the files * into chunks before upload. The progress of the upload isn't continuous, because * the file uploader uploads a chunk at a time.

*/ inline void SetIsResumable(bool value) { m_isResumableHasBeenSet = true; m_isResumable = value; } /** *

Allows the file upload operation to be paused and resumed. The default value * is false.

When isResumable is set to * true, the file uploader uses a multipart upload to break the files * into chunks before upload. The progress of the upload isn't continuous, because * the file uploader uploads a chunk at a time.

*/ inline FileUploaderFieldConfig& WithIsResumable(bool value) { SetIsResumable(value); return *this;} /** *

Specifies the maximum number of files that can be selected to upload. The * default value is an unlimited number of files.

*/ inline int GetMaxFileCount() const{ return m_maxFileCount; } /** *

Specifies the maximum number of files that can be selected to upload. The * default value is an unlimited number of files.

*/ inline bool MaxFileCountHasBeenSet() const { return m_maxFileCountHasBeenSet; } /** *

Specifies the maximum number of files that can be selected to upload. The * default value is an unlimited number of files.

*/ inline void SetMaxFileCount(int value) { m_maxFileCountHasBeenSet = true; m_maxFileCount = value; } /** *

Specifies the maximum number of files that can be selected to upload. The * default value is an unlimited number of files.

*/ inline FileUploaderFieldConfig& WithMaxFileCount(int value) { SetMaxFileCount(value); return *this;} /** *

The maximum file size in bytes that the file uploader will accept. The * default value is an unlimited file size.

*/ inline int GetMaxSize() const{ return m_maxSize; } /** *

The maximum file size in bytes that the file uploader will accept. The * default value is an unlimited file size.

*/ inline bool MaxSizeHasBeenSet() const { return m_maxSizeHasBeenSet; } /** *

The maximum file size in bytes that the file uploader will accept. The * default value is an unlimited file size.

*/ inline void SetMaxSize(int value) { m_maxSizeHasBeenSet = true; m_maxSize = value; } /** *

The maximum file size in bytes that the file uploader will accept. The * default value is an unlimited file size.

*/ inline FileUploaderFieldConfig& WithMaxSize(int value) { SetMaxSize(value); return *this;} private: StorageAccessLevel m_accessLevel; bool m_accessLevelHasBeenSet = false; Aws::Vector m_acceptedFileTypes; bool m_acceptedFileTypesHasBeenSet = false; bool m_showThumbnails; bool m_showThumbnailsHasBeenSet = false; bool m_isResumable; bool m_isResumableHasBeenSet = false; int m_maxFileCount; bool m_maxFileCountHasBeenSet = false; int m_maxSize; bool m_maxSizeHasBeenSet = false; }; } // namespace Model } // namespace AmplifyUIBuilder } // namespace Aws