Trendsic Platform Service

<back to all web services

CadRenderStatusRequest

Requires Authentication
Requires any of the roles:Worker, Agent, Administrator
The following routes are available for this service:
GET,OPTIONS/v1/cad/{AttachmentId}/render/status
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class CadDerivative implements IConvertible
{
    int? CadDerivativeID;
    String? AttachmentId;
    int? VersionNo;
    String? Urn;
    String? ObjectKey;
    String? Status;
    int? Progress;
    String? StageLabel;
    bool? Has2d;
    bool? Has3d;
    bool? HasPdf;
    String? ThumbKey;
    String? ThumbUrl;
    String? PdfAttachmentId;
    String? ErrorText;
    String? RequestedBy;
    DateTime? RequestedAt;
    DateTime? FinishedAt;
    int? AgeSeconds;

    CadDerivative({this.CadDerivativeID,this.AttachmentId,this.VersionNo,this.Urn,this.ObjectKey,this.Status,this.Progress,this.StageLabel,this.Has2d,this.Has3d,this.HasPdf,this.ThumbKey,this.ThumbUrl,this.PdfAttachmentId,this.ErrorText,this.RequestedBy,this.RequestedAt,this.FinishedAt,this.AgeSeconds});
    CadDerivative.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CadDerivativeID = json['CadDerivativeID'];
        AttachmentId = json['AttachmentId'];
        VersionNo = json['VersionNo'];
        Urn = json['Urn'];
        ObjectKey = json['ObjectKey'];
        Status = json['Status'];
        Progress = json['Progress'];
        StageLabel = json['StageLabel'];
        Has2d = json['Has2d'];
        Has3d = json['Has3d'];
        HasPdf = json['HasPdf'];
        ThumbKey = json['ThumbKey'];
        ThumbUrl = json['ThumbUrl'];
        PdfAttachmentId = json['PdfAttachmentId'];
        ErrorText = json['ErrorText'];
        RequestedBy = json['RequestedBy'];
        RequestedAt = JsonConverters.fromJson(json['RequestedAt'],'DateTime',context!);
        FinishedAt = JsonConverters.fromJson(json['FinishedAt'],'DateTime',context!);
        AgeSeconds = json['AgeSeconds'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CadDerivativeID': CadDerivativeID,
        'AttachmentId': AttachmentId,
        'VersionNo': VersionNo,
        'Urn': Urn,
        'ObjectKey': ObjectKey,
        'Status': Status,
        'Progress': Progress,
        'StageLabel': StageLabel,
        'Has2d': Has2d,
        'Has3d': Has3d,
        'HasPdf': HasPdf,
        'ThumbKey': ThumbKey,
        'ThumbUrl': ThumbUrl,
        'PdfAttachmentId': PdfAttachmentId,
        'ErrorText': ErrorText,
        'RequestedBy': RequestedBy,
        'RequestedAt': JsonConverters.toJson(RequestedAt,'DateTime',context!),
        'FinishedAt': JsonConverters.toJson(FinishedAt,'DateTime',context!),
        'AgeSeconds': AgeSeconds
    };

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

class CadRenderResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    CadDerivative? Derivative;

    CadRenderResponse({this.ResponseStatus,this.Derivative});
    CadRenderResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        Derivative = JsonConverters.fromJson(json['Derivative'],'CadDerivative',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
        'Derivative': JsonConverters.toJson(Derivative,'CadDerivative',context!)
    };

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

class CadRenderStatusRequest implements IConvertible
{
    String? AttachmentId;
    int? VersionNo;

    CadRenderStatusRequest({this.AttachmentId,this.VersionNo});
    CadRenderStatusRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'CadDerivative': TypeInfo(TypeOf.Class, create:() => CadDerivative()),
    'CadRenderResponse': TypeInfo(TypeOf.Class, create:() => CadRenderResponse()),
    'CadRenderStatusRequest': TypeInfo(TypeOf.Class, create:() => CadRenderStatusRequest()),
});

Dart CadRenderStatusRequest DTOs

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

HTTP + CSV

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

GET /v1/cad/{AttachmentId}/render/status HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Derivative":{"CadDerivativeID":0,"AttachmentId":"00000000000000000000000000000000","VersionNo":0,"Urn":"String","ObjectKey":"String","Status":"String","Progress":0,"StageLabel":"String","Has2d":false,"Has3d":false,"HasPdf":false,"ThumbKey":"String","ThumbUrl":"String","PdfAttachmentId":"00000000000000000000000000000000","ErrorText":"String","RequestedBy":"String","RequestedAt":"0001-01-01T00:00:00.0000000","FinishedAt":"0001-01-01T00:00:00.0000000","AgeSeconds":0}}