CL$WS Host : D5239-staging-cl

<back to all web services

cl_materielRequest

The following routes are available for this service:
GET, POST/cl_materiel/{id_operateur}/{id_tournee}
import 'package:servicestack/servicestack.dart';

class _materiel implements IConvertible
{
    String? id_operateur;
    String? id_tournee;
    String? id_materiel;
    int? depart;
    String? type_materiel;
    int? quantite_depart;
    int? quantite;
    String? date;

    _materiel({this.id_operateur,this.id_tournee,this.id_materiel,this.depart,this.type_materiel,this.quantite_depart,this.quantite,this.date});
    _materiel.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id_operateur = json['id_operateur'];
        id_tournee = json['id_tournee'];
        id_materiel = json['id_materiel'];
        depart = json['depart'];
        type_materiel = json['type_materiel'];
        quantite_depart = json['quantite_depart'];
        quantite = json['quantite'];
        date = json['date'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id_operateur': id_operateur,
        'id_tournee': id_tournee,
        'id_materiel': id_materiel,
        'depart': depart,
        'type_materiel': type_materiel,
        'quantite_depart': quantite_depart,
        'quantite': quantite,
        'date': date
    };

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

class cl_materielResponse implements IConvertible
{
    String? id_operateur;
    String? id_tournee;
    List<_materiel>? materiels;

    cl_materielResponse({this.id_operateur,this.id_tournee,this.materiels});
    cl_materielResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id_operateur = json['id_operateur'];
        id_tournee = json['id_tournee'];
        materiels = JsonConverters.fromJson(json['materiels'],'List<_materiel>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id_operateur': id_operateur,
        'id_tournee': id_tournee,
        'materiels': JsonConverters.toJson(materiels,'List<_materiel>',context!)
    };

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

class cl_materielRequest implements IConvertible
{
    String? id_operateur;
    String? id_tournee;
    List<_materiel>? materiels;

    cl_materielRequest({this.id_operateur,this.id_tournee,this.materiels});
    cl_materielRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id_operateur = json['id_operateur'];
        id_tournee = json['id_tournee'];
        materiels = JsonConverters.fromJson(json['materiels'],'List<_materiel>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id_operateur': id_operateur,
        'id_tournee': id_tournee,
        'materiels': JsonConverters.toJson(materiels,'List<_materiel>',context!)
    };

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

TypeContext _ctx = TypeContext(library: 'freemotion_staging.milliet.paris', types: <String, TypeInfo> {
    '_materiel': TypeInfo(TypeOf.Class, create:() => _materiel()),
    'cl_materielResponse': TypeInfo(TypeOf.Class, create:() => cl_materielResponse()),
    'List<_materiel>': TypeInfo(TypeOf.Class, create:() => <_materiel>[]),
    'cl_materielRequest': TypeInfo(TypeOf.Class, create:() => cl_materielRequest()),
});

Dart cl_materielRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /cl_materiel/{id_operateur}/{id_tournee} HTTP/1.1 
Host: freemotion-staging.milliet.paris 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"id_operateur":"String","id_tournee":"String","materiels":[{"id_operateur":"String","id_tournee":"String","id_materiel":"String","depart":0,"type_materiel":"String","quantite_depart":0,"quantite":0,"date":"String"}]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"id_operateur":"String","id_tournee":"String","materiels":[{"id_operateur":"String","id_tournee":"String","id_materiel":"String","depart":0,"type_materiel":"String","quantite_depart":0,"quantite":0,"date":"String"}]}