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

export interface CloudwatchMetricArgs extends core.SchemaArgs {
  metricName: string | core.StringOut;

  metricNamespace: string | core.StringOut;

  metricTimestamp?: string | core.StringOut;

  metricUnit: string | core.StringOut;

  metricValue: string | core.StringOut;

  roleArn: string | core.StringOut;
}

export class CloudwatchMetric extends core.Schema<CloudwatchMetricArgs> {
  @core.attr(String)
  public metricName!: string | core.StringOut;

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

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

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

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

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

export interface SqsArgs extends core.SchemaArgs {
  queueUrl: string | core.StringOut;

  roleArn: string | core.StringOut;

  useBase64: boolean | core.BooleanOut;
}

export class Sqs extends core.Schema<SqsArgs> {
  @core.attr(String)
  public queueUrl!: string | core.StringOut;

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

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

export interface TimestampArgs extends core.SchemaArgs {
  unit: string | core.StringOut;

  value: string | core.StringOut;
}

export class Timestamp extends core.Schema<TimestampArgs> {
  @core.attr(String)
  public unit!: string | core.StringOut;

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

export interface DimensionArgs extends core.SchemaArgs {
  name: string | core.StringOut;

  value: string | core.StringOut;
}

export class Dimension extends core.Schema<DimensionArgs> {
  @core.attr(String)
  public name!: string | core.StringOut;

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

export interface TimestreamArgs extends core.SchemaArgs {
  databaseName: string | core.StringOut;

  dimension: core.Array<Dimension> | core.ArrayOut<Dimension>;

  roleArn: string | core.StringOut;

  tableName: string | core.StringOut;

  timestamp?: Timestamp;
}

export class Timestream extends core.Schema<TimestreamArgs> {
  @core.attr(String)
  public databaseName!: string | core.StringOut;

  @core.attr(Dimension, { kind: "array" })
  public dimension!: core.Array<Dimension> | core.ArrayOut<Dimension>;

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

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

  @core.attr(Timestamp)
  public timestamp?: Timestamp;
}

export interface LambdaArgs extends core.SchemaArgs {
  functionArn: string | core.StringOut;
}

export class Lambda extends core.Schema<LambdaArgs> {
  @core.attr(String)
  public functionArn!: string | core.StringOut;
}

export interface CloudwatchAlarmArgs extends core.SchemaArgs {
  alarmName: string | core.StringOut;

  roleArn: string | core.StringOut;

  stateReason: string | core.StringOut;

  stateValue: string | core.StringOut;
}

export class CloudwatchAlarm extends core.Schema<CloudwatchAlarmArgs> {
  @core.attr(String)
  public alarmName!: string | core.StringOut;

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

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

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

export interface DynamodbArgs extends core.SchemaArgs {
  hashKeyField: string | core.StringOut;

  hashKeyType?: string | core.StringOut;

  hashKeyValue: string | core.StringOut;

  operation?: string | core.StringOut;

  payloadField?: string | core.StringOut;

  rangeKeyField?: string | core.StringOut;

  rangeKeyType?: string | core.StringOut;

  rangeKeyValue?: string | core.StringOut;

  roleArn: string | core.StringOut;

  tableName: string | core.StringOut;
}

export class Dynamodb extends core.Schema<DynamodbArgs> {
  @core.attr(String)
  public hashKeyField!: string | core.StringOut;

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

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

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

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

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

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

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

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

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

export interface IotAnalyticsArgs extends core.SchemaArgs {
  channelName: string | core.StringOut;

  roleArn: string | core.StringOut;
}

export class IotAnalytics extends core.Schema<IotAnalyticsArgs> {
  @core.attr(String)
  public channelName!: string | core.StringOut;

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

export interface PutItemArgs extends core.SchemaArgs {
  tableName: string | core.StringOut;
}

export class PutItem extends core.Schema<PutItemArgs> {
  @core.attr(String)
  public tableName!: string | core.StringOut;
}

export interface Dynamodbv2Args extends core.SchemaArgs {
  putItem?: PutItem;

  roleArn: string | core.StringOut;
}

export class Dynamodbv2 extends core.Schema<Dynamodbv2Args> {
  @core.attr(PutItem)
  public putItem?: PutItem;

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

export interface S3Args extends core.SchemaArgs {
  bucketName: string | core.StringOut;

  cannedAcl?: string | core.StringOut;

  key: string | core.StringOut;

