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

export interface SourceDataArgs extends core.SchemaArgs {
  acmPcaArn?: string | core.StringOut;

  x509CertificateData?: string | core.StringOut;
}

export class SourceData extends core.Schema<SourceDataArgs> {
  @core.attr(String)
  public acmPcaArn?: string | core.StringOut;

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

export interface SourceArgs extends core.SchemaArgs {
  sourceData: SourceData;

  sourceType: string | core.StringOut;
}

export class Source extends core.Schema<SourceArgs> {
  @core.attr(SourceData)
  public sourceData!: SourceData;

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

export interface TrustAnchorArgs extends core.ResourceArgs {
  enabled?: boolean | core.BooleanOut;

  name: string | core.StringOut;

  source: Source;

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

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

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

  @core.attr(Boolean, { computed: true })
  public enabled?: boolean | core.BooleanOut;

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

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

  @core.attr(Source)
  public source!: Source;

  @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?: TrustAnchorArgs) {
    super(name, "aws_rolesanywhere_trust_anchor", args);
  }

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