Mercedes.VehicleManagement.API

<back to all web services

DataProcessListByTypeRequest

Requires Authentication
The following routes are available for this service:
POST/v1/GetAllDataProcessListGet list of all data processes by the type
POST/v1/GetDataProcessListGet list of data processes created by the user
import 'package:servicestack/servicestack.dart';

class DataProcessResponse implements IConvertible
{
    int id = 0;
    int type = 0;
    String typeName = "";
    String statusName = "";
    int status = 0;
    int totalRecords = 0;
    int processedRecords = 0;
    String fileName = "";
    String originalFileName = "";
    String dateCreated = "";
    String dateStarted = "";
    String dateFinished = "";
    String gasId = "";

    DataProcessResponse({this.id=0,this.type=0,this.typeName="",this.statusName="",this.status=0,this.totalRecords=0,this.processedRecords=0,this.fileName="",this.originalFileName="",this.dateCreated="",this.dateStarted="",this.dateFinished="",this.gasId=""});
    DataProcessResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'] ?? 0;
        type = json['type'] ?? 0;
        typeName = json['typeName'] ?? "";
        statusName = json['statusName'] ?? "";
        status = json['status'] ?? 0;
        totalRecords = json['totalRecords'] ?? 0;
        processedRecords = json['processedRecords'] ?? 0;
        fileName = json['fileName'] ?? "";
        originalFileName = json['originalFileName'] ?? "";
        dateCreated = json['dateCreated'] ?? "";
        dateStarted = json['dateStarted'] ?? "";
        dateFinished = json['dateFinished'] ?? "";
        gasId = json['gasId'] ?? "";
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'type': type,
        'typeName': typeName,
        'statusName': statusName,
        'status': status,
        'totalRecords': totalRecords,
        'processedRecords': processedRecords,
        'fileName': fileName,
        'originalFileName': originalFileName,
        'dateCreated': dateCreated,
        'dateStarted': dateStarted,
        'dateFinished': dateFinished,
        'gasId': gasId
    };

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

class DataProcessListResponse implements IConvertible
{
    List<DataProcessResponse> dataProcesses = [];

    DataProcessListResponse({this.dataProcesses=const []});
    DataProcessListResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        dataProcesses = JsonConverters.fromJson(json['dataProcesses'],'List<DataProcessResponse>',context!) ?? [];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'dataProcesses': JsonConverters.toJson(dataProcesses,'List<DataProcessResponse>',context!)
    };

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

class DataProcessListRequest implements IPost, IConvertible
{
    List<int> type = [];

    DataProcessListRequest({this.type=const []});
    DataProcessListRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        type = JsonConverters.fromJson(json['type'],'List<int>',context!) ?? [];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'type': JsonConverters.toJson(type,'List<int>',context!)
    };

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

class DataProcessListByTypeRequest extends DataProcessListRequest implements IConvertible
{
    DataProcessListByTypeRequest();
    DataProcessListByTypeRequest.fromJson(Map<String, dynamic> json) : super.fromJson(json);
    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson();
    getTypeName() => "DataProcessListByTypeRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'uat_api_vehicle_mgt_mb_dhc.rapp_customers.co.uk', types: <String, TypeInfo> {
    'DataProcessResponse': TypeInfo(TypeOf.Class, create:() => DataProcessResponse()),
    'DataProcessListResponse': TypeInfo(TypeOf.Class, create:() => DataProcessListResponse()),
    'List<DataProcessResponse>': TypeInfo(TypeOf.Class, create:() => <DataProcessResponse>[]),
    'DataProcessListRequest': TypeInfo(TypeOf.Class, create:() => DataProcessListRequest()),
    'DataProcessListByTypeRequest': TypeInfo(TypeOf.Class, create:() => DataProcessListByTypeRequest()),
});

Dart DataProcessListByTypeRequest DTOs

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

HTTP + JSV

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

POST /v1/GetAllDataProcessList HTTP/1.1 
Host: uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	type: 
	[
		0
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	dataProcesses: 
	[
		{
			id: 0,
			type: 0,
			typeName: String,
			statusName: String,
			status: 0,
			totalRecords: 0,
			processedRecords: 0,
			fileName: String,
			originalFileName: String,
			dateCreated: String,
			dateStarted: String,
			dateFinished: String,
			gasId: String
		}
	]
}