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

export interface UserSettingsArgs extends core.SchemaArgs {
  action: string | core.StringOut;

  permission: string | core.StringOut;
}

export class UserSettings extends core.Schema<UserSettingsArgs> {
  @core.attr(String)
  public action!: string | core.StringOut;

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

export interface ApplicationSettingsArgs extends core.SchemaArgs {
  enabled?: boolean | core.BooleanOut;

  settingsGroup?: string | core.StringOut;
}

export class ApplicationSettings extends core.Schema<ApplicationSettingsArgs> {
  @core.attr(Boolean)
  public enabled?: boolean | core.BooleanOut;

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

export interface StorageConnectorsArgs extends core.SchemaArgs {
  connectorType: string | core.StringOut;

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

  resourceIdentifier?: string | core.StringOut;
}

export class StorageConnectors extends core.Schema<StorageConnectorsArgs> {
  @core.attr(String)
  public connectorType!: string | core.StringOut;

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

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

export interface AccessEndpointsArgs extends core.SchemaArgs {
  endpointType: string | core.StringOut;

  vpceId?: string | core.StringOut;
}

export class AccessEndpoints extends core.Schema<AccessEndpointsArgs> {
  @core.attr(String)
  public endpointType!: string | core.StringOut;

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

export interface StackArgs extends core.ResourceArgs {
  accessEndpoints?:
    | core.Array<AccessEndpoints>
    | core.ArrayOut<AccessEndpoints>;

  applicationSettings?: ApplicationSettings;

  description?: string | core.StringOut;

  displayName?: string | core.StringOut;

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

  feedbackUrl?: string | core.StringOut;

  name: string | core.StringOut;

  redirectUrl?: string | core.StringOut;

  storageConnectors?:
    | core.Array<StorageConnectors>
    | core.ArrayOut<StorageConnectors>;

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

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

  userSettings?: core.Array<UserSettings> | core.ArrayOut<UserSettings>;
}

export class Stack extends core.Resource<StackArgs> {
  @core.attr(AccessEndpoints, { computed: true, kind: "array" })
  public accessEndpoints?:
    | core.Array<AccessEndpoints>
    | core.ArrayOut<AccessEndpoints>;

  @core.attr(ApplicationSettings, { computed: true })
  public applicationSettings?: ApplicationSettings;

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

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

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

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

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

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

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

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

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

  @core.attr(StorageConnectors, { computed: true, kind: "array" })
  public storageConnectors?:
    | core.Array<StorageConnectors>
    | core.ArrayOut<StorageConnectors>;

  @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(UserSettings, { computed: true, kind: "array" })
  public userSettings?: core.Array<UserSettings> | core.ArrayOut<UserSettings>;

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

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