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

export interface ApiKeyArgs extends core.SchemaArgs {
  key: string | core.StringOut;

  value: string | core.StringOut;
}

export class ApiKey extends core.Schema<ApiKeyArgs> {
  @core.attr(String)
  public key!: string | core.StringOut;

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

export interface BasicArgs extends core.SchemaArgs {
  password: string | core.StringOut;

  username: string | core.StringOut;
}

export class Basic extends core.Schema<BasicArgs> {
  @core.attr(String)
  public password!: string | core.StringOut;

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

export interface BodyArgs extends core.SchemaArgs {
  isValueSecret?: boolean | core.BooleanOut;

  key?: string | core.StringOut;

  value?: string | core.StringOut;
}

export class Body extends core.Schema<BodyArgs> {
  @core.attr(Boolean)
  public isValueSecret?: boolean | core.BooleanOut;

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

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

export interface HeaderArgs extends core.SchemaArgs {
  isValueSecret?: boolean | core.BooleanOut;

  key?: string | core.StringOut;

  value?: string | core.StringOut;
}

export class Header extends core.Schema<HeaderArgs> {
  @core.attr(Boolean)
  public isValueSecret?: boolean | core.BooleanOut;

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

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

export interface QueryStringArgs extends core.SchemaArgs {
  isValueSecret?: boolean | core.BooleanOut;

  key?: string | core.StringOut;

  value?: string | core.StringOut;
}

export class QueryString extends core.Schema<QueryStringArgs> {
  @core.attr(Boolean)
  public isValueSecret?: boolean | core.BooleanOut;

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

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

export interface OauthHttpParametersArgs extends core.SchemaArgs {
  body?: core.Array<Body> | core.ArrayOut<Body>;

  header?: core.Array<Header> | core.ArrayOut<Header>;

  queryString?: core.Array<QueryString> | core.ArrayOut<QueryString>;
}

export class OauthHttpParameters extends core.Schema<OauthHttpParametersArgs> {
  @core.attr(Body, { kind: "array" })
  public body?: core.Array<Body> | core.ArrayOut<Body>;

  @core.attr(Header, { kind: "array" })
  public header?: core.Array<Header> | core.ArrayOut<Header>;

  @core.attr(QueryString, { kind: "array" })
  public queryString?: core.Array<QueryString> | core.ArrayOut<QueryString>;
}

export interface ClientParametersArgs extends core.SchemaArgs {
  clientId: string | core.StringOut;

  clientSecret: string | core.StringOut;
}

export class ClientParameters extends core.Schema<ClientParametersArgs> {
  @core.attr(String)
  public clientId!: string | core.StringOut;

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

export interface OauthArgs extends core.SchemaArgs {
  authorizationEndpoint: string | core.StringOut;

  clientParameters?: ClientParameters;

  httpMethod: string | core.StringOut;

  oauthHttpParameters: OauthHttpParameters;
}

export class Oauth extends core.Schema<OauthArgs> {
  @core.attr(String)
  public authorizationEndpoint!: string | core.StringOut;

  @core.attr(ClientParameters)
  public clientParameters?: ClientParameters;

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

  @core.attr(OauthHttpParameters)
  public oauthHttpParameters!: OauthHttpParameters;
}

export interface InvocationHttpParametersArgs extends core.SchemaArgs {
  body?: core.Array<Body> | core.ArrayOut<Body>;

  header?: core.Array<Header> | core.ArrayOut<Header>;

  queryString?: core.Array<QueryString> | core.ArrayOut<QueryString>;
}

export class InvocationHttpParameters extends core.Schema<InvocationHttpParametersArgs> {
  @core.attr(Body, { kind: "array" })
  public body?: core.Array<Body> | core.ArrayOut<Body>;

  @core.attr(Header, { kind: "array" })
  public header?: core.Array<Header> | core.ArrayOut<Header>;

  @core.attr(QueryString, { kind: "array" })
  public queryString?: core.Array<QueryString> | core.ArrayOut<QueryString>;
}

export interface AuthParametersArgs extends core.SchemaArgs {
  apiKey?: ApiKey;

  basic?: Basic;

  invocationHttpParameters?: InvocationHttpParameters;

  oauth?: Oauth;
}

export class AuthParameters extends core.Schema<AuthParametersArgs> {
  @core.attr(ApiKey)
  public apiKey?: ApiKey;

  @core.attr(Basic)
  public basic?: Basic;

  @core.attr(InvocationHttpParameters)
  public invocationHttpParameters?: InvocationHttpParameters;

  @core.attr(Oauth)
  public oauth?: Oauth;
}

export interface CloudwatchEventConnectionArgs extends core.ResourceArgs {
  authParameters: AuthParameters;

  authorizationType: string | core.StringOut;

  description?: string | core.StringOut;

  name: string | core.StringOut;
}

export class CloudwatchEventConnection extends core.Resource<CloudwatchEventConnectionArgs> {
  @core.attr(String, { computed: true })
  public arn!: string | core.StringOut;

  @core.attr(AuthParameters)
  public authParameters!: AuthParameters;

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

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

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

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

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

  constructor(name: string, args?: CloudwatchEventConnectionArgs) {
    super(name, "aws_cloudwatch_event_connection", args);
  }

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