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

export interface StepFunctionsParametersArgs extends core.SchemaArgs {
  input?: string | core.StringOut;

  name?: string | core.StringOut;
}

export class StepFunctionsParameters extends core.Schema<StepFunctionsParametersArgs> {
  @core.attr(String)
  public input?: string | core.StringOut;

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

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

  values: core.Array<string> | core.ArrayOut<core.StringOut>;
}

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

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

export interface AutomationParametersArgs extends core.SchemaArgs {
  documentVersion?: string | core.StringOut;

  parameter?: core.Array<Parameter> | core.ArrayOut<Parameter>;
}

export class AutomationParameters extends core.Schema<AutomationParametersArgs> {
  @core.attr(String)
  public documentVersion?: string | core.StringOut;

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

export interface LambdaParametersArgs extends core.SchemaArgs {
  clientContext?: string | core.StringOut;

  payload?: string | core.StringOut;

  qualifier?: string | core.StringOut;
}

export class LambdaParameters extends core.Schema<LambdaParametersArgs> {
  @core.attr(String)
  public clientContext?: string | core.StringOut;

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

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

export interface CloudwatchConfigArgs extends core.SchemaArgs {
  cloudwatchLogGroupName?: string | core.StringOut;

  cloudwatchOutputEnabled?: boolean | core.BooleanOut;
}

export class CloudwatchConfig extends core.Schema<CloudwatchConfigArgs> {
  @core.attr(String, { computed: true })
  public cloudwatchLogGroupName?: string | core.StringOut;

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

export interface NotificationConfigArgs extends core.SchemaArgs {
  notificationArn?: string | core.StringOut;

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

  notificationType?: string | core.StringOut;
}

export class NotificationConfig extends core.Schema<NotificationConfigArgs> {
  @core.attr(String)
  public notificationArn?: string | core.StringOut;

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

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

export interface RunCommandParametersArgs extends core.SchemaArgs {
  cloudwatchConfig?: CloudwatchConfig;

  comment?: string | core.StringOut;

  documentHash?: string | core.StringOut;

  documentHashType?: string | core.StringOut;

  documentVersion?: string | core.StringOut;

  notificationConfig?: NotificationConfig;

  outputS3Bucket?: string | core.StringOut;

  outputS3KeyPrefix?: string | core.StringOut;

  parameter?: core.Array<Parameter> | core.ArrayOut<Parameter>;

  serviceRoleArn?: string | core.StringOut;

  timeoutSeconds?: number | core.NumberOut;
}

export class RunCommandParameters extends core.Schema<RunCommandParametersArgs> {
  @core.attr(CloudwatchConfig)
  public cloudwatchConfig?: CloudwatchConfig;

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

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

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

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

  @core.attr(NotificationConfig)
  public notificationConfig?: NotificationConfig;

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

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

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

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

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

export interface TaskInvocationParametersArgs extends core.SchemaArgs {
  automationParameters?: AutomationParameters;

  lambdaParameters?: LambdaParameters;

  runCommandParameters?: RunCommandParameters;

  stepFunctionsParameters?: StepFunctionsParameters;
}

export class TaskInvocationParameters extends core.Schema<TaskInvocationParametersArgs> {
  @core.attr(AutomationParameters)
  public automationParameters?: AutomationParameters;

  @core.attr(LambdaParameters)
  public lambdaParameters?: LambdaParameters;

  @core.attr(RunCommandParameters)
  public runCommandParameters?: RunCommandParameters;

  @core.attr(StepFunctionsParameters)
  public stepFunctionsParameters?: StepFunctionsParameters;
}

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

  values: core.Array<string> | core.ArrayOut<core.StringOut>;
}

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

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

export interface MaintenanceWindowTaskArgs extends core.ResourceArgs {
  cutoffBehavior?: string | core.StringOut;

  description?: string | core.StringOut;

  maxConcurrency?: string | core.StringOut;

  maxErrors?: string | core.StringOut;

  name?: string | core.StringOut;

  priority?: number | core.NumberOut;

  serviceRoleArn?: string | core.StringOut;

  targets?: core.Array<Targets> | core.ArrayOut<Targets>;

  taskArn: string | core.StringOut;

  taskInvocationParameters?: TaskInvocationParameters;

  taskType: string | core.StringOut;

  windowId: string | core.StringOut;
}

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

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

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

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

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

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

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

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

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

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

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

  @core.attr(TaskInvocationParameters)
  public taskInvocationParameters?: TaskInvocationParameters;

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

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

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

  constructor(name: string, args?: MaintenanceWindowTaskArgs) {
    super(name, "aws_ssm_maintenance_window_task", args);
  }

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