Trendsic Platform Service

<back to all web services

PmProjectDetailRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/pm/project/{Uid}
import 'package:servicestack/servicestack.dart';

class PmFinance implements IConvertible
{
    double? Budget;
    double? Spent;
    double? EstimatedCost;
    double? CrewCost;
    double? EquipCost;
    double? MatCost;
    double? Variance;
    int? HealthPct;
    int? SpentPct;
    int? ProgressPct;

    PmFinance({this.Budget,this.Spent,this.EstimatedCost,this.CrewCost,this.EquipCost,this.MatCost,this.Variance,this.HealthPct,this.SpentPct,this.ProgressPct});
    PmFinance.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Budget = JsonConverters.toDouble(json['Budget']);
        Spent = JsonConverters.toDouble(json['Spent']);
        EstimatedCost = JsonConverters.toDouble(json['EstimatedCost']);
        CrewCost = JsonConverters.toDouble(json['CrewCost']);
        EquipCost = JsonConverters.toDouble(json['EquipCost']);
        MatCost = JsonConverters.toDouble(json['MatCost']);
        Variance = JsonConverters.toDouble(json['Variance']);
        HealthPct = json['HealthPct'];
        SpentPct = json['SpentPct'];
        ProgressPct = json['ProgressPct'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Budget': Budget,
        'Spent': Spent,
        'EstimatedCost': EstimatedCost,
        'CrewCost': CrewCost,
        'EquipCost': EquipCost,
        'MatCost': MatCost,
        'Variance': Variance,
        'HealthPct': HealthPct,
        'SpentPct': SpentPct,
        'ProgressPct': ProgressPct
    };

    getTypeName() => "PmFinance";
    TypeContext? context = _ctx;
}

class PmReadiness implements IConvertible
{
    int? JobsNoCrew;
    int? OpenRoles;
    int? EquipmentConflicts;
    int? MaterialGaps;
    int? TotalGaps;
    int? ReadyPct;

    PmReadiness({this.JobsNoCrew,this.OpenRoles,this.EquipmentConflicts,this.MaterialGaps,this.TotalGaps,this.ReadyPct});
    PmReadiness.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        JobsNoCrew = json['JobsNoCrew'];
        OpenRoles = json['OpenRoles'];
        EquipmentConflicts = json['EquipmentConflicts'];
        MaterialGaps = json['MaterialGaps'];
        TotalGaps = json['TotalGaps'];
        ReadyPct = json['ReadyPct'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'JobsNoCrew': JobsNoCrew,
        'OpenRoles': OpenRoles,
        'EquipmentConflicts': EquipmentConflicts,
        'MaterialGaps': MaterialGaps,
        'TotalGaps': TotalGaps,
        'ReadyPct': ReadyPct
    };

    getTypeName() => "PmReadiness";
    TypeContext? context = _ctx;
}

class PmJobCrew implements IConvertible
{
    int? ContactID;
    String? Name;
    double? Rate;
    double? BudgetedHours;
    bool? IsOpen;

    PmJobCrew({this.ContactID,this.Name,this.Rate,this.BudgetedHours,this.IsOpen});
    PmJobCrew.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ContactID = json['ContactID'];
        Name = json['Name'];
        Rate = JsonConverters.toDouble(json['Rate']);
        BudgetedHours = JsonConverters.toDouble(json['BudgetedHours']);
        IsOpen = json['IsOpen'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ContactID': ContactID,
        'Name': Name,
        'Rate': Rate,
        'BudgetedHours': BudgetedHours,
        'IsOpen': IsOpen
    };

    getTypeName() => "PmJobCrew";
    TypeContext? context = _ctx;
}

class PmJobResource implements IConvertible
{
    int? Id;
    String? Name;
    double? Amount;
    int? Qty;

    PmJobResource({this.Id,this.Name,this.Amount,this.Qty});
    PmJobResource.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Name = json['Name'];
        Amount = JsonConverters.toDouble(json['Amount']);
        Qty = json['Qty'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Name': Name,
        'Amount': Amount,
        'Qty': Qty
    };

    getTypeName() => "PmJobResource";
    TypeContext? context = _ctx;
}

