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

export interface ClientLoginBannerOptionsArgs extends core.SchemaArgs {
  bannerText?: string | core.StringOut;

  enabled?: boolean | core.BooleanOut;
}

export class ClientLoginBannerOptions extends core.Schema<ClientLoginBannerOptionsArgs> {
  @core.attr(String, { computed: true })
  public bannerText?: string | core.StringOut;

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

export interface ClientConnectOptionsArgs extends core.SchemaArgs {
  enabled?: boolean | core.BooleanOut;

  lambdaFunctionArn?: string | core.StringOut;
}

export class ClientConnectOptions extends core.Schema<ClientConnectOptionsArgs> {
  @core.attr(Boolean, { computed: true })
  public enabled?: boolean | core.BooleanOut;

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

export interface AuthenticationOptionsArgs extends core.SchemaArgs {
  activeDirectoryId?: string | core.StringOut;

  rootCertificateChainArn?: string | core.StringOut;

  samlProviderArn?: string | core.StringOut;

  selfServiceSamlProviderArn?: string | core.StringOut;

  type: string | core.StringOut;
}

export class AuthenticationOptions extends core.Schema<AuthenticationOptionsArgs> {
  @core.attr(String)
  public activeDirectoryId?: string | core.StringOut;

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

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

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

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

export interface ConnectionLogOptionsArgs extends core.SchemaArgs {
  cloudwatchLogGroup?: string | core.StringOut;

  cloudwatchLogStream?: string | core.StringOut;

  enabled: boolean | core.BooleanOut;
}

export class ConnectionLogOptions extends core.Schema<ConnectionLogOptionsArgs> {
  @core.attr(String)
  public cloudwatchLogGroup?: string | core.StringOut;

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

  @core.attr(Boolean)
  public enabled!: boolean | core.BooleanOut;
}

export interface Ec2ClientVpnEndpointArgs extends core.ResourceArgs {
  authenticationOptions:
    | core.Array<AuthenticationOptions>
    | core.ArrayOut<AuthenticationOptions>;

  clientCidrBlock: string | core.StringOut;

  clientConnectOptions?: ClientConnectOptions;

  clientLoginBannerOptions?: ClientLoginBannerOptions;

  connectionLogOptions: ConnectionLogOptions;

  description?: string | core.StringOut;

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

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

  selfServicePortal?: string | core.StringOut;

  serverCertificateArn: string | core.StringOut;

  sessionTimeoutHours?: number | core.NumberOut;

  splitTunnel?: boolean | core.BooleanOut;

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

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

  transportProtocol?: string | core.StringOut;

  vpcId?: string | core.StringOut;

  vpnPort?: number | core.NumberOut;
}

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

  @core.attr(AuthenticationOptions, { kind: "array" })
  public authenticationOptions!:
    | core.Array<AuthenticationOptions>
    | core.ArrayOut<AuthenticationOptions>;

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

  @core.attr(ClientConnectOptions, { computed: true })
  public clientConnectOptions?: ClientConnectOptions;

  @core.attr(ClientLoginBannerOptions, { computed: true })
  public clientLoginBannerOptions?: ClientLoginBannerOptions;

  @core.attr(ConnectionLogOptions)
  public connectionLogOptions!: ConnectionLogOptions;

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

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

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

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

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

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

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

  @core.attr(Number)
  public sessionTimeoutHours?: number | core.NumberOut;

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

  @core.attr(String, { computed: true })
  public status!: 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 transportProtocol?: string | core.StringOut;

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

  @core.attr(Number)
  public vpnPort?: number | core.NumberOut;

  constructor(name: string, args?: Ec2ClientVpnEndpointArgs) {
    super(name, "aws_ec2_client_vpn_endpoint", args);
  }

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