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

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

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

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

  cookies?: Cookies;
}

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

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

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

  headers?: Headers;
}

export class HeadersConfig extends core.Schema<HeadersConfigArgs> {
  @core.attr(String)
  public headerBehavior?: string | core.StringOut;

  @core.attr(Headers)
  public headers?: Headers;
}

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

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

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

  queryStrings?: QueryStrings;
}

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

  @core.attr(QueryStrings)
  public queryStrings?: QueryStrings;
}

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

  cookiesConfig: CookiesConfig;

  headersConfig: HeadersConfig;

  name: string | core.StringOut;

  queryStringsConfig: QueryStringsConfig;
}

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

  @core.attr(CookiesConfig)
  public cookiesConfig!: CookiesConfig;

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

  @core.attr(HeadersConfig)
  public headersConfig!: HeadersConfig;

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

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

  @core.attr(QueryStringsConfig)
  public queryStringsConfig!: QueryStringsConfig;

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

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