File

src/datablocks/dto/create-datablock.dto.ts

Extends

OwnableDto

Index

Properties

Properties

Readonly archiveId
Type : string
Decorators :
@ApiProperty({type: String, required: true, description: 'Unique identifier given by the archive system to the stored datablock. This id is used when data is retrieved back.'})
@IsString()
Readonly chkAlg
Type : string
Decorators :
@ApiProperty({type: String, required: false, description: 'Name of the hasing algorithm used to compute the hash for each file.'})
@IsOptional()
@IsString()
@IsNotEmpty()
Readonly dataFileList
Type : DataFile[]
Decorators :
@IsArray()
@ArrayNotEmpty()
@ValidateNested({each: true})
@Type(undefined)
Readonly datasetId
Type : string
Decorators :
@ApiProperty({type: String, required: true, description: 'Persistent identifier of the dataset this orig datablock belongs to.'})
@IsString()
Readonly packedSize
Type : number
Decorators :
@ApiProperty({type: Number, required: true, description: 'Total size in bytes of all files in the datablock when on archived.'})
@IsInt()
Readonly size
Type : number
Decorators :
@ApiProperty({type: Number, required: true, description: 'Total size in bytes of all files in the datablock when on accessible.'})
@IsInt()
Readonly version
Type : string
Decorators :
@ApiProperty({type: String, required: true, description: 'Version string defining the format of how data is packed and stored in archive.'})
@IsString()
Readonly Optional accessGroups
Type : string[]
Decorators :
@ApiProperty({type: undefined, required: false, description: 'List of groups which have access to this item.'})
@IsOptional()
@IsString({each: true})
Inherited from OwnableDto
Defined in OwnableDto:22
Readonly Optional instrumentGroup
Type : string
Decorators :
@ApiProperty({type: String, required: false, description: 'Group of the instrument which this item was acquired on.'})
@IsOptional()
@IsString()
Inherited from OwnableDto
Defined in OwnableDto:31
Readonly ownerGroup
Type : string
Decorators :
@ApiProperty({type: String, required: true, description: 'Name of the group owning this item.'})
@IsString()
Inherited from OwnableDto
Defined in OwnableDto:11
import { ApiProperty } from "@nestjs/swagger";
import { Type } from "class-transformer";
import {
  ArrayNotEmpty,
  IsArray,
  IsInt,
  IsNotEmpty,
  IsOptional,
  IsString,
  ValidateNested,
} from "class-validator";
import { DataFileDto } from "src/common/dto/datafile.dto";
import { OwnableDto } from "src/common/dto/ownable.dto";
import { DataFile } from "src/common/schemas/datafile.schema";

export class CreateDatablockDto extends OwnableDto {
  @ApiProperty({
    type: String,
    required: true,
    description:
      "Persistent identifier of the dataset this orig datablock belongs to.",
  })
  @IsString()
  readonly datasetId: string;

  @ApiProperty({
    type: String,
    required: true,
    description:
      "Unique identifier given by the archive system to the stored datablock. This id is used when data is retrieved back.",
  })
  @IsString()
  readonly archiveId: string;

  @ApiProperty({
    type: Number,
    required: true,
    description:
      "Total size in bytes of all files in the datablock when on accessible.",
  })
  @IsInt()
  readonly size: number;

  @ApiProperty({
    type: Number,
    required: true,
    description:
      "Total size in bytes of all files in the datablock when on archived.",
  })
  @IsInt()
  readonly packedSize: number;

  @ApiProperty({
    type: String,
    required: false,
    description:
      "Name of the hasing algorithm used to compute the hash for each file.",
  })
  @IsOptional()
  @IsString()
  @IsNotEmpty()
  readonly chkAlg: string;

  @ApiProperty({
    type: String,
    required: true,
    description:
      "Version string defining the format of how data is packed and stored in archive.",
  })
  @IsString()
  readonly version: string;

  @IsArray()
  @ArrayNotEmpty()
  @ValidateNested({ each: true })
  @Type(() => DataFileDto)
  readonly dataFileList: DataFile[];
}

results matching ""

    No results matching ""