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

export interface NodeExporterArgs extends core.SchemaArgs {
  enabledInBroker: boolean | core.BooleanOut;
}

export class NodeExporter extends core.Schema<NodeExporterArgs> {
  @core.attr(Boolean)
  public enabledInBroker!: boolean | core.BooleanOut;
}

export interface JmxExporterArgs extends core.SchemaArgs {
  enabledInBroker: boolean | core.BooleanOut;
}

export class JmxExporter extends core.Schema<JmxExporterArgs> {
  @core.attr(Boolean)
  public enabledInBroker!: boolean | core.BooleanOut;
}

export interface PrometheusArgs extends core.SchemaArgs {
  jmxExporter?: JmxExporter;

  nodeExporter?: NodeExporter;
}

export class Prometheus extends core.Schema<PrometheusArgs> {
  @core.attr(JmxExporter)
  public jmxExporter?: JmxExporter;

  @core.attr(NodeExporter)
  public nodeExporter?: NodeExporter;
}

export interface OpenMonitoringArgs extends core.SchemaArgs {
  prometheus: Prometheus;
}

export class OpenMonitoring extends core.Schema<OpenMonitoringArgs> {
  @core.attr(Prometheus)
  public prometheus!: Prometheus;
}

export interface ConfigurationInfoArgs extends core.SchemaArgs {
  arn: string | core.StringOut;

  revision: number | core.NumberOut;
}

export class ConfigurationInfo extends core.Schema<ConfigurationInfoArgs> {
  @core.attr(String)
  public arn!: string | core.StringOut;

  @core.attr(Number)
  public revision!: number | core.NumberOut;
}

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

  logGroup?: string | core.StringOut;
}

export class CloudwatchLogs extends core.Schema<CloudwatchLogsArgs> {
  @core.attr(Boolean)
  public enabled!: boolean | core.BooleanOut;

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

export interface FirehoseArgs extends core.SchemaArgs {
  deliveryStream?: string | core.StringOut;

  enabled: boolean | core.BooleanOut;
}

export class Firehose extends core.Schema<FirehoseArgs> {
  @core.attr(String)
  public deliveryStream?: string | core.StringOut;

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

export interface S3Args extends core.SchemaArgs {
  bucket?: string | core.StringOut;

  enabled: boolean | core.BooleanOut;

  prefix?: string | core.StringOut;
}

export class S3 extends core.Schema<S3Args> {
  @core.attr(String)
  public bucket?: string | core.StringOut;

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

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

export interface BrokerLogsArgs extends core.SchemaArgs {
  cloudwatchLogs?: CloudwatchLogs;

  firehose?: Firehose;

  s3?: S3;
}

export class BrokerLogs extends core.Schema<BrokerLogsArgs> {
  @core.attr(CloudwatchLogs)
  public cloudwatchLogs?: CloudwatchLogs;

  @core.attr(Firehose)
  public firehose?: Firehose;

  @core.attr(S3)
  public s3?: S3;
}

export interface LoggingInfoArgs extends core.SchemaArgs {
  brokerLogs: BrokerLogs;
}

export class LoggingInfo extends core.Schema<LoggingInfoArgs> {
  @core.attr(BrokerLogs)
  public brokerLogs!: BrokerLogs;
}

export interface SaslArgs extends core.SchemaArgs {
  iam?: boolean | core.BooleanOut;

  scram?: boolean | core.BooleanOut;
}

export class Sasl extends core.Schema<SaslArgs> {
  @core.attr(Boolean)
  public iam?: boolean | core.BooleanOut;

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

export interface TlsArgs extends core.SchemaArgs {
  certificateAuthorityArns?: core.Array<string> | core.ArrayOut<core.StringOut>;
}

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

export interface ClientAuthenticationArgs extends core.SchemaArgs {
  sasl?: Sasl;

  tls?: Tls;

  unauthenticated?: boolean | core.BooleanOut;
}

export class ClientAuthentication extends core.Schema<ClientAuthenticationArgs> {
  @core.attr(Sasl)
  public sasl?: Sasl;

  @core.attr(Tls)
  public tls?: Tls;

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

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