  roleArn: string | core.StringOut;
}

export class S3 extends core.Schema<S3Args> {
  @core.attr(String)
  public bucketName!: string | core.StringOut;

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

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

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

export interface FirehoseArgs extends core.SchemaArgs {
  deliveryStreamName: string | core.StringOut;

  roleArn: string | core.StringOut;

  separator?: string | core.StringOut;
}

export class Firehose extends core.Schema<FirehoseArgs> {
  @core.attr(String)
  public deliveryStreamName!: string | core.StringOut;

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

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

export interface CloudwatchLogsArgs extends core.SchemaArgs {
  logGroupName: string | core.StringOut;

  roleArn: string | core.StringOut;
}

export class CloudwatchLogs extends core.Schema<CloudwatchLogsArgs> {
  @core.attr(String)
  public logGroupName!: string | core.StringOut;

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

export interface StepFunctionsArgs extends core.SchemaArgs {
  executionNamePrefix?: string | core.StringOut;

  roleArn: string | core.StringOut;

  stateMachineName: string | core.StringOut;
}

export class StepFunctions extends core.Schema<StepFunctionsArgs> {
  @core.attr(String)
  public executionNamePrefix?: string | core.StringOut;

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

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

export interface KinesisArgs extends core.SchemaArgs {
  partitionKey?: string | core.StringOut;

  roleArn: string | core.StringOut;

  streamName: string | core.StringOut;
}

export class Kinesis extends core.Schema<KinesisArgs> {
  @core.attr(String)
  public partitionKey?: string | core.StringOut;

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

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

export interface ElasticsearchArgs extends core.SchemaArgs {
  endpoint: string | core.StringOut;

  id: string | core.StringOut;

  index: string | core.StringOut;

  roleArn: string | core.StringOut;

  type: string | core.StringOut;
}

export class Elasticsearch extends core.Schema<ElasticsearchArgs> {
  @core.attr(String)
  public endpoint!: string | core.StringOut;

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

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

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

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

export interface RepublishArgs extends core.SchemaArgs {
  qos?: number | core.NumberOut;

  roleArn: string | core.StringOut;

  topic: string | core.StringOut;
}

export class Republish extends core.Schema<RepublishArgs> {
  @core.attr(Number)
  public qos?: number | core.NumberOut;

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

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

export interface KafkaArgs extends core.SchemaArgs {
  clientProperties: core.Map<string, string> | core.MapOut<core.StringOut>;

  destinationArn: string | core.StringOut;

  key?: string | core.StringOut;

  partition?: string | core.StringOut;

  topic: string | core.StringOut;
}

export class Kafka extends core.Schema<KafkaArgs> {
  @core.attr(String, { kind: "map" })
  public clientProperties!:
    | core.Map<string, string>
    | core.MapOut<core.StringOut>;

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

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

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

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

export interface SnsArgs extends core.SchemaArgs {
  messageFormat?: string | core.StringOut;

  roleArn: string | core.StringOut;

  targetArn: string | core.StringOut;
}

export class Sns extends core.Schema<SnsArgs> {
  @core.attr(String)
  public messageFormat?: string | core.StringOut;

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

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

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

  value: string | core.StringOut;
}

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

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

export interface HttpArgs extends core.SchemaArgs {
  confirmationUrl?: string | core.StringOut;

  httpHeader?: core.Array<HttpHeader> | core.ArrayOut<HttpHeader>;

  url: string | core.StringOut;
}

export class Http extends core.Schema<HttpArgs> {
  @core.attr(String)
  public confirmationUrl?: string | core.StringOut;

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

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

export interface IotEventsArgs extends core.SchemaArgs {
  inputName: string | core.StringOut;

  messageId?: string | core.StringOut;

  roleArn: string | core.StringOut;
}

export class IotEvents extends core.Schema<IotEventsArgs> {
  @core.attr(String)
  public inputName!: string | core.StringOut;

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

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

export interface ErrorActionArgs extends core.SchemaArgs {
  cloudwatchAlarm?: CloudwatchAlarm;

  cloudwatchLogs?: CloudwatchLogs;

  cloudwatchMetric?: CloudwatchMetric;

  dynamodb?: Dynamodb;

  dynamodbv2?: Dynamodbv2;

  elasticsearch?: Elasticsearch;

  firehose?: Firehose;

  http?: Http;

  iotAnalytics?: IotAnalytics;

  iotEvents?: IotEvents;

  kafka?: Kafka;

  kinesis?: Kinesis;

  lambda?: Lambda;

  republish?: Republish;

  s3?: S3;

