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

export interface IdentityProviderArgs extends core.ResourceArgs {
  attributeMapping?: core.Map<string, string> | core.MapOut<core.StringOut>;

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

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

  providerName: string | core.StringOut;

  providerType: string | core.StringOut;

  userPoolId: string | core.StringOut;
}

export class IdentityProvider extends core.Resource<IdentityProviderArgs> {
  @core.attr(String, { computed: true, kind: "map" })
  public attributeMapping?:
    | core.Map<string, string>
    | core.MapOut<core.StringOut>;

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

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

  @core.attr(String, { kind: "map" })
  public providerDetails!:
    | core.Map<string, string>
    | core.MapOut<core.StringOut>;

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

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

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

  constructor(name: string, args?: IdentityProviderArgs) {
    super(name, "aws_cognito_identity_provider", args);
  }

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