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

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

  fileKey: string | core.StringOut;

  objectVersion?: string | core.StringOut;
}

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

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

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

export interface LocationArgs extends core.SchemaArgs {
  s3: S3;
}

export class Location extends core.Schema<LocationArgs> {
  @core.attr(S3)
  public s3!: S3;
}

export interface MskconnectCustomPluginArgs extends core.ResourceArgs {
  contentType: string | core.StringOut;

  description?: string | core.StringOut;

  location: Location;

  name: string | core.StringOut;
}

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

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

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

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

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

  @core.attr(Location)
  public location!: Location;

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

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

  constructor(name: string, args?: MskconnectCustomPluginArgs) {
    super(name, "aws_mskconnect_custom_plugin", args);
  }

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