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

export interface RuntimePlatformArgs extends core.SchemaArgs {
  cpuArchitecture?: string | core.StringOut;

  operatingSystemFamily?: string | core.StringOut;
}

export class RuntimePlatform extends core.Schema<RuntimePlatformArgs> {
  @core.attr(String)
  public cpuArchitecture?: string | core.StringOut;

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

export interface InferenceAcceleratorArgs extends core.SchemaArgs {
  deviceName: string | core.StringOut;

  deviceType: string | core.StringOut;
}

export class InferenceAccelerator extends core.Schema<InferenceAcceleratorArgs> {
  @core.attr(String)
  public deviceName!: string | core.StringOut;

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

export interface PlacementConstraintsArgs extends core.SchemaArgs {
  expression?: string | core.StringOut;

  type: string | core.StringOut;
}

export class PlacementConstraints extends core.Schema<PlacementConstraintsArgs> {
  @core.attr(String)
  public expression?: string | core.StringOut;

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

export interface ProxyConfigurationArgs extends core.SchemaArgs {
  containerName: string | core.StringOut;

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

  type?: string | core.StringOut;
}

export class ProxyConfiguration extends core.Schema<ProxyConfigurationArgs> {
  @core.attr(String)
  public containerName!: string | core.StringOut;

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

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

export interface EphemeralStorageArgs extends core.SchemaArgs {
  sizeInGib: number | core.NumberOut;
}

export class EphemeralStorage extends core.Schema<EphemeralStorageArgs> {
  @core.attr(Number)
  public sizeInGib!: number | core.NumberOut;
}

export interface DockerVolumeConfigurationArgs extends core.SchemaArgs {
  autoprovision?: boolean | core.BooleanOut;

  driver?: string | core.StringOut;

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

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

  scope?: string | core.StringOut;
}

export class DockerVolumeConfiguration extends core.Schema<DockerVolumeConfigurationArgs> {
  @core.attr(Boolean)
  public autoprovision?: boolean | core.BooleanOut;

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

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

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

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

export interface EfsVolumeConfigurationAuthorizationConfigArgs
  extends core.SchemaArgs {
  accessPointId?: string | core.StringOut;

  iam?: string | core.StringOut;
}

export class EfsVolumeConfigurationAuthorizationConfig extends core.Schema<EfsVolumeConfigurationAuthorizationConfigArgs> {
  @core.attr(String)
  public accessPointId?: string | core.StringOut;

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

export interface EfsVolumeConfigurationArgs extends core.SchemaArgs {
  authorizationConfig?: EfsVolumeConfigurationAuthorizationConfig;

  fileSystemId: string | core.StringOut;

  rootDirectory?: string | core.StringOut;

  transitEncryption?: string | core.StringOut;

  transitEncryptionPort?: number | core.NumberOut;
}

export class EfsVolumeConfiguration extends core.Schema<EfsVolumeConfigurationArgs> {
  @core.attr(EfsVolumeConfigurationAuthorizationConfig)
  public authorizationConfig?: EfsVolumeConfigurationAuthorizationConfig;

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

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

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

  @core.attr(Number)
  public transitEncryptionPort?: number | core.NumberOut;
}

export interface FsxWindowsFileServerVolumeConfigurationAuthorizationConfigArgs
  extends core.SchemaArgs {
  credentialsParameter: string | core.StringOut;

  domain: string | core.StringOut;
}

export class FsxWindowsFileServerVolumeConfigurationAuthorizationConfig extends core.Schema<FsxWindowsFileServerVolumeConfigurationAuthorizationConfigArgs> {
  @core.attr(String)
  public credentialsParameter!: string | core.StringOut;

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

export interface FsxWindowsFileServerVolumeConfigurationArgs
  extends core.SchemaArgs {
  authorizationConfig: FsxWindowsFileServerVolumeConfigurationAuthorizationConfig;

  fileSystemId: string | core.StringOut;

  rootDirectory: string | core.StringOut;
}

export class FsxWindowsFileServerVolumeConfiguration extends core.Schema<FsxWindowsFileServerVolumeConfigurationArgs> {
  @core.attr(FsxWindowsFileServerVolumeConfigurationAuthorizationConfig)
  public authorizationConfig!: FsxWindowsFileServerVolumeConfigurationAuthorizationConfig;

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

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

export interface VolumeArgs extends core.SchemaArgs {
  dockerVolumeConfiguration?: DockerVolumeConfiguration;

  efsVolumeConfiguration?: EfsVolumeConfiguration;

  fsxWindowsFileServerVolumeConfiguration?: FsxWindowsFileServerVolumeConfiguration;

  hostPath?: string | core.StringOut;

  name: string | core.StringOut;
}

export class Volume extends core.Schema<VolumeArgs> {
  @core.attr(DockerVolumeConfiguration)
  public dockerVolumeConfiguration?: DockerVolumeConfiguration;

  @core.attr(EfsVolumeConfiguration)
  public efsVolumeConfiguration?: EfsVolumeConfiguration;

  @core.attr(FsxWindowsFileServerVolumeConfiguration)
  public fsxWindowsFileServerVolumeConfiguration?: FsxWindowsFileServerVolumeConfiguration;

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

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

export interface TaskDefinitionArgs extends core.ResourceArgs {
  containerDefinitions: string | core.StringOut;

  cpu?: string | core.StringOut;

  ephemeralStorage?: EphemeralStorage;

  executionRoleArn?: string | core.StringOut;

  family: string | core.StringOut;

  inferenceAccelerator?:
    | core.Array<InferenceAccelerator>
    | core.ArrayOut<InferenceAccelerator>;

  ipcMode?: string | core.StringOut;

  memory?: string | core.StringOut;

  networkMode?: string | core.StringOut;

  pidMode?: string | core.StringOut;

  placementConstraints?:
    | core.Array<PlacementConstraints>
    | core.ArrayOut<PlacementConstraints>;

  proxyConfiguration?: ProxyConfiguration;

  requiresCompatibilities?: core.Array<string> | core.ArrayOut<core.StringOut>;

  runtimePlatform?: RuntimePlatform;

  skipDestroy?: boolean | core.BooleanOut;

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

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

  taskRoleArn?: string | core.StringOut;

  volume?: core.Array<Volume> | core.ArrayOut<Volume>;
}

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

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

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

  @core.attr(EphemeralStorage)
  public ephemeralStorage?: EphemeralStorage;

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

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

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

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

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

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

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

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

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

  @core.attr(ProxyConfiguration)
  public proxyConfiguration?: ProxyConfiguration;

  @core.attr(String, { kind: "array" })
  public requiresCompatibilities?:
    | core.Array<string>
    | core.ArrayOut<core.StringOut>;

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

  @core.attr(RuntimePlatform)
  public runtimePlatform?: RuntimePlatform;

  @core.attr(Boolean)
  public skipDestroy?: boolean | core.BooleanOut;

  @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 taskRoleArn?: string | core.StringOut;

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

  constructor(name: string, args?: TaskDefinitionArgs) {
    super(name, "aws_ecs_task_definition", args);
  }

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