/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { template class AmazonWebServiceResult; namespace Utils { namespace Json { class JsonValue; } // namespace Json } // namespace Utils namespace QLDB { namespace Model { class CreateLedgerResult { public: AWS_QLDB_API CreateLedgerResult(); AWS_QLDB_API CreateLedgerResult(const Aws::AmazonWebServiceResult& result); AWS_QLDB_API CreateLedgerResult& operator=(const Aws::AmazonWebServiceResult& result); /** *

The name of the ledger.

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

The name of the ledger.

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

The name of the ledger.

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

The name of the ledger.

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

The name of the ledger.

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

The name of the ledger.

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

The name of the ledger.

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

The Amazon Resource Name (ARN) for the ledger.

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

The Amazon Resource Name (ARN) for the ledger.

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

The Amazon Resource Name (ARN) for the ledger.

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

The Amazon Resource Name (ARN) for the ledger.

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

The Amazon Resource Name (ARN) for the ledger.

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

The Amazon Resource Name (ARN) for the ledger.

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

The Amazon Resource Name (ARN) for the ledger.

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

The current status of the ledger.

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

The current status of the ledger.

*/ inline void SetState(const LedgerState& value) { m_state = value; } /** *

The current status of the ledger.

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

The current status of the ledger.

*/ inline CreateLedgerResult& WithState(const LedgerState& value) { SetState(value); return *this;} /** *

The current status of the ledger.

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

The date and time, in epoch time format, when the ledger was created. (Epoch * time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970 * UTC.)

*/ inline const Aws::Utils::DateTime& GetCreationDateTime() const{ return m_creationDateTime; } /** *

The date and time, in epoch time format, when the ledger was created. (Epoch * time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970 * UTC.)

*/ inline void SetCreationDateTime(const Aws::Utils::DateTime& value) { m_creationDateTime = value; } /** *

The date and time, in epoch time format, when the ledger was created. (Epoch * time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970 * UTC.)

*/ inline void SetCreationDateTime(Aws::Utils::DateTime&& value) { m_creationDateTime = std::move(value); } /** *

The date and time, in epoch time format, when the ledger was created. (Epoch * time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970 * UTC.)

*/ inline CreateLedgerResult& WithCreationDateTime(const Aws::Utils::DateTime& value) { SetCreationDateTime(value); return *this;} /** *

The date and time, in epoch time format, when the ledger was created. (Epoch * time format is the number of seconds elapsed since 12:00:00 AM January 1, 1970 * UTC.)

*/ inline CreateLedgerResult& WithCreationDateTime(Aws::Utils::DateTime&& value) { SetCreationDateTime(std::move(value)); return *this;} /** *

The permissions mode of the ledger that you created.

*/ inline const PermissionsMode& GetPermissionsMode() const{ return m_permissionsMode; } /** *

The permissions mode of the ledger that you created.

*/ inline void SetPermissionsMode(const PermissionsMode& value) { m_permissionsMode = value; } /** *

The permissions mode of the ledger that you created.

*/ inline void SetPermissionsMode(PermissionsMode&& value) { m_permissionsMode = std::move(value); } /** *

The permissions mode of the ledger that you created.

*/ inline CreateLedgerResult& WithPermissionsMode(const PermissionsMode& value) { SetPermissionsMode(value); return *this;} /** *

The permissions mode of the ledger that you created.

*/ inline CreateLedgerResult& WithPermissionsMode(PermissionsMode&& value) { SetPermissionsMode(std::move(value)); return *this;} /** *

Specifies whether the ledger is protected from being deleted by any user. If * not defined during ledger creation, this feature is enabled (true) * by default.

If deletion protection is enabled, you must first disable it * before you can delete the ledger. You can disable it by calling the * UpdateLedger operation to set this parameter to * false.

*/ inline bool GetDeletionProtection() const{ return m_deletionProtection; } /** *

Specifies whether the ledger is protected from being deleted by any user. If * not defined during ledger creation, this feature is enabled (true) * by default.

If deletion protection is enabled, you must first disable it * before you can delete the ledger. You can disable it by calling the * UpdateLedger operation to set this parameter to * false.

*/ inline void SetDeletionProtection(bool value) { m_deletionProtection = value; } /** *

Specifies whether the ledger is protected from being deleted by any user. If * not defined during ledger creation, this feature is enabled (true) * by default.

If deletion protection is enabled, you must first disable it * before you can delete the ledger. You can disable it by calling the * UpdateLedger operation to set this parameter to * false.

*/ inline CreateLedgerResult& WithDeletionProtection(bool value) { SetDeletionProtection(value); return *this;} /** *

The ARN of the customer managed KMS key that the ledger uses for encryption * at rest. If this parameter is undefined, the ledger uses an Amazon Web Services * owned KMS key for encryption.

*/ inline const Aws::String& GetKmsKeyArn() const{ return m_kmsKeyArn; } /** *

The ARN of the customer managed KMS key that the ledger uses for encryption * at rest. If this parameter is undefined, the ledger uses an Amazon Web Services * owned KMS key for encryption.

*/ inline void SetKmsKeyArn(const Aws::String& value) { m_kmsKeyArn = value; } /** *

The ARN of the customer managed KMS key that the ledger uses for encryption * at rest. If this parameter is undefined, the ledger uses an Amazon Web Services * owned KMS key for encryption.

*/ inline void SetKmsKeyArn(Aws::String&& value) { m_kmsKeyArn = std::move(value); } /** *

The ARN of the customer managed KMS key that the ledger uses for encryption * at rest. If this parameter is undefined, the ledger uses an Amazon Web Services * owned KMS key for encryption.

*/ inline void SetKmsKeyArn(const char* value) { m_kmsKeyArn.assign(value); } /** *

The ARN of the customer managed KMS key that the ledger uses for encryption * at rest. If this parameter is undefined, the ledger uses an Amazon Web Services * owned KMS key for encryption.

*/ inline CreateLedgerResult& WithKmsKeyArn(const Aws::String& value) { SetKmsKeyArn(value); return *this;} /** *

The ARN of the customer managed KMS key that the ledger uses for encryption * at rest. If this parameter is undefined, the ledger uses an Amazon Web Services * owned KMS key for encryption.

*/ inline CreateLedgerResult& WithKmsKeyArn(Aws::String&& value) { SetKmsKeyArn(std::move(value)); return *this;} /** *

The ARN of the customer managed KMS key that the ledger uses for encryption * at rest. If this parameter is undefined, the ledger uses an Amazon Web Services * owned KMS key for encryption.

*/ inline CreateLedgerResult& WithKmsKeyArn(const char* value) { SetKmsKeyArn(value); return *this;} inline const Aws::String& GetRequestId() const{ return m_requestId; } inline void SetRequestId(const Aws::String& value) { m_requestId = value; } inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); } inline void SetRequestId(const char* value) { m_requestId.assign(value); } inline CreateLedgerResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;} inline CreateLedgerResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;} inline CreateLedgerResult& WithRequestId(const char* value) { SetRequestId(value); return *this;} private: Aws::String m_name; Aws::String m_arn; LedgerState m_state; Aws::Utils::DateTime m_creationDateTime; PermissionsMode m_permissionsMode; bool m_deletionProtection; Aws::String m_kmsKeyArn; Aws::String m_requestId; }; } // namespace Model } // namespace QLDB } // namespace Aws