Trendsic Platform Service

<back to all web services

ResourceConflictsRequest

Requires Authentication
The following routes are available for this service:
GET/v1/resource-conflicts
import 'package:servicestack/servicestack.dart';

class ResourceConflictBookingDto implements IConvertible
{
    String? Project;
    String? Job;
    String? Window;
    String? Tag;
    bool? Hot;

    ResourceConflictBookingDto({this.Project,this.Job,this.Window,this.Tag,this.Hot});
    ResourceConflictBookingDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Project = json['Project'];
        Job = json['Job'];
        Window = json['Window'];
        Tag = json['Tag'];
        Hot = json['Hot'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Project': Project,
        'Job': Job,
        'Window': Window,
        'Tag': Tag,
        'Hot': Hot
    };

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

class ResourceConflictOptionDto implements IConvertible
{
    String? Id;
    String? Label;
    String? Note;
    bool? Clears;
    bool? Recommended;
    String? Why;
    String? ActionJson;

    ResourceConflictOptionDto({this.Id,this.Label,this.Note,this.Clears,this.Recommended,this.Why,this.ActionJson});
    ResourceConflictOptionDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Label = json['Label'];
        Note = json['Note'];
        Clears = json['Clears'];
        Recommended = json['Recommended'];
        Why = json['Why'];
        ActionJson = json['ActionJson'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Label': Label,
        'Note': Note,
        'Clears': Clears,
        'Recommended': Recommended,
        'Why': Why,
        'ActionJson': ActionJson
    };

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

class ResourceConflictDto implements IConvertible
{
    String? Id;
    String? Kind;
    String? Name;
    String? Severity;
    String? Summary;
    List<ResourceConflictBookingDto>? Bookings = [];
    List<ResourceConflictOptionDto>? Options = [];

    ResourceConflictDto({this.Id,this.Kind,this.Name,this.Severity,this.Summary,this.Bookings,this.Options});
    ResourceConflictDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Kind = json['Kind'];
        Name = json['Name'];
        Severity = json['Severity'];
        Summary = json['Summary'];
        Bookings = JsonConverters.fromJson(json['Bookings'],'List<ResourceConflictBookingDto>',context!);
        Options = JsonConverters.fromJson(json['Options'],'List<ResourceConflictOptionDto>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Kind': Kind,
        'Name': Name,
        'Severity': Severity,
        'Summary': Summary,
        'Bookings': JsonConverters.toJson(Bookings,'List<ResourceConflictBookingDto>',context!),
        'Options': JsonConverters.toJson(Options,'List<ResourceConflictOptionDto>',context!)
    };

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

class ResourceConflictsResponse implements IConvertible
{
    List<ResourceConflictDto>? Conflicts = [];
    int? EquipmentWatched;
    int? WorkersWatched;
    int? CrewsWatched;
    int? ResolvedInWindow;
    bool? CanResolve;
    ResponseStatus? ResponseStatus;

    ResourceConflictsResponse({this.Conflicts,this.EquipmentWatched,this.WorkersWatched,this.CrewsWatched,this.ResolvedInWindow,this.CanResolve,this.ResponseStatus});
    ResourceConflictsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Conflicts = JsonConverters.fromJson(json['Conflicts'],'List<ResourceConflictDto>',context!);
        EquipmentWatched = json['EquipmentWatched'];
        WorkersWatched = json['WorkersWatched'];
        CrewsWatched = json['CrewsWatched'];
        ResolvedInWindow = json['ResolvedInWindow'];
        CanResolve = json['CanResolve'];
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Conflicts': JsonConverters.toJson(Conflicts,'List<ResourceConflictDto>',context!),
        'EquipmentWatched': EquipmentWatched,
        'WorkersWatched': WorkersWatched,
        'CrewsWatched': CrewsWatched,
        'ResolvedInWindow': ResolvedInWindow,
        'CanResolve': CanResolve,
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

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

class ResourceConflictsRequest implements IConvertible
{
    int? Window;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'ResourceConflictBookingDto': TypeInfo(TypeOf.Class, create:() => ResourceConflictBookingDto()),
    'ResourceConflictOptionDto': TypeInfo(TypeOf.Class, create:() => ResourceConflictOptionDto()),
    'ResourceConflictDto': TypeInfo(TypeOf.Class, create:() => ResourceConflictDto()),
    'List<ResourceConflictBookingDto>': TypeInfo(TypeOf.Class, create:() => <ResourceConflictBookingDto>[]),
    'List<ResourceConflictOptionDto>': TypeInfo(TypeOf.Class, create:() => <ResourceConflictOptionDto>[]),
    'ResourceConflictsResponse': TypeInfo(TypeOf.Class, create:() => ResourceConflictsResponse()),
    'List<ResourceConflictDto>': TypeInfo(TypeOf.Class, create:() => <ResourceConflictDto>[]),
    'ResourceConflictsRequest': TypeInfo(TypeOf.Class, create:() => ResourceConflictsRequest()),
});

Dart ResourceConflictsRequest 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/resource-conflicts HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"Conflicts":[{"Id":"String","Kind":"String","Name":"String","Severity":"String","Summary":"String","Bookings":[{"Project":"String","Job":"String","Window":"String","Tag":"String","Hot":false}],"Options":[{"Id":"String","Label":"String","Note":"String","Clears":false,"Recommended":false,"Why":"String","ActionJson":"String"}]}],"EquipmentWatched":0,"WorkersWatched":0,"CrewsWatched":0,"ResolvedInWindow":0,"CanResolve":false,"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}