  sns?: Sns;

  sqs?: Sqs;

  stepFunctions?: StepFunctions;

  timestream?: Timestream;
}

export class ErrorAction extends core.Schema<ErrorActionArgs> {
  @core.attr(CloudwatchAlarm)
  public cloudwatchAlarm?: CloudwatchAlarm;

  @core.attr(CloudwatchLogs)
  public cloudwatchLogs?: CloudwatchLogs;

  @core.attr(CloudwatchMetric)
  public cloudwatchMetric?: CloudwatchMetric;

  @core.attr(Dynamodb)
  public dynamodb?: Dynamodb;

  @core.attr(Dynamodbv2)
  public dynamodbv2?: Dynamodbv2;

  @core.attr(Elasticsearch)
  public elasticsearch?: Elasticsearch;

  @core.attr(Firehose)
  public firehose?: Firehose;

  @core.attr(Http)
  public http?: Http;

  @core.attr(IotAnalytics)
  public iotAnalytics?: IotAnalytics;

  @core.attr(IotEvents)
  public iotEvents?: IotEvents;

  @core.attr(Kafka)
  public kafka?: Kafka;

  @core.attr(Kinesis)
  public kinesis?: Kinesis;

  @core.attr(Lambda)
  public lambda?: Lambda;

  @core.attr(Republish)
  public republish?: Republish;

  @core.attr(S3)
  public s3?: S3;

  @core.attr(Sns)
  public sns?: Sns;

  @core.attr(Sqs)
  public sqs?: Sqs;

  @core.attr(StepFunctions)
  public stepFunctions?: StepFunctions;

  @core.attr(Timestream)
  public timestream?: Timestream;
}

export interface TopicRuleArgs extends core.ResourceArgs {
  cloudwatchAlarm?:
    | core.Array<CloudwatchAlarm>
    | core.ArrayOut<CloudwatchAlarm>;

  cloudwatchLogs?: core.Array<CloudwatchLogs> | core.ArrayOut<CloudwatchLogs>;

  cloudwatchMetric?:
    | core.Array<CloudwatchMetric>
    | core.ArrayOut<CloudwatchMetric>;

  description?: string | core.StringOut;

  dynamodb?: core.Array<Dynamodb> | core.ArrayOut<Dynamodb>;

  dynamodbv2?: core.Array<Dynamodbv2> | core.ArrayOut<Dynamodbv2>;

  elasticsearch?: core.Array<Elasticsearch> | core.ArrayOut<Elasticsearch>;

  enabled: boolean | core.BooleanOut;

  errorAction?: ErrorAction;

  firehose?: core.Array<Firehose> | core.ArrayOut<Firehose>;

  http?: core.Array<Http> | core.ArrayOut<Http>;

  iotAnalytics?: core.Array<IotAnalytics> | core.ArrayOut<IotAnalytics>;

  iotEvents?: core.Array<IotEvents> | core.ArrayOut<IotEvents>;

  kafka?: core.Array<Kafka> | core.ArrayOut<Kafka>;

  kinesis?: core.Array<Kinesis> | core.ArrayOut<Kinesis>;

  lambda?: core.Array<Lambda> | core.ArrayOut<Lambda>;

  name: string | core.StringOut;

  republish?: core.Array<Republish> | core.ArrayOut<Republish>;

  s3?: core.Array<S3> | core.ArrayOut<S3>;

  sns?: core.Array<Sns> | core.ArrayOut<Sns>;

  sql: string | core.StringOut;

  sqlVersion: string | core.StringOut;

  sqs?: core.Array<Sqs> | core.ArrayOut<Sqs>;

  stepFunctions?: core.Array<StepFunctions> | core.ArrayOut<StepFunctions>;

  tags?: core.Map<string, string> | core.MapOut<core.StringOut>;

  tagsAll?: core.Map<string, string> | core.MapOut<core.StringOut>;

  timestream?: core.Array<Timestream> | core.ArrayOut<Timestream>;
}

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

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

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

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

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

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

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

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

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

  @core.attr(ErrorAction)
  public errorAction?: ErrorAction;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  @core.attr(String, { kind: "map" })
  public tags?: core.Map<string, string> | core.MapOut<core.StringOut>;

  @core.attr(String, { computed: true, kind: "map" })
  public tagsAll?: core.Map<string, string> | core.MapOut<core.StringOut>;

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

  constructor(name: string, args?: TopicRuleArgs) {
    super(name, "aws_iot_topic_rule", args);
  }

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