class PmJob implements IConvertible
{
    int? JobID;
    String? Name;
    String? Description;
    String? Status;
    String? StartDate;
    String? EndDate;
    int? CrewCount;
    double? BudgetedHours;
    int? EquipmentCount;
    int? MaterialCount;
    double? CrewCost;
    double? EquipCost;
    double? MatCost;
    double? Cost;
    bool? NoCrew;
    bool? EquipConflict;
    bool? MaterialGap;
    int? ReadyPct;
    List<PmJobCrew>? Crew = [];
    List<PmJobResource>? Equipment = [];
    List<PmJobResource>? Materials = [];

    PmJob({this.JobID,this.Name,this.Description,this.Status,this.StartDate,this.EndDate,this.CrewCount,this.BudgetedHours,this.EquipmentCount,this.MaterialCount,this.CrewCost,this.EquipCost,this.MatCost,this.Cost,this.NoCrew,this.EquipConflict,this.MaterialGap,this.ReadyPct,this.Crew,this.Equipment,this.Materials});
    PmJob.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        JobID = json['JobID'];
        Name = json['Name'];
        Description = json['Description'];
        Status = json['Status'];
        StartDate = json['StartDate'];
        EndDate = json['EndDate'];
        CrewCount = json['CrewCount'];
        BudgetedHours = JsonConverters.toDouble(json['BudgetedHours']);
        EquipmentCount = json['EquipmentCount'];
        MaterialCount = json['MaterialCount'];
        CrewCost = JsonConverters.toDouble(json['CrewCost']);
        EquipCost = JsonConverters.toDouble(json['EquipCost']);
        MatCost = JsonConverters.toDouble(json['MatCost']);
        Cost = JsonConverters.toDouble(json['Cost']);
        NoCrew = json['NoCrew'];
        EquipConflict = json['EquipConflict'];
        MaterialGap = json['MaterialGap'];
        ReadyPct = json['ReadyPct'];
        Crew = JsonConverters.fromJson(json['Crew'],'List<PmJobCrew>',context!);
        Equipment = JsonConverters.fromJson(json['Equipment'],'List<PmJobResource>',context!);
        Materials = JsonConverters.fromJson(json['Materials'],'List<PmJobResource>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'JobID': JobID,
        'Name': Name,
        'Description': Description,
        'Status': Status,
        'StartDate': StartDate,
        'EndDate': EndDate,
        'CrewCount': CrewCount,
        'BudgetedHours': BudgetedHours,
        'EquipmentCount': EquipmentCount,
        'MaterialCount': MaterialCount,
        'CrewCost': CrewCost,
        'EquipCost': EquipCost,
        'MatCost': MatCost,
        'Cost': Cost,
        'NoCrew': NoCrew,
        'EquipConflict': EquipConflict,
        'MaterialGap': MaterialGap,
        'ReadyPct': ReadyPct,
        'Crew': JsonConverters.toJson(Crew,'List<PmJobCrew>',context!),
        'Equipment': JsonConverters.toJson(Equipment,'List<PmJobResource>',context!),
        'Materials': JsonConverters.toJson(Materials,'List<PmJobResource>',context!)
    };

    getTypeName() => "PmJob";
    TypeContext? context = _ctx;
}

class PmConflict implements IConvertible
{
    String? ProjectName;
    String? JobName;
    String? StartDate;
    String? EndDate;

    PmConflict({this.ProjectName,this.JobName,this.StartDate,this.EndDate});
    PmConflict.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ProjectName = json['ProjectName'];
        JobName = json['JobName'];
        StartDate = json['StartDate'];
        EndDate = json['EndDate'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ProjectName': ProjectName,
        'JobName': JobName,
        'StartDate': StartDate,
        'EndDate': EndDate
    };

    getTypeName() => "PmConflict";
    TypeContext? context = _ctx;
}

class PmEquipmentRow implements IConvertible
{
    int? EquipmentID;
    String? Name;
    String? EquipmentType;
    String? SerialNumber;
    String? UsedByJobs;
    bool? Available;
    List<PmConflict>? Conflicts = [];
    int? MaintenanceIntervalDays;
    String? LastServiceDate;
    String? NextServiceDate;
    String? MaintenanceState;

