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/amplifybackend/AmplifyBackend_EXPORTS.h> 8 #include <aws/amplifybackend/model/AuthResources.h> 9 #include <aws/amplifybackend/model/CreateBackendAuthIdentityPoolConfig.h> 10 #include <aws/amplifybackend/model/Service.h> 11 #include <aws/amplifybackend/model/CreateBackendAuthUserPoolConfig.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 AmplifyBackend 25 { 26 namespace Model 27 { 28 29 /** 30 * <p>Defines the resource configuration when creating an auth resource in your 31 * Amplify project.</p><p><h3>See Also:</h3> <a 32 * href="http://docs.aws.amazon.com/goto/WebAPI/amplifybackend-2020-08-11/CreateBackendAuthResourceConfig">AWS 33 * API Reference</a></p> 34 */ 35 class AWS_AMPLIFYBACKEND_API CreateBackendAuthResourceConfig 36 { 37 public: 38 CreateBackendAuthResourceConfig(); 39 CreateBackendAuthResourceConfig(Aws::Utils::Json::JsonView jsonValue); 40 CreateBackendAuthResourceConfig& operator=(Aws::Utils::Json::JsonView jsonValue); 41 Aws::Utils::Json::JsonValue Jsonize() const; 42 43 44 /** 45 * <p>Defines whether you want to configure only authentication or both 46 * authentication and authorization settings.</p> 47 */ GetAuthResources()48 inline const AuthResources& GetAuthResources() const{ return m_authResources; } 49 50 /** 51 * <p>Defines whether you want to configure only authentication or both 52 * authentication and authorization settings.</p> 53 */ AuthResourcesHasBeenSet()54 inline bool AuthResourcesHasBeenSet() const { return m_authResourcesHasBeenSet; } 55 56 /** 57 * <p>Defines whether you want to configure only authentication or both 58 * authentication and authorization settings.</p> 59 */ SetAuthResources(const AuthResources & value)60 inline void SetAuthResources(const AuthResources& value) { m_authResourcesHasBeenSet = true; m_authResources = value; } 61 62 /** 63 * <p>Defines whether you want to configure only authentication or both 64 * authentication and authorization settings.</p> 65 */ SetAuthResources(AuthResources && value)66 inline void SetAuthResources(AuthResources&& value) { m_authResourcesHasBeenSet = true; m_authResources = std::move(value); } 67 68 /** 69 * <p>Defines whether you want to configure only authentication or both 70 * authentication and authorization settings.</p> 71 */ WithAuthResources(const AuthResources & value)72 inline CreateBackendAuthResourceConfig& WithAuthResources(const AuthResources& value) { SetAuthResources(value); return *this;} 73 74 /** 75 * <p>Defines whether you want to configure only authentication or both 76 * authentication and authorization settings.</p> 77 */ WithAuthResources(AuthResources && value)78 inline CreateBackendAuthResourceConfig& WithAuthResources(AuthResources&& value) { SetAuthResources(std::move(value)); return *this;} 79 80 81 /** 82 * <p>Describes the authorization configuration for the Amazon Cognito identity 83 * pool, provisioned as a part of your auth resource in the Amplify project.</p> 84 */ GetIdentityPoolConfigs()85 inline const CreateBackendAuthIdentityPoolConfig& GetIdentityPoolConfigs() const{ return m_identityPoolConfigs; } 86 87 /** 88 * <p>Describes the authorization configuration for the Amazon Cognito identity 89 * pool, provisioned as a part of your auth resource in the Amplify project.</p> 90 */ IdentityPoolConfigsHasBeenSet()91 inline bool IdentityPoolConfigsHasBeenSet() const { return m_identityPoolConfigsHasBeenSet; } 92 93 /** 94 * <p>Describes the authorization configuration for the Amazon Cognito identity 95 * pool, provisioned as a part of your auth resource in the Amplify project.</p> 96 */ SetIdentityPoolConfigs(const CreateBackendAuthIdentityPoolConfig & value)97 inline void SetIdentityPoolConfigs(const CreateBackendAuthIdentityPoolConfig& value) { m_identityPoolConfigsHasBeenSet = true; m_identityPoolConfigs = value; } 98 99 /** 100 * <p>Describes the authorization configuration for the Amazon Cognito identity 101 * pool, provisioned as a part of your auth resource in the Amplify project.</p> 102 */ SetIdentityPoolConfigs(CreateBackendAuthIdentityPoolConfig && value)103 inline void SetIdentityPoolConfigs(CreateBackendAuthIdentityPoolConfig&& value) { m_identityPoolConfigsHasBeenSet = true; m_identityPoolConfigs = std::move(value); } 104 105 /** 106 * <p>Describes the authorization configuration for the Amazon Cognito identity 107 * pool, provisioned as a part of your auth resource in the Amplify project.</p> 108 */ WithIdentityPoolConfigs(const CreateBackendAuthIdentityPoolConfig & value)109 inline CreateBackendAuthResourceConfig& WithIdentityPoolConfigs(const CreateBackendAuthIdentityPoolConfig& value) { SetIdentityPoolConfigs(value); return *this;} 110 111 /** 112 * <p>Describes the authorization configuration for the Amazon Cognito identity 113 * pool, provisioned as a part of your auth resource in the Amplify project.</p> 114 */ WithIdentityPoolConfigs(CreateBackendAuthIdentityPoolConfig && value)115 inline CreateBackendAuthResourceConfig& WithIdentityPoolConfigs(CreateBackendAuthIdentityPoolConfig&& value) { SetIdentityPoolConfigs(std::move(value)); return *this;} 116 117 118 /** 119 * <p>Defines the service name to use when configuring an authentication resource 120 * in your Amplify project.</p> 121 */ GetService()122 inline const Service& GetService() const{ return m_service; } 123 124 /** 125 * <p>Defines the service name to use when configuring an authentication resource 126 * in your Amplify project.</p> 127 */ ServiceHasBeenSet()128 inline bool ServiceHasBeenSet() const { return m_serviceHasBeenSet; } 129 130 /** 131 * <p>Defines the service name to use when configuring an authentication resource 132 * in your Amplify project.</p> 133 */ SetService(const Service & value)134 inline void SetService(const Service& value) { m_serviceHasBeenSet = true; m_service = value; } 135 136 /** 137 * <p>Defines the service name to use when configuring an authentication resource 138 * in your Amplify project.</p> 139 */ SetService(Service && value)140 inline void SetService(Service&& value) { m_serviceHasBeenSet = true; m_service = std::move(value); } 141 142 /** 143 * <p>Defines the service name to use when configuring an authentication resource 144 * in your Amplify project.</p> 145 */ WithService(const Service & value)146 inline CreateBackendAuthResourceConfig& WithService(const Service& value) { SetService(value); return *this;} 147 148 /** 149 * <p>Defines the service name to use when configuring an authentication resource 150 * in your Amplify project.</p> 151 */ WithService(Service && value)152 inline CreateBackendAuthResourceConfig& WithService(Service&& value) { SetService(std::move(value)); return *this;} 153 154 155 /** 156 * <p>Describes authentication configuration for the Amazon Cognito user pool, 157 * provisioned as a part of your auth resource in the Amplify project.</p> 158 */ GetUserPoolConfigs()159 inline const CreateBackendAuthUserPoolConfig& GetUserPoolConfigs() const{ return m_userPoolConfigs; } 160 161 /** 162 * <p>Describes authentication configuration for the Amazon Cognito user pool, 163 * provisioned as a part of your auth resource in the Amplify project.</p> 164 */ UserPoolConfigsHasBeenSet()165 inline bool UserPoolConfigsHasBeenSet() const { return m_userPoolConfigsHasBeenSet; } 166 167 /** 168 * <p>Describes authentication configuration for the Amazon Cognito user pool, 169 * provisioned as a part of your auth resource in the Amplify project.</p> 170 */ SetUserPoolConfigs(const CreateBackendAuthUserPoolConfig & value)171 inline void SetUserPoolConfigs(const CreateBackendAuthUserPoolConfig& value) { m_userPoolConfigsHasBeenSet = true; m_userPoolConfigs = value; } 172 173 /** 174 * <p>Describes authentication configuration for the Amazon Cognito user pool, 175 * provisioned as a part of your auth resource in the Amplify project.</p> 176 */ SetUserPoolConfigs(CreateBackendAuthUserPoolConfig && value)177 inline void SetUserPoolConfigs(CreateBackendAuthUserPoolConfig&& value) { m_userPoolConfigsHasBeenSet = true; m_userPoolConfigs = std::move(value); } 178 179 /** 180 * <p>Describes authentication configuration for the Amazon Cognito user pool, 181 * provisioned as a part of your auth resource in the Amplify project.</p> 182 */ WithUserPoolConfigs(const CreateBackendAuthUserPoolConfig & value)183 inline CreateBackendAuthResourceConfig& WithUserPoolConfigs(const CreateBackendAuthUserPoolConfig& value) { SetUserPoolConfigs(value); return *this;} 184 185 /** 186 * <p>Describes authentication configuration for the Amazon Cognito user pool, 187 * provisioned as a part of your auth resource in the Amplify project.</p> 188 */ WithUserPoolConfigs(CreateBackendAuthUserPoolConfig && value)189 inline CreateBackendAuthResourceConfig& WithUserPoolConfigs(CreateBackendAuthUserPoolConfig&& value) { SetUserPoolConfigs(std::move(value)); return *this;} 190 191 private: 192 193 AuthResources m_authResources; 194 bool m_authResourcesHasBeenSet; 195 196 CreateBackendAuthIdentityPoolConfig m_identityPoolConfigs; 197 bool m_identityPoolConfigsHasBeenSet; 198 199 Service m_service; 200 bool m_serviceHasBeenSet; 201 202 CreateBackendAuthUserPoolConfig m_userPoolConfigs; 203 bool m_userPoolConfigsHasBeenSet; 204 }; 205 206 } // namespace Model 207 } // namespace AmplifyBackend 208 } // namespace Aws 209