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

export interface SnapshotDeliveryPropertiesArgs extends core.SchemaArgs {
  deliveryFrequency?: string | core.StringOut;
}

export class SnapshotDeliveryProperties extends core.Schema<SnapshotDeliveryPropertiesArgs> {
  @core.attr(String)
  public deliveryFrequency?: string | core.StringOut;
}

export interface DeliveryChannelArgs extends core.ResourceArgs {
  name?: string | core.StringOut;

  s3BucketName: string | core.StringOut;

  s3KeyPrefix?: string | core.StringOut;

  s3KmsKeyArn?: string | core.StringOut;

  snapshotDeliveryProperties?: SnapshotDeliveryProperties;

  snsTopicArn?: string | core.StringOut;
}

export class DeliveryChannel extends core.Resource<DeliveryChannelArgs> {
  @core.attr(String, { computed: true })
  public id!: string | core.StringOut;

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

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

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

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

  @core.attr(SnapshotDeliveryProperties)
  public snapshotDeliveryProperties?: SnapshotDeliveryProperties;

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

  constructor(name: string, args?: DeliveryChannelArgs) {
    super(name, "aws_config_delivery_channel", args);
  }

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