    PmEquipmentRow({this.EquipmentID,this.Name,this.EquipmentType,this.SerialNumber,this.UsedByJobs,this.Available,this.Conflicts,this.MaintenanceIntervalDays,this.LastServiceDate,this.NextServiceDate,this.MaintenanceState});
    PmEquipmentRow.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        EquipmentID = json['EquipmentID'];
        Name = json['Name'];
        EquipmentType = json['EquipmentType'];
        SerialNumber = json['SerialNumber'];
        UsedByJobs = json['UsedByJobs'];
        Available = json['Available'];
        Conflicts = JsonConverters.fromJson(json['Conflicts'],'List<PmConflict>',context!);
        MaintenanceIntervalDays = json['MaintenanceIntervalDays'];
        LastServiceDate = json['LastServiceDate'];
        NextServiceDate = json['NextServiceDate'];
        MaintenanceState = json['MaintenanceState'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'EquipmentID': EquipmentID,
        'Name': Name,
        'EquipmentType': EquipmentType,
        'SerialNumber': SerialNumber,
        'UsedByJobs': UsedByJobs,
        'Available': Available,
        'Conflicts': JsonConverters.toJson(Conflicts,'List<PmConflict>',context!),
        'MaintenanceIntervalDays': MaintenanceIntervalDays,
        'LastServiceDate': LastServiceDate,
        'NextServiceDate': NextServiceDate,
        'MaintenanceState': MaintenanceState
    };

    getTypeName() => "PmEquipmentRow";
    TypeContext? context = _ctx;
}

class PmMaterialRow implements IConvertible
{
    int? MaterialID;
    String? Name;
    String? MaterialType;
    int? OnHand;
    int? NeededByJobs;
    int? QtyNeeded;
    int? ToOrder;
    double? UnitCost;
    double? LineCost;
    int? ProjectMaterialID;
    int? StatusID;
    String? Status;
    String? Supplier;
    String? OrderDate;
    String? DeliveryDate;
    bool? Shortfall;

    PmMaterialRow({this.MaterialID,this.Name,this.MaterialType,this.OnHand,this.NeededByJobs,this.QtyNeeded,this.ToOrder,this.UnitCost,this.LineCost,this.ProjectMaterialID,this.StatusID,this.Status,this.Supplier,this.OrderDate,this.DeliveryDate,this.Shortfall});
    PmMaterialRow.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        MaterialID = json['MaterialID'];
        Name = json['Name'];
        MaterialType = json['MaterialType'];
        OnHand = json['OnHand'];
        NeededByJobs = json['NeededByJobs'];
        QtyNeeded = json['QtyNeeded'];
        ToOrder = json['ToOrder'];
        UnitCost = JsonConverters.toDouble(json['UnitCost']);
        LineCost = JsonConverters.toDouble(json['LineCost']);
        ProjectMaterialID = json['ProjectMaterialID'];
        StatusID = json['StatusID'];
        Status = json['Status'];
        Supplier = json['Supplier'];
        OrderDate = json['OrderDate'];
        DeliveryDate = json['DeliveryDate'];
        Shortfall = json['Shortfall'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'MaterialID': MaterialID,
        'Name': Name,
        'MaterialType': MaterialType,
        'OnHand': OnHand,
        'NeededByJobs': NeededByJobs,
        'QtyNeeded': QtyNeeded,
        'ToOrder': ToOrder,
        'UnitCost': UnitCost,
        'LineCost': LineCost,
        'ProjectMaterialID': ProjectMaterialID,
        'StatusID': StatusID,
        'Status': Status,
        'Supplier': Supplier,
        'OrderDate': OrderDate,
        'DeliveryDate': DeliveryDate,
        'Shortfall': Shortfall
    };

    getTypeName() => "PmMaterialRow";
    TypeContext? context = _ctx;
}

class PmCalendarBar implements IConvertible
{
    int? JobID;
    String? Name;
    String? StartDate;
    String? EndDate;
    String? Status;

    PmCalendarBar({this.JobID,this.Name,this.StartDate,this.EndDate,this.Status});
    PmCalendarBar.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        JobID = json['JobID'];
        Name = json['Name'];
        StartDate = json['StartDate'];
        EndDate = json['EndDate'];
        Status = json['Status'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'JobID': JobID,
        'Name': Name,
        'StartDate': StartDate,
        'EndDate': EndDate,
        'Status': Status
    };