  volumeThroughput?: number | core.NumberOut;
}

export class ProvisionedThroughput extends core.Schema<ProvisionedThroughputArgs> {
  @core.attr(Boolean)
  public enabled?: boolean | core.BooleanOut;

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

export interface EbsStorageInfoArgs extends core.SchemaArgs {
  provisionedThroughput?: ProvisionedThroughput;

  volumeSize?: number | core.NumberOut;
}

export class EbsStorageInfo extends core.Schema<EbsStorageInfoArgs> {
  @core.attr(ProvisionedThroughput)
  public provisionedThroughput?: ProvisionedThroughput;

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

export interface StorageInfoArgs extends core.SchemaArgs {
  ebsStorageInfo?: EbsStorageInfo;
}

export class StorageInfo extends core.Schema<StorageInfoArgs> {
  @core.attr(EbsStorageInfo)
  public ebsStorageInfo?: EbsStorageInfo;
}

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

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

export interface ConnectivityInfoArgs extends core.SchemaArgs {
  publicAccess?: PublicAccess;
}

export class ConnectivityInfo extends core.Schema<ConnectivityInfoArgs> {
  @core.attr(PublicAccess, { computed: true })
  public publicAccess?: PublicAccess;
}

export interface BrokerNodeGroupInfoArgs extends core.SchemaArgs {
  azDistribution?: string | core.StringOut;

  clientSubnets: core.Array<string> | core.ArrayOut<core.StringOut>;

  connectivityInfo?: ConnectivityInfo;

  ebsVolumeSize?: number | core.NumberOut;

  instanceType: string | core.StringOut;

  securityGroups: core.Array<string> | core.ArrayOut<core.StringOut>;

  storageInfo?: StorageInfo;
}

export class BrokerNodeGroupInfo extends core.Schema<BrokerNodeGroupInfoArgs> {
  @core.attr(String)
  public azDistribution?: string | core.StringOut;

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

  @core.attr(ConnectivityInfo, { computed: true })
  public connectivityInfo?: ConnectivityInfo;

  @core.attr(Number, { computed: true })
  public ebsVolumeSize?: number | core.NumberOut;

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

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

  @core.attr(StorageInfo, { computed: true })
  public storageInfo?: StorageInfo;
}

export interface EncryptionInTransitArgs extends core.SchemaArgs {
  clientBroker?: string | core.StringOut;

  inCluster?: boolean | core.BooleanOut;
}

export class EncryptionInTransit extends core.Schema<EncryptionInTransitArgs> {
  @core.attr(String)
  public clientBroker?: string | core.StringOut;

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

export interface EncryptionInfoArgs extends core.SchemaArgs {
  encryptionAtRestKmsKeyArn?: string | core.StringOut;

  encryptionInTransit?: EncryptionInTransit;
}

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

  @core.attr(EncryptionInTransit)
  public encryptionInTransit?: EncryptionInTransit;
}

export interface MskClusterArgs extends core.ResourceArgs {
  brokerNodeGroupInfo: BrokerNodeGroupInfo;

  clientAuthentication?: ClientAuthentication;

  clusterName: string | core.StringOut;

  configurationInfo?: ConfigurationInfo;

  encryptionInfo?: EncryptionInfo;

  enhancedMonitoring?: string | core.StringOut;

  kafkaVersion: string | core.StringOut;

  loggingInfo?: LoggingInfo;

  numberOfBrokerNodes: number | core.NumberOut;

  openMonitoring?: OpenMonitoring;

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

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

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

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

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

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

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

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

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

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

  @core.attr(BrokerNodeGroupInfo)
  public brokerNodeGroupInfo!: BrokerNodeGroupInfo;

  @core.attr(ClientAuthentication)
  public clientAuthentication?: ClientAuthentication;

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

  @core.attr(ConfigurationInfo)
  public configurationInfo?: ConfigurationInfo;

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

  @core.attr(EncryptionInfo)
  public encryptionInfo?: EncryptionInfo;

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

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

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

  @core.attr(LoggingInfo)
  public loggingInfo?: LoggingInfo;

  @core.attr(Number)
  public numberOfBrokerNodes!: number | core.NumberOut;

  @core.attr(OpenMonitoring)
  public openMonitoring?: OpenMonitoring;

  @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, { computed: true })
  public zookeeperConnectString!: string | core.StringOut;

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

  constructor(name: string, args?: MskClusterArgs) {
    super(name, "aws_msk_cluster", args);
  }

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