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

export interface CidrAuthorizationContextArgs extends core.SchemaArgs {
  message?: string | core.StringOut;

  signature?: string | core.StringOut;
}

export class CidrAuthorizationContext extends core.Schema<CidrAuthorizationContextArgs> {
  @core.attr(String)
  public message?: string | core.StringOut;

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

export interface PoolCidrArgs extends core.ResourceArgs {
  cidr?: string | core.StringOut;

  cidrAuthorizationContext?: CidrAuthorizationContext;

  ipamPoolId: string | core.StringOut;
}

export class PoolCidr extends core.Resource<PoolCidrArgs> {
  @core.attr(String, { computed: true })
  public cidr?: string | core.StringOut;

  @core.attr(CidrAuthorizationContext)
  public cidrAuthorizationContext?: CidrAuthorizationContext;

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

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

  constructor(name: string, args?: PoolCidrArgs) {
    super(name, "aws_vpc_ipam_pool_cidr", args);
  }

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