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

export interface BranchArgs extends core.ResourceArgs {
  appId: string | core.StringOut;

  backendEnvironmentArn?: string | core.StringOut;

  basicAuthCredentials?: string | core.StringOut;

  branchName: string | core.StringOut;

  description?: string | core.StringOut;

  displayName?: string | core.StringOut;

  enableAutoBuild?: boolean | core.BooleanOut;

  enableBasicAuth?: boolean | core.BooleanOut;

  enableNotification?: boolean | core.BooleanOut;

  enablePerformanceMode?: boolean | core.BooleanOut;

  enablePullRequestPreview?: boolean | core.BooleanOut;

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

  framework?: string | core.StringOut;

  pullRequestEnvironmentName?: string | core.StringOut;

  stage?: string | core.StringOut;

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

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

  ttl?: string | core.StringOut;
}

export class Branch extends core.Resource<BranchArgs> {
  @core.attr(String)
  public appId!: string | core.StringOut;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  @core.attr(String)
  public stage?: 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 ttl?: string | core.StringOut;

  constructor(name: string, args?: BranchArgs) {
    super(name, "aws_amplify_branch", args);
  }

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