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, { computed: true })
  public enabled!: boolean | core.BooleanOut;

  @core.attr(Number, { computed: true })
  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, { computed: true, 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, { computed: true, 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, { computed: true, 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, { computed: true, kind: "array" })
  public items!: core.Array<string> | core.ArrayOut<core.StringOut>;
}

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

  accessControlAllowHeaders:
    | core.Array<AccessControlAllowHeaders>
    | core.ArrayOut<AccessControlAllowHeaders>;

  accessControlAllowMethods:
    | core.Array<AccessControlAllowMethods>
    | core.ArrayOut<AccessControlAllowMethods>;

  accessControlAllowOrigins:
    | core.Array<AccessControlAllowOrigins>
    | core.ArrayOut<AccessControlAllowOrigins>;

  accessControlExposeHeaders:
    | core.Array<AccessControlExposeHeaders>
    | core.ArrayOut<AccessControlExposeHeaders>;

  accessControlMaxAgeSec: number | core.NumberOut;

  originOverride: boolean | core.BooleanOut;
}

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

  @core.attr(AccessControlAllowHeaders, { computed: true, kind: "array" })
  public accessControlAllowHeaders!:
    | core.Array<AccessControlAllowHeaders>
    | core.ArrayOut<AccessControlAllowHeaders>;

  @core.attr(AccessControlAllowMethods, { computed: true, kind: "array" })
  public accessControlAllowMethods!:
    | core.Array<AccessControlAllowMethods>
    | core.ArrayOut<AccessControlAllowMethods>;

  @core.attr(AccessControlAllowOrigins, { computed: true, kind: "array" })
  public accessControlAllowOrigins!:
    | core.Array<AccessControlAllowOrigins>
    | core.ArrayOut<AccessControlAllowOrigins>;

  @core.attr(AccessControlExposeHeaders, { computed: true, kind: "array" })
  public accessControlExposeHeaders!:
    | core.Array<AccessControlExposeHeaders>
    | core.ArrayOut<AccessControlExposeHeaders>;

  @core.attr(Number, { computed: true })
  public accessControlMaxAgeSec!: number | core.NumberOut;

  @core.attr(Boolean, { computed: true })
  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, { computed: true })
  public header!: string | core.StringOut;

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

  @core.attr(String, { computed: true })
  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, { computed: true, kind: "array" })
  public items!: core.Array<Items> | core.ArrayOut<Items>;
}

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, { computed: true })
  public modeBlock!: boolean | core.BooleanOut;

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

  @core.attr(Boolean, { computed: true })
  public protection!: boolean | core.BooleanOut;

  @core.attr(String, { computed: true })
  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, { computed: true })
  public contentSecurityPolicy!: string | core.StringOut;

  @core.attr(Boolean, { computed: true })
  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, { computed: true })
  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, { computed: true })
  public frameOption!: string | core.StringOut;

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

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

  referrerPolicy: string | core.StringOut;
}

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

  @core.attr(String, { computed: true })
  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, { computed: true })
  public accessControlMaxAgeSec!: number | core.NumberOut;

  @core.attr(Boolean, { computed: true })
  public includeSubdomains!: boolean | core.BooleanOut;

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

  @core.attr(Boolean, { computed: true })
  public preload!: boolean | core.BooleanOut;
}

export interface SecurityHeadersConfigArgs extends core.SchemaArgs {
  contentSecurityPolicy:
    | core.Array<ContentSecurityPolicy>
    | core.ArrayOut<ContentSecurityPolicy>;

  contentTypeOptions:
    | core.Array<ContentTypeOptions>
    | core.ArrayOut<ContentTypeOptions>;

  frameOptions: core.Array<FrameOptions> | core.ArrayOut<FrameOptions>;

  referrerPolicy: core.Array<ReferrerPolicy> | core.ArrayOut<ReferrerPolicy>;

  strictTransportSecurity:
    | core.Array<StrictTransportSecurity>
    | core.ArrayOut<StrictTransportSecurity>;

  xssProtection: core.Array<XssProtection> | core.ArrayOut<XssProtection>;
}

export class SecurityHeadersConfig extends core.Schema<SecurityHeadersConfigArgs> {
  @core.attr(ContentSecurityPolicy, { computed: true, kind: "array" })
  public contentSecurityPolicy!:
    | core.Array<ContentSecurityPolicy>
    | core.ArrayOut<ContentSecurityPolicy>;

  @core.attr(ContentTypeOptions, { computed: true, kind: "array" })
  public contentTypeOptions!:
    | core.Array<ContentTypeOptions>
    | core.ArrayOut<ContentTypeOptions>;

  @core.attr(FrameOptions, { computed: true, kind: "array" })
  public frameOptions!: core.Array<FrameOptions> | core.ArrayOut<FrameOptions>;

  @core.attr(ReferrerPolicy, { computed: true, kind: "array" })
  public referrerPolicy!:
    | core.Array<ReferrerPolicy>
    | core.ArrayOut<ReferrerPolicy>;

  @core.attr(StrictTransportSecurity, { computed: true, kind: "array" })
  public strictTransportSecurity!:
    | core.Array<StrictTransportSecurity>
    | core.ArrayOut<StrictTransportSecurity>;

  @core.attr(XssProtection, { computed: true, kind: "array" })
  public xssProtection!:
    | core.Array<XssProtection>
    | core.ArrayOut<XssProtection>;
}

export interface DsResponseHeadersPolicyArgs {
  id?: string | core.StringOut;

  name?: string | core.StringOut;
}

export class DsResponseHeadersPolicy extends core.Data<DsResponseHeadersPolicyArgs> {
  @core.attr(String, { computed: true })
  public comment!: string | core.StringOut;

  @core.attr(CorsConfig, { computed: true, kind: "array" })
  public corsConfig!: core.Array<CorsConfig> | core.ArrayOut<CorsConfig>;

  @core.attr(CustomHeadersConfig, { computed: true, kind: "array" })
  public customHeadersConfig!:
    | core.Array<CustomHeadersConfig>
    | core.ArrayOut<CustomHeadersConfig>;

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

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

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

  @core.attr(SecurityHeadersConfig, { computed: true, kind: "array" })
  public securityHeadersConfig!:
    | core.Array<SecurityHeadersConfig>
    | core.ArrayOut<SecurityHeadersConfig>;

  @core.attr(ServerTimingHeadersConfig, { computed: true, kind: "array" })
  public serverTimingHeadersConfig!:
    | core.Array<ServerTimingHeadersConfig>
    | core.ArrayOut<ServerTimingHeadersConfig>;

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

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