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

export interface QuietTimeArgs extends core.SchemaArgs {
  end?: string | core.StringOut;

  start?: string | core.StringOut;
}

export class QuietTime extends core.Schema<QuietTimeArgs> {
  @core.attr(String)
  public end?: string | core.StringOut;

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

export interface CampaignHookArgs extends core.SchemaArgs {
  lambdaFunctionName?: string | core.StringOut;

  mode?: string | core.StringOut;

  webUrl?: string | core.StringOut;
}

export class CampaignHook extends core.Schema<CampaignHookArgs> {
  @core.attr(String)
  public lambdaFunctionName?: string | core.StringOut;

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

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

export interface LimitsArgs extends core.SchemaArgs {
  daily?: number | core.NumberOut;

  maximumDuration?: number | core.NumberOut;

  messagesPerSecond?: number | core.NumberOut;

  total?: number | core.NumberOut;
}

export class Limits extends core.Schema<LimitsArgs> {
  @core.attr(Number)
  public daily?: number | core.NumberOut;

  @core.attr(Number)
  public maximumDuration?: number | core.NumberOut;

  @core.attr(Number)
  public messagesPerSecond?: number | core.NumberOut;

  @core.attr(Number)
  public total?: number | core.NumberOut;
}

export interface AppArgs extends core.ResourceArgs {
  /**
   * (Optional) Specifies settings for invoking an AWS Lambda function that customizes a segment for a ca
   * mpaign
   */
  campaignHook?: CampaignHook;

  /**
   * (Optional) The default campaign limits for the app. These limits apply to each campaign for the app,
   * unless the campaign overrides the default with limits of its own
   */
  limits?: Limits;

  /**
   * (Optional) The application name. By default generated by Terraform
   */
  name?: string | core.StringOut;

  /**
   * (Optional) The name of the Pinpoint application. Conflicts with `name`
   */
  namePrefix?: string | core.StringOut;

  /**
   * (Optional) The default quiet time for the app. Each campaign for this app sends no messages during t
   * his time unless the campaign overrides the default with a quiet time of its own
   */
  quietTime?: QuietTime;

  /**
   * (Optional) Key-value map of resource tags. If configured with a provider [`default_tags` configurati
   * on block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configurati
   * on-block) present, tags with matching keys will overwrite those defined at the provider-level.
   */
  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 App extends core.Resource<AppArgs> {
  /**
   * The Application ID of the Pinpoint App.
   */
  @core.attr(String, { computed: true })
  public applicationId!: string | core.StringOut;

  /**
   * Amazon Resource Name (ARN) of the PinPoint Application
   */
  @core.attr(String, { computed: true })
  public arn!: string | core.StringOut;

  /**
   * (Optional) Specifies settings for invoking an AWS Lambda function that customizes a segment for a ca
   * mpaign
   */
  @core.attr(CampaignHook)
  public campaignHook?: CampaignHook;

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

  /**
   * (Optional) The default campaign limits for the app. These limits apply to each campaign for the app,
   * unless the campaign overrides the default with limits of its own
   */
  @core.attr(Limits)
  public limits?: Limits;

  /**
   * (Optional) The application name. By default generated by Terraform
   */
  @core.attr(String, { computed: true })
  public name?: string | core.StringOut;

  /**
   * (Optional) The name of the Pinpoint application. Conflicts with `name`
   */
  @core.attr(String)
  public namePrefix?: string | core.StringOut;

  /**
   * (Optional) The default quiet time for the app. Each campaign for this app sends no messages during t
   * his time unless the campaign overrides the default with a quiet time of its own
   */
  @core.attr(QuietTime)
  public quietTime?: QuietTime;

  /**
   * (Optional) Key-value map of resource tags. If configured with a provider [`default_tags` configurati
   * on block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags-configurati
   * on-block) present, tags with matching keys will overwrite those defined at the provider-level.
   */
  @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?: AppArgs) {
    super(name, "aws_pinpoint_app", args);
  }

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