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

export interface GcmChannelArgs extends core.ResourceArgs {
  /**
   * (Required) Platform credential API key from Google.
   */
  apiKey: string | core.StringOut;

  /**
   * (Required) The application ID.
   */
  applicationId: string | core.StringOut;

  /**
   * (Optional) Whether the channel is enabled or disabled. Defaults to `true`.
   */
  enabled?: boolean | core.BooleanOut;
}

export class GcmChannel extends core.Resource<GcmChannelArgs> {
  /**
   * (Required) Platform credential API key from Google.
   */
  @core.attr(String)
  public apiKey!: string | core.StringOut;

  /**
   * (Required) The application ID.
   */
  @core.attr(String)
  public applicationId!: string | core.StringOut;

  /**
   * (Optional) Whether the channel is enabled or disabled. Defaults to `true`.
   */
  @core.attr(Boolean)
  public enabled?: boolean | core.BooleanOut;

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

  constructor(name: string, args?: GcmChannelArgs) {
    super(name, "aws_pinpoint_gcm_channel", args);
  }

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