/*
* 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 securityhub-2018-10-26.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.SecurityHub.Model
{
///
/// Contains the cross-origin resource sharing (CORS) configuration for the API. CORS
/// is only supported for HTTP APIs.
///
public partial class AwsCorsConfiguration
{
private bool? _allowCredentials;
private List _allowHeaders = new List();
private List _allowMethods = new List();
private List _allowOrigins = new List();
private List _exposeHeaders = new List();
private int? _maxAge;
///
/// Gets and sets the property AllowCredentials.
///
/// Indicates whether the CORS request includes credentials.
///
///
public bool AllowCredentials
{
get { return this._allowCredentials.GetValueOrDefault(); }
set { this._allowCredentials = value; }
}
// Check to see if AllowCredentials property is set
internal bool IsSetAllowCredentials()
{
return this._allowCredentials.HasValue;
}
///
/// Gets and sets the property AllowHeaders.
///
/// The allowed headers for CORS requests.
///
///
public List AllowHeaders
{
get { return this._allowHeaders; }
set { this._allowHeaders = value; }
}
// Check to see if AllowHeaders property is set
internal bool IsSetAllowHeaders()
{
return this._allowHeaders != null && this._allowHeaders.Count > 0;
}
///
/// Gets and sets the property AllowMethods.
///
/// The allowed methods for CORS requests.
///
///
public List AllowMethods
{
get { return this._allowMethods; }
set { this._allowMethods = value; }
}
// Check to see if AllowMethods property is set
internal bool IsSetAllowMethods()
{
return this._allowMethods != null && this._allowMethods.Count > 0;
}
///
/// Gets and sets the property AllowOrigins.
///
/// The allowed origins for CORS requests.
///
///
public List AllowOrigins
{
get { return this._allowOrigins; }
set { this._allowOrigins = value; }
}
// Check to see if AllowOrigins property is set
internal bool IsSetAllowOrigins()
{
return this._allowOrigins != null && this._allowOrigins.Count > 0;
}
///
/// Gets and sets the property ExposeHeaders.
///
/// The exposed headers for CORS requests.
///
///
public List ExposeHeaders
{
get { return this._exposeHeaders; }
set { this._exposeHeaders = value; }
}
// Check to see if ExposeHeaders property is set
internal bool IsSetExposeHeaders()
{
return this._exposeHeaders != null && this._exposeHeaders.Count > 0;
}
///
/// Gets and sets the property MaxAge.
///
/// The number of seconds for which the browser caches preflight request results.
///
///
public int MaxAge
{
get { return this._maxAge.GetValueOrDefault(); }
set { this._maxAge = value; }
}
// Check to see if MaxAge property is set
internal bool IsSetMaxAge()
{
return this._maxAge.HasValue;
}
}
}