CL$WS Host : D5239-staging-cl

<back to all web services

cr_materielRequest

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

class _cr_materiel implements IConvertible
{
    String? id_controleur;
    String? id_tournee;
    String? id_materiel;
    int? depart;
    String? type_materiel;
    int? quantite_depart;
    int? quantite;
    String? date;

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

    fromMap(Map<String, dynamic> json) {
        id_controleur = json['id_controleur'];
        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_controleur': id_controleur,
        'id_tournee': id_tournee,
        'id_materiel': id_materiel,
        'depart': depart,
        'type_materiel': type_materiel,
        'quantite_depart': quantite_depart,
        'quantite': quantite,
        'date': date
    };

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

class cr_materielResponse implements IConvertible
{
    String? id_controleur;
    String? id_tournee;
    List<_cr_materiel>? cr_materiels;

    cr_materielResponse({this.id_controleur,this.id_tournee,this.cr_materiels});
    cr_materielResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'id_controleur': id_controleur,
        'id_tournee': id_tournee,
        'cr_materiels': JsonConverters.toJson(cr_materiels,'List<_cr_materiel>',context!)
    };

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

class cr_materielRequest implements IConvertible
{
    String? id_controleur;
    String? id_tournee;
    List<_cr_materiel>? cr_materiels;

    cr_materielRequest({this.id_controleur,this.id_tournee,this.cr_materiels});
    cr_materielRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'id_controleur': id_controleur,
        'id_tournee': id_tournee,
        'cr_materiels': JsonConverters.toJson(cr_materiels,'List<_cr_materiel>',context!)
    };

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

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

Dart cr_materielRequest 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.

POST /cr_materiel/{id_controleur}/{id_tournee} HTTP/1.1 
Host: freemotion-staging.milliet.paris 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"id_controleur":"String","id_tournee":"String","cr_materiels":[{"id_controleur":"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: text/jsonl
Content-Length: length

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