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

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

export class QueryStrings extends core.Schema<QueryStringsArgs> {
  @core.attr(String, { computed: true, kind: "array" })
  public items!: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export interface QueryStringsConfigArgs extends core.SchemaArgs {
  queryStringBehavior: string | core.StringOut;

  queryStrings: core.Array<QueryStrings> | core.ArrayOut<QueryStrings>;
}

export class QueryStringsConfig extends core.Schema<QueryStringsConfigArgs> {
  @core.attr(String, { computed: true })
  public queryStringBehavior!: string | core.StringOut;

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

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

export class Cookies extends core.Schema<CookiesArgs> {
  @core.attr(String, { computed: true, kind: "array" })
  public items!: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export interface CookiesConfigArgs extends core.SchemaArgs {
  cookieBehavior: string | core.StringOut;

  cookies: core.Array<Cookies> | core.ArrayOut<Cookies>;
}

export class CookiesConfig extends core.Schema<CookiesConfigArgs> {
  @core.attr(String, { computed: true })
  public cookieBehavior!: string | core.StringOut;

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

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

export class Headers extends core.Schema<HeadersArgs> {
  @core.attr(String, { computed: true, kind: "array" })
  public items!: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export interface HeadersConfigArgs extends core.SchemaArgs {
  headerBehavior: string | core.StringOut;

  headers: core.Array<Headers> | core.ArrayOut<Headers>;
}

export class HeadersConfig extends core.Schema<HeadersConfigArgs> {
  @core.attr(String, { computed: true })
  public headerBehavior!: string | core.StringOut;

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

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

  name?: string | core.StringOut;
}

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

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

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

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

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

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

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

  constructor(name: string, args?: DsOriginRequestPolicyArgs) {
    super(name, "aws_cloudfront_origin_request_policy", args);
  }

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