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

export interface FilterArgs extends core.SchemaArgs {
  name: string | core.StringOut;

  values: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export class Filter extends core.Schema<FilterArgs> {
  @core.attr(String)
  public name!: string | core.StringOut;

  @core.attr(String, { kind: "array" })
  public values!: core.Array<string> | core.ArrayOut<core.StringOut>;
}

export interface DsEndpointServiceArgs {
  filter?: core.Array<Filter> | core.ArrayOut<Filter>;

  service?: string | core.StringOut;

  serviceName?: string | core.StringOut;

  serviceType?: string | core.StringOut;

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

export class DsEndpointService extends core.Data<DsEndpointServiceArgs> {
  @core.attr(Boolean, { computed: true })
  public acceptanceRequired!: boolean | core.BooleanOut;

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

  @core.attr(String, { computed: true, kind: "array" })
  public availabilityZones!: core.Array<string> | core.ArrayOut<core.StringOut>;

  @core.attr(String, { computed: true, kind: "array" })
  public baseEndpointDnsNames!:
    | core.Array<string>
    | core.ArrayOut<core.StringOut>;

  @core.attr(Filter, { kind: "array" })
  public filter?: core.Array<Filter> | core.ArrayOut<Filter>;

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

  @core.attr(Boolean, { computed: true })
  public managesVpcEndpoints!: boolean | core.BooleanOut;

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

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

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

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

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

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

  @core.attr(String, { computed: true, kind: "array" })
  public supportedIpAddressTypes!:
    | core.Array<string>
    | core.ArrayOut<core.StringOut>;

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

  @core.attr(Boolean, { computed: true })
  public vpcEndpointPolicySupported!: boolean | core.BooleanOut;

  constructor(name: string, args?: DsEndpointServiceArgs) {
    super(name, "aws_vpc_endpoint_service", args);
  }

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