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

export interface DestinationOptionsArgs extends core.SchemaArgs {
  fileFormat?: string | core.StringOut;

  hiveCompatiblePartitions?: boolean | core.BooleanOut;

  perHourPartition?: boolean | core.BooleanOut;
}

export class DestinationOptions extends core.Schema<DestinationOptionsArgs> {
  @core.attr(String)
  public fileFormat?: string | core.StringOut;

  @core.attr(Boolean)
  public hiveCompatiblePartitions?: boolean | core.BooleanOut;

  @core.attr(Boolean)
  public perHourPartition?: boolean | core.BooleanOut;
}

export interface FlowLogArgs extends core.ResourceArgs {
  destinationOptions?: DestinationOptions;

  eniId?: string | core.StringOut;

  iamRoleArn?: string | core.StringOut;

  logDestination?: string | core.StringOut;

  logDestinationType?: string | core.StringOut;

  logFormat?: string | core.StringOut;

  logGroupName?: string | core.StringOut;

  maxAggregationInterval?: number | core.NumberOut;

  subnetId?: string | core.StringOut;

  tags?: core.Map<string, string> | core.MapOut<core.StringOut>;

  tagsAll?: core.Map<string, string> | core.MapOut<core.StringOut>;

  trafficType?: string | core.StringOut;

  transitGatewayAttachmentId?: string | core.StringOut;

  transitGatewayId?: string | core.StringOut;

  vpcId?: string | core.StringOut;
}

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

  @core.attr(DestinationOptions)
  public destinationOptions?: DestinationOptions;

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

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

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

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

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

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

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

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

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

  @core.attr(String, { kind: "map" })
  public tags?: core.Map<string, string> | core.MapOut<core.StringOut>;

  @core.attr(String, { computed: true, kind: "map" })
  public tagsAll?: core.Map<string, string> | core.MapOut<core.StringOut>;

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

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

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

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

  constructor(name: string, args?: FlowLogArgs) {
    super(name, "aws_flow_log", args);
  }

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