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

export interface LicenseConfigurationArgs extends core.ResourceArgs {
  /**
   * (Optional) Description of the license configuration.
   */
  description?: string | core.StringOut;

  /**
   * (Optional) Number of licenses managed by the license configuration.
   */
  licenseCount?: number | core.NumberOut;

  /**
   * (Optional) Sets the number of available licenses as a hard limit.
   */
  licenseCountHardLimit?: boolean | core.BooleanOut;

  /**
   * (Required) Dimension to use to track license inventory. Specify either `vCPU`, `Instance`, `Core` or
   * Socket`.
   */
  licenseCountingType: string | core.StringOut;

  /**
   * (Optional) Array of configured License Manager rules.
   */
  licenseRules?: core.Array<string> | core.ArrayOut<core.StringOut>;

  /**
   * (Required) Name of the license configuration.
   */
  name: string | core.StringOut;

  /**
   * (Optional) A map of tags to assign to the resource. If configured with a provider [`default_tags` co
   * nfiguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-co
   * nfiguration-block) present, tags with matching keys will overwrite those defined at the provider-lev
   * el.
   */
  tags?: core.Map<string, string> | core.MapOut<core.StringOut>;

  /**
   * A map of tags assigned to the resource, including those inherited from the provider [`default_tags`
   * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-
   * configuration-block).
   */
  tagsAll?: core.Map<string, string> | core.MapOut<core.StringOut>;
}

export class LicenseConfiguration extends core.Resource<LicenseConfigurationArgs> {
  /**
   * The license configuration ARN.
   */
  @core.attr(String, { computed: true })
  public arn!: string | core.StringOut;

  /**
   * (Optional) Description of the license configuration.
   */
  @core.attr(String)
  public description?: string | core.StringOut;

  /**
   * The license configuration ARN.
   */
  @core.attr(String, { computed: true })
  public id!: string | core.StringOut;

  /**
   * (Optional) Number of licenses managed by the license configuration.
   */
  @core.attr(Number)
  public licenseCount?: number | core.NumberOut;

  /**
   * (Optional) Sets the number of available licenses as a hard limit.
   */
  @core.attr(Boolean)
  public licenseCountHardLimit?: boolean | core.BooleanOut;

  /**
   * (Required) Dimension to use to track license inventory. Specify either `vCPU`, `Instance`, `Core` or
   * Socket`.
   */
  @core.attr(String)
  public licenseCountingType!: string | core.StringOut;

  /**
   * (Optional) Array of configured License Manager rules.
   */
  @core.attr(String, { kind: "array" })
  public licenseRules?: core.Array<string> | core.ArrayOut<core.StringOut>;

  /**
   * (Required) Name of the license configuration.
   */
  @core.attr(String)
  public name!: string | core.StringOut;

  /**
   * Account ID of the owner of the license configuration.
   */
  @core.attr(String, { computed: true })
  public ownerAccountId!: string | core.StringOut;

  /**
   * (Optional) A map of tags to assign to the resource. If configured with a provider [`default_tags` co
   * nfiguration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-co
   * nfiguration-block) present, tags with matching keys will overwrite those defined at the provider-lev
   * el.
   */
  @core.attr(String, { kind: "map" })
  public tags?: core.Map<string, string> | core.MapOut<core.StringOut>;

  /**
   * A map of tags assigned to the resource, including those inherited from the provider [`default_tags`
   * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-
   * configuration-block).
   */
  @core.attr(String, { computed: true, kind: "map" })
  public tagsAll?: core.Map<string, string> | core.MapOut<core.StringOut>;

  constructor(name: string, args?: LicenseConfigurationArgs) {
    super(name, "aws_licensemanager_license_configuration", args);
  }

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