/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include <aws/memorydb/MemoryDB_EXPORTS.h> #include <aws/memorydb/MemoryDBRequest.h> #include <aws/core/utils/memory/stl/AWSString.h> #include <aws/core/utils/memory/stl/AWSVector.h> #include <aws/memorydb/model/Tag.h> #include <utility> namespace Aws { namespace MemoryDB { namespace Model { /** */ class CreateSnapshotRequest : public MemoryDBRequest { public: AWS_MEMORYDB_API CreateSnapshotRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateSnapshot"; } AWS_MEMORYDB_API Aws::String SerializePayload() const override; AWS_MEMORYDB_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** * <p>The snapshot is created from this cluster.</p> */ inline const Aws::String& GetClusterName() const{ return m_clusterName; } /** * <p>The snapshot is created from this cluster.</p> */ inline bool ClusterNameHasBeenSet() const { return m_clusterNameHasBeenSet; } /** * <p>The snapshot is created from this cluster.</p> */ inline void SetClusterName(const Aws::String& value) { m_clusterNameHasBeenSet = true; m_clusterName = value; } /** * <p>The snapshot is created from this cluster.</p> */ inline void SetClusterName(Aws::String&& value) { m_clusterNameHasBeenSet = true; m_clusterName = std::move(value); } /** * <p>The snapshot is created from this cluster.</p> */ inline void SetClusterName(const char* value) { m_clusterNameHasBeenSet = true; m_clusterName.assign(value); } /** * <p>The snapshot is created from this cluster.</p> */ inline CreateSnapshotRequest& WithClusterName(const Aws::String& value) { SetClusterName(value); return *this;} /** * <p>The snapshot is created from this cluster.</p> */ inline CreateSnapshotRequest& WithClusterName(Aws::String&& value) { SetClusterName(std::move(value)); return *this;} /** * <p>The snapshot is created from this cluster.</p> */ inline CreateSnapshotRequest& WithClusterName(const char* value) { SetClusterName(value); return *this;} /** * <p>A name for the snapshot being created.</p> */ inline const Aws::String& GetSnapshotName() const{ return m_snapshotName; } /** * <p>A name for the snapshot being created.</p> */ inline bool SnapshotNameHasBeenSet() const { return m_snapshotNameHasBeenSet; } /** * <p>A name for the snapshot being created.</p> */ inline void SetSnapshotName(const Aws::String& value) { m_snapshotNameHasBeenSet = true; m_snapshotName = value; } /** * <p>A name for the snapshot being created.</p> */ inline void SetSnapshotName(Aws::String&& value) { m_snapshotNameHasBeenSet = true; m_snapshotName = std::move(value); } /** * <p>A name for the snapshot being created.</p> */ inline void SetSnapshotName(const char* value) { m_snapshotNameHasBeenSet = true; m_snapshotName.assign(value); } /** * <p>A name for the snapshot being created.</p> */ inline CreateSnapshotRequest& WithSnapshotName(const Aws::String& value) { SetSnapshotName(value); return *this;} /** * <p>A name for the snapshot being created.</p> */ inline CreateSnapshotRequest& WithSnapshotName(Aws::String&& value) { SetSnapshotName(std::move(value)); return *this;} /** * <p>A name for the snapshot being created.</p> */ inline CreateSnapshotRequest& WithSnapshotName(const char* value) { SetSnapshotName(value); return *this;} /** * <p>The ID of the KMS key used to encrypt the snapshot.</p> */ inline const Aws::String& GetKmsKeyId() const{ return m_kmsKeyId; } /** * <p>The ID of the KMS key used to encrypt the snapshot.</p> */ inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; } /** * <p>The ID of the KMS key used to encrypt the snapshot.</p> */ inline void SetKmsKeyId(const Aws::String& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = value; } /** * <p>The ID of the KMS key used to encrypt the snapshot.</p> */ inline void SetKmsKeyId(Aws::String&& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = std::move(value); } /** * <p>The ID of the KMS key used to encrypt the snapshot.</p> */ inline void SetKmsKeyId(const char* value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId.assign(value); } /** * <p>The ID of the KMS key used to encrypt the snapshot.</p> */ inline CreateSnapshotRequest& WithKmsKeyId(const Aws::String& value) { SetKmsKeyId(value); return *this;} /** * <p>The ID of the KMS key used to encrypt the snapshot.</p> */ inline CreateSnapshotRequest& WithKmsKeyId(Aws::String&& value) { SetKmsKeyId(std::move(value)); return *this;} /** * <p>The ID of the KMS key used to encrypt the snapshot.</p> */ inline CreateSnapshotRequest& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;} /** * <p>A list of tags to be added to this resource. A tag is a key-value pair. A tag * key must be accompanied by a tag value, although null is accepted.</p> */ inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; } /** * <p>A list of tags to be added to this resource. A tag is a key-value pair. A tag * key must be accompanied by a tag value, although null is accepted.</p> */ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** * <p>A list of tags to be added to this resource. A tag is a key-value pair. A tag * key must be accompanied by a tag value, although null is accepted.</p> */ inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; } /** * <p>A list of tags to be added to this resource. A tag is a key-value pair. A tag * key must be accompanied by a tag value, although null is accepted.</p> */ inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** * <p>A list of tags to be added to this resource. A tag is a key-value pair. A tag * key must be accompanied by a tag value, although null is accepted.</p> */ inline CreateSnapshotRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;} /** * <p>A list of tags to be added to this resource. A tag is a key-value pair. A tag * key must be accompanied by a tag value, although null is accepted.</p> */ inline CreateSnapshotRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;} /** * <p>A list of tags to be added to this resource. A tag is a key-value pair. A tag * key must be accompanied by a tag value, although null is accepted.</p> */ inline CreateSnapshotRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** * <p>A list of tags to be added to this resource. A tag is a key-value pair. A tag * key must be accompanied by a tag value, although null is accepted.</p> */ inline CreateSnapshotRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: Aws::String m_clusterName; bool m_clusterNameHasBeenSet = false; Aws::String m_snapshotName; bool m_snapshotNameHasBeenSet = false; Aws::String m_kmsKeyId; bool m_kmsKeyIdHasBeenSet = false; Aws::Vector<Tag> m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace MemoryDB } // namespace Aws