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

export interface EgressFilterArgs extends core.SchemaArgs {
  type?: string | core.StringOut;
}

export class EgressFilter extends core.Schema<EgressFilterArgs> {
  @core.attr(String)
  public type?: string | core.StringOut;
}

export interface SpecArgs extends core.SchemaArgs {
  egressFilter?: EgressFilter;
}

export class Spec extends core.Schema<SpecArgs> {
  @core.attr(EgressFilter)
  public egressFilter?: EgressFilter;
}

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

  spec?: Spec;

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

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

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

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

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

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

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

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

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

  @core.attr(Spec)
  public spec?: Spec;

  @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>;

  constructor(name: string, args?: MeshArgs) {
    super(name, "aws_appmesh_mesh", args);
  }

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