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/dataexchange/DataExchange_EXPORTS.h> 8 #include <aws/dataexchange/DataExchangeRequest.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/core/utils/memory/stl/AWSMap.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 namespace DataExchange 16 { 17 namespace Model 18 { 19 20 /** 21 * <p>The request body for TagResource.</p><p><h3>See Also:</h3> <a 22 * href="http://docs.aws.amazon.com/goto/WebAPI/dataexchange-2017-07-25/TagResourceRequest">AWS 23 * API Reference</a></p> 24 */ 25 class AWS_DATAEXCHANGE_API TagResourceRequest : public DataExchangeRequest 26 { 27 public: 28 TagResourceRequest(); 29 30 // Service request name is the Operation name which will send this request out, 31 // each operation should has unique request name, so that we can get operation's name from this request. 32 // Note: this is not true for response, multiple operations may have the same response name, 33 // so we can not get operation's name from response. GetServiceRequestName()34 inline virtual const char* GetServiceRequestName() const override { return "TagResource"; } 35 36 Aws::String SerializePayload() const override; 37 38 39 /** 40 * <p>An Amazon Resource Name (ARN) that uniquely identifies an AWS resource.</p> 41 */ GetResourceArn()42 inline const Aws::String& GetResourceArn() const{ return m_resourceArn; } 43 44 /** 45 * <p>An Amazon Resource Name (ARN) that uniquely identifies an AWS resource.</p> 46 */ ResourceArnHasBeenSet()47 inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; } 48 49 /** 50 * <p>An Amazon Resource Name (ARN) that uniquely identifies an AWS resource.</p> 51 */ SetResourceArn(const Aws::String & value)52 inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; } 53 54 /** 55 * <p>An Amazon Resource Name (ARN) that uniquely identifies an AWS resource.</p> 56 */ SetResourceArn(Aws::String && value)57 inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); } 58 59 /** 60 * <p>An Amazon Resource Name (ARN) that uniquely identifies an AWS resource.</p> 61 */ SetResourceArn(const char * value)62 inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); } 63 64 /** 65 * <p>An Amazon Resource Name (ARN) that uniquely identifies an AWS resource.</p> 66 */ WithResourceArn(const Aws::String & value)67 inline TagResourceRequest& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;} 68 69 /** 70 * <p>An Amazon Resource Name (ARN) that uniquely identifies an AWS resource.</p> 71 */ WithResourceArn(Aws::String && value)72 inline TagResourceRequest& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;} 73 74 /** 75 * <p>An Amazon Resource Name (ARN) that uniquely identifies an AWS resource.</p> 76 */ WithResourceArn(const char * value)77 inline TagResourceRequest& WithResourceArn(const char* value) { SetResourceArn(value); return *this;} 78 79 80 /** 81 * A label that consists of a customer-defined key and an optional value. 82 */ GetTags()83 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const{ return m_tags; } 84 85 /** 86 * A label that consists of a customer-defined key and an optional value. 87 */ TagsHasBeenSet()88 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } 89 90 /** 91 * A label that consists of a customer-defined key and an optional value. 92 */ SetTags(const Aws::Map<Aws::String,Aws::String> & value)93 inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tagsHasBeenSet = true; m_tags = value; } 94 95 /** 96 * A label that consists of a customer-defined key and an optional value. 97 */ SetTags(Aws::Map<Aws::String,Aws::String> && value)98 inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } 99 100 /** 101 * A label that consists of a customer-defined key and an optional value. 102 */ WithTags(const Aws::Map<Aws::String,Aws::String> & value)103 inline TagResourceRequest& WithTags(const Aws::Map<Aws::String, Aws::String>& value) { SetTags(value); return *this;} 104 105 /** 106 * A label that consists of a customer-defined key and an optional value. 107 */ WithTags(Aws::Map<Aws::String,Aws::String> && value)108 inline TagResourceRequest& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;} 109 110 /** 111 * A label that consists of a customer-defined key and an optional value. 112 */ AddTags(const Aws::String & key,const Aws::String & value)113 inline TagResourceRequest& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } 114 115 /** 116 * A label that consists of a customer-defined key and an optional value. 117 */ AddTags(Aws::String && key,const Aws::String & value)118 inline TagResourceRequest& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } 119 120 /** 121 * A label that consists of a customer-defined key and an optional value. 122 */ AddTags(const Aws::String & key,Aws::String && value)123 inline TagResourceRequest& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } 124 125 /** 126 * A label that consists of a customer-defined key and an optional value. 127 */ AddTags(Aws::String && key,Aws::String && value)128 inline TagResourceRequest& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; } 129 130 /** 131 * A label that consists of a customer-defined key and an optional value. 132 */ AddTags(const char * key,Aws::String && value)133 inline TagResourceRequest& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } 134 135 /** 136 * A label that consists of a customer-defined key and an optional value. 137 */ AddTags(Aws::String && key,const char * value)138 inline TagResourceRequest& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } 139 140 /** 141 * A label that consists of a customer-defined key and an optional value. 142 */ AddTags(const char * key,const char * value)143 inline TagResourceRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } 144 145 private: 146 147 Aws::String m_resourceArn; 148 bool m_resourceArnHasBeenSet; 149 150 Aws::Map<Aws::String, Aws::String> m_tags; 151 bool m_tagsHasBeenSet; 152 }; 153 154 } // namespace Model 155 } // namespace DataExchange 156 } // namespace Aws 157