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

export interface EndpointDetailsArgs extends core.SchemaArgs {
  addressAllocationIds?: core.Array<string> | core.ArrayOut<core.StringOut>;

  securityGroupIds?: core.Array<string> | core.ArrayOut<core.StringOut>;

  subnetIds?: core.Array<string> | core.ArrayOut<core.StringOut>;

  vpcEndpointId?: string | core.StringOut;

  vpcId?: string | core.StringOut;
}

export class EndpointDetails extends core.Schema<EndpointDetailsArgs> {
  @core.attr(String, { kind: "array" })
  public addressAllocationIds?:
    | core.Array<string>
    | core.ArrayOut<core.StringOut>;

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

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

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

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

export interface OnUploadArgs extends core.SchemaArgs {
  executionRole: string | core.StringOut;

  workflowId: string | core.StringOut;
}

export class OnUpload extends core.Schema<OnUploadArgs> {
  @core.attr(String)
  public executionRole!: string | core.StringOut;

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

export interface WorkflowDetailsArgs extends core.SchemaArgs {
  onUpload?: OnUpload;
}

export class WorkflowDetails extends core.Schema<WorkflowDetailsArgs> {
  @core.attr(OnUpload)
  public onUpload?: OnUpload;
}

export interface ServerArgs extends core.ResourceArgs {
  certificate?: string | core.StringOut;

  directoryId?: string | core.StringOut;

  domain?: string | core.StringOut;

  endpointDetails?: EndpointDetails;

  endpointType?: string | core.StringOut;

  forceDestroy?: boolean | core.BooleanOut;

  function?: string | core.StringOut;

  hostKey?: string | core.StringOut;

  identityProviderType?: string | core.StringOut;

  invocationRole?: string | core.StringOut;

  loggingRole?: string | core.StringOut;

  postAuthenticationLoginBanner?: string | core.StringOut;

  preAuthenticationLoginBanner?: string | core.StringOut;

  protocols?: core.Array<string> | core.ArrayOut<core.StringOut>;

  securityPolicyName?: string | core.StringOut;

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

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

  url?: string | core.StringOut;

  workflowDetails?: WorkflowDetails;
}

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

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

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

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

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

  @core.attr(EndpointDetails)
  public endpointDetails?: EndpointDetails;

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

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

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

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

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

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

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

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

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

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

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

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

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

  @core.attr(WorkflowDetails)
  public workflowDetails?: WorkflowDetails;

  constructor(name: string, args?: ServerArgs) {
    super(name, "aws_transfer_server", args);
  }

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