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

export interface CustomCookbooksSourceArgs extends core.SchemaArgs {
  password?: string | core.StringOut;

  revision?: string | core.StringOut;

  sshKey?: string | core.StringOut;

  type: string | core.StringOut;

  url: string | core.StringOut;

  username?: string | core.StringOut;
}

export class CustomCookbooksSource extends core.Schema<CustomCookbooksSourceArgs> {
  @core.attr(String)
  public password?: string | core.StringOut;

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

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

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

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

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

export interface StackArgs extends core.ResourceArgs {
  agentVersion?: string | core.StringOut;

  berkshelfVersion?: string | core.StringOut;

  color?: string | core.StringOut;

  configurationManagerName?: string | core.StringOut;

  configurationManagerVersion?: string | core.StringOut;

  customCookbooksSource?: CustomCookbooksSource;

  customJson?: string | core.StringOut;

  defaultAvailabilityZone?: string | core.StringOut;

  defaultInstanceProfileArn: string | core.StringOut;

  defaultOs?: string | core.StringOut;

  defaultRootDeviceType?: string | core.StringOut;

  defaultSshKeyName?: string | core.StringOut;

  defaultSubnetId?: string | core.StringOut;

  hostnameTheme?: string | core.StringOut;

  manageBerkshelf?: boolean | core.BooleanOut;

  name: string | core.StringOut;

  region: string | core.StringOut;

  serviceRoleArn: string | core.StringOut;

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

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

  useCustomCookbooks?: boolean | core.BooleanOut;

  useOpsworksSecurityGroups?: boolean | core.BooleanOut;

  vpcId?: string | core.StringOut;
}

export class Stack extends core.Resource<StackArgs> {
  @core.attr(String, { computed: true })
  public agentVersion?: string | core.StringOut;

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

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

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

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

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

  @core.attr(CustomCookbooksSource, { computed: true })
  public customCookbooksSource?: CustomCookbooksSource;

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

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

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

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

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

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

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

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

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

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

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

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

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

  @core.attr(String, { computed: true })
  public stackEndpoint!: 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(Boolean)
  public useCustomCookbooks?: boolean | core.BooleanOut;

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

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

  constructor(name: string, args?: StackArgs) {
    super(name, "aws_opsworks_stack", args);
  }

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