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

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

  url: string | core.StringOut;

  username: string | core.StringOut;
}

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

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

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

export interface HlsIngestArgs extends core.SchemaArgs {
  ingestEndpoints: core.Array<IngestEndpoints> | core.ArrayOut<IngestEndpoints>;
}

export class HlsIngest extends core.Schema<HlsIngestArgs> {
  @core.attr(IngestEndpoints, { computed: true, kind: "array" })
  public ingestEndpoints!:
    | core.Array<IngestEndpoints>
    | core.ArrayOut<IngestEndpoints>;
}

export interface MediaPackageChannelArgs extends core.ResourceArgs {
  channelId: string | core.StringOut;

  description?: string | core.StringOut;

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

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

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

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

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

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

  @core.attr(String, { computed: true })
  public id!: 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>;

  constructor(name: string, args?: MediaPackageChannelArgs) {
    super(name, "aws_media_package_channel", args);
  }

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