// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
//   protoc-gen-ts_proto  v1.174.0
//   protoc               v3.12.4
// source: Projects.proto

/* eslint-disable */
import { type DatasourceDto, type TimestampsDto } from './Magma';

export const protobufPackage = 'Projects';

export enum ProjectDatasourceStatusDto {
  LOADING = 'LOADING',
  READY = 'READY',
  BUSY = 'BUSY',
  NONE = 'NONE',
  ERRORS = 'ERRORS',
  UNRECOGNIZED = 'UNRECOGNIZED',
}

export enum AnalysisStatusDto {
  IN_PROGRESS = 'IN_PROGRESS',
  PASSED = 'PASSED',
  FAILED = 'FAILED',
  ERROR = 'ERROR',
  IGNORED = 'IGNORED',
  UNRECOGNIZED = 'UNRECOGNIZED',
}

export interface ProjectDto {
  name: string;
  title: string;
  description?: string | undefined;
  datasource?: DatasourceDto | undefined;
  tags: string[];
  link?: string | undefined;
  directory?: string | undefined;
  archived?: boolean | undefined;
  database?: string | undefined;
  timestamps?: TimestampsDto | undefined;
  vcfStoreService?: string | undefined;
  exportFolder?: string | undefined;
  idMappings: ProjectDto_IdentifiersMappingDto[];
  datasourceStatus?: ProjectDatasourceStatusDto | undefined;
}

export interface ProjectDto_IdentifiersMappingDto {
  entityType: string;
  name: string;
  mapping: string;
}

export interface ProjectFactoryDto {
  name: string;
  title?: string | undefined;
  description?: string | undefined;
  database?: string | undefined;
  tags: string[];
  vcfStoreService?: string | undefined;
  exportFolder?: string | undefined;
}

export interface ProjectSummaryDto {
  name: string;
  tableCount: number;
  variableCount: number;
  entityCount: number;
  viewCount: number;
  derivedVariableCount: number;
  resourceCount: number;
  datasourceStatus: ProjectDatasourceStatusDto;
  timestamps?: TimestampsDto | undefined;
}

export interface OpalAnalysisDto {
  name: string;
  datasource: string;
  table: string;
  pluginName: string;
  templateName: string;
  parameters: string;
  variables: string[];
  created?: string | undefined;
  updated?: string | undefined;
  analysisResults: OpalAnalysisResultDto[];
  lastResult?: OpalAnalysisResultDto | undefined;
}

export interface OpalAnalysesDto {
  analyses: OpalAnalysisDto[];
}

export interface OpalAnalysisResultDto {
  id: string;
  analysisName: string;
  startDate?: string | undefined;
  endDate?: string | undefined;
  resultItems: AnalysisResultItemDto[];
  status: AnalysisStatusDto;
  message?: string | undefined;
  created?: string | undefined;
  updated?: string | undefined;
}

export interface AnalysisResultItemDto {
  status: AnalysisStatusDto;
  message?: string | undefined;
}

export interface OpalAnalysisResultsDto {
  analysisResults: OpalAnalysisResultDto[];
}

export interface ResourceReferenceDto {
  name: string;
  description?: string | undefined;
  project: string;
  provider: string;
  factory: string;
  parameters: string;
  credentials?: string | undefined;
  created?: string | undefined;
  updated?: string | undefined;
  resource?: ResourceSummaryDto | undefined;
  editable?: boolean | undefined;
}

export interface ResourceSummaryDto {
  name: string;
  url: string;
  format?: string | undefined;
}
