import * as core from "@terrascript/core";

export interface ServerTimingHeadersConfigArgs extends core.SchemaArgs {
  enabled: boolean | core.BooleanOut;

  samplingRate: number | core.NumberOut;
}

export class ServerTimingHeadersConfig extends core.Schema<ServerTimingHeadersConfigArgs> {
  @core.attr(Boolean)
  public enabled!: boolean | core.BooleanOut;

  @core.attr(Number)
  public samplingRate!: number | core.NumberOut;
}

export interface AccessControlAllowHeadersArgs extends core.SchemaArgs {
  items?: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export class AccessControlAllowHeaders extends core.Schema<AccessControlAllowHeadersArgs> {
  @core.attr(String, { kind: "array" })
  public items?: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export interface AccessControlAllowMethodsArgs extends core.SchemaArgs {
  items?: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export class AccessControlAllowMethods extends core.Schema<AccessControlAllowMethodsArgs> {
  @core.attr(String, { kind: "array" })
  public items?: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export interface AccessControlAllowOriginsArgs extends core.SchemaArgs {
  items?: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export class AccessControlAllowOrigins extends core.Schema<AccessControlAllowOriginsArgs> {
  @core.attr(String, { kind: "array" })
  public items?: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export interface AccessControlExposeHeadersArgs extends core.SchemaArgs {
  items?: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export class AccessControlExposeHeaders extends core.Schema<AccessControlExposeHeadersArgs> {
  @core.attr(String, { kind: "array" })
  public items?: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export interface CorsConfigArgs extends core.SchemaArgs {
  accessControlAllowCredentials: boolean | core.BooleanOut;

  accessControlAllowHeaders: AccessControlAllowHeaders;

  accessControlAllowMethods: AccessControlAllowMethods;

  accessControlAllowOrigins: AccessControlAllowOrigins;

  accessControlExposeHeaders?: AccessControlExposeHeaders;

  accessControlMaxAgeSec?: number | core.NumberOut;

  originOverride: boolean | core.BooleanOut;
}

export class CorsConfig extends core.Schema<CorsConfigArgs> {
  @core.attr(Boolean)
  public accessControlAllowCredentials!: boolean | core.BooleanOut;

  @core.attr(AccessControlAllowHeaders)
  public accessControlAllowHeaders!: AccessControlAllowHeaders;

  @core.attr(AccessControlAllowMethods)
  public accessControlAllowMethods!: AccessControlAllowMethods;

  @core.attr(AccessControlAllowOrigins)
  public accessControlAllowOrigins!: AccessControlAllowOrigins;

  @core.attr(AccessControlExposeHeaders)
  public accessControlExposeHeaders?: AccessControlExposeHeaders;

  @core.attr(Number)
  public accessControlMaxAgeSec?: number | core.NumberOut;

  @core.attr(Boolean)
  public originOverride!: boolean | core.BooleanOut;
}

export interface ItemsArgs extends core.SchemaArgs {
  header: string | core.StringOut;

  override: boolean | core.BooleanOut;

  value: string | core.StringOut;
}

export class Items extends core.Schema<ItemsArgs> {
  @core.attr(String)
  public header!: string | core.StringOut;

  @core.attr(Boolean)
  public override!: boolean | core.BooleanOut;

  @core.attr(String)
  public value!: string | core.StringOut;
}

export interface CustomHeadersConfigArgs extends core.SchemaArgs {
  items?: core.Array<Items> | core.ArrayOut<Items>;
}

export class CustomHeadersConfig extends core.Schema<CustomHeadersConfigArgs> {
  @core.attr(Items, { kind: "array" })
  public items?: core.Array<Items> | core.ArrayOut<Items>;
}

export interface ReferrerPolicyArgs extends core.SchemaArgs {
  override: boolean | core.BooleanOut;

  referrerPolicy: string | core.StringOut;
}

export class ReferrerPolicy extends core.Schema<ReferrerPolicyArgs> {
  @core.attr(Boolean)
  public override!: boolean | core.BooleanOut;

  @core.attr(String)
  public referrerPolicy!: string | core.StringOut;
}

export interface StrictTransportSecurityArgs extends core.SchemaArgs {
  accessControlMaxAgeSec: number | core.NumberOut;

  includeSubdomains?: boolean | core.BooleanOut;

  override: boolean | core.BooleanOut;

  preload?: boolean | core.BooleanOut;
}

export class StrictTransportSecurity extends core.Schema<StrictTransportSecurityArgs> {
  @core.attr(Number)
  public accessControlMaxAgeSec!: number | core.NumberOut;

  @core.attr(Boolean)
  public includeSubdomains?: boolean | core.BooleanOut;

  @core.attr(Boolean)
  public override!: boolean | core.BooleanOut;

  @core.attr(Boolean)
  public preload?: boolean | core.BooleanOut;
}

export interface XssProtectionArgs extends core.SchemaArgs {
  modeBlock?: boolean | core.BooleanOut;

  override: boolean | core.BooleanOut;

  protection: boolean | core.BooleanOut;

  reportUri?: string | core.StringOut;
}

export class XssProtection extends core.Schema<XssProtectionArgs> {
  @core.attr(Boolean)
  public modeBlock?: boolean | core.BooleanOut;

  @core.attr(Boolean)
  public override!: boolean | core.BooleanOut;

  @core.attr(Boolean)
  public protection!: boolean | core.BooleanOut;

  @core.attr(String)
  public reportUri?: string | core.StringOut;
}

export interface ContentSecurityPolicyArgs extends core.SchemaArgs {
  contentSecurityPolicy: string | core.StringOut;

  override: boolean | core.BooleanOut;
}

export class ContentSecurityPolicy extends core.Schema<ContentSecurityPolicyArgs> {
  @core.attr(String)
  public contentSecurityPolicy!: string | core.StringOut;

  @core.attr(Boolean)
  public override!: boolean | core.BooleanOut;
}

export interface ContentTypeOptionsArgs extends core.SchemaArgs {
  override: boolean | core.BooleanOut;
}

export class ContentTypeOptions extends core.Schema<ContentTypeOptionsArgs> {
  @core.attr(Boolean)
  public override!: boolean | core.BooleanOut;
}

export interface FrameOptionsArgs extends core.SchemaArgs {
  frameOption: string | core.StringOut;

  override: boolean | core.BooleanOut;
}

export class FrameOptions extends core.Schema<FrameOptionsArgs> {
  @core.attr(String)
  public frameOption!: string | core.StringOut;

  @core.attr(Boolean)
  public override!: boolean | core.BooleanOut;
}

export interface SecurityHeadersConfigArgs extends core.SchemaArgs {
  contentSecurityPolicy?: ContentSecurityPolicy;

  contentTypeOptions?: ContentTypeOptions;

  frameOptions?: FrameOptions;

  referrerPolicy?: ReferrerPolicy;

  strictTransportSecurity?: StrictTransportSecurity;

  xssProtection?: XssProtection;
}

export class SecurityHeadersConfig extends core.Schema<SecurityHeadersConfigArgs> {
  @core.attr(ContentSecurityPolicy)
  public contentSecurityPolicy?: ContentSecurityPolicy;

  @core.attr(ContentTypeOptions)
  public contentTypeOptions?: ContentTypeOptions;

  @core.attr(FrameOptions)
  public frameOptions?: FrameOptions;

  @core.attr(ReferrerPolicy)
  public referrerPolicy?: ReferrerPolicy;

  @core.attr(StrictTransportSecurity)
  public strictTransportSecurity?: StrictTransportSecurity;

  @core.attr(XssProtection)
  public xssProtection?: XssProtection;
}

export interface ResponseHeadersPolicyArgs extends core.ResourceArgs {
  comment?: string | core.StringOut;

  corsConfig?: CorsConfig;

  customHeadersConfig?: CustomHeadersConfig;

  etag?: string | core.StringOut;

  name: string | core.StringOut;

  securityHeadersConfig?: SecurityHeadersConfig;

  serverTimingHeadersConfig?: ServerTimingHeadersConfig;
}

export class ResponseHeadersPolicy extends core.Resource<ResponseHeadersPolicyArgs> {
  @core.attr(String)
  public comment?: string | core.StringOut;

  @core.attr(CorsConfig)
  public corsConfig?: CorsConfig;

  @core.attr(CustomHeadersConfig)
  public customHeadersConfig?: CustomHeadersConfig;

  @core.attr(String, { computed: true })
  public etag?: string | core.StringOut;

  @core.attr(String, { computed: true })
  public id!: string | core.StringOut;

  @core.attr(String)
  public name!: string | core.StringOut;

  @core.attr(SecurityHeadersConfig)
  public securityHeadersConfig?: SecurityHeadersConfig;

  @core.attr(ServerTimingHeadersConfig)
  public serverTimingHeadersConfig?: ServerTimingHeadersConfig;

  constructor(name: string, args?: ResponseHeadersPolicyArgs) {
    super(name, "aws_cloudfront_response_headers_policy", args);
  }

  public override getNamespace(): string {
    return "aws_cloudfront";
  }
}
