diff --git a/.generator b/.generator index 905031f..67d669b 160000 --- a/.generator +++ b/.generator @@ -1 +1 @@ -Subproject commit 905031ff3d7763722dc55e4fd6ea07cc8e4687a3 +Subproject commit 67d669b346458bafb515fb48a8128a26953e4d2c diff --git a/src/TypeScriptSDK/models/Building.ts b/src/TypeScriptSDK/models/Building.ts index eee22f0..e36732d 100644 --- a/src/TypeScriptSDK/models/Building.ts +++ b/src/TypeScriptSDK/models/Building.ts @@ -1,4 +1,4 @@ -import { IsInstance, ValidateNested, IsDefined, IsString, IsOptional, IsArray, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsInstance, ValidateNested, IsDefined, IsString, IsOptional, Matches, IsArray, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { BuildingPropertiesAbridged } from "./BuildingPropertiesAbridged"; import { IDdBaseModel } from "honeybee-schema"; @@ -17,6 +17,7 @@ export class Building extends IDdBaseModel { @IsString() @IsOptional() + @Matches(/^Building$/) type?: string; @IsArray() diff --git a/src/TypeScriptSDK/models/BuildingEnergyPropertiesAbridged.ts b/src/TypeScriptSDK/models/BuildingEnergyPropertiesAbridged.ts index af740c2..94cef67 100644 --- a/src/TypeScriptSDK/models/BuildingEnergyPropertiesAbridged.ts +++ b/src/TypeScriptSDK/models/BuildingEnergyPropertiesAbridged.ts @@ -1,4 +1,4 @@ -import { IsString, IsOptional, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsString, IsOptional, Matches, MinLength, MaxLength, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; @@ -6,10 +6,13 @@ import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; export class BuildingEnergyPropertiesAbridged extends _OpenAPIGenBaseModel { @IsString() @IsOptional() + @Matches(/^BuildingEnergyPropertiesAbridged$/) type?: string; @IsString() @IsOptional() + @MinLength(1) + @MaxLength(100) /** Name of a ConstructionSet to specify all constructions for the Building. If None, the Model global_construction_set will be used. */ construction_set?: string; diff --git a/src/TypeScriptSDK/models/BuildingPropertiesAbridged.ts b/src/TypeScriptSDK/models/BuildingPropertiesAbridged.ts index 15ff70d..e10be60 100644 --- a/src/TypeScriptSDK/models/BuildingPropertiesAbridged.ts +++ b/src/TypeScriptSDK/models/BuildingPropertiesAbridged.ts @@ -1,4 +1,4 @@ -import { IsString, IsOptional, IsInstance, ValidateNested, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsString, IsOptional, Matches, IsInstance, ValidateNested, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; import { BuildingEnergyPropertiesAbridged } from "./BuildingEnergyPropertiesAbridged"; @@ -7,6 +7,7 @@ import { BuildingRadiancePropertiesAbridged } from "./BuildingRadianceProperties export class BuildingPropertiesAbridged extends _OpenAPIGenBaseModel { @IsString() @IsOptional() + @Matches(/^BuildingPropertiesAbridged$/) type?: string; @IsInstance(BuildingEnergyPropertiesAbridged) diff --git a/src/TypeScriptSDK/models/BuildingRadiancePropertiesAbridged.ts b/src/TypeScriptSDK/models/BuildingRadiancePropertiesAbridged.ts index 0d44dc1..e311eae 100644 --- a/src/TypeScriptSDK/models/BuildingRadiancePropertiesAbridged.ts +++ b/src/TypeScriptSDK/models/BuildingRadiancePropertiesAbridged.ts @@ -1,4 +1,4 @@ -import { IsString, IsOptional, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsString, IsOptional, Matches, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; @@ -6,6 +6,7 @@ import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; export class BuildingRadiancePropertiesAbridged extends _OpenAPIGenBaseModel { @IsString() @IsOptional() + @Matches(/^BuildingRadiancePropertiesAbridged$/) type?: string; @IsString() diff --git a/src/TypeScriptSDK/models/ContextShade.ts b/src/TypeScriptSDK/models/ContextShade.ts index 73593ec..6fb3084 100644 --- a/src/TypeScriptSDK/models/ContextShade.ts +++ b/src/TypeScriptSDK/models/ContextShade.ts @@ -1,4 +1,4 @@ -import { IsArray, IsDefined, IsInstance, ValidateNested, IsString, IsOptional, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsArray, IsDefined, IsInstance, ValidateNested, IsString, IsOptional, Matches, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { ContextShadePropertiesAbridged } from "./ContextShadePropertiesAbridged"; import { Face3D } from "honeybee-schema"; @@ -21,6 +21,7 @@ export class ContextShade extends IDdBaseModel { @IsString() @IsOptional() + @Matches(/^ContextShade$/) type?: string; @IsBoolean() diff --git a/src/TypeScriptSDK/models/ContextShadeEnergyPropertiesAbridged.ts b/src/TypeScriptSDK/models/ContextShadeEnergyPropertiesAbridged.ts index 071c132..2cec525 100644 --- a/src/TypeScriptSDK/models/ContextShadeEnergyPropertiesAbridged.ts +++ b/src/TypeScriptSDK/models/ContextShadeEnergyPropertiesAbridged.ts @@ -1,4 +1,4 @@ -import { IsString, IsOptional, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsString, IsOptional, Matches, MinLength, MaxLength, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; @@ -6,15 +6,20 @@ import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; export class ContextShadeEnergyPropertiesAbridged extends _OpenAPIGenBaseModel { @IsString() @IsOptional() + @Matches(/^ContextShadeEnergyPropertiesAbridged$/) type?: string; @IsString() @IsOptional() + @MinLength(1) + @MaxLength(100) /** Name of a ShadeConstruction to set the reflectance and specularity of the ContextShade. If None, the the EnergyPlus default of 0.2 diffuse reflectance will be used. */ construction?: string; @IsString() @IsOptional() + @MinLength(1) + @MaxLength(100) /** Name of a schedule to set the transmittance of the ContextShade, which can vary throughout the simulation. If None, the ContextShade will be completely opaque. */ transmittance_schedule?: string; diff --git a/src/TypeScriptSDK/models/ContextShadePropertiesAbridged.ts b/src/TypeScriptSDK/models/ContextShadePropertiesAbridged.ts index fdf01a2..c688940 100644 --- a/src/TypeScriptSDK/models/ContextShadePropertiesAbridged.ts +++ b/src/TypeScriptSDK/models/ContextShadePropertiesAbridged.ts @@ -1,4 +1,4 @@ -import { IsString, IsOptional, IsInstance, ValidateNested, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsString, IsOptional, Matches, IsInstance, ValidateNested, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; import { ContextShadeEnergyPropertiesAbridged } from "./ContextShadeEnergyPropertiesAbridged"; @@ -7,6 +7,7 @@ import { ContextShadeRadiancePropertiesAbridged } from "./ContextShadeRadiancePr export class ContextShadePropertiesAbridged extends _OpenAPIGenBaseModel { @IsString() @IsOptional() + @Matches(/^ContextShadePropertiesAbridged$/) type?: string; @IsInstance(ContextShadeEnergyPropertiesAbridged) diff --git a/src/TypeScriptSDK/models/ContextShadeRadiancePropertiesAbridged.ts b/src/TypeScriptSDK/models/ContextShadeRadiancePropertiesAbridged.ts index 0c88386..ab847ec 100644 --- a/src/TypeScriptSDK/models/ContextShadeRadiancePropertiesAbridged.ts +++ b/src/TypeScriptSDK/models/ContextShadeRadiancePropertiesAbridged.ts @@ -1,4 +1,4 @@ -import { IsString, IsOptional, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsString, IsOptional, Matches, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; @@ -6,6 +6,7 @@ import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; export class ContextShadeRadiancePropertiesAbridged extends _OpenAPIGenBaseModel { @IsString() @IsOptional() + @Matches(/^ContextShadeRadiancePropertiesAbridged$/) type?: string; @IsString() diff --git a/src/TypeScriptSDK/models/DetailedSkylights.ts b/src/TypeScriptSDK/models/DetailedSkylights.ts index 40f7150..224216d 100644 --- a/src/TypeScriptSDK/models/DetailedSkylights.ts +++ b/src/TypeScriptSDK/models/DetailedSkylights.ts @@ -1,4 +1,4 @@ -import { IsArray, ValidateNested, IsNumber, IsDefined, IsString, IsOptional, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsArray, ValidateNested, IsNumber, IsDefined, IsString, IsOptional, Matches, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; @@ -18,6 +18,7 @@ export class DetailedSkylights extends _OpenAPIGenBaseModel { @IsString() @IsOptional() + @Matches(/^DetailedSkylights$/) type?: string; @IsArray() diff --git a/src/TypeScriptSDK/models/DetailedWindows.ts b/src/TypeScriptSDK/models/DetailedWindows.ts index 2176e22..6a300e8 100644 --- a/src/TypeScriptSDK/models/DetailedWindows.ts +++ b/src/TypeScriptSDK/models/DetailedWindows.ts @@ -1,4 +1,4 @@ -import { IsArray, ValidateNested, IsNumber, IsDefined, IsString, IsOptional, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsArray, ValidateNested, IsNumber, IsDefined, IsString, IsOptional, Matches, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _WindowParameterBase } from "./_WindowParameterBase"; @@ -18,6 +18,7 @@ export class DetailedWindows extends _WindowParameterBase { @IsString() @IsOptional() + @Matches(/^DetailedWindows$/) type?: string; @IsArray() diff --git a/src/TypeScriptSDK/models/ExteriorApertureGridParameter.ts b/src/TypeScriptSDK/models/ExteriorApertureGridParameter.ts index 7f76fb9..5708b67 100644 --- a/src/TypeScriptSDK/models/ExteriorApertureGridParameter.ts +++ b/src/TypeScriptSDK/models/ExteriorApertureGridParameter.ts @@ -1,4 +1,4 @@ -import { IsString, IsOptional, IsNumber, IsEnum, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsString, IsOptional, Matches, IsNumber, IsEnum, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _GridParameterBase } from "./_GridParameterBase"; import { ExteriorApertureType } from "./ExteriorApertureType"; @@ -7,6 +7,7 @@ import { ExteriorApertureType } from "./ExteriorApertureType"; export class ExteriorApertureGridParameter extends _GridParameterBase { @IsString() @IsOptional() + @Matches(/^ExteriorApertureGridParameter$/) type?: string; @IsNumber() diff --git a/src/TypeScriptSDK/models/ExteriorFaceGridParameter.ts b/src/TypeScriptSDK/models/ExteriorFaceGridParameter.ts index f5d1470..9410c93 100644 --- a/src/TypeScriptSDK/models/ExteriorFaceGridParameter.ts +++ b/src/TypeScriptSDK/models/ExteriorFaceGridParameter.ts @@ -1,4 +1,4 @@ -import { IsString, IsOptional, IsNumber, IsEnum, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsString, IsOptional, Matches, IsNumber, IsEnum, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _GridParameterBase } from "./_GridParameterBase"; import { ExteriorFaceType } from "./ExteriorFaceType"; @@ -7,6 +7,7 @@ import { ExteriorFaceType } from "./ExteriorFaceType"; export class ExteriorFaceGridParameter extends _GridParameterBase { @IsString() @IsOptional() + @Matches(/^ExteriorFaceGridParameter$/) type?: string; @IsNumber() diff --git a/src/TypeScriptSDK/models/ExtrudedBorder.ts b/src/TypeScriptSDK/models/ExtrudedBorder.ts index 2e3b395..6e94c00 100644 --- a/src/TypeScriptSDK/models/ExtrudedBorder.ts +++ b/src/TypeScriptSDK/models/ExtrudedBorder.ts @@ -1,4 +1,4 @@ -import { IsNumber, IsDefined, IsString, IsOptional, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsNumber, IsDefined, IsString, IsOptional, Matches, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; @@ -11,6 +11,7 @@ export class ExtrudedBorder extends _OpenAPIGenBaseModel { @IsString() @IsOptional() + @Matches(/^ExtrudedBorder$/) type?: string; diff --git a/src/TypeScriptSDK/models/GriddedSkylightArea.ts b/src/TypeScriptSDK/models/GriddedSkylightArea.ts index 5bd9cbd..01a9ce8 100644 --- a/src/TypeScriptSDK/models/GriddedSkylightArea.ts +++ b/src/TypeScriptSDK/models/GriddedSkylightArea.ts @@ -1,4 +1,4 @@ -import { IsNumber, IsDefined, IsString, IsOptional, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsNumber, IsDefined, IsString, IsOptional, Matches, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; import { Autocalculate } from "honeybee-schema"; @@ -12,6 +12,7 @@ export class GriddedSkylightArea extends _OpenAPIGenBaseModel { @IsString() @IsOptional() + @Matches(/^GriddedSkylightArea$/) type?: string; @IsOptional() diff --git a/src/TypeScriptSDK/models/GriddedSkylightRatio.ts b/src/TypeScriptSDK/models/GriddedSkylightRatio.ts index 075519f..bbeb0b1 100644 --- a/src/TypeScriptSDK/models/GriddedSkylightRatio.ts +++ b/src/TypeScriptSDK/models/GriddedSkylightRatio.ts @@ -1,4 +1,4 @@ -import { IsNumber, IsDefined, IsString, IsOptional, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsNumber, IsDefined, IsString, IsOptional, Matches, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; import { Autocalculate } from "honeybee-schema"; @@ -12,6 +12,7 @@ export class GriddedSkylightRatio extends _OpenAPIGenBaseModel { @IsString() @IsOptional() + @Matches(/^GriddedSkylightRatio$/) type?: string; @IsOptional() diff --git a/src/TypeScriptSDK/models/LouversByCount.ts b/src/TypeScriptSDK/models/LouversByCount.ts index 363e430..711afed 100644 --- a/src/TypeScriptSDK/models/LouversByCount.ts +++ b/src/TypeScriptSDK/models/LouversByCount.ts @@ -1,4 +1,4 @@ -import { IsInt, IsDefined, IsString, IsOptional, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsInt, IsDefined, IsString, IsOptional, Matches, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _LouversBase } from "./_LouversBase"; @@ -11,6 +11,7 @@ export class LouversByCount extends _LouversBase { @IsString() @IsOptional() + @Matches(/^LouversByCount$/) type?: string; diff --git a/src/TypeScriptSDK/models/LouversByDistance.ts b/src/TypeScriptSDK/models/LouversByDistance.ts index 950f7b5..0373b5f 100644 --- a/src/TypeScriptSDK/models/LouversByDistance.ts +++ b/src/TypeScriptSDK/models/LouversByDistance.ts @@ -1,4 +1,4 @@ -import { IsNumber, IsDefined, IsString, IsOptional, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsNumber, IsDefined, IsString, IsOptional, Matches, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _LouversBase } from "./_LouversBase"; @@ -11,6 +11,7 @@ export class LouversByDistance extends _LouversBase { @IsString() @IsOptional() + @Matches(/^LouversByDistance$/) type?: string; diff --git a/src/TypeScriptSDK/models/Model.ts b/src/TypeScriptSDK/models/Model.ts index d7f04c5..f40ab52 100644 --- a/src/TypeScriptSDK/models/Model.ts +++ b/src/TypeScriptSDK/models/Model.ts @@ -1,4 +1,4 @@ -import { IsInstance, ValidateNested, IsDefined, IsString, IsOptional, IsArray, IsEnum, IsNumber, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsInstance, ValidateNested, IsDefined, IsString, IsOptional, Matches, IsArray, IsEnum, IsNumber, Min, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { Building } from "./Building"; import { ContextShade } from "./ContextShade"; @@ -17,10 +17,12 @@ export class Model extends IDdBaseModel { @IsString() @IsOptional() + @Matches(/^Model$/) type?: string; @IsString() @IsOptional() + @Matches(/([0-9]+)\.([0-9]+)\.([0-9]+)/) /** Text string for the current version of the schema. */ version?: string; @@ -48,11 +50,13 @@ export class Model extends IDdBaseModel { @IsNumber() @IsOptional() + @Min(0) /** The maximum difference between x, y, and z values at which vertices are considered equivalent. This value should be in the Model units and is used in a variety of checks and operations. A value of 0 will result in bypassing all checks so it is recommended that this always be a positive number when checks have not already been performed on a Model. The default of 0.01 is suitable for models in meters. */ tolerance?: number; @IsNumber() @IsOptional() + @Min(0) /** The max angle difference in degrees that vertices are allowed to differ from one another in order to consider them colinear. This value is used in a variety of checks and operations that can be performed on geometry. A value of 0 will result in no checks and an inability to perform certain operations so it is recommended that this always be a positive number when checks have not already been performed on a given Model. */ angle_tolerance?: number; diff --git a/src/TypeScriptSDK/models/ModelEnergyProperties.ts b/src/TypeScriptSDK/models/ModelEnergyProperties.ts index 2efea72..19be49f 100644 --- a/src/TypeScriptSDK/models/ModelEnergyProperties.ts +++ b/src/TypeScriptSDK/models/ModelEnergyProperties.ts @@ -1,4 +1,4 @@ -import { IsString, IsOptional, IsInstance, ValidateNested, IsArray, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsString, IsOptional, Matches, IsInstance, ValidateNested, IsArray, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; import { AirBoundaryConstruction } from "honeybee-schema"; @@ -55,6 +55,7 @@ import { WSHPwithDOASAbridged } from "honeybee-schema"; export class ModelEnergyProperties extends _OpenAPIGenBaseModel { @IsString() @IsOptional() + @Matches(/^ModelEnergyProperties$/) type?: string; @IsInstance(GlobalConstructionSet) diff --git a/src/TypeScriptSDK/models/ModelProperties.ts b/src/TypeScriptSDK/models/ModelProperties.ts index 4ebe53e..833ad79 100644 --- a/src/TypeScriptSDK/models/ModelProperties.ts +++ b/src/TypeScriptSDK/models/ModelProperties.ts @@ -1,4 +1,4 @@ -import { IsString, IsOptional, IsInstance, ValidateNested, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsString, IsOptional, Matches, IsInstance, ValidateNested, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; import { ModelEnergyProperties } from "./ModelEnergyProperties"; @@ -7,6 +7,7 @@ import { ModelRadianceProperties } from "./ModelRadianceProperties"; export class ModelProperties extends _OpenAPIGenBaseModel { @IsString() @IsOptional() + @Matches(/^ModelProperties$/) type?: string; @IsInstance(ModelEnergyProperties) diff --git a/src/TypeScriptSDK/models/ModelRadianceProperties.ts b/src/TypeScriptSDK/models/ModelRadianceProperties.ts index 90af1e8..5ada99b 100644 --- a/src/TypeScriptSDK/models/ModelRadianceProperties.ts +++ b/src/TypeScriptSDK/models/ModelRadianceProperties.ts @@ -1,4 +1,4 @@ -import { IsString, IsOptional, IsInstance, ValidateNested, IsArray, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsString, IsOptional, Matches, IsInstance, ValidateNested, IsArray, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; import { BSDF } from "honeybee-schema"; @@ -18,6 +18,7 @@ import { Void } from "honeybee-schema"; export class ModelRadianceProperties extends _OpenAPIGenBaseModel { @IsString() @IsOptional() + @Matches(/^ModelRadianceProperties$/) type?: string; @IsInstance(GlobalModifierSet) diff --git a/src/TypeScriptSDK/models/Overhang.ts b/src/TypeScriptSDK/models/Overhang.ts index f069452..1f329ce 100644 --- a/src/TypeScriptSDK/models/Overhang.ts +++ b/src/TypeScriptSDK/models/Overhang.ts @@ -1,4 +1,4 @@ -import { IsNumber, IsDefined, IsString, IsOptional, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsNumber, IsDefined, IsString, IsOptional, Matches, Min, Max, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; @@ -11,10 +11,13 @@ export class Overhang extends _OpenAPIGenBaseModel { @IsString() @IsOptional() + @Matches(/^Overhang$/) type?: string; @IsNumber() @IsOptional() + @Min(-90) + @Max(90) /** A number between -90 and 90 for the for an angle to rotate the overhang in degrees. 0 indicates an overhang perpendicular to the wall. Positive values indicate a downward rotation. Negative values indicate an upward rotation. */ angle?: number; diff --git a/src/TypeScriptSDK/models/RectangularWindows.ts b/src/TypeScriptSDK/models/RectangularWindows.ts index bc9083d..9e24949 100644 --- a/src/TypeScriptSDK/models/RectangularWindows.ts +++ b/src/TypeScriptSDK/models/RectangularWindows.ts @@ -1,4 +1,4 @@ -import { IsArray, ValidateNested, IsNumber, IsDefined, IsString, IsOptional, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsArray, ValidateNested, IsNumber, IsDefined, IsString, IsOptional, Matches, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _WindowParameterBase } from "./_WindowParameterBase"; @@ -27,6 +27,7 @@ export class RectangularWindows extends _WindowParameterBase { @IsString() @IsOptional() + @Matches(/^RectangularWindows$/) type?: string; @IsArray() diff --git a/src/TypeScriptSDK/models/RepeatingWindowRatio.ts b/src/TypeScriptSDK/models/RepeatingWindowRatio.ts index b412871..5f349b6 100644 --- a/src/TypeScriptSDK/models/RepeatingWindowRatio.ts +++ b/src/TypeScriptSDK/models/RepeatingWindowRatio.ts @@ -1,4 +1,4 @@ -import { IsNumber, IsDefined, IsString, IsOptional, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsNumber, IsDefined, Min, IsString, IsOptional, Matches, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _WindowParameterBase } from "./_WindowParameterBase"; @@ -21,15 +21,18 @@ export class RepeatingWindowRatio extends _WindowParameterBase { @IsNumber() @IsDefined() + @Min(0) /** A number for the target separation between individual window centerlines. If this number is larger than the parent rectangle base, only one window will be produced. */ horizontal_separation!: number; @IsString() @IsOptional() + @Matches(/^RepeatingWindowRatio$/) type?: string; @IsNumber() @IsOptional() + @Min(0) /** An optional number to create a single vertical separation between top and bottom windows. */ vertical_separation?: number; diff --git a/src/TypeScriptSDK/models/RoofSpecification.ts b/src/TypeScriptSDK/models/RoofSpecification.ts index 46555b4..5f1b8f7 100644 --- a/src/TypeScriptSDK/models/RoofSpecification.ts +++ b/src/TypeScriptSDK/models/RoofSpecification.ts @@ -1,4 +1,4 @@ -import { IsArray, IsInstance, ValidateNested, IsDefined, IsString, IsOptional, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsArray, IsInstance, ValidateNested, IsDefined, IsString, IsOptional, Matches, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; import { Face3D } from "honeybee-schema"; @@ -15,6 +15,7 @@ export class RoofSpecification extends _OpenAPIGenBaseModel { @IsString() @IsOptional() + @Matches(/^RoofSpecification$/) type?: string; diff --git a/src/TypeScriptSDK/models/Room2D.ts b/src/TypeScriptSDK/models/Room2D.ts index 6123dac..b0ad867 100644 --- a/src/TypeScriptSDK/models/Room2D.ts +++ b/src/TypeScriptSDK/models/Room2D.ts @@ -1,4 +1,4 @@ -import { IsArray, ValidateNested, IsNumber, IsDefined, IsInstance, IsString, IsOptional, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsArray, ValidateNested, IsNumber, IsDefined, IsInstance, IsString, IsOptional, Matches, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { Adiabatic } from "honeybee-schema"; import { DetailedSkylights } from "./DetailedSkylights"; @@ -51,6 +51,7 @@ export class Room2D extends IDdBaseModel { @IsString() @IsOptional() + @Matches(/^Room2D$/) type?: string; @IsArray() diff --git a/src/TypeScriptSDK/models/Room2DEnergyPropertiesAbridged.ts b/src/TypeScriptSDK/models/Room2DEnergyPropertiesAbridged.ts index 42c78cd..05969b2 100644 --- a/src/TypeScriptSDK/models/Room2DEnergyPropertiesAbridged.ts +++ b/src/TypeScriptSDK/models/Room2DEnergyPropertiesAbridged.ts @@ -1,4 +1,4 @@ -import { IsString, IsOptional, IsInstance, ValidateNested, IsArray, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsString, IsOptional, Matches, MinLength, MaxLength, IsInstance, ValidateNested, IsArray, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; import { ProcessAbridged } from "honeybee-schema"; @@ -9,25 +9,34 @@ import { VentilationOpening } from "honeybee-schema"; export class Room2DEnergyPropertiesAbridged extends _OpenAPIGenBaseModel { @IsString() @IsOptional() + @Matches(/^Room2DEnergyPropertiesAbridged$/) type?: string; @IsString() @IsOptional() + @MinLength(1) + @MaxLength(100) /** Name of a ConstructionSet to specify all constructions for the Room2D. If None, the Room2D will use the Story or Building construction_set or the Model global_construction_set. Any ConstructionSet assigned here will override those assigned to these objects. */ construction_set?: string; @IsString() @IsOptional() + @MinLength(1) + @MaxLength(100) /** Name of a ProgramType to specify all schedules and loads for the Room2D. If None, the Room2D will have no loads or setpoints. */ program_type?: string; @IsString() @IsOptional() + @MinLength(1) + @MaxLength(100) /** An optional identifier of a HVAC system (such as an IdealAirSystem) that specifies how the Room2D is conditioned. If None, it will be assumed that the Room2D is not conditioned. */ hvac?: string; @IsString() @IsOptional() + @MinLength(1) + @MaxLength(100) /** An optional identifier of a Service Hot Water (SHW) system that specifies how the hot water load of the Room is met. If None, the hot water load will be met with a generic system that only measures thermal loadand does not account for system efficiencies. */ shw?: string; diff --git a/src/TypeScriptSDK/models/Room2DPropertiesAbridged.ts b/src/TypeScriptSDK/models/Room2DPropertiesAbridged.ts index 011ed15..c84b42e 100644 --- a/src/TypeScriptSDK/models/Room2DPropertiesAbridged.ts +++ b/src/TypeScriptSDK/models/Room2DPropertiesAbridged.ts @@ -1,4 +1,4 @@ -import { IsString, IsOptional, IsInstance, ValidateNested, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsString, IsOptional, Matches, IsInstance, ValidateNested, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; import { Room2DEnergyPropertiesAbridged } from "./Room2DEnergyPropertiesAbridged"; @@ -7,6 +7,7 @@ import { Room2DRadiancePropertiesAbridged } from "./Room2DRadiancePropertiesAbri export class Room2DPropertiesAbridged extends _OpenAPIGenBaseModel { @IsString() @IsOptional() + @Matches(/^Room2DPropertiesAbridged$/) type?: string; @IsInstance(Room2DEnergyPropertiesAbridged) diff --git a/src/TypeScriptSDK/models/Room2DRadiancePropertiesAbridged.ts b/src/TypeScriptSDK/models/Room2DRadiancePropertiesAbridged.ts index d16d46a..2a3c4ea 100644 --- a/src/TypeScriptSDK/models/Room2DRadiancePropertiesAbridged.ts +++ b/src/TypeScriptSDK/models/Room2DRadiancePropertiesAbridged.ts @@ -1,4 +1,4 @@ -import { IsString, IsOptional, IsArray, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsString, IsOptional, Matches, IsArray, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; import { ExteriorApertureGridParameter } from "./ExteriorApertureGridParameter"; @@ -10,6 +10,7 @@ import { RoomRadialGridParameter } from "./RoomRadialGridParameter"; export class Room2DRadiancePropertiesAbridged extends _OpenAPIGenBaseModel { @IsString() @IsOptional() + @Matches(/^Room2DRadiancePropertiesAbridged$/) type?: string; @IsString() diff --git a/src/TypeScriptSDK/models/RoomGridParameter.ts b/src/TypeScriptSDK/models/RoomGridParameter.ts index 6cb97e5..cfd8ccc 100644 --- a/src/TypeScriptSDK/models/RoomGridParameter.ts +++ b/src/TypeScriptSDK/models/RoomGridParameter.ts @@ -1,4 +1,4 @@ -import { IsString, IsOptional, IsNumber, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsString, IsOptional, Matches, IsNumber, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _GridParameterBase } from "./_GridParameterBase"; @@ -6,6 +6,7 @@ import { _GridParameterBase } from "./_GridParameterBase"; export class RoomGridParameter extends _GridParameterBase { @IsString() @IsOptional() + @Matches(/^RoomGridParameter$/) type?: string; @IsNumber() diff --git a/src/TypeScriptSDK/models/RoomRadialGridParameter.ts b/src/TypeScriptSDK/models/RoomRadialGridParameter.ts index 7e1a651..286a60b 100644 --- a/src/TypeScriptSDK/models/RoomRadialGridParameter.ts +++ b/src/TypeScriptSDK/models/RoomRadialGridParameter.ts @@ -1,4 +1,4 @@ -import { IsInt, IsOptional, IsArray, IsNumber, IsString, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsInt, IsOptional, IsArray, IsNumber, IsString, Matches, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { Autocalculate } from "honeybee-schema"; import { RoomGridParameter } from "./RoomGridParameter"; @@ -22,6 +22,7 @@ export class RoomRadialGridParameter extends RoomGridParameter { @IsString() @IsOptional() + @Matches(/^RoomRadialGridParameter$/) type?: string; diff --git a/src/TypeScriptSDK/models/SimpleWindowArea.ts b/src/TypeScriptSDK/models/SimpleWindowArea.ts index bcc9aa6..8a2477e 100644 --- a/src/TypeScriptSDK/models/SimpleWindowArea.ts +++ b/src/TypeScriptSDK/models/SimpleWindowArea.ts @@ -1,4 +1,4 @@ -import { IsNumber, IsDefined, IsString, IsOptional, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsNumber, IsDefined, IsString, IsOptional, Matches, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _WindowParameterBase } from "./_WindowParameterBase"; @@ -11,6 +11,7 @@ export class SimpleWindowArea extends _WindowParameterBase { @IsString() @IsOptional() + @Matches(/^SimpleWindowArea$/) type?: string; @IsBoolean() diff --git a/src/TypeScriptSDK/models/SimpleWindowRatio.ts b/src/TypeScriptSDK/models/SimpleWindowRatio.ts index d0bc570..75062bd 100644 --- a/src/TypeScriptSDK/models/SimpleWindowRatio.ts +++ b/src/TypeScriptSDK/models/SimpleWindowRatio.ts @@ -1,4 +1,4 @@ -import { IsNumber, IsDefined, IsString, IsOptional, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsNumber, IsDefined, IsString, IsOptional, Matches, IsBoolean, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _WindowParameterBase } from "./_WindowParameterBase"; @@ -11,6 +11,7 @@ export class SimpleWindowRatio extends _WindowParameterBase { @IsString() @IsOptional() + @Matches(/^SimpleWindowRatio$/) type?: string; @IsBoolean() diff --git a/src/TypeScriptSDK/models/SingleWindow.ts b/src/TypeScriptSDK/models/SingleWindow.ts index 6b160a2..b527bc2 100644 --- a/src/TypeScriptSDK/models/SingleWindow.ts +++ b/src/TypeScriptSDK/models/SingleWindow.ts @@ -1,4 +1,4 @@ -import { IsNumber, IsDefined, IsString, IsOptional, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsNumber, IsDefined, IsString, IsOptional, Matches, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _WindowParameterBase } from "./_WindowParameterBase"; @@ -16,6 +16,7 @@ export class SingleWindow extends _WindowParameterBase { @IsString() @IsOptional() + @Matches(/^SingleWindow$/) type?: string; @IsNumber() diff --git a/src/TypeScriptSDK/models/Story.ts b/src/TypeScriptSDK/models/Story.ts index 3bf63be..b3ad1ed 100644 --- a/src/TypeScriptSDK/models/Story.ts +++ b/src/TypeScriptSDK/models/Story.ts @@ -1,4 +1,4 @@ -import { IsArray, IsInstance, ValidateNested, IsDefined, IsString, IsOptional, IsInt, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsArray, IsInstance, ValidateNested, IsDefined, IsString, IsOptional, Matches, IsInt, Min, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { Autocalculate } from "honeybee-schema"; import { IDdBaseModel } from "honeybee-schema"; @@ -25,6 +25,7 @@ export class Story extends IDdBaseModel { @IsString() @IsOptional() + @Matches(/^Story$/) type?: string; @IsOptional() @@ -37,6 +38,7 @@ export class Story extends IDdBaseModel { @IsInt() @IsOptional() + @Min(1) /** An integer that denotes the number of times that this Story is repeated over the height of the building. */ multiplier?: number; diff --git a/src/TypeScriptSDK/models/StoryEnergyPropertiesAbridged.ts b/src/TypeScriptSDK/models/StoryEnergyPropertiesAbridged.ts index 61e6497..cf259ad 100644 --- a/src/TypeScriptSDK/models/StoryEnergyPropertiesAbridged.ts +++ b/src/TypeScriptSDK/models/StoryEnergyPropertiesAbridged.ts @@ -1,4 +1,4 @@ -import { IsString, IsOptional, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsString, IsOptional, Matches, MinLength, MaxLength, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; @@ -6,10 +6,13 @@ import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; export class StoryEnergyPropertiesAbridged extends _OpenAPIGenBaseModel { @IsString() @IsOptional() + @Matches(/^StoryEnergyPropertiesAbridged$/) type?: string; @IsString() @IsOptional() + @MinLength(1) + @MaxLength(100) /** Name of a ConstructionSet to specify all constructions for the Story. If None, the Story will use the Building construction_set or the Model global_construction_set. Any ConstructionSet assigned here will override those assigned to these objects. */ construction_set?: string; diff --git a/src/TypeScriptSDK/models/StoryPropertiesAbridged.ts b/src/TypeScriptSDK/models/StoryPropertiesAbridged.ts index ab35c14..ac43516 100644 --- a/src/TypeScriptSDK/models/StoryPropertiesAbridged.ts +++ b/src/TypeScriptSDK/models/StoryPropertiesAbridged.ts @@ -1,4 +1,4 @@ -import { IsString, IsOptional, IsInstance, ValidateNested, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsString, IsOptional, Matches, IsInstance, ValidateNested, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; import { StoryEnergyPropertiesAbridged } from "./StoryEnergyPropertiesAbridged"; @@ -7,6 +7,7 @@ import { StoryRadiancePropertiesAbridged } from "./StoryRadiancePropertiesAbridg export class StoryPropertiesAbridged extends _OpenAPIGenBaseModel { @IsString() @IsOptional() + @Matches(/^StoryPropertiesAbridged$/) type?: string; @IsInstance(StoryEnergyPropertiesAbridged) diff --git a/src/TypeScriptSDK/models/StoryRadiancePropertiesAbridged.ts b/src/TypeScriptSDK/models/StoryRadiancePropertiesAbridged.ts index 746a862..746fbfd 100644 --- a/src/TypeScriptSDK/models/StoryRadiancePropertiesAbridged.ts +++ b/src/TypeScriptSDK/models/StoryRadiancePropertiesAbridged.ts @@ -1,4 +1,4 @@ -import { IsString, IsOptional, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsString, IsOptional, Matches, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; @@ -6,6 +6,7 @@ import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; export class StoryRadiancePropertiesAbridged extends _OpenAPIGenBaseModel { @IsString() @IsOptional() + @Matches(/^StoryRadiancePropertiesAbridged$/) type?: string; @IsString() diff --git a/src/TypeScriptSDK/models/_GridParameterBase.ts b/src/TypeScriptSDK/models/_GridParameterBase.ts index f9d62e6..c4596b9 100644 --- a/src/TypeScriptSDK/models/_GridParameterBase.ts +++ b/src/TypeScriptSDK/models/_GridParameterBase.ts @@ -1,4 +1,4 @@ -import { IsNumber, IsDefined, IsBoolean, IsOptional, IsString, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsNumber, IsDefined, IsBoolean, IsOptional, IsString, Matches, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; @@ -16,6 +16,7 @@ export class _GridParameterBase extends _OpenAPIGenBaseModel { @IsString() @IsOptional() + @Matches(/^_GridParameterBase$/) type?: string; diff --git a/src/TypeScriptSDK/models/_LouversBase.ts b/src/TypeScriptSDK/models/_LouversBase.ts index 8fc989c..ec291dc 100644 --- a/src/TypeScriptSDK/models/_LouversBase.ts +++ b/src/TypeScriptSDK/models/_LouversBase.ts @@ -1,4 +1,4 @@ -import { IsNumber, IsDefined, IsOptional, IsArray, IsBoolean, IsString, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsNumber, IsDefined, IsOptional, Min, Max, IsArray, IsBoolean, IsString, Matches, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; @@ -11,11 +11,14 @@ export class _LouversBase extends _OpenAPIGenBaseModel { @IsNumber() @IsOptional() + @Min(0) /** A number for the distance to louvers from the wall. */ offset?: number; @IsNumber() @IsOptional() + @Min(-90) + @Max(90) /** A number between -90 and 90 for the for an angle to rotate the louvers in degrees. 0 indicates louvers perpendicular to the wall. Positive values indicate a downward rotation. Negative values indicate an upward rotation. */ angle?: number; @@ -32,6 +35,7 @@ export class _LouversBase extends _OpenAPIGenBaseModel { @IsString() @IsOptional() + @Matches(/^_LouversBase$/) type?: string; diff --git a/src/TypeScriptSDK/models/_WindowParameterBase.ts b/src/TypeScriptSDK/models/_WindowParameterBase.ts index 4f3d2a5..6fddc70 100644 --- a/src/TypeScriptSDK/models/_WindowParameterBase.ts +++ b/src/TypeScriptSDK/models/_WindowParameterBase.ts @@ -1,4 +1,4 @@ -import { IsOptional, IsString, validate, ValidationError as TsValidationError } from 'class-validator'; +import { IsOptional, IsString, Matches, validate, ValidationError as TsValidationError } from 'class-validator'; import { Type, plainToClass } from 'class-transformer'; import { _OpenAPIGenBaseModel } from "./_OpenAPIGenBaseModel"; @@ -10,6 +10,7 @@ export class _WindowParameterBase extends _OpenAPIGenBaseModel { @IsString() @IsOptional() + @Matches(/^_WindowParameterBase$/) type?: string;