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

export interface FieldPatternsArgs extends core.SchemaArgs {
  items?: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export class FieldPatterns extends core.Schema<FieldPatternsArgs> {
  @core.attr(String, { kind: "array" })
  public items?: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export interface ItemsArgs extends core.SchemaArgs {
  fieldPatterns: FieldPatterns;

  providerId: string | core.StringOut;

  publicKeyId: string | core.StringOut;
}

export class Items extends core.Schema<ItemsArgs> {
  @core.attr(FieldPatterns)
  public fieldPatterns!: FieldPatterns;

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

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

export interface EncryptionEntitiesArgs extends core.SchemaArgs {
  items?: core.Array<Items> | core.ArrayOut<Items>;
}

export class EncryptionEntities extends core.Schema<EncryptionEntitiesArgs> {
  @core.attr(Items, { kind: "array" })
  public items?: core.Array<Items> | core.ArrayOut<Items>;
}

export interface FieldLevelEncryptionProfileArgs extends core.ResourceArgs {
  comment?: string | core.StringOut;

  encryptionEntities: EncryptionEntities;

  name: string | core.StringOut;
}

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

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

  @core.attr(EncryptionEntities)
  public encryptionEntities!: EncryptionEntities;

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

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

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

  constructor(name: string, args?: FieldLevelEncryptionProfileArgs) {
    super(name, "aws_cloudfront_field_level_encryption_profile", args);
  }

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