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/quicksight/QuickSight_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSString.h> 9 #include <aws/quicksight/model/RowLevelPermissionPolicy.h> 10 #include <aws/quicksight/model/RowLevelPermissionFormatVersion.h> 11 #include <aws/quicksight/model/Status.h> 12 #include <utility> 13 14 namespace Aws 15 { 16 namespace Utils 17 { 18 namespace Json 19 { 20 class JsonValue; 21 class JsonView; 22 } // namespace Json 23 } // namespace Utils 24 namespace QuickSight 25 { 26 namespace Model 27 { 28 29 /** 30 * <p>Information about a dataset that contains permissions for row-level security 31 * (RLS). The permissions dataset maps fields to users or groups. For more 32 * information, see <a 33 * href="https://docs.aws.amazon.com/quicksight/latest/user/restrict-access-to-a-data-set-using-row-level-security.html">Using 34 * Row-Level Security (RLS) to Restrict Access to a Dataset</a> in the <i>Amazon 35 * QuickSight User Guide</i>.</p> <p>The option to deny permissions by setting 36 * <code>PermissionPolicy</code> to <code>DENY_ACCESS</code> is not supported for 37 * new RLS datasets.</p><p><h3>See Also:</h3> <a 38 * href="http://docs.aws.amazon.com/goto/WebAPI/quicksight-2018-04-01/RowLevelPermissionDataSet">AWS 39 * API Reference</a></p> 40 */ 41 class AWS_QUICKSIGHT_API RowLevelPermissionDataSet 42 { 43 public: 44 RowLevelPermissionDataSet(); 45 RowLevelPermissionDataSet(Aws::Utils::Json::JsonView jsonValue); 46 RowLevelPermissionDataSet& operator=(Aws::Utils::Json::JsonView jsonValue); 47 Aws::Utils::Json::JsonValue Jsonize() const; 48 49 50 /** 51 * <p>The namespace associated with the dataset that contains permissions for 52 * RLS.</p> 53 */ GetNamespace()54 inline const Aws::String& GetNamespace() const{ return m_namespace; } 55 56 /** 57 * <p>The namespace associated with the dataset that contains permissions for 58 * RLS.</p> 59 */ NamespaceHasBeenSet()60 inline bool NamespaceHasBeenSet() const { return m_namespaceHasBeenSet; } 61 62 /** 63 * <p>The namespace associated with the dataset that contains permissions for 64 * RLS.</p> 65 */ SetNamespace(const Aws::String & value)66 inline void SetNamespace(const Aws::String& value) { m_namespaceHasBeenSet = true; m_namespace = value; } 67 68 /** 69 * <p>The namespace associated with the dataset that contains permissions for 70 * RLS.</p> 71 */ SetNamespace(Aws::String && value)72 inline void SetNamespace(Aws::String&& value) { m_namespaceHasBeenSet = true; m_namespace = std::move(value); } 73 74 /** 75 * <p>The namespace associated with the dataset that contains permissions for 76 * RLS.</p> 77 */ SetNamespace(const char * value)78 inline void SetNamespace(const char* value) { m_namespaceHasBeenSet = true; m_namespace.assign(value); } 79 80 /** 81 * <p>The namespace associated with the dataset that contains permissions for 82 * RLS.</p> 83 */ WithNamespace(const Aws::String & value)84 inline RowLevelPermissionDataSet& WithNamespace(const Aws::String& value) { SetNamespace(value); return *this;} 85 86 /** 87 * <p>The namespace associated with the dataset that contains permissions for 88 * RLS.</p> 89 */ WithNamespace(Aws::String && value)90 inline RowLevelPermissionDataSet& WithNamespace(Aws::String&& value) { SetNamespace(std::move(value)); return *this;} 91 92 /** 93 * <p>The namespace associated with the dataset that contains permissions for 94 * RLS.</p> 95 */ WithNamespace(const char * value)96 inline RowLevelPermissionDataSet& WithNamespace(const char* value) { SetNamespace(value); return *this;} 97 98 99 /** 100 * <p>The Amazon Resource Name (ARN) of the dataset that contains permissions for 101 * RLS.</p> 102 */ GetArn()103 inline const Aws::String& GetArn() const{ return m_arn; } 104 105 /** 106 * <p>The Amazon Resource Name (ARN) of the dataset that contains permissions for 107 * RLS.</p> 108 */ ArnHasBeenSet()109 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; } 110 111 /** 112 * <p>The Amazon Resource Name (ARN) of the dataset that contains permissions for 113 * RLS.</p> 114 */ SetArn(const Aws::String & value)115 inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; } 116 117 /** 118 * <p>The Amazon Resource Name (ARN) of the dataset that contains permissions for 119 * RLS.</p> 120 */ SetArn(Aws::String && value)121 inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = std::move(value); } 122 123 /** 124 * <p>The Amazon Resource Name (ARN) of the dataset that contains permissions for 125 * RLS.</p> 126 */ SetArn(const char * value)127 inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); } 128 129 /** 130 * <p>The Amazon Resource Name (ARN) of the dataset that contains permissions for 131 * RLS.</p> 132 */ WithArn(const Aws::String & value)133 inline RowLevelPermissionDataSet& WithArn(const Aws::String& value) { SetArn(value); return *this;} 134 135 /** 136 * <p>The Amazon Resource Name (ARN) of the dataset that contains permissions for 137 * RLS.</p> 138 */ WithArn(Aws::String && value)139 inline RowLevelPermissionDataSet& WithArn(Aws::String&& value) { SetArn(std::move(value)); return *this;} 140 141 /** 142 * <p>The Amazon Resource Name (ARN) of the dataset that contains permissions for 143 * RLS.</p> 144 */ WithArn(const char * value)145 inline RowLevelPermissionDataSet& WithArn(const char* value) { SetArn(value); return *this;} 146 147 148 /** 149 * <p>The type of permissions to use when interpreting the permissions for RLS. 150 * <code>DENY_ACCESS</code> is included for backward compatibility only.</p> 151 */ GetPermissionPolicy()152 inline const RowLevelPermissionPolicy& GetPermissionPolicy() const{ return m_permissionPolicy; } 153 154 /** 155 * <p>The type of permissions to use when interpreting the permissions for RLS. 156 * <code>DENY_ACCESS</code> is included for backward compatibility only.</p> 157 */ PermissionPolicyHasBeenSet()158 inline bool PermissionPolicyHasBeenSet() const { return m_permissionPolicyHasBeenSet; } 159 160 /** 161 * <p>The type of permissions to use when interpreting the permissions for RLS. 162 * <code>DENY_ACCESS</code> is included for backward compatibility only.</p> 163 */ SetPermissionPolicy(const RowLevelPermissionPolicy & value)164 inline void SetPermissionPolicy(const RowLevelPermissionPolicy& value) { m_permissionPolicyHasBeenSet = true; m_permissionPolicy = value; } 165 166 /** 167 * <p>The type of permissions to use when interpreting the permissions for RLS. 168 * <code>DENY_ACCESS</code> is included for backward compatibility only.</p> 169 */ SetPermissionPolicy(RowLevelPermissionPolicy && value)170 inline void SetPermissionPolicy(RowLevelPermissionPolicy&& value) { m_permissionPolicyHasBeenSet = true; m_permissionPolicy = std::move(value); } 171 172 /** 173 * <p>The type of permissions to use when interpreting the permissions for RLS. 174 * <code>DENY_ACCESS</code> is included for backward compatibility only.</p> 175 */ WithPermissionPolicy(const RowLevelPermissionPolicy & value)176 inline RowLevelPermissionDataSet& WithPermissionPolicy(const RowLevelPermissionPolicy& value) { SetPermissionPolicy(value); return *this;} 177 178 /** 179 * <p>The type of permissions to use when interpreting the permissions for RLS. 180 * <code>DENY_ACCESS</code> is included for backward compatibility only.</p> 181 */ WithPermissionPolicy(RowLevelPermissionPolicy && value)182 inline RowLevelPermissionDataSet& WithPermissionPolicy(RowLevelPermissionPolicy&& value) { SetPermissionPolicy(std::move(value)); return *this;} 183 184 185 /** 186 * <p>The user or group rules associated with the dataset that contains permissions 187 * for RLS.</p> <p>By default, <code>FormatVersion</code> is 188 * <code>VERSION_1</code>. When <code>FormatVersion</code> is 189 * <code>VERSION_1</code>, <code>UserName</code> and <code>GroupName</code> are 190 * required. When <code>FormatVersion</code> is <code>VERSION_2</code>, 191 * <code>UserARN</code> and <code>GroupARN</code> are required, and 192 * <code>Namespace</code> must not exist.</p> 193 */ GetFormatVersion()194 inline const RowLevelPermissionFormatVersion& GetFormatVersion() const{ return m_formatVersion; } 195 196 /** 197 * <p>The user or group rules associated with the dataset that contains permissions 198 * for RLS.</p> <p>By default, <code>FormatVersion</code> is 199 * <code>VERSION_1</code>. When <code>FormatVersion</code> is 200 * <code>VERSION_1</code>, <code>UserName</code> and <code>GroupName</code> are 201 * required. When <code>FormatVersion</code> is <code>VERSION_2</code>, 202 * <code>UserARN</code> and <code>GroupARN</code> are required, and 203 * <code>Namespace</code> must not exist.</p> 204 */ FormatVersionHasBeenSet()205 inline bool FormatVersionHasBeenSet() const { return m_formatVersionHasBeenSet; } 206 207 /** 208 * <p>The user or group rules associated with the dataset that contains permissions 209 * for RLS.</p> <p>By default, <code>FormatVersion</code> is 210 * <code>VERSION_1</code>. When <code>FormatVersion</code> is 211 * <code>VERSION_1</code>, <code>UserName</code> and <code>GroupName</code> are 212 * required. When <code>FormatVersion</code> is <code>VERSION_2</code>, 213 * <code>UserARN</code> and <code>GroupARN</code> are required, and 214 * <code>Namespace</code> must not exist.</p> 215 */ SetFormatVersion(const RowLevelPermissionFormatVersion & value)216 inline void SetFormatVersion(const RowLevelPermissionFormatVersion& value) { m_formatVersionHasBeenSet = true; m_formatVersion = value; } 217 218 /** 219 * <p>The user or group rules associated with the dataset that contains permissions 220 * for RLS.</p> <p>By default, <code>FormatVersion</code> is 221 * <code>VERSION_1</code>. When <code>FormatVersion</code> is 222 * <code>VERSION_1</code>, <code>UserName</code> and <code>GroupName</code> are 223 * required. When <code>FormatVersion</code> is <code>VERSION_2</code>, 224 * <code>UserARN</code> and <code>GroupARN</code> are required, and 225 * <code>Namespace</code> must not exist.</p> 226 */ SetFormatVersion(RowLevelPermissionFormatVersion && value)227 inline void SetFormatVersion(RowLevelPermissionFormatVersion&& value) { m_formatVersionHasBeenSet = true; m_formatVersion = std::move(value); } 228 229 /** 230 * <p>The user or group rules associated with the dataset that contains permissions 231 * for RLS.</p> <p>By default, <code>FormatVersion</code> is 232 * <code>VERSION_1</code>. When <code>FormatVersion</code> is 233 * <code>VERSION_1</code>, <code>UserName</code> and <code>GroupName</code> are 234 * required. When <code>FormatVersion</code> is <code>VERSION_2</code>, 235 * <code>UserARN</code> and <code>GroupARN</code> are required, and 236 * <code>Namespace</code> must not exist.</p> 237 */ WithFormatVersion(const RowLevelPermissionFormatVersion & value)238 inline RowLevelPermissionDataSet& WithFormatVersion(const RowLevelPermissionFormatVersion& value) { SetFormatVersion(value); return *this;} 239 240 /** 241 * <p>The user or group rules associated with the dataset that contains permissions 242 * for RLS.</p> <p>By default, <code>FormatVersion</code> is 243 * <code>VERSION_1</code>. When <code>FormatVersion</code> is 244 * <code>VERSION_1</code>, <code>UserName</code> and <code>GroupName</code> are 245 * required. When <code>FormatVersion</code> is <code>VERSION_2</code>, 246 * <code>UserARN</code> and <code>GroupARN</code> are required, and 247 * <code>Namespace</code> must not exist.</p> 248 */ WithFormatVersion(RowLevelPermissionFormatVersion && value)249 inline RowLevelPermissionDataSet& WithFormatVersion(RowLevelPermissionFormatVersion&& value) { SetFormatVersion(std::move(value)); return *this;} 250 251 252 /** 253 * <p>The status of the row-level security permission dataset. If enabled, the 254 * status is <code>ENABLED</code>. If disabled, the status is 255 * <code>DISABLED</code>.</p> 256 */ GetStatus()257 inline const Status& GetStatus() const{ return m_status; } 258 259 /** 260 * <p>The status of the row-level security permission dataset. If enabled, the 261 * status is <code>ENABLED</code>. If disabled, the status is 262 * <code>DISABLED</code>.</p> 263 */ StatusHasBeenSet()264 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } 265 266 /** 267 * <p>The status of the row-level security permission dataset. If enabled, the 268 * status is <code>ENABLED</code>. If disabled, the status is 269 * <code>DISABLED</code>.</p> 270 */ SetStatus(const Status & value)271 inline void SetStatus(const Status& value) { m_statusHasBeenSet = true; m_status = value; } 272 273 /** 274 * <p>The status of the row-level security permission dataset. If enabled, the 275 * status is <code>ENABLED</code>. If disabled, the status is 276 * <code>DISABLED</code>.</p> 277 */ SetStatus(Status && value)278 inline void SetStatus(Status&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } 279 280 /** 281 * <p>The status of the row-level security permission dataset. If enabled, the 282 * status is <code>ENABLED</code>. If disabled, the status is 283 * <code>DISABLED</code>.</p> 284 */ WithStatus(const Status & value)285 inline RowLevelPermissionDataSet& WithStatus(const Status& value) { SetStatus(value); return *this;} 286 287 /** 288 * <p>The status of the row-level security permission dataset. If enabled, the 289 * status is <code>ENABLED</code>. If disabled, the status is 290 * <code>DISABLED</code>.</p> 291 */ WithStatus(Status && value)292 inline RowLevelPermissionDataSet& WithStatus(Status&& value) { SetStatus(std::move(value)); return *this;} 293 294 private: 295 296 Aws::String m_namespace; 297 bool m_namespaceHasBeenSet; 298 299 Aws::String m_arn; 300 bool m_arnHasBeenSet; 301 302 RowLevelPermissionPolicy m_permissionPolicy; 303 bool m_permissionPolicyHasBeenSet; 304 305 RowLevelPermissionFormatVersion m_formatVersion; 306 bool m_formatVersionHasBeenSet; 307 308 Status m_status; 309 bool m_statusHasBeenSet; 310 }; 311 312 } // namespace Model 313 } // namespace QuickSight 314 } // namespace Aws 315