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

export interface StorageLocationArgs extends core.SchemaArgs {
  bucket: string | core.StringOut;

  key: string | core.StringOut;

  objectVersion?: string | core.StringOut;

  roleArn: string | core.StringOut;
}

export class StorageLocation extends core.Schema<StorageLocationArgs> {
  @core.attr(String)
  public bucket!: string | core.StringOut;

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

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

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

export interface ScriptArgs extends core.ResourceArgs {
  name: string | core.StringOut;

  storageLocation?: StorageLocation;

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

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

  version?: string | core.StringOut;

  zipFile?: string | core.StringOut;
}

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

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

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

  @core.attr(StorageLocation, { computed: true })
  public storageLocation?: StorageLocation;

  @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(String)
  public version?: string | core.StringOut;

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

  constructor(name: string, args?: ScriptArgs) {
    super(name, "aws_gamelift_script", args);
  }

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