/* Options: Date: 2026-06-13 04:12:49 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: ScheduleJobsRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class Crew implements IConvertible { int? CrewID; String? CrewName; String? CrewNumber; int? CrewManagerContactID; String? CrewManagerContactName; String? CrewColor; DateTime? RecordCreatedDate; bool? Active; String? CreatedByUID; int? ProjectID; int? CrewMemberCount; int? ProjectCrewID; String? ProjectName; String? BranchId; String? BranchName; Crew({this.CrewID,this.CrewName,this.CrewNumber,this.CrewManagerContactID,this.CrewManagerContactName,this.CrewColor,this.RecordCreatedDate,this.Active,this.CreatedByUID,this.ProjectID,this.CrewMemberCount,this.ProjectCrewID,this.ProjectName,this.BranchId,this.BranchName}); Crew.fromJson(Map json) { fromMap(json); } fromMap(Map json) { CrewID = json['CrewID']; CrewName = json['CrewName']; CrewNumber = json['CrewNumber']; CrewManagerContactID = json['CrewManagerContactID']; CrewManagerContactName = json['CrewManagerContactName']; CrewColor = json['CrewColor']; RecordCreatedDate = JsonConverters.fromJson(json['RecordCreatedDate'],'DateTime',context!); Active = json['Active']; CreatedByUID = json['CreatedByUID']; ProjectID = json['ProjectID']; CrewMemberCount = json['CrewMemberCount']; ProjectCrewID = json['ProjectCrewID']; ProjectName = json['ProjectName']; BranchId = json['BranchId']; BranchName = json['BranchName']; return this; } Map toJson() => { 'CrewID': CrewID, 'CrewName': CrewName, 'CrewNumber': CrewNumber, 'CrewManagerContactID': CrewManagerContactID, 'CrewManagerContactName': CrewManagerContactName, 'CrewColor': CrewColor, 'RecordCreatedDate': JsonConverters.toJson(RecordCreatedDate,'DateTime',context!), 'Active': Active, 'CreatedByUID': CreatedByUID, 'ProjectID': ProjectID, 'CrewMemberCount': CrewMemberCount, 'ProjectCrewID': ProjectCrewID, 'ProjectName': ProjectName, 'BranchId': BranchId, 'BranchName': BranchName }; getTypeName() => "Crew"; TypeContext? context = _ctx; } class WorkerScheduleItem implements IConvertible { int? WorkerScheduleItemID; int? JobID; int? ProjectID; int? ContactID; DateTime? ScheduledDate; int? SortOrder; int? SourceCrewID; String? Status; DateTime? StartedAt; DateTime? CompletedAt; String? WorkerNotes; String? JobName; String? ProjectName; String? FirstName; String? LastName; String? WorkerName; String? SourceCrewName; int? ProjectLocationID; String? ProjectLocationName; String? LocationZip; String? LocationCity; double? LocationLatitude; double? LocationLongitude; String? JobStatusName; String? BranchId; String? BranchName; String? WorkerHomeBranchId; String? WorkerHomeBranchName; WorkerScheduleItem({this.WorkerScheduleItemID,this.JobID,this.ProjectID,this.ContactID,this.ScheduledDate,this.SortOrder,this.SourceCrewID,this.Status,this.StartedAt,this.CompletedAt,this.WorkerNotes,this.JobName,this.ProjectName,this.FirstName,this.LastName,this.WorkerName,this.SourceCrewName,this.ProjectLocationID,this.ProjectLocationName,this.LocationZip,this.LocationCity,this.LocationLatitude,this.LocationLongitude,this.JobStatusName,this.BranchId,this.BranchName,this.WorkerHomeBranchId,this.WorkerHomeBranchName}); WorkerScheduleItem.fromJson(Map json) { fromMap(json); } fromMap(Map json) { WorkerScheduleItemID = json['WorkerScheduleItemID']; JobID = json['JobID']; ProjectID = json['ProjectID']; ContactID = json['ContactID']; ScheduledDate = JsonConverters.fromJson(json['ScheduledDate'],'DateTime',context!); SortOrder = json['SortOrder']; SourceCrewID = json['SourceCrewID']; Status = json['Status']; StartedAt = JsonConverters.fromJson(json['StartedAt'],'DateTime',context!); CompletedAt = JsonConverters.fromJson(json['CompletedAt'],'DateTime',context!); WorkerNotes = json['WorkerNotes']; JobName = json['JobName']; ProjectName = json['ProjectName']; FirstName = json['FirstName']; LastName = json['LastName']; WorkerName = json['WorkerName']; SourceCrewName = json['SourceCrewName']; ProjectLocationID = json['ProjectLocationID']; ProjectLocationName = json['ProjectLocationName']; LocationZip = json['LocationZip']; LocationCity = json['LocationCity']; LocationLatitude = JsonConverters.toDouble(json['LocationLatitude']); LocationLongitude = JsonConverters.toDouble(json['LocationLongitude']); JobStatusName = json['JobStatusName']; BranchId = json['BranchId']; BranchName = json['BranchName']; WorkerHomeBranchId = json['WorkerHomeBranchId']; WorkerHomeBranchName = json['WorkerHomeBranchName']; return this; } Map toJson() => { 'WorkerScheduleItemID': WorkerScheduleItemID, 'JobID': JobID, 'ProjectID': ProjectID, 'ContactID': ContactID, 'ScheduledDate': JsonConverters.toJson(ScheduledDate,'DateTime',context!), 'SortOrder': SortOrder, 'SourceCrewID': SourceCrewID, 'Status': Status, 'StartedAt': JsonConverters.toJson(StartedAt,'DateTime',context!), 'CompletedAt': JsonConverters.toJson(CompletedAt,'DateTime',context!), 'WorkerNotes': WorkerNotes, 'JobName': JobName, 'ProjectName': ProjectName, 'FirstName': FirstName, 'LastName': LastName, 'WorkerName': WorkerName, 'SourceCrewName': SourceCrewName, 'ProjectLocationID': ProjectLocationID, 'ProjectLocationName': ProjectLocationName, 'LocationZip': LocationZip, 'LocationCity': LocationCity, 'LocationLatitude': LocationLatitude, 'LocationLongitude': LocationLongitude, 'JobStatusName': JobStatusName, 'BranchId': BranchId, 'BranchName': BranchName, 'WorkerHomeBranchId': WorkerHomeBranchId, 'WorkerHomeBranchName': WorkerHomeBranchName }; getTypeName() => "WorkerScheduleItem"; TypeContext? context = _ctx; } class SchedulableJob implements IConvertible { int? JobID; String? JobName; int? ProjectID; String? ProjectName; int? StatusID; String? StatusName; int? ProjectLocationID; String? ProjectLocationName; String? LocationZip; String? LocationCity; double? LocationLatitude; double? LocationLongitude; DateTime? ExpectedStartDate; DateTime? ExpectedCompletionDate; bool? IsRecurring; List? OccurrenceDates = []; SchedulableJob({this.JobID,this.JobName,this.ProjectID,this.ProjectName,this.StatusID,this.StatusName,this.ProjectLocationID,this.ProjectLocationName,this.LocationZip,this.LocationCity,this.LocationLatitude,this.LocationLongitude,this.ExpectedStartDate,this.ExpectedCompletionDate,this.IsRecurring,this.OccurrenceDates}); SchedulableJob.fromJson(Map json) { fromMap(json); } fromMap(Map json) { JobID = json['JobID']; JobName = json['JobName']; ProjectID = json['ProjectID']; ProjectName = json['ProjectName']; StatusID = json['StatusID']; StatusName = json['StatusName']; ProjectLocationID = json['ProjectLocationID']; ProjectLocationName = json['ProjectLocationName']; LocationZip = json['LocationZip']; LocationCity = json['LocationCity']; LocationLatitude = JsonConverters.toDouble(json['LocationLatitude']); LocationLongitude = JsonConverters.toDouble(json['LocationLongitude']); ExpectedStartDate = JsonConverters.fromJson(json['ExpectedStartDate'],'DateTime',context!); ExpectedCompletionDate = JsonConverters.fromJson(json['ExpectedCompletionDate'],'DateTime',context!); IsRecurring = json['IsRecurring']; OccurrenceDates = JsonConverters.fromJson(json['OccurrenceDates'],'List',context!); return this; } Map toJson() => { 'JobID': JobID, 'JobName': JobName, 'ProjectID': ProjectID, 'ProjectName': ProjectName, 'StatusID': StatusID, 'StatusName': StatusName, 'ProjectLocationID': ProjectLocationID, 'ProjectLocationName': ProjectLocationName, 'LocationZip': LocationZip, 'LocationCity': LocationCity, 'LocationLatitude': LocationLatitude, 'LocationLongitude': LocationLongitude, 'ExpectedStartDate': JsonConverters.toJson(ExpectedStartDate,'DateTime',context!), 'ExpectedCompletionDate': JsonConverters.toJson(ExpectedCompletionDate,'DateTime',context!), 'IsRecurring': IsRecurring, 'OccurrenceDates': JsonConverters.toJson(OccurrenceDates,'List',context!) }; getTypeName() => "SchedulableJob"; TypeContext? context = _ctx; } class ScheduleWorker implements IConvertible { int? ContactId; String? FirstName; String? LastName; String? Name; String? Initials; double? Rate; String? ImageUrl; String? BranchId; String? BranchName; ScheduleWorker({this.ContactId,this.FirstName,this.LastName,this.Name,this.Initials,this.Rate,this.ImageUrl,this.BranchId,this.BranchName}); ScheduleWorker.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ContactId = json['ContactId']; FirstName = json['FirstName']; LastName = json['LastName']; Name = json['Name']; Initials = json['Initials']; Rate = JsonConverters.toDouble(json['Rate']); ImageUrl = json['ImageUrl']; BranchId = json['BranchId']; BranchName = json['BranchName']; return this; } Map toJson() => { 'ContactId': ContactId, 'FirstName': FirstName, 'LastName': LastName, 'Name': Name, 'Initials': Initials, 'Rate': Rate, 'ImageUrl': ImageUrl, 'BranchId': BranchId, 'BranchName': BranchName }; getTypeName() => "ScheduleWorker"; TypeContext? context = _ctx; } class ScheduleLastAssignment implements IConvertible { int? JobID; List? ContactIds = []; int? SourceCrewID; ScheduleLastAssignment({this.JobID,this.ContactIds,this.SourceCrewID}); ScheduleLastAssignment.fromJson(Map json) { fromMap(json); } fromMap(Map json) { JobID = json['JobID']; ContactIds = JsonConverters.fromJson(json['ContactIds'],'List',context!); SourceCrewID = json['SourceCrewID']; return this; } Map toJson() => { 'JobID': JobID, 'ContactIds': JsonConverters.toJson(ContactIds,'List',context!), 'SourceCrewID': SourceCrewID }; getTypeName() => "ScheduleLastAssignment"; TypeContext? context = _ctx; } class ScheduleAutoFillResult implements IConvertible { int? JobsFilled; int? JobsSkipped; int? VisitsScheduled; ScheduleAutoFillResult({this.JobsFilled,this.JobsSkipped,this.VisitsScheduled}); ScheduleAutoFillResult.fromJson(Map json) { fromMap(json); } fromMap(Map json) { JobsFilled = json['JobsFilled']; JobsSkipped = json['JobsSkipped']; VisitsScheduled = json['VisitsScheduled']; return this; } Map toJson() => { 'JobsFilled': JobsFilled, 'JobsSkipped': JobsSkipped, 'VisitsScheduled': VisitsScheduled }; getTypeName() => "ScheduleAutoFillResult"; TypeContext? context = _ctx; } class WorkerScheduleResponse implements IConvertible { List? Items = []; List? SchedulableJobs = []; List? Workers = []; List? Crews = []; List? BudgetedCrew = []; ScheduleLastAssignment? LastAssignment; ScheduleAutoFillResult? AutoFill; int? DatesScheduled; int? WorkersScheduled; int? ItemsRemoved; ResponseStatus? ResponseStatus; WorkerScheduleResponse({this.Items,this.SchedulableJobs,this.Workers,this.Crews,this.BudgetedCrew,this.LastAssignment,this.AutoFill,this.DatesScheduled,this.WorkersScheduled,this.ItemsRemoved,this.ResponseStatus}); WorkerScheduleResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { Items = JsonConverters.fromJson(json['Items'],'List',context!); SchedulableJobs = JsonConverters.fromJson(json['SchedulableJobs'],'List',context!); Workers = JsonConverters.fromJson(json['Workers'],'List',context!); Crews = JsonConverters.fromJson(json['Crews'],'List',context!); BudgetedCrew = JsonConverters.fromJson(json['BudgetedCrew'],'List',context!); LastAssignment = JsonConverters.fromJson(json['LastAssignment'],'ScheduleLastAssignment',context!); AutoFill = JsonConverters.fromJson(json['AutoFill'],'ScheduleAutoFillResult',context!); DatesScheduled = json['DatesScheduled']; WorkersScheduled = json['WorkersScheduled']; ItemsRemoved = json['ItemsRemoved']; ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!); return this; } Map toJson() => { 'Items': JsonConverters.toJson(Items,'List',context!), 'SchedulableJobs': JsonConverters.toJson(SchedulableJobs,'List',context!), 'Workers': JsonConverters.toJson(Workers,'List',context!), 'Crews': JsonConverters.toJson(Crews,'List',context!), 'BudgetedCrew': JsonConverters.toJson(BudgetedCrew,'List',context!), 'LastAssignment': JsonConverters.toJson(LastAssignment,'ScheduleLastAssignment',context!), 'AutoFill': JsonConverters.toJson(AutoFill,'ScheduleAutoFillResult',context!), 'DatesScheduled': DatesScheduled, 'WorkersScheduled': WorkersScheduled, 'ItemsRemoved': ItemsRemoved, 'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!) }; getTypeName() => "WorkerScheduleResponse"; TypeContext? context = _ctx; } // @Route("/v1/schedule/jobs", "GET") class ScheduleJobsRequest implements IReturn, IConvertible, IGet { int? ProjectID; String? FromDate; String? ToDate; bool? ShowAll; bool? ShowCompleted; ScheduleJobsRequest({this.ProjectID,this.FromDate,this.ToDate,this.ShowAll,this.ShowCompleted}); ScheduleJobsRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { ProjectID = json['ProjectID']; FromDate = json['FromDate']; ToDate = json['ToDate']; ShowAll = json['ShowAll']; ShowCompleted = json['ShowCompleted']; return this; } Map toJson() => { 'ProjectID': ProjectID, 'FromDate': FromDate, 'ToDate': ToDate, 'ShowAll': ShowAll, 'ShowCompleted': ShowCompleted }; createResponse() => WorkerScheduleResponse(); getResponseTypeName() => "WorkerScheduleResponse"; getTypeName() => "ScheduleJobsRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: { 'Crew': TypeInfo(TypeOf.Class, create:() => Crew()), 'WorkerScheduleItem': TypeInfo(TypeOf.Class, create:() => WorkerScheduleItem()), 'SchedulableJob': TypeInfo(TypeOf.Class, create:() => SchedulableJob()), 'ScheduleWorker': TypeInfo(TypeOf.Class, create:() => ScheduleWorker()), 'ScheduleLastAssignment': TypeInfo(TypeOf.Class, create:() => ScheduleLastAssignment()), 'ScheduleAutoFillResult': TypeInfo(TypeOf.Class, create:() => ScheduleAutoFillResult()), 'WorkerScheduleResponse': TypeInfo(TypeOf.Class, create:() => WorkerScheduleResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'ScheduleJobsRequest': TypeInfo(TypeOf.Class, create:() => ScheduleJobsRequest()), });