/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include Contains the cross-origin resource sharing (CORS) configuration for the API.
* CORS is only supported for HTTP APIs.See Also:
AWS
* API Reference
The allowed origins for CORS requests.
*/ inline const Aws::VectorThe allowed origins for CORS requests.
*/ inline bool AllowOriginsHasBeenSet() const { return m_allowOriginsHasBeenSet; } /** *The allowed origins for CORS requests.
*/ inline void SetAllowOrigins(const Aws::VectorThe allowed origins for CORS requests.
*/ inline void SetAllowOrigins(Aws::VectorThe allowed origins for CORS requests.
*/ inline AwsCorsConfiguration& WithAllowOrigins(const Aws::VectorThe allowed origins for CORS requests.
*/ inline AwsCorsConfiguration& WithAllowOrigins(Aws::VectorThe allowed origins for CORS requests.
*/ inline AwsCorsConfiguration& AddAllowOrigins(const Aws::String& value) { m_allowOriginsHasBeenSet = true; m_allowOrigins.push_back(value); return *this; } /** *The allowed origins for CORS requests.
*/ inline AwsCorsConfiguration& AddAllowOrigins(Aws::String&& value) { m_allowOriginsHasBeenSet = true; m_allowOrigins.push_back(std::move(value)); return *this; } /** *The allowed origins for CORS requests.
*/ inline AwsCorsConfiguration& AddAllowOrigins(const char* value) { m_allowOriginsHasBeenSet = true; m_allowOrigins.push_back(value); return *this; } /** *Indicates whether the CORS request includes credentials.
*/ inline bool GetAllowCredentials() const{ return m_allowCredentials; } /** *Indicates whether the CORS request includes credentials.
*/ inline bool AllowCredentialsHasBeenSet() const { return m_allowCredentialsHasBeenSet; } /** *Indicates whether the CORS request includes credentials.
*/ inline void SetAllowCredentials(bool value) { m_allowCredentialsHasBeenSet = true; m_allowCredentials = value; } /** *Indicates whether the CORS request includes credentials.
*/ inline AwsCorsConfiguration& WithAllowCredentials(bool value) { SetAllowCredentials(value); return *this;} /** *The exposed headers for CORS requests.
*/ inline const Aws::VectorThe exposed headers for CORS requests.
*/ inline bool ExposeHeadersHasBeenSet() const { return m_exposeHeadersHasBeenSet; } /** *The exposed headers for CORS requests.
*/ inline void SetExposeHeaders(const Aws::VectorThe exposed headers for CORS requests.
*/ inline void SetExposeHeaders(Aws::VectorThe exposed headers for CORS requests.
*/ inline AwsCorsConfiguration& WithExposeHeaders(const Aws::VectorThe exposed headers for CORS requests.
*/ inline AwsCorsConfiguration& WithExposeHeaders(Aws::VectorThe exposed headers for CORS requests.
*/ inline AwsCorsConfiguration& AddExposeHeaders(const Aws::String& value) { m_exposeHeadersHasBeenSet = true; m_exposeHeaders.push_back(value); return *this; } /** *The exposed headers for CORS requests.
*/ inline AwsCorsConfiguration& AddExposeHeaders(Aws::String&& value) { m_exposeHeadersHasBeenSet = true; m_exposeHeaders.push_back(std::move(value)); return *this; } /** *The exposed headers for CORS requests.
*/ inline AwsCorsConfiguration& AddExposeHeaders(const char* value) { m_exposeHeadersHasBeenSet = true; m_exposeHeaders.push_back(value); return *this; } /** *The number of seconds for which the browser caches preflight request * results.
*/ inline int GetMaxAge() const{ return m_maxAge; } /** *The number of seconds for which the browser caches preflight request * results.
*/ inline bool MaxAgeHasBeenSet() const { return m_maxAgeHasBeenSet; } /** *The number of seconds for which the browser caches preflight request * results.
*/ inline void SetMaxAge(int value) { m_maxAgeHasBeenSet = true; m_maxAge = value; } /** *The number of seconds for which the browser caches preflight request * results.
*/ inline AwsCorsConfiguration& WithMaxAge(int value) { SetMaxAge(value); return *this;} /** *The allowed methods for CORS requests.
*/ inline const Aws::VectorThe allowed methods for CORS requests.
*/ inline bool AllowMethodsHasBeenSet() const { return m_allowMethodsHasBeenSet; } /** *The allowed methods for CORS requests.
*/ inline void SetAllowMethods(const Aws::VectorThe allowed methods for CORS requests.
*/ inline void SetAllowMethods(Aws::VectorThe allowed methods for CORS requests.
*/ inline AwsCorsConfiguration& WithAllowMethods(const Aws::VectorThe allowed methods for CORS requests.
*/ inline AwsCorsConfiguration& WithAllowMethods(Aws::VectorThe allowed methods for CORS requests.
*/ inline AwsCorsConfiguration& AddAllowMethods(const Aws::String& value) { m_allowMethodsHasBeenSet = true; m_allowMethods.push_back(value); return *this; } /** *The allowed methods for CORS requests.
*/ inline AwsCorsConfiguration& AddAllowMethods(Aws::String&& value) { m_allowMethodsHasBeenSet = true; m_allowMethods.push_back(std::move(value)); return *this; } /** *The allowed methods for CORS requests.
*/ inline AwsCorsConfiguration& AddAllowMethods(const char* value) { m_allowMethodsHasBeenSet = true; m_allowMethods.push_back(value); return *this; } /** *The allowed headers for CORS requests.
*/ inline const Aws::VectorThe allowed headers for CORS requests.
*/ inline bool AllowHeadersHasBeenSet() const { return m_allowHeadersHasBeenSet; } /** *The allowed headers for CORS requests.
*/ inline void SetAllowHeaders(const Aws::VectorThe allowed headers for CORS requests.
*/ inline void SetAllowHeaders(Aws::VectorThe allowed headers for CORS requests.
*/ inline AwsCorsConfiguration& WithAllowHeaders(const Aws::VectorThe allowed headers for CORS requests.
*/ inline AwsCorsConfiguration& WithAllowHeaders(Aws::VectorThe allowed headers for CORS requests.
*/ inline AwsCorsConfiguration& AddAllowHeaders(const Aws::String& value) { m_allowHeadersHasBeenSet = true; m_allowHeaders.push_back(value); return *this; } /** *The allowed headers for CORS requests.
*/ inline AwsCorsConfiguration& AddAllowHeaders(Aws::String&& value) { m_allowHeadersHasBeenSet = true; m_allowHeaders.push_back(std::move(value)); return *this; } /** *The allowed headers for CORS requests.
*/ inline AwsCorsConfiguration& AddAllowHeaders(const char* value) { m_allowHeadersHasBeenSet = true; m_allowHeaders.push_back(value); return *this; } private: Aws::Vector