/* Options: Date: 2025-12-06 09:44:36 Version: 8.80 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://api.dev.dynamics.trendsic.com //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: ProjectMaterialListRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart,dart:typed_data */ import 'package:servicestack/servicestack.dart'; import 'dart:typed_data'; class Project implements IConvertible { int? ProjectID; String? ProjectUID; String? ProjectName; String? ImageURL; String? ImageKey; String? ClientName; String? ClientPhone; String? ClientEmail; int? ProjectManagerID; String? ProjectManagerName; DateTime? StartDate; DateTime? EndDate; DateTime? ActualStartDate; DateTime? ActualEndDate; int? JobCount; int? CrewMemberCount; int? EquipmentCount; int? MaterialCount; int? ProjectStatusID; String? ProjectStatusDescription; double? Budget; double? CostToDate; String? ProjectLocation; String? ProjectType; String? ProjectSponsor; String? CreatedBy; DateTime? CreatedAt; DateTime? UpdatedAt; String? ProjectDescription; String? Scope; int? StatusId; Project({this.ProjectID,this.ProjectUID,this.ProjectName,this.ImageURL,this.ImageKey,this.ClientName,this.ClientPhone,this.ClientEmail,this.ProjectManagerID,this.ProjectManagerName,this.StartDate,this.EndDate,this.ActualStartDate,this.ActualEndDate,this.JobCount,this.CrewMemberCount,this.EquipmentCount,this.MaterialCount,this.ProjectStatusID,this.ProjectStatusDescription,this.Budget,this.CostToDate,this.ProjectLocation,this.ProjectType,this.ProjectSponsor,this.CreatedBy,this.CreatedAt,this.UpdatedAt,this.ProjectDescription,this.Scope,this.StatusId}); Project.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ProjectID = json['ProjectID']; ProjectUID = json['ProjectUID']; ProjectName = json['ProjectName']; ImageURL = json['ImageURL']; ImageKey = json['ImageKey']; ClientName = json['ClientName']; ClientPhone = json['ClientPhone']; ClientEmail = json['ClientEmail']; ProjectManagerID = json['ProjectManagerID']; ProjectManagerName = json['ProjectManagerName']; StartDate = JsonConverters.fromJson(json['StartDate'],'DateTime',context!); EndDate = JsonConverters.fromJson(json['EndDate'],'DateTime',context!); ActualStartDate = JsonConverters.fromJson(json['ActualStartDate'],'DateTime',context!); ActualEndDate = JsonConverters.fromJson(json['ActualEndDate'],'DateTime',context!); JobCount = json['JobCount']; CrewMemberCount = json['CrewMemberCount']; EquipmentCount = json['EquipmentCount']; MaterialCount = json['MaterialCount']; ProjectStatusID = json['ProjectStatusID']; ProjectStatusDescription = json['ProjectStatusDescription']; Budget = JsonConverters.toDouble(json['Budget']); CostToDate = JsonConverters.toDouble(json['CostToDate']); ProjectLocation = json['ProjectLocation']; ProjectType = json['ProjectType']; ProjectSponsor = json['ProjectSponsor']; CreatedBy = json['CreatedBy']; CreatedAt = JsonConverters.fromJson(json['CreatedAt'],'DateTime',context!); UpdatedAt = JsonConverters.fromJson(json['UpdatedAt'],'DateTime',context!); ProjectDescription = json['ProjectDescription']; Scope = json['Scope']; StatusId = json['StatusId']; return this; } Map toJson() => { 'ProjectID': ProjectID, 'ProjectUID': ProjectUID, 'ProjectName': ProjectName, 'ImageURL': ImageURL, 'ImageKey': ImageKey, 'ClientName': ClientName, 'ClientPhone': ClientPhone, 'ClientEmail': ClientEmail, 'ProjectManagerID': ProjectManagerID, 'ProjectManagerName': ProjectManagerName, 'StartDate': JsonConverters.toJson(StartDate,'DateTime',context!), 'EndDate': JsonConverters.toJson(EndDate,'DateTime',context!), 'ActualStartDate': JsonConverters.toJson(ActualStartDate,'DateTime',context!), 'ActualEndDate': JsonConverters.toJson(ActualEndDate,'DateTime',context!), 'JobCount': JobCount, 'CrewMemberCount': CrewMemberCount, 'EquipmentCount': EquipmentCount, 'MaterialCount': MaterialCount, 'ProjectStatusID': ProjectStatusID, 'ProjectStatusDescription': ProjectStatusDescription, 'Budget': Budget, 'CostToDate': CostToDate, 'ProjectLocation': ProjectLocation, 'ProjectType': ProjectType, 'ProjectSponsor': ProjectSponsor, 'CreatedBy': CreatedBy, 'CreatedAt': JsonConverters.toJson(CreatedAt,'DateTime',context!), 'UpdatedAt': JsonConverters.toJson(UpdatedAt,'DateTime',context!), 'ProjectDescription': ProjectDescription, 'Scope': Scope, 'StatusId': StatusId }; getTypeName() => "Project"; TypeContext? context = _ctx; } class Material implements IConvertible { int? MaterialID; String? MaterialName; int? MaterialTypeID; int? MaterialStatusID; int? Quantity; String? Supplier; DateTime? OrderDate; DateTime? DeliveryDate; DateTime? OnSiteDate; String? MaterialLocation; String? Manufacturer; String? SerialNumber; String? BarCode; String? TrackingInfo; String? MaterialDescription; String? Notes; String? ImageURL; String? DetailsURL; String? CreatedByUID; bool? Active; DateTime? RecordCreatedDate; int? StatusId; String? MaterialTypeName; double? Cost; List? Projects = []; Material({this.MaterialID,this.MaterialName,this.MaterialTypeID,this.MaterialStatusID,this.Quantity,this.Supplier,this.OrderDate,this.DeliveryDate,this.OnSiteDate,this.MaterialLocation,this.Manufacturer,this.SerialNumber,this.BarCode,this.TrackingInfo,this.MaterialDescription,this.Notes,this.ImageURL,this.DetailsURL,this.CreatedByUID,this.Active,this.RecordCreatedDate,this.StatusId,this.MaterialTypeName,this.Cost,this.Projects}); Material.fromJson(Map json) { fromMap(json); } fromMap(Map json) { MaterialID = json['MaterialID']; MaterialName = json['MaterialName']; MaterialTypeID = json['MaterialTypeID']; MaterialStatusID = json['MaterialStatusID']; Quantity = json['Quantity']; Supplier = json['Supplier']; OrderDate = JsonConverters.fromJson(json['OrderDate'],'DateTime',context!); DeliveryDate = JsonConverters.fromJson(json['DeliveryDate'],'DateTime',context!); OnSiteDate = JsonConverters.fromJson(json['OnSiteDate'],'DateTime',context!); MaterialLocation = json['MaterialLocation']; Manufacturer = json['Manufacturer']; SerialNumber = json['SerialNumber']; BarCode = json['BarCode']; TrackingInfo = json['TrackingInfo']; MaterialDescription = json['MaterialDescription']; Notes = json['Notes']; ImageURL = json['ImageURL']; DetailsURL = json['DetailsURL']; CreatedByUID = json['CreatedByUID']; Active = json['Active']; RecordCreatedDate = JsonConverters.fromJson(json['RecordCreatedDate'],'DateTime',context!); StatusId = json['StatusId']; MaterialTypeName = json['MaterialTypeName']; Cost = JsonConverters.toDouble(json['Cost']); Projects = JsonConverters.fromJson(json['Projects'],'List',context!); return this; } Map toJson() => { 'MaterialID': MaterialID, 'MaterialName': MaterialName, 'MaterialTypeID': MaterialTypeID, 'MaterialStatusID': MaterialStatusID, 'Quantity': Quantity, 'Supplier': Supplier, 'OrderDate': JsonConverters.toJson(OrderDate,'DateTime',context!), 'DeliveryDate': JsonConverters.toJson(DeliveryDate,'DateTime',context!), 'OnSiteDate': JsonConverters.toJson(OnSiteDate,'DateTime',context!), 'MaterialLocation': MaterialLocation, 'Manufacturer': Manufacturer, 'SerialNumber': SerialNumber, 'BarCode': BarCode, 'TrackingInfo': TrackingInfo, 'MaterialDescription': MaterialDescription, 'Notes': Notes, 'ImageURL': ImageURL, 'DetailsURL': DetailsURL, 'CreatedByUID': CreatedByUID, 'Active': Active, 'RecordCreatedDate': JsonConverters.toJson(RecordCreatedDate,'DateTime',context!), 'StatusId': StatusId, 'MaterialTypeName': MaterialTypeName, 'Cost': Cost, 'Projects': JsonConverters.toJson(Projects,'List',context!) }; getTypeName() => "Material"; TypeContext? context = _ctx; } class ProjectMaterial extends Material implements IConvertible { int? ProjectMaterialID; int? ProjectID; DateTime? ProjectEndDate; double? MaterialCost; int? JobID; double? BilledMaterialCost; int? MaterialQty; ProjectMaterial({this.ProjectMaterialID,this.ProjectID,this.ProjectEndDate,this.MaterialCost,this.JobID,this.BilledMaterialCost,this.MaterialQty}); ProjectMaterial.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); ProjectMaterialID = json['ProjectMaterialID']; ProjectID = json['ProjectID']; ProjectEndDate = JsonConverters.fromJson(json['ProjectEndDate'],'DateTime',context!); MaterialCost = JsonConverters.toDouble(json['MaterialCost']); JobID = json['JobID']; BilledMaterialCost = JsonConverters.toDouble(json['BilledMaterialCost']); MaterialQty = json['MaterialQty']; return this; } Map toJson() => super.toJson()..addAll({ 'ProjectMaterialID': ProjectMaterialID, 'ProjectID': ProjectID, 'ProjectEndDate': JsonConverters.toJson(ProjectEndDate,'DateTime',context!), 'MaterialCost': MaterialCost, 'JobID': JobID, 'BilledMaterialCost': BilledMaterialCost, 'MaterialQty': MaterialQty }); getTypeName() => "ProjectMaterial"; TypeContext? context = _ctx; } class ProjectMaterialListResponse implements IConvertible { ResponseStatus? ResponseStatus; List? ProjectMaterials = []; ProjectMaterialListResponse({this.ResponseStatus,this.ProjectMaterials}); ProjectMaterialListResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!); ProjectMaterials = JsonConverters.fromJson(json['ProjectMaterials'],'List',context!); return this; } Map toJson() => { 'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!), 'ProjectMaterials': JsonConverters.toJson(ProjectMaterials,'List',context!) }; getTypeName() => "ProjectMaterialListResponse"; TypeContext? context = _ctx; } // @Route("/v1/Project/Materials/{ProjectID}", "GET,POST,PUT,DELETE,OPTIONS") // @Route("/v1/Project/Materials/{ProjectID}/{JobID}", "GET,POST,PUT,DELETE,OPTIONS") class ProjectMaterialListRequest implements IReturn, IConvertible, IGet { int? ProjectID; int? JobID; List? ProjectMaterials = []; ProjectMaterialListRequest({this.ProjectID,this.JobID,this.ProjectMaterials}); ProjectMaterialListRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ProjectID = json['ProjectID']; JobID = json['JobID']; ProjectMaterials = JsonConverters.fromJson(json['ProjectMaterials'],'List',context!); return this; } Map toJson() => { 'ProjectID': ProjectID, 'JobID': JobID, 'ProjectMaterials': JsonConverters.toJson(ProjectMaterials,'List',context!) }; createResponse() => ProjectMaterialListResponse(); getResponseTypeName() => "ProjectMaterialListResponse"; getTypeName() => "ProjectMaterialListRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: { 'Project': TypeInfo(TypeOf.Class, create:() => Project()), 'Material': TypeInfo(TypeOf.Class, create:() => Material()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'ProjectMaterial': TypeInfo(TypeOf.Class, create:() => ProjectMaterial()), 'ProjectMaterialListResponse': TypeInfo(TypeOf.Class, create:() => ProjectMaterialListResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'ProjectMaterialListRequest': TypeInfo(TypeOf.Class, create:() => ProjectMaterialListRequest()), 'List': TypeInfo(TypeOf.Class, create:() => []), });