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

export interface OutputsArgs extends core.SchemaArgs {
  description: string | core.StringOut;

  key: string | core.StringOut;

  value: string | core.StringOut;
}

export class Outputs extends core.Schema<OutputsArgs> {
  @core.attr(String, { computed: true })
  public description!: string | core.StringOut;

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

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

export interface StackSetProvisioningPreferencesArgs extends core.SchemaArgs {
  accounts?: core.Array<string> | core.ArrayOut<core.StringOut>;

  failureToleranceCount?: number | core.NumberOut;

  failureTolerancePercentage?: number | core.NumberOut;

  maxConcurrencyCount?: number | core.NumberOut;

  maxConcurrencyPercentage?: number | core.NumberOut;

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

export class StackSetProvisioningPreferences extends core.Schema<StackSetProvisioningPreferencesArgs> {
  @core.attr(String, { kind: "array" })
  public accounts?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

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

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

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

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

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

  usePreviousValue?: boolean | core.BooleanOut;

  value?: string | core.StringOut;
}

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

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

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

export interface ProvisionedProductArgs extends core.ResourceArgs {
  acceptLanguage?: string | core.StringOut;

  ignoreErrors?: boolean | core.BooleanOut;

  name: string | core.StringOut;

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

  pathId?: string | core.StringOut;

  pathName?: string | core.StringOut;

  productId?: string | core.StringOut;

  productName?: string | core.StringOut;

  provisioningArtifactId?: string | core.StringOut;

  provisioningArtifactName?: string | core.StringOut;

  provisioningParameters?:
    | core.Array<ProvisioningParameters>
    | core.ArrayOut<ProvisioningParameters>;

  retainPhysicalResources?: boolean | core.BooleanOut;

  stackSetProvisioningPreferences?: StackSetProvisioningPreferences;

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

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

export class ProvisionedProduct extends core.Resource<ProvisionedProductArgs> {
  @core.attr(String)
  public acceptLanguage?: string | core.StringOut;

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

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

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

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

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

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

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

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

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

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

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

  @core.attr(Outputs, { computed: true, kind: "array" })
  public outputs!: core.Array<Outputs> | core.ArrayOut<Outputs>;

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

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

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

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

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

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

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

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

  @core.attr(StackSetProvisioningPreferences)
  public stackSetProvisioningPreferences?: StackSetProvisioningPreferences;

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

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

  @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, { computed: true })
  public type!: string | core.StringOut;

  constructor(name: string, args?: ProvisionedProductArgs) {
    super(name, "aws_servicecatalog_provisioned_product", args);
  }

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