    getTypeName() => "PmCalendarBar";
    TypeContext? context = _ctx;
}

class PmCatalogItem implements IConvertible
{
    int? Id;
    String? Name;
    double? Amount;

    PmCatalogItem({this.Id,this.Name,this.Amount});
    PmCatalogItem.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Name = json['Name'];
        Amount = JsonConverters.toDouble(json['Amount']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Name': Name,
        'Amount': Amount
    };

    getTypeName() => "PmCatalogItem";
    TypeContext? context = _ctx;
}

class PmProjectDetail implements IConvertible
{
    int? ProjectID;
    String? ProjectUID;
    String? Name;
    String? Client;
    String? ProjectType;
    String? Status;
    String? Branch;
    String? StartDate;
    String? EndDate;
    String? Description;
    PmFinance? Finance;
    PmReadiness? Readiness;
    List<PmJob>? Jobs = [];
    List<PmEquipmentRow>? Equipment = [];
    List<PmMaterialRow>? Materials = [];
    List<PmCalendarBar>? Calendar = [];
    List<PmCatalogItem>? ProjectStatuses = [];
    ResponseStatus? ResponseStatus;

    PmProjectDetail({this.ProjectID,this.ProjectUID,this.Name,this.Client,this.ProjectType,this.Status,this.Branch,this.StartDate,this.EndDate,this.Description,this.Finance,this.Readiness,this.Jobs,this.Equipment,this.Materials,this.Calendar,this.ProjectStatuses,this.ResponseStatus});
    PmProjectDetail.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ProjectID = json['ProjectID'];
        ProjectUID = json['ProjectUID'];
        Name = json['Name'];
        Client = json['Client'];
        ProjectType = json['ProjectType'];
        Status = json['Status'];
        Branch = json['Branch'];
        StartDate = json['StartDate'];
        EndDate = json['EndDate'];
        Description = json['Description'];
        Finance = JsonConverters.fromJson(json['Finance'],'PmFinance',context!);
        Readiness = JsonConverters.fromJson(json['Readiness'],'PmReadiness',context!);
        Jobs = JsonConverters.fromJson(json['Jobs'],'List<PmJob>',context!);
        Equipment = JsonConverters.fromJson(json['Equipment'],'List<PmEquipmentRow>',context!);
        Materials = JsonConverters.fromJson(json['Materials'],'List<PmMaterialRow>',context!);
        Calendar = JsonConverters.fromJson(json['Calendar'],'List<PmCalendarBar>',context!);
        ProjectStatuses = JsonConverters.fromJson(json['ProjectStatuses'],'List<PmCatalogItem>',context!);
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ProjectID': ProjectID,
        'ProjectUID': ProjectUID,
        'Name': Name,
        'Client': Client,
        'ProjectType': ProjectType,
        'Status': Status,
        'Branch': Branch,
        'StartDate': StartDate,
        'EndDate': EndDate,
        'Description': Description,
        'Finance': JsonConverters.toJson(Finance,'PmFinance',context!),
        'Readiness': JsonConverters.toJson(Readiness,'PmReadiness',context!),
        'Jobs': JsonConverters.toJson(Jobs,'List<PmJob>',context!),
        'Equipment': JsonConverters.toJson(Equipment,'List<PmEquipmentRow>',context!),
        'Materials': JsonConverters.toJson(Materials,'List<PmMaterialRow>',context!),
        'Calendar': JsonConverters.toJson(Calendar,'List<PmCalendarBar>',context!),
        'ProjectStatuses': JsonConverters.toJson(ProjectStatuses,'List<PmCatalogItem>',context!),
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

    getTypeName() => "PmProjectDetail";
    TypeContext? context = _ctx;
}

class PmProjectDetailRequest implements IConvertible
{
    String? Uid;

    PmProjectDetailRequest({this.Uid});
    PmProjectDetailRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Uid = json['Uid'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Uid': Uid
    };

    getTypeName() => "PmProjectDetailRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'PmFinance': TypeInfo(TypeOf.Class, create:() => PmFinance()),
    'PmReadiness': TypeInfo(TypeOf.Class, create:() => PmReadiness()),
    'PmJobCrew': TypeInfo(TypeOf.Class, create:() => PmJobCrew()),
    'PmJobResource': TypeInfo(TypeOf.Class, create:() => PmJobResource()),
    'PmJob': TypeInfo(TypeOf.Class, create:() => PmJob()),
    'List<PmJobCrew>': TypeInfo(TypeOf.Class, create:() => <PmJobCrew>[]),
    'List<PmJobResource>': TypeInfo(TypeOf.Class, create:() => <PmJobResource>[]),
    'PmConflict': TypeInfo(TypeOf.Class, create:() => PmConflict()),
    'PmEquipmentRow': TypeInfo(TypeOf.Class, create:() => PmEquipmentRow()),
    'List<PmConflict>': TypeInfo(TypeOf.Class, create:() => <PmConflict>[]),
    'PmMaterialRow': TypeInfo(TypeOf.Class, create:() => PmMaterialRow()),
    'PmCalendarBar': TypeInfo(TypeOf.Class, create:() => PmCalendarBar()),
    'PmCatalogItem': TypeInfo(TypeOf.Class, create:() => PmCatalogItem()),
    'PmProjectDetail': TypeInfo(TypeOf.Class, create:() => PmProjectDetail()),
    'List<PmJob>': TypeInfo(TypeOf.Class, create:() => <PmJob>[]),
    'List<PmEquipmentRow>': TypeInfo(TypeOf.Class, create:() => <PmEquipmentRow>[]),
    'List<PmMaterialRow>': TypeInfo(TypeOf.Class, create:() => <PmMaterialRow>[]),
    'List<PmCalendarBar>': TypeInfo(TypeOf.Class, create:() => <PmCalendarBar>[]),
    'List<PmCatalogItem>': TypeInfo(TypeOf.Class, create:() => <PmCatalogItem>[]),
    'PmProjectDetailRequest': TypeInfo(TypeOf.Class, create:() => PmProjectDetailRequest()),
});

Dart PmProjectDetailRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /v1/pm/project/{Uid} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"ProjectID":0,"ProjectUID":"String","Name":"String","Client":"String","ProjectType":"String","Status":"String","Branch":"String","StartDate":"String","EndDate":"String","Description":"String","Finance":{"Budget":0,"Spent":0,"EstimatedCost":0,"CrewCost":0,"EquipCost":0,"MatCost":0,"Variance":0,"HealthPct":0,"SpentPct":0,"ProgressPct":0},"Readiness":{"JobsNoCrew":0,"OpenRoles":0,"EquipmentConflicts":0,"MaterialGaps":0,"TotalGaps":0,"ReadyPct":0},"Jobs":[{"JobID":0,"Name":"String","Description":"String","Status":"String","StartDate":"String","EndDate":"String","CrewCount":0,"BudgetedHours":0,"EquipmentCount":0,"MaterialCount":0,"CrewCost":0,"EquipCost":0,"MatCost":0,"Cost":0,"NoCrew":false,"EquipConflict":false,"MaterialGap":false,"ReadyPct":0,"Crew":[{"ContactID":0,"Name":"String","Rate":0,"BudgetedHours":0,"IsOpen":false}],"Equipment":[{"Id":0,"Name":"String","Amount":0,"Qty":0}],"Materials":[{"Id":0,"Name":"String","Amount":0,"Qty":0}]}],"Equipment":[{"EquipmentID":0,"Name":"String","EquipmentType":"String","SerialNumber":"String","UsedByJobs":"String","Available":false,"Conflicts":[{"ProjectName":"String","JobName":"String","StartDate":"String","EndDate":"String"}],"MaintenanceIntervalDays":0,"LastServiceDate":"String","NextServiceDate":"String","MaintenanceState":"String"}],"Materials":[{"MaterialID":0,"Name":"String","MaterialType":"String","OnHand":0,"NeededByJobs":0,"QtyNeeded":0,"ToOrder":0,"UnitCost":0,"LineCost":0,"ProjectMaterialID":0,"StatusID":0,"Status":"String","Supplier":"String","OrderDate":"String","DeliveryDate":"String","Shortfall":false}],"Calendar":[{"JobID":0,"Name":"String","StartDate":"String","EndDate":"String","Status":"String"}],"ProjectStatuses":[{"Id":0,"Name":"String","Amount":0}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}