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/apigateway/APIGateway_EXPORTS.h> 8 #include <aws/apigateway/APIGatewayRequest.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/core/utils/memory/stl/AWSVector.h> 11 #include <aws/apigateway/model/PatchOperation.h> 12 #include <utility> 13 14 namespace Aws 15 { 16 namespace APIGateway 17 { 18 namespace Model 19 { 20 21 /** 22 * <p>Request to change information about a <a>Resource</a> resource.</p><p><h3>See 23 * Also:</h3> <a 24 * href="http://docs.aws.amazon.com/goto/WebAPI/apigateway-2015-07-09/UpdateResourceRequest">AWS 25 * API Reference</a></p> 26 */ 27 class AWS_APIGATEWAY_API UpdateResourceRequest : public APIGatewayRequest 28 { 29 public: 30 UpdateResourceRequest(); 31 32 // Service request name is the Operation name which will send this request out, 33 // each operation should has unique request name, so that we can get operation's name from this request. 34 // Note: this is not true for response, multiple operations may have the same response name, 35 // so we can not get operation's name from response. GetServiceRequestName()36 inline virtual const char* GetServiceRequestName() const override { return "UpdateResource"; } 37 38 Aws::String SerializePayload() const override; 39 40 41 /** 42 * <p>[Required] The string identifier of the associated <a>RestApi</a>.</p> 43 */ GetRestApiId()44 inline const Aws::String& GetRestApiId() const{ return m_restApiId; } 45 46 /** 47 * <p>[Required] The string identifier of the associated <a>RestApi</a>.</p> 48 */ RestApiIdHasBeenSet()49 inline bool RestApiIdHasBeenSet() const { return m_restApiIdHasBeenSet; } 50 51 /** 52 * <p>[Required] The string identifier of the associated <a>RestApi</a>.</p> 53 */ SetRestApiId(const Aws::String & value)54 inline void SetRestApiId(const Aws::String& value) { m_restApiIdHasBeenSet = true; m_restApiId = value; } 55 56 /** 57 * <p>[Required] The string identifier of the associated <a>RestApi</a>.</p> 58 */ SetRestApiId(Aws::String && value)59 inline void SetRestApiId(Aws::String&& value) { m_restApiIdHasBeenSet = true; m_restApiId = std::move(value); } 60 61 /** 62 * <p>[Required] The string identifier of the associated <a>RestApi</a>.</p> 63 */ SetRestApiId(const char * value)64 inline void SetRestApiId(const char* value) { m_restApiIdHasBeenSet = true; m_restApiId.assign(value); } 65 66 /** 67 * <p>[Required] The string identifier of the associated <a>RestApi</a>.</p> 68 */ WithRestApiId(const Aws::String & value)69 inline UpdateResourceRequest& WithRestApiId(const Aws::String& value) { SetRestApiId(value); return *this;} 70 71 /** 72 * <p>[Required] The string identifier of the associated <a>RestApi</a>.</p> 73 */ WithRestApiId(Aws::String && value)74 inline UpdateResourceRequest& WithRestApiId(Aws::String&& value) { SetRestApiId(std::move(value)); return *this;} 75 76 /** 77 * <p>[Required] The string identifier of the associated <a>RestApi</a>.</p> 78 */ WithRestApiId(const char * value)79 inline UpdateResourceRequest& WithRestApiId(const char* value) { SetRestApiId(value); return *this;} 80 81 82 /** 83 * <p>[Required] The identifier of the <a>Resource</a> resource.</p> 84 */ GetResourceId()85 inline const Aws::String& GetResourceId() const{ return m_resourceId; } 86 87 /** 88 * <p>[Required] The identifier of the <a>Resource</a> resource.</p> 89 */ ResourceIdHasBeenSet()90 inline bool ResourceIdHasBeenSet() const { return m_resourceIdHasBeenSet; } 91 92 /** 93 * <p>[Required] The identifier of the <a>Resource</a> resource.</p> 94 */ SetResourceId(const Aws::String & value)95 inline void SetResourceId(const Aws::String& value) { m_resourceIdHasBeenSet = true; m_resourceId = value; } 96 97 /** 98 * <p>[Required] The identifier of the <a>Resource</a> resource.</p> 99 */ SetResourceId(Aws::String && value)100 inline void SetResourceId(Aws::String&& value) { m_resourceIdHasBeenSet = true; m_resourceId = std::move(value); } 101 102 /** 103 * <p>[Required] The identifier of the <a>Resource</a> resource.</p> 104 */ SetResourceId(const char * value)105 inline void SetResourceId(const char* value) { m_resourceIdHasBeenSet = true; m_resourceId.assign(value); } 106 107 /** 108 * <p>[Required] The identifier of the <a>Resource</a> resource.</p> 109 */ WithResourceId(const Aws::String & value)110 inline UpdateResourceRequest& WithResourceId(const Aws::String& value) { SetResourceId(value); return *this;} 111 112 /** 113 * <p>[Required] The identifier of the <a>Resource</a> resource.</p> 114 */ WithResourceId(Aws::String && value)115 inline UpdateResourceRequest& WithResourceId(Aws::String&& value) { SetResourceId(std::move(value)); return *this;} 116 117 /** 118 * <p>[Required] The identifier of the <a>Resource</a> resource.</p> 119 */ WithResourceId(const char * value)120 inline UpdateResourceRequest& WithResourceId(const char* value) { SetResourceId(value); return *this;} 121 122 123 /** 124 * <p>A list of update operations to be applied to the specified resource and in 125 * the order specified in this list.</p> 126 */ GetPatchOperations()127 inline const Aws::Vector<PatchOperation>& GetPatchOperations() const{ return m_patchOperations; } 128 129 /** 130 * <p>A list of update operations to be applied to the specified resource and in 131 * the order specified in this list.</p> 132 */ PatchOperationsHasBeenSet()133 inline bool PatchOperationsHasBeenSet() const { return m_patchOperationsHasBeenSet; } 134 135 /** 136 * <p>A list of update operations to be applied to the specified resource and in 137 * the order specified in this list.</p> 138 */ SetPatchOperations(const Aws::Vector<PatchOperation> & value)139 inline void SetPatchOperations(const Aws::Vector<PatchOperation>& value) { m_patchOperationsHasBeenSet = true; m_patchOperations = value; } 140 141 /** 142 * <p>A list of update operations to be applied to the specified resource and in 143 * the order specified in this list.</p> 144 */ SetPatchOperations(Aws::Vector<PatchOperation> && value)145 inline void SetPatchOperations(Aws::Vector<PatchOperation>&& value) { m_patchOperationsHasBeenSet = true; m_patchOperations = std::move(value); } 146 147 /** 148 * <p>A list of update operations to be applied to the specified resource and in 149 * the order specified in this list.</p> 150 */ WithPatchOperations(const Aws::Vector<PatchOperation> & value)151 inline UpdateResourceRequest& WithPatchOperations(const Aws::Vector<PatchOperation>& value) { SetPatchOperations(value); return *this;} 152 153 /** 154 * <p>A list of update operations to be applied to the specified resource and in 155 * the order specified in this list.</p> 156 */ WithPatchOperations(Aws::Vector<PatchOperation> && value)157 inline UpdateResourceRequest& WithPatchOperations(Aws::Vector<PatchOperation>&& value) { SetPatchOperations(std::move(value)); return *this;} 158 159 /** 160 * <p>A list of update operations to be applied to the specified resource and in 161 * the order specified in this list.</p> 162 */ AddPatchOperations(const PatchOperation & value)163 inline UpdateResourceRequest& AddPatchOperations(const PatchOperation& value) { m_patchOperationsHasBeenSet = true; m_patchOperations.push_back(value); return *this; } 164 165 /** 166 * <p>A list of update operations to be applied to the specified resource and in 167 * the order specified in this list.</p> 168 */ AddPatchOperations(PatchOperation && value)169 inline UpdateResourceRequest& AddPatchOperations(PatchOperation&& value) { m_patchOperationsHasBeenSet = true; m_patchOperations.push_back(std::move(value)); return *this; } 170 171 private: 172 173 Aws::String m_restApiId; 174 bool m_restApiIdHasBeenSet; 175 176 Aws::String m_resourceId; 177 bool m_resourceIdHasBeenSet; 178 179 Aws::Vector<PatchOperation> m_patchOperations; 180 bool m_patchOperationsHasBeenSet; 181 }; 182 183 } // namespace Model 184 } // namespace APIGateway 185 } // namespace Aws 186