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

export interface WorkspaceSamlConfigurationArgs extends core.ResourceArgs {
  adminRoleValues?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

  editorRoleValues: core.Array<string> | core.ArrayOut<core.StringOut>;

  emailAssertion?: string | core.StringOut;

  groupsAssertion?: string | core.StringOut;

  idpMetadataUrl?: string | core.StringOut;

  idpMetadataXml?: string | core.StringOut;

  loginAssertion?: string | core.StringOut;

  loginValidityDuration?: number | core.NumberOut;

  nameAssertion?: string | core.StringOut;

  orgAssertion?: string | core.StringOut;

  roleAssertion?: string | core.StringOut;

  workspaceId: string | core.StringOut;
}

export class WorkspaceSamlConfiguration extends core.Resource<WorkspaceSamlConfigurationArgs> {
  @core.attr(String, { kind: "array" })
  public adminRoleValues?: core.Array<string> | core.ArrayOut<core.StringOut>;

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

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

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

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

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

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

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

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

  @core.attr(Number, { computed: true })
  public loginValidityDuration?: number | core.NumberOut;

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

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

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

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

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

  constructor(name: string, args?: WorkspaceSamlConfigurationArgs) {
    super(name, "aws_grafana_workspace_saml_configuration", args);
  }

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