/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudfront-2020-05-31.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudFront.Model
{
///
/// A configuration for a set of HTTP response headers that are used for cross-origin
/// resource sharing (CORS). CloudFront adds these headers to HTTP responses that it sends
/// for CORS requests that match a cache behavior associated with this response headers
/// policy.
///
///
///
/// For more information about CORS, see Cross-Origin
/// Resource Sharing (CORS) in the MDN Web Docs.
///
///
public partial class ResponseHeadersPolicyCorsConfig
{
private bool? _accessControlAllowCredentials;
private ResponseHeadersPolicyAccessControlAllowHeaders _accessControlAllowHeaders;
private ResponseHeadersPolicyAccessControlAllowMethods _accessControlAllowMethods;
private ResponseHeadersPolicyAccessControlAllowOrigins _accessControlAllowOrigins;
private ResponseHeadersPolicyAccessControlExposeHeaders _accessControlExposeHeaders;
private int? _accessControlMaxAgeSec;
private bool? _originOverride;
///
/// Gets and sets the property AccessControlAllowCredentials.
///
/// A Boolean that CloudFront uses as the value for the Access-Control-Allow-Credentials
/// HTTP response header.
///
///
///
/// For more information about the Access-Control-Allow-Credentials
HTTP
/// response header, see Access-Control-Allow-Credentials
/// in the MDN Web Docs.
///
///
[AWSProperty(Required=true)]
public bool AccessControlAllowCredentials
{
get { return this._accessControlAllowCredentials.GetValueOrDefault(); }
set { this._accessControlAllowCredentials = value; }
}
// Check to see if AccessControlAllowCredentials property is set
internal bool IsSetAccessControlAllowCredentials()
{
return this._accessControlAllowCredentials.HasValue;
}
///
/// Gets and sets the property AccessControlAllowHeaders.
///
/// A list of HTTP header names that CloudFront includes as values for the Access-Control-Allow-Headers
/// HTTP response header.
///
///
///
/// For more information about the Access-Control-Allow-Headers
HTTP response
/// header, see Access-Control-Allow-Headers
/// in the MDN Web Docs.
///
///
[AWSProperty(Required=true)]
public ResponseHeadersPolicyAccessControlAllowHeaders AccessControlAllowHeaders
{
get { return this._accessControlAllowHeaders; }
set { this._accessControlAllowHeaders = value; }
}
// Check to see if AccessControlAllowHeaders property is set
internal bool IsSetAccessControlAllowHeaders()
{
return this._accessControlAllowHeaders != null;
}
///
/// Gets and sets the property AccessControlAllowMethods.
///
/// A list of HTTP methods that CloudFront includes as values for the Access-Control-Allow-Methods
/// HTTP response header.
///
///
///
/// For more information about the Access-Control-Allow-Methods
HTTP response
/// header, see Access-Control-Allow-Methods
/// in the MDN Web Docs.
///
///
[AWSProperty(Required=true)]
public ResponseHeadersPolicyAccessControlAllowMethods AccessControlAllowMethods
{
get { return this._accessControlAllowMethods; }
set { this._accessControlAllowMethods = value; }
}
// Check to see if AccessControlAllowMethods property is set
internal bool IsSetAccessControlAllowMethods()
{
return this._accessControlAllowMethods != null;
}
///
/// Gets and sets the property AccessControlAllowOrigins.
///
/// A list of origins (domain names) that CloudFront can use as the value for the Access-Control-Allow-Origin
/// HTTP response header.
///
///
///
/// For more information about the Access-Control-Allow-Origin
HTTP response
/// header, see Access-Control-Allow-Origin
/// in the MDN Web Docs.
///
///
[AWSProperty(Required=true)]
public ResponseHeadersPolicyAccessControlAllowOrigins AccessControlAllowOrigins
{
get { return this._accessControlAllowOrigins; }
set { this._accessControlAllowOrigins = value; }
}
// Check to see if AccessControlAllowOrigins property is set
internal bool IsSetAccessControlAllowOrigins()
{
return this._accessControlAllowOrigins != null;
}
///
/// Gets and sets the property AccessControlExposeHeaders.
///
/// A list of HTTP headers that CloudFront includes as values for the Access-Control-Expose-Headers
/// HTTP response header.
///
///
///
/// For more information about the Access-Control-Expose-Headers
HTTP response
/// header, see Access-Control-Expose-Headers
/// in the MDN Web Docs.
///
///
public ResponseHeadersPolicyAccessControlExposeHeaders AccessControlExposeHeaders
{
get { return this._accessControlExposeHeaders; }
set { this._accessControlExposeHeaders = value; }
}
// Check to see if AccessControlExposeHeaders property is set
internal bool IsSetAccessControlExposeHeaders()
{
return this._accessControlExposeHeaders != null;
}
///
/// Gets and sets the property AccessControlMaxAgeSec.
///
/// A number that CloudFront uses as the value for the Access-Control-Max-Age
/// HTTP response header.
///
///
///
/// For more information about the Access-Control-Max-Age
HTTP response header,
/// see Access-Control-Max-Age
/// in the MDN Web Docs.
///
///
public int AccessControlMaxAgeSec
{
get { return this._accessControlMaxAgeSec.GetValueOrDefault(); }
set { this._accessControlMaxAgeSec = value; }
}
// Check to see if AccessControlMaxAgeSec property is set
internal bool IsSetAccessControlMaxAgeSec()
{
return this._accessControlMaxAgeSec.HasValue;
}
///
/// Gets and sets the property OriginOverride.
///
/// A Boolean that determines whether CloudFront overrides HTTP response headers received
/// from the origin with the ones specified in this response headers policy.
///
///
[AWSProperty(Required=true)]
public bool OriginOverride
{
get { return this._originOverride.GetValueOrDefault(); }
set { this._originOverride = value; }
}
// Check to see if OriginOverride property is set
internal bool IsSetOriginOverride()
{
return this._originOverride.HasValue;
}
}
}