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

export interface ResourceUrisArgs extends core.SchemaArgs {
  resourceType: string | core.StringOut;

  uri: string | core.StringOut;
}

export class ResourceUris extends core.Schema<ResourceUrisArgs> {
  @core.attr(String)
  public resourceType!: string | core.StringOut;

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

export interface UserDefinedFunctionArgs extends core.ResourceArgs {
  catalogId?: string | core.StringOut;

  className: string | core.StringOut;

  databaseName: string | core.StringOut;

  name: string | core.StringOut;

  ownerName: string | core.StringOut;

  ownerType: string | core.StringOut;

  resourceUris?: core.Array<ResourceUris> | core.ArrayOut<ResourceUris>;
}

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

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

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

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

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

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

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

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

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

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

  constructor(name: string, args?: UserDefinedFunctionArgs) {
    super(name, "aws_glue_user_defined_function", args);
  }

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