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';
import 'dart:typed_data';

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 .xml suffix or ?format=xml

HTTP + XML

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: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ResourceConflictsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <CanResolve>false</CanResolve>
  <Conflicts>
    <ResourceConflictDto>
      <Bookings>
        <ResourceConflictBookingDto>
          <Hot>false</Hot>
          <Job>String</Job>
          <Project>String</Project>
          <Tag>String</Tag>
          <Window>String</Window>
        </ResourceConflictBookingDto>
      </Bookings>
      <Id>String</Id>
      <Kind>String</Kind>
      <Name>String</Name>
      <Options>
        <ResourceConflictOptionDto>
          <ActionJson>String</ActionJson>
          <Clears>false</Clears>
          <Id>String</Id>
          <Label>String</Label>
          <Note>String</Note>
          <Recommended>false</Recommended>
          <Why>String</Why>
        </ResourceConflictOptionDto>
      </Options>
      <Severity>String</Severity>
      <Summary>String</Summary>
    </ResourceConflictDto>
  </Conflicts>
  <CrewsWatched>0</CrewsWatched>
  <EquipmentWatched>0</EquipmentWatched>
  <ResolvedInWindow>0</ResolvedInWindow>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
  <WorkersWatched>0</WorkersWatched>
</ResourceConflictsResponse>