1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/clouddirectory/CloudDirectory_EXPORTS.h> 8 #include <aws/clouddirectory/CloudDirectoryRequest.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/core/utils/memory/stl/AWSVector.h> 11 #include <aws/clouddirectory/model/ConsistencyLevel.h> 12 #include <aws/clouddirectory/model/BatchReadOperation.h> 13 #include <utility> 14 15 namespace Aws 16 { 17 namespace CloudDirectory 18 { 19 namespace Model 20 { 21 22 /** 23 */ 24 class AWS_CLOUDDIRECTORY_API BatchReadRequest : public CloudDirectoryRequest 25 { 26 public: 27 BatchReadRequest(); 28 29 // Service request name is the Operation name which will send this request out, 30 // each operation should has unique request name, so that we can get operation's name from this request. 31 // Note: this is not true for response, multiple operations may have the same response name, 32 // so we can not get operation's name from response. GetServiceRequestName()33 inline virtual const char* GetServiceRequestName() const override { return "BatchRead"; } 34 35 Aws::String SerializePayload() const override; 36 37 Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; 38 39 40 /** 41 * <p>The Amazon Resource Name (ARN) that is associated with the <a>Directory</a>. 42 * For more information, see <a>arns</a>.</p> 43 */ GetDirectoryArn()44 inline const Aws::String& GetDirectoryArn() const{ return m_directoryArn; } 45 46 /** 47 * <p>The Amazon Resource Name (ARN) that is associated with the <a>Directory</a>. 48 * For more information, see <a>arns</a>.</p> 49 */ DirectoryArnHasBeenSet()50 inline bool DirectoryArnHasBeenSet() const { return m_directoryArnHasBeenSet; } 51 52 /** 53 * <p>The Amazon Resource Name (ARN) that is associated with the <a>Directory</a>. 54 * For more information, see <a>arns</a>.</p> 55 */ SetDirectoryArn(const Aws::String & value)56 inline void SetDirectoryArn(const Aws::String& value) { m_directoryArnHasBeenSet = true; m_directoryArn = value; } 57 58 /** 59 * <p>The Amazon Resource Name (ARN) that is associated with the <a>Directory</a>. 60 * For more information, see <a>arns</a>.</p> 61 */ SetDirectoryArn(Aws::String && value)62 inline void SetDirectoryArn(Aws::String&& value) { m_directoryArnHasBeenSet = true; m_directoryArn = std::move(value); } 63 64 /** 65 * <p>The Amazon Resource Name (ARN) that is associated with the <a>Directory</a>. 66 * For more information, see <a>arns</a>.</p> 67 */ SetDirectoryArn(const char * value)68 inline void SetDirectoryArn(const char* value) { m_directoryArnHasBeenSet = true; m_directoryArn.assign(value); } 69 70 /** 71 * <p>The Amazon Resource Name (ARN) that is associated with the <a>Directory</a>. 72 * For more information, see <a>arns</a>.</p> 73 */ WithDirectoryArn(const Aws::String & value)74 inline BatchReadRequest& WithDirectoryArn(const Aws::String& value) { SetDirectoryArn(value); return *this;} 75 76 /** 77 * <p>The Amazon Resource Name (ARN) that is associated with the <a>Directory</a>. 78 * For more information, see <a>arns</a>.</p> 79 */ WithDirectoryArn(Aws::String && value)80 inline BatchReadRequest& WithDirectoryArn(Aws::String&& value) { SetDirectoryArn(std::move(value)); return *this;} 81 82 /** 83 * <p>The Amazon Resource Name (ARN) that is associated with the <a>Directory</a>. 84 * For more information, see <a>arns</a>.</p> 85 */ WithDirectoryArn(const char * value)86 inline BatchReadRequest& WithDirectoryArn(const char* value) { SetDirectoryArn(value); return *this;} 87 88 89 /** 90 * <p>A list of operations that are part of the batch.</p> 91 */ GetOperations()92 inline const Aws::Vector<BatchReadOperation>& GetOperations() const{ return m_operations; } 93 94 /** 95 * <p>A list of operations that are part of the batch.</p> 96 */ OperationsHasBeenSet()97 inline bool OperationsHasBeenSet() const { return m_operationsHasBeenSet; } 98 99 /** 100 * <p>A list of operations that are part of the batch.</p> 101 */ SetOperations(const Aws::Vector<BatchReadOperation> & value)102 inline void SetOperations(const Aws::Vector<BatchReadOperation>& value) { m_operationsHasBeenSet = true; m_operations = value; } 103 104 /** 105 * <p>A list of operations that are part of the batch.</p> 106 */ SetOperations(Aws::Vector<BatchReadOperation> && value)107 inline void SetOperations(Aws::Vector<BatchReadOperation>&& value) { m_operationsHasBeenSet = true; m_operations = std::move(value); } 108 109 /** 110 * <p>A list of operations that are part of the batch.</p> 111 */ WithOperations(const Aws::Vector<BatchReadOperation> & value)112 inline BatchReadRequest& WithOperations(const Aws::Vector<BatchReadOperation>& value) { SetOperations(value); return *this;} 113 114 /** 115 * <p>A list of operations that are part of the batch.</p> 116 */ WithOperations(Aws::Vector<BatchReadOperation> && value)117 inline BatchReadRequest& WithOperations(Aws::Vector<BatchReadOperation>&& value) { SetOperations(std::move(value)); return *this;} 118 119 /** 120 * <p>A list of operations that are part of the batch.</p> 121 */ AddOperations(const BatchReadOperation & value)122 inline BatchReadRequest& AddOperations(const BatchReadOperation& value) { m_operationsHasBeenSet = true; m_operations.push_back(value); return *this; } 123 124 /** 125 * <p>A list of operations that are part of the batch.</p> 126 */ AddOperations(BatchReadOperation && value)127 inline BatchReadRequest& AddOperations(BatchReadOperation&& value) { m_operationsHasBeenSet = true; m_operations.push_back(std::move(value)); return *this; } 128 129 130 /** 131 * <p>Represents the manner and timing in which the successful write or update of 132 * an object is reflected in a subsequent read operation of that same object.</p> 133 */ GetConsistencyLevel()134 inline const ConsistencyLevel& GetConsistencyLevel() const{ return m_consistencyLevel; } 135 136 /** 137 * <p>Represents the manner and timing in which the successful write or update of 138 * an object is reflected in a subsequent read operation of that same object.</p> 139 */ ConsistencyLevelHasBeenSet()140 inline bool ConsistencyLevelHasBeenSet() const { return m_consistencyLevelHasBeenSet; } 141 142 /** 143 * <p>Represents the manner and timing in which the successful write or update of 144 * an object is reflected in a subsequent read operation of that same object.</p> 145 */ SetConsistencyLevel(const ConsistencyLevel & value)146 inline void SetConsistencyLevel(const ConsistencyLevel& value) { m_consistencyLevelHasBeenSet = true; m_consistencyLevel = value; } 147 148 /** 149 * <p>Represents the manner and timing in which the successful write or update of 150 * an object is reflected in a subsequent read operation of that same object.</p> 151 */ SetConsistencyLevel(ConsistencyLevel && value)152 inline void SetConsistencyLevel(ConsistencyLevel&& value) { m_consistencyLevelHasBeenSet = true; m_consistencyLevel = std::move(value); } 153 154 /** 155 * <p>Represents the manner and timing in which the successful write or update of 156 * an object is reflected in a subsequent read operation of that same object.</p> 157 */ WithConsistencyLevel(const ConsistencyLevel & value)158 inline BatchReadRequest& WithConsistencyLevel(const ConsistencyLevel& value) { SetConsistencyLevel(value); return *this;} 159 160 /** 161 * <p>Represents the manner and timing in which the successful write or update of 162 * an object is reflected in a subsequent read operation of that same object.</p> 163 */ WithConsistencyLevel(ConsistencyLevel && value)164 inline BatchReadRequest& WithConsistencyLevel(ConsistencyLevel&& value) { SetConsistencyLevel(std::move(value)); return *this;} 165 166 private: 167 168 Aws::String m_directoryArn; 169 bool m_directoryArnHasBeenSet; 170 171 Aws::Vector<BatchReadOperation> m_operations; 172 bool m_operationsHasBeenSet; 173 174 ConsistencyLevel m_consistencyLevel; 175 bool m_consistencyLevelHasBeenSet; 176 }; 177 178 } // namespace Model 179 } // namespace CloudDirectory 180 } // namespace Aws 181