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

export interface S3LogsArgs extends core.SchemaArgs {
  bucketOwnerAccess?: string | core.StringOut;

  encryptionDisabled?: boolean | core.BooleanOut;

  location?: string | core.StringOut;

  status?: string | core.StringOut;
}

export class S3Logs extends core.Schema<S3LogsArgs> {
  @core.attr(String)
  public bucketOwnerAccess?: string | core.StringOut;

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

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

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

export interface CloudwatchLogsArgs extends core.SchemaArgs {
  groupName?: string | core.StringOut;

  status?: string | core.StringOut;

  streamName?: string | core.StringOut;
}

export class CloudwatchLogs extends core.Schema<CloudwatchLogsArgs> {
  @core.attr(String)
  public groupName?: string | core.StringOut;

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

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

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

  s3Logs?: S3Logs;
}

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

  @core.attr(S3Logs)
  public s3Logs?: S3Logs;
}

export interface RegistryCredentialArgs extends core.SchemaArgs {
  credential: string | core.StringOut;

  credentialProvider: string | core.StringOut;
}

export class RegistryCredential extends core.Schema<RegistryCredentialArgs> {
  @core.attr(String)
  public credential!: string | core.StringOut;

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

export interface EnvironmentVariableArgs extends core.SchemaArgs {
  name: string | core.StringOut;

  type?: string | core.StringOut;

  value: string | core.StringOut;
}

export class EnvironmentVariable extends core.Schema<EnvironmentVariableArgs> {
  @core.attr(String)
  public name!: string | core.StringOut;

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

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

export interface EnvironmentArgs extends core.SchemaArgs {
  certificate?: string | core.StringOut;

  computeType: string | core.StringOut;

  environmentVariable?:
    | core.Array<EnvironmentVariable>
    | core.ArrayOut<EnvironmentVariable>;

  image: string | core.StringOut;

  imagePullCredentialsType?: string | core.StringOut;

  privilegedMode?: boolean | core.BooleanOut;

  registryCredential?: RegistryCredential;

  type: string | core.StringOut;
}

export class Environment extends core.Schema<EnvironmentArgs> {
  @core.attr(String)
  public certificate?: string | core.StringOut;

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

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

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

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

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

  @core.attr(RegistryCredential)
  public registryCredential?: RegistryCredential;

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

export interface GitSubmodulesConfigArgs extends core.SchemaArgs {
  fetchSubmodules: boolean | core.BooleanOut;
}

export class GitSubmodulesConfig extends core.Schema<GitSubmodulesConfigArgs> {
  @core.attr(Boolean)
  public fetchSubmodules!: boolean | core.BooleanOut;
}

export interface AuthArgs extends core.SchemaArgs {
  resource?: string | core.StringOut;

  type: string | core.StringOut;
}

export class Auth extends core.Schema<AuthArgs> {
  @core.attr(String)
  public resource?: string | core.StringOut;

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

export interface BuildStatusConfigArgs extends core.SchemaArgs {
  context?: string | core.StringOut;

  targetUrl?: string | core.StringOut;
}

export class BuildStatusConfig extends core.Schema<BuildStatusConfigArgs> {
  @core.attr(String)
  public context?: string | core.StringOut;

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

export interface SecondarySourcesArgs extends core.SchemaArgs {
  auth?: Auth;

  buildStatusConfig?: BuildStatusConfig;

  buildspec?: string | core.StringOut;

  gitCloneDepth?: number | core.NumberOut;

  gitSubmodulesConfig?: GitSubmodulesConfig;

  insecureSsl?: boolean | core.BooleanOut;

  location?: string | core.StringOut;

  reportBuildStatus?: boolean | core.BooleanOut;

  sourceIdentifier: string | core.StringOut;

  type: string | core.StringOut;
}

export class SecondarySources extends core.Schema<SecondarySourcesArgs> {
  @core.attr(Auth)
  public auth?: Auth;

  @core.attr(BuildStatusConfig)
  public buildStatusConfig?: BuildStatusConfig;

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

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

  @core.attr(GitSubmodulesConfig)
  public gitSubmodulesConfig?: GitSubmodulesConfig;

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

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

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

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

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

export interface SourceArgs extends core.SchemaArgs {
  auth?: Auth;

  buildStatusConfig?: BuildStatusConfig;

  buildspec?: string | core.StringOut;

  gitCloneDepth?: number | core.NumberOut;

  gitSubmodulesConfig?: GitSubmodulesConfig;

  insecureSsl?: boolean | core.BooleanOut;

  location?: string | core.StringOut;

  reportBuildStatus?: boolean | core.BooleanOut;

  type: string | core.StringOut;
}

export class Source extends core.Schema<SourceArgs> {
  @core.attr(Auth)
  public auth?: Auth;

  @core.attr(BuildStatusConfig)
  public buildStatusConfig?: BuildStatusConfig;

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

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

  @core.attr(GitSubmodulesConfig)
  public gitSubmodulesConfig?: GitSubmodulesConfig;

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

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

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

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

export interface SecondaryArtifactsArgs extends core.SchemaArgs {
  artifactIdentifier: string | core.StringOut;

  bucketOwnerAccess?: string | core.StringOut;

  encryptionDisabled?: boolean | core.BooleanOut;

  location?: string | core.StringOut;

  name?: string | core.StringOut;

  namespaceType?: string | core.StringOut;

  overrideArtifactName?: boolean | core.BooleanOut;

  packaging?: string | core.StringOut;

  path?: string | core.StringOut;

  type: string | core.StringOut;
}

export class SecondaryArtifacts extends core.Schema<SecondaryArtifactsArgs> {
  @core.attr(String)
  public artifactIdentifier!: string | core.StringOut;

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

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

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

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

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

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

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

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

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

export interface VpcConfigArgs extends core.SchemaArgs {
  securityGroupIds: core.Array<string> | core.ArrayOut<core.StringOut>;

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

  vpcId: string | core.StringOut;
}

export class VpcConfig extends core.Schema<VpcConfigArgs> {
  @core.attr(String, { kind: "array" })
  public securityGroupIds!: core.Array<string> | core.ArrayOut<core.StringOut>;

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

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

export interface CacheArgs extends core.SchemaArgs {
  location?: string | core.StringOut;

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

  type?: string | core.StringOut;
}

export class Cache extends core.Schema<CacheArgs> {
  @core.attr(String)
  public location?: string | core.StringOut;

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

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

export interface SecondarySourceVersionArgs extends core.SchemaArgs {
  sourceIdentifier: string | core.StringOut;

  sourceVersion: string | core.StringOut;
}

export class SecondarySourceVersion extends core.Schema<SecondarySourceVersionArgs> {
  @core.attr(String)
  public sourceIdentifier!: string | core.StringOut;

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

export interface ArtifactsArgs extends core.SchemaArgs {
  artifactIdentifier?: string | core.StringOut;

  bucketOwnerAccess?: string | core.StringOut;

  encryptionDisabled?: boolean | core.BooleanOut;

  location?: string | core.StringOut;

  name?: string | core.StringOut;

  namespaceType?: string | core.StringOut;

  overrideArtifactName?: boolean | core.BooleanOut;

  packaging?: string | core.StringOut;

  path?: string | core.StringOut;

  type: string | core.StringOut;
}

export class Artifacts extends core.Schema<ArtifactsArgs> {
  @core.attr(String)
  public artifactIdentifier?: string | core.StringOut;

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

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

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

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

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

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

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

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

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

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

  maximumBuildsAllowed?: number | core.NumberOut;
}

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

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

export interface BuildBatchConfigArgs extends core.SchemaArgs {
  combineArtifacts?: boolean | core.BooleanOut;

  restrictions?: Restrictions;

  serviceRole: string | core.StringOut;

  timeoutInMins?: number | core.NumberOut;
}

export class BuildBatchConfig extends core.Schema<BuildBatchConfigArgs> {
  @core.attr(Boolean)
  public combineArtifacts?: boolean | core.BooleanOut;

  @core.attr(Restrictions)
  public restrictions?: Restrictions;

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

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

export interface FileSystemLocationsArgs extends core.SchemaArgs {
  identifier?: string | core.StringOut;

  location?: string | core.StringOut;

  mountOptions?: string | core.StringOut;

  mountPoint?: string | core.StringOut;

  type?: string | core.StringOut;
}

export class FileSystemLocations extends core.Schema<FileSystemLocationsArgs> {
  @core.attr(String)
  public identifier?: string | core.StringOut;

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

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

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

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

export interface ProjectArgs extends core.ResourceArgs {
  artifacts: Artifacts;

  badgeEnabled?: boolean | core.BooleanOut;

  buildBatchConfig?: BuildBatchConfig;

  buildTimeout?: number | core.NumberOut;

  cache?: Cache;

  concurrentBuildLimit?: number | core.NumberOut;

  description?: string | core.StringOut;

  encryptionKey?: string | core.StringOut;

  environment: Environment;

  fileSystemLocations?:
    | core.Array<FileSystemLocations>
    | core.ArrayOut<FileSystemLocations>;

  logsConfig?: LogsConfig;

  name: string | core.StringOut;

  projectVisibility?: string | core.StringOut;

  queuedTimeout?: number | core.NumberOut;

  resourceAccessRole?: string | core.StringOut;

  secondaryArtifacts?:
    | core.Array<SecondaryArtifacts>
    | core.ArrayOut<SecondaryArtifacts>;

  secondarySourceVersion?:
    | core.Array<SecondarySourceVersion>
    | core.ArrayOut<SecondarySourceVersion>;

  secondarySources?:
    | core.Array<SecondarySources>
    | core.ArrayOut<SecondarySources>;

  serviceRole: string | core.StringOut;

  source: Source;

  sourceVersion?: string | core.StringOut;

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

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

  vpcConfig?: VpcConfig;
}

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

  @core.attr(Artifacts)
  public artifacts!: Artifacts;

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

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

  @core.attr(BuildBatchConfig)
  public buildBatchConfig?: BuildBatchConfig;

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

  @core.attr(Cache)
  public cache?: Cache;

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

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

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

  @core.attr(Environment)
  public environment!: Environment;

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

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

  @core.attr(LogsConfig)
  public logsConfig?: LogsConfig;

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

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

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

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

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

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

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

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

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

  @core.attr(Source)
  public source!: Source;

  @core.attr(String)
  public sourceVersion?: 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(VpcConfig)
  public vpcConfig?: VpcConfig;

  constructor(name: string, args?: ProjectArgs) {
    super(name, "aws_codebuild_project", args);
  }

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