/* Options:
Date: 2026-04-18 12:49:23
Version: 8.53
Tip: To override a DTO option, remove "//" prefix before updating
BaseUrl: https://chinook.netcore.io

//GlobalNamespace: 
//AddServiceStackTypes: True
//AddResponseStatus: False
//AddImplicitVersion: 
//AddDescriptionAsComments: True
//IncludeTypes: 
//ExcludeTypes: 
//DefaultImports: package:servicestack/servicestack.dart
*/

import 'package:servicestack/servicestack.dart';

class Albums implements IConvertible
{
    int? albumId;
    // @required()
    String? title;

    int? artistId;

    Albums({this.albumId,this.title,this.artistId});
    Albums.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        albumId = json['albumId'];
        title = json['title'];
        artistId = json['artistId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'albumId': albumId,
        'title': title,
        'artistId': artistId
    };

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

class Artists implements IConvertible
{
    int? artistId;
    String? name;

    Artists({this.artistId,this.name});
    Artists.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'artistId': artistId,
        'name': name
    };

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

class Genres implements IConvertible
{
    int? genreId;
    String? name;

    Genres({this.genreId,this.name});
    Genres.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'genreId': genreId,
        'name': name
    };

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

class MediaTypes implements IConvertible
{
    int? mediaTypeId;
    String? name;

    MediaTypes({this.mediaTypeId,this.name});
    MediaTypes.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'mediaTypeId': mediaTypeId,
        'name': name
    };

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

class Playlists implements IConvertible
{
    int? playlistId;
    String? name;

    Playlists({this.playlistId,this.name});
    Playlists.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'playlistId': playlistId,
        'name': name
    };

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

class Tracks implements IConvertible
{
    int? trackId;
    // @required()
    String? name;

    // @References(typeof(Albums))
    int? albumId;

    // @References(typeof(MediaTypes))
    int? mediaTypeId;

    // @References(typeof(Genres))
    int? genreId;

    String? composer;
    int? milliseconds;
    int? bytes;
    double? unitPrice;
    Albums? album;
    MediaTypes? mediaType;
    Genres? genre;

    Tracks({this.trackId,this.name,this.albumId,this.mediaTypeId,this.genreId,this.composer,this.milliseconds,this.bytes,this.unitPrice,this.album,this.mediaType,this.genre});
    Tracks.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        trackId = json['trackId'];
        name = json['name'];
        albumId = json['albumId'];
        mediaTypeId = json['mediaTypeId'];
        genreId = json['genreId'];
        composer = json['composer'];
        milliseconds = json['milliseconds'];
        bytes = json['bytes'];
        unitPrice = JsonConverters.toDouble(json['unitPrice']);
        album = JsonConverters.fromJson(json['album'],'Albums',context!);
        mediaType = JsonConverters.fromJson(json['mediaType'],'MediaTypes',context!);
        genre = JsonConverters.fromJson(json['genre'],'Genres',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'trackId': trackId,
        'name': name,
        'albumId': albumId,
        'mediaTypeId': mediaTypeId,
        'genreId': genreId,
        'composer': composer,
        'milliseconds': milliseconds,
        'bytes': bytes,
        'unitPrice': unitPrice,
        'album': JsonConverters.toJson(album,'Albums',context!),
        'mediaType': JsonConverters.toJson(mediaType,'MediaTypes',context!),
        'genre': JsonConverters.toJson(genre,'Genres',context!)
    };

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

class Customers implements IConvertible
{
    int? customerId;
    // @computed()
    String? displayName;

    // @required()
    String? firstName;

    // @required()
    String? lastName;

    int? supportRepId;
    String? company;
    String? address;
    String? city;
    String? state;
    String? country;
    String? postalCode;
    String? phone;
    String? fax;
    // @required()
    String? email;

    Customers({this.customerId,this.displayName,this.firstName,this.lastName,this.supportRepId,this.company,this.address,this.city,this.state,this.country,this.postalCode,this.phone,this.fax,this.email});
    Customers.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        customerId = json['customerId'];
        displayName = json['displayName'];
        firstName = json['firstName'];
        lastName = json['lastName'];
        supportRepId = json['supportRepId'];
        company = json['company'];
        address = json['address'];
        city = json['city'];
        state = json['state'];
        country = json['country'];
        postalCode = json['postalCode'];
        phone = json['phone'];
        fax = json['fax'];
        email = json['email'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'customerId': customerId,
        'displayName': displayName,
        'firstName': firstName,
        'lastName': lastName,
        'supportRepId': supportRepId,
        'company': company,
        'address': address,
        'city': city,
        'state': state,
        'country': country,
        'postalCode': postalCode,
        'phone': phone,
        'fax': fax,
        'email': email
    };

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

class Employees implements IConvertible
{
    int? employeeId;
    // @required()
    String? lastName;

    // @required()
    String? firstName;

    String? title;
    int? reportsTo;
    DateTime? birthDate;
    DateTime? hireDate;
    String? address;
    String? city;
    String? state;
    String? country;
    String? postalCode;
    String? phone;
    String? fax;
    String? email;

    Employees({this.employeeId,this.lastName,this.firstName,this.title,this.reportsTo,this.birthDate,this.hireDate,this.address,this.city,this.state,this.country,this.postalCode,this.phone,this.fax,this.email});
    Employees.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        employeeId = json['employeeId'];
        lastName = json['lastName'];
        firstName = json['firstName'];
        title = json['title'];
        reportsTo = json['reportsTo'];
        birthDate = JsonConverters.fromJson(json['birthDate'],'DateTime',context!);
        hireDate = JsonConverters.fromJson(json['hireDate'],'DateTime',context!);
        address = json['address'];
        city = json['city'];
        state = json['state'];
        country = json['country'];
        postalCode = json['postalCode'];
        phone = json['phone'];
        fax = json['fax'];
        email = json['email'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'employeeId': employeeId,
        'lastName': lastName,
        'firstName': firstName,
        'title': title,
        'reportsTo': reportsTo,
        'birthDate': JsonConverters.toJson(birthDate,'DateTime',context!),
        'hireDate': JsonConverters.toJson(hireDate,'DateTime',context!),
        'address': address,
        'city': city,
        'state': state,
        'country': country,
        'postalCode': postalCode,
        'phone': phone,
        'fax': fax,
        'email': email
    };

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

class InvoiceItems implements IConvertible
{
    int? invoiceLineId;
    int? invoiceId;
    int? trackId;
    double? unitPrice;
    int? quantity;

    InvoiceItems({this.invoiceLineId,this.invoiceId,this.trackId,this.unitPrice,this.quantity});
    InvoiceItems.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        invoiceLineId = json['invoiceLineId'];
        invoiceId = json['invoiceId'];
        trackId = json['trackId'];
        unitPrice = JsonConverters.toDouble(json['unitPrice']);
        quantity = json['quantity'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'invoiceLineId': invoiceLineId,
        'invoiceId': invoiceId,
        'trackId': trackId,
        'unitPrice': unitPrice,
        'quantity': quantity
    };

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

class Invoices implements IConvertible
{
    int? invoiceId;
    int? customerId;
    DateTime? invoiceDate;
    double? total;
    String? billingAddress;
    String? billingCity;
    String? billingState;
    String? billingCountry;
    String? billingPostalCode;

    Invoices({this.invoiceId,this.customerId,this.invoiceDate,this.total,this.billingAddress,this.billingCity,this.billingState,this.billingCountry,this.billingPostalCode});
    Invoices.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        invoiceId = json['invoiceId'];
        customerId = json['customerId'];
        invoiceDate = JsonConverters.fromJson(json['invoiceDate'],'DateTime',context!);
        total = JsonConverters.toDouble(json['total']);
        billingAddress = json['billingAddress'];
        billingCity = json['billingCity'];
        billingState = json['billingState'];
        billingCountry = json['billingCountry'];
        billingPostalCode = json['billingPostalCode'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'invoiceId': invoiceId,
        'customerId': customerId,
        'invoiceDate': JsonConverters.toJson(invoiceDate,'DateTime',context!),
        'total': total,
        'billingAddress': billingAddress,
        'billingCity': billingCity,
        'billingState': billingState,
        'billingCountry': billingCountry,
        'billingPostalCode': billingPostalCode
    };

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

class HelloResponse implements IConvertible
{
    String? result;

    HelloResponse({this.result});
    HelloResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

// @Route("/hello")
// @Route("/hello/{Name}")
class Hello implements IReturn<HelloResponse>, IConvertible, IPost
{
    String? name;

    Hello({this.name});
    Hello.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

    createResponse() => HelloResponse();
    getResponseTypeName() => "HelloResponse";
    getTypeName() => "Hello";
    TypeContext? context = _ctx;
}

// @Route("/albums", "GET")
// @Route("/albums/{AlbumId}", "GET")
class QueryAlbums extends QueryDb<Albums> implements IReturn<QueryResponse<Albums>>, IGet, IConvertible
{
    int? albumId;

    QueryAlbums({this.albumId});
    QueryAlbums.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        albumId = json['albumId'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'albumId': albumId
    });

    createResponse() => QueryResponse<Albums>();
    getResponseTypeName() => "QueryResponse<Albums>";
    getTypeName() => "QueryAlbums";
    TypeContext? context = _ctx;
}

// @Route("/artists", "GET")
// @Route("/artists/{ArtistId}", "GET")
class QueryArtists extends QueryDb<Artists> implements IReturn<QueryResponse<Artists>>, IGet, IConvertible
{
    int? artistId;
    List<int>? artistIdBetween;
    String? nameStartsWith;

    QueryArtists({this.artistId,this.artistIdBetween,this.nameStartsWith});
    QueryArtists.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'artistId': artistId,
        'artistIdBetween': JsonConverters.toJson(artistIdBetween,'List<int>',context!),
        'nameStartsWith': nameStartsWith
    });

    createResponse() => QueryResponse<Artists>();
    getResponseTypeName() => "QueryResponse<Artists>";
    getTypeName() => "QueryArtists";
    TypeContext? context = _ctx;
}

// @Route("/genres", "GET")
// @Route("/genres/{GenreId}", "GET")
class QueryGenres extends QueryDb<Genres> implements IReturn<QueryResponse<Genres>>, IGet, IConvertible
{
    int? genreId;

    QueryGenres({this.genreId});
    QueryGenres.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        genreId = json['genreId'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'genreId': genreId
    });

    createResponse() => QueryResponse<Genres>();
    getResponseTypeName() => "QueryResponse<Genres>";
    getTypeName() => "QueryGenres";
    TypeContext? context = _ctx;
}

// @Route("/mediatypes", "GET")
// @Route("/mediatypes/{MediaTypeId}", "GET")
class QueryMediaTypes extends QueryDb<MediaTypes> implements IReturn<QueryResponse<MediaTypes>>, IGet, IConvertible
{
    int? mediaTypeId;

    QueryMediaTypes({this.mediaTypeId});
    QueryMediaTypes.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        mediaTypeId = json['mediaTypeId'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'mediaTypeId': mediaTypeId
    });

    createResponse() => QueryResponse<MediaTypes>();
    getResponseTypeName() => "QueryResponse<MediaTypes>";
    getTypeName() => "QueryMediaTypes";
    TypeContext? context = _ctx;
}

// @Route("/playlists", "GET")
// @Route("/playlists/{PlaylistId}", "GET")
class QueryPlaylists extends QueryDb<Playlists> implements IReturn<QueryResponse<Playlists>>, IGet, IConvertible
{
    int? playlistId;

    QueryPlaylists({this.playlistId});
    QueryPlaylists.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        playlistId = json['playlistId'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'playlistId': playlistId
    });

    createResponse() => QueryResponse<Playlists>();
    getResponseTypeName() => "QueryResponse<Playlists>";
    getTypeName() => "QueryPlaylists";
    TypeContext? context = _ctx;
}

// @Route("/tracks", "GET")
// @Route("/tracks/{TrackId}", "GET")
class QueryTracks extends QueryDb<Tracks> implements IReturn<QueryResponse<Tracks>>, IGet, IConvertible
{
    int? trackId;
    String? nameContains;

    QueryTracks({this.trackId,this.nameContains});
    QueryTracks.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        trackId = json['trackId'];
        nameContains = json['nameContains'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'trackId': trackId,
        'nameContains': nameContains
    });

    createResponse() => QueryResponse<Tracks>();
    getResponseTypeName() => "QueryResponse<Tracks>";
    getTypeName() => "QueryTracks";
    TypeContext? context = _ctx;
}

// @Route("/customers", "GET")
// @Route("/customers/{CustomerId}", "GET")
class QueryCustomers extends QueryDb<Customers> implements IReturn<QueryResponse<Customers>>, IGet, IConvertible
{
    int? customerId;

    QueryCustomers({this.customerId});
    QueryCustomers.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        customerId = json['customerId'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'customerId': customerId
    });

    createResponse() => QueryResponse<Customers>();
    getResponseTypeName() => "QueryResponse<Customers>";
    getTypeName() => "QueryCustomers";
    TypeContext? context = _ctx;
}

// @Route("/employees", "GET")
// @Route("/employees/{EmployeeId}", "GET")
class QueryEmployees extends QueryDb<Employees> implements IReturn<QueryResponse<Employees>>, IGet, IConvertible
{
    int? employeeId;

    QueryEmployees({this.employeeId});
    QueryEmployees.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        employeeId = json['employeeId'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'employeeId': employeeId
    });

    createResponse() => QueryResponse<Employees>();
    getResponseTypeName() => "QueryResponse<Employees>";
    getTypeName() => "QueryEmployees";
    TypeContext? context = _ctx;
}

// @Route("/invoiceitems", "GET")
// @Route("/invoiceitems/{InvoiceLineId}", "GET")
class QueryInvoiceItems extends QueryDb<InvoiceItems> implements IReturn<QueryResponse<InvoiceItems>>, IGet, IConvertible
{
    int? invoiceLineId;

    QueryInvoiceItems({this.invoiceLineId});
    QueryInvoiceItems.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        invoiceLineId = json['invoiceLineId'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'invoiceLineId': invoiceLineId
    });

    createResponse() => QueryResponse<InvoiceItems>();
    getResponseTypeName() => "QueryResponse<InvoiceItems>";
    getTypeName() => "QueryInvoiceItems";
    TypeContext? context = _ctx;
}

// @Route("/invoices", "GET")
// @Route("/invoices/{InvoiceId}", "GET")
class QueryInvoices extends QueryDb<Invoices> implements IReturn<QueryResponse<Invoices>>, IGet, IConvertible
{
    int? invoiceId;

    QueryInvoices({this.invoiceId});
    QueryInvoices.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        invoiceId = json['invoiceId'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'invoiceId': invoiceId
    });

    createResponse() => QueryResponse<Invoices>();
    getResponseTypeName() => "QueryResponse<Invoices>";
    getTypeName() => "QueryInvoices";
    TypeContext? context = _ctx;
}

// @Route("/albums", "POST")
class CreateAlbums implements IReturn<IdResponse>, IPost, ICreateDb<Albums>, IConvertible
{
    // @Validate(Validator="NotEmpty")
    String? title;

    // @Validate(Validator="GreaterThan(0)")
    int? artistId;

    CreateAlbums({this.title,this.artistId});
    CreateAlbums.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'title': title,
        'artistId': artistId
    };

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "CreateAlbums";
    TypeContext? context = _ctx;
}

// @Route("/artists", "POST")
class CreateArtists implements IReturn<IdResponse>, IPost, ICreateDb<Artists>, IConvertible
{
    String? name;

    CreateArtists({this.name});
    CreateArtists.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "CreateArtists";
    TypeContext? context = _ctx;
}

// @Route("/genres", "POST")
class CreateGenres implements IReturn<IdResponse>, IPost, ICreateDb<Genres>, IConvertible
{
    String? name;

    CreateGenres({this.name});
    CreateGenres.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "CreateGenres";
    TypeContext? context = _ctx;
}

// @Route("/mediatypes", "POST")
class CreateMediaTypes implements IReturn<IdResponse>, IPost, ICreateDb<MediaTypes>, IConvertible
{
    String? name;

    CreateMediaTypes({this.name});
    CreateMediaTypes.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "CreateMediaTypes";
    TypeContext? context = _ctx;
}

// @Route("/playlists", "POST")
class CreatePlaylists implements IReturn<IdResponse>, IPost, ICreateDb<Playlists>, IConvertible
{
    String? name;

    CreatePlaylists({this.name});
    CreatePlaylists.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "CreatePlaylists";
    TypeContext? context = _ctx;
}

// @Route("/tracks", "POST")
class CreateTracks implements IReturn<IdResponse>, IPost, ICreateDb<Tracks>, IConvertible
{
    String? name;
    int? albumId;
    int? mediaTypeId;
    int? genreId;
    String? composer;
    int? milliseconds;
    int? bytes;
    double? unitPrice;

    CreateTracks({this.name,this.albumId,this.mediaTypeId,this.genreId,this.composer,this.milliseconds,this.bytes,this.unitPrice});
    CreateTracks.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        name = json['name'];
        albumId = json['albumId'];
        mediaTypeId = json['mediaTypeId'];
        genreId = json['genreId'];
        composer = json['composer'];
        milliseconds = json['milliseconds'];
        bytes = json['bytes'];
        unitPrice = JsonConverters.toDouble(json['unitPrice']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'name': name,
        'albumId': albumId,
        'mediaTypeId': mediaTypeId,
        'genreId': genreId,
        'composer': composer,
        'milliseconds': milliseconds,
        'bytes': bytes,
        'unitPrice': unitPrice
    };

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "CreateTracks";
    TypeContext? context = _ctx;
}

// @Route("/albums/{AlbumId}", "DELETE")
class DeleteAlbums implements IReturn<IdResponse>, IDelete, IDeleteDb<Albums>, IConvertible
{
    int? albumId;

    DeleteAlbums({this.albumId});
    DeleteAlbums.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "DeleteAlbums";
    TypeContext? context = _ctx;
}

// @Route("/artists/{ArtistId}", "DELETE")
class DeleteArtists implements IReturn<IdResponse>, IDelete, IDeleteDb<Artists>, IConvertible
{
    int? artistId;

    DeleteArtists({this.artistId});
    DeleteArtists.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "DeleteArtists";
    TypeContext? context = _ctx;
}

// @Route("/genres/{GenreId}", "DELETE")
class DeleteGenres implements IReturn<IdResponse>, IDelete, IDeleteDb<Genres>, IConvertible
{
    int? genreId;

    DeleteGenres({this.genreId});
    DeleteGenres.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "DeleteGenres";
    TypeContext? context = _ctx;
}

// @Route("/mediatypes/{MediaTypeId}", "DELETE")
class DeleteMediaTypes implements IReturn<IdResponse>, IDelete, IDeleteDb<MediaTypes>, IConvertible
{
    int? mediaTypeId;

    DeleteMediaTypes({this.mediaTypeId});
    DeleteMediaTypes.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "DeleteMediaTypes";
    TypeContext? context = _ctx;
}

// @Route("/playlists/{PlaylistId}", "DELETE")
class DeletePlaylists implements IReturn<IdResponse>, IDelete, IDeleteDb<Playlists>, IConvertible
{
    int? playlistId;

    DeletePlaylists({this.playlistId});
    DeletePlaylists.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "DeletePlaylists";
    TypeContext? context = _ctx;
}

// @Route("/tracks/{TrackId}", "DELETE")
class DeleteTracks implements IReturn<IdResponse>, IDelete, IDeleteDb<Tracks>, IConvertible
{
    int? trackId;

    DeleteTracks({this.trackId});
    DeleteTracks.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "DeleteTracks";
    TypeContext? context = _ctx;
}

// @Route("/albums/{AlbumId}", "PATCH")
class PatchAlbums implements IReturn<IdResponse>, IPatch, IPatchDb<Albums>, IConvertible
{
    int? albumId;
    String? title;
    int? artistId;

    PatchAlbums({this.albumId,this.title,this.artistId});
    PatchAlbums.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        albumId = json['albumId'];
        title = json['title'];
        artistId = json['artistId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'albumId': albumId,
        'title': title,
        'artistId': artistId
    };

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "PatchAlbums";
    TypeContext? context = _ctx;
}

// @Route("/artists/{ArtistId}", "PATCH")
class PatchArtists implements IReturn<IdResponse>, IPatch, IPatchDb<Artists>, IConvertible
{
    int? artistId;
    String? name;

    PatchArtists({this.artistId,this.name});
    PatchArtists.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'artistId': artistId,
        'name': name
    };

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "PatchArtists";
    TypeContext? context = _ctx;
}

// @Route("/genres/{GenreId}", "PATCH")
class PatchGenres implements IReturn<IdResponse>, IPatch, IPatchDb<Genres>, IConvertible
{
    int? genreId;
    String? name;

    PatchGenres({this.genreId,this.name});
    PatchGenres.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'genreId': genreId,
        'name': name
    };

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "PatchGenres";
    TypeContext? context = _ctx;
}

// @Route("/mediatypes/{MediaTypeId}", "PATCH")
class PatchMediaTypes implements IReturn<IdResponse>, IPatch, IPatchDb<MediaTypes>, IConvertible
{
    int? mediaTypeId;
    String? name;

    PatchMediaTypes({this.mediaTypeId,this.name});
    PatchMediaTypes.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'mediaTypeId': mediaTypeId,
        'name': name
    };

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "PatchMediaTypes";
    TypeContext? context = _ctx;
}

// @Route("/playlists/{PlaylistId}", "PATCH")
class PatchPlaylists implements IReturn<IdResponse>, IPatch, IPatchDb<Playlists>, IConvertible
{
    int? playlistId;
    String? name;

    PatchPlaylists({this.playlistId,this.name});
    PatchPlaylists.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'playlistId': playlistId,
        'name': name
    };

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "PatchPlaylists";
    TypeContext? context = _ctx;
}

// @Route("/tracks/{TrackId}", "PATCH")
class PatchTracks implements IReturn<IdResponse>, IPatch, IPatchDb<Tracks>, IConvertible
{
    int? trackId;
    String? name;
    int? albumId;
    int? mediaTypeId;
    int? genreId;
    String? composer;
    int? milliseconds;
    int? bytes;
    double? unitPrice;

    PatchTracks({this.trackId,this.name,this.albumId,this.mediaTypeId,this.genreId,this.composer,this.milliseconds,this.bytes,this.unitPrice});
    PatchTracks.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        trackId = json['trackId'];
        name = json['name'];
        albumId = json['albumId'];
        mediaTypeId = json['mediaTypeId'];
        genreId = json['genreId'];
        composer = json['composer'];
        milliseconds = json['milliseconds'];
        bytes = json['bytes'];
        unitPrice = JsonConverters.toDouble(json['unitPrice']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'trackId': trackId,
        'name': name,
        'albumId': albumId,
        'mediaTypeId': mediaTypeId,
        'genreId': genreId,
        'composer': composer,
        'milliseconds': milliseconds,
        'bytes': bytes,
        'unitPrice': unitPrice
    };

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "PatchTracks";
    TypeContext? context = _ctx;
}

// @Route("/albums/{AlbumId}", "PUT")
class UpdateAlbums implements IReturn<IdResponse>, IPut, IUpdateDb<Albums>, IConvertible
{
    int? albumId;
    String? title;
    int? artistId;

    UpdateAlbums({this.albumId,this.title,this.artistId});
    UpdateAlbums.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        albumId = json['albumId'];
        title = json['title'];
        artistId = json['artistId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'albumId': albumId,
        'title': title,
        'artistId': artistId
    };

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "UpdateAlbums";
    TypeContext? context = _ctx;
}

// @Route("/artists/{ArtistId}", "PUT")
class UpdateArtists implements IReturn<IdResponse>, IPut, IUpdateDb<Artists>, IConvertible
{
    int? artistId;
    String? name;

    UpdateArtists({this.artistId,this.name});
    UpdateArtists.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'artistId': artistId,
        'name': name
    };

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "UpdateArtists";
    TypeContext? context = _ctx;
}

// @Route("/genres/{GenreId}", "PUT")
class UpdateGenres implements IReturn<IdResponse>, IPut, IUpdateDb<Genres>, IConvertible
{
    int? genreId;
    String? name;

    UpdateGenres({this.genreId,this.name});
    UpdateGenres.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'genreId': genreId,
        'name': name
    };

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "UpdateGenres";
    TypeContext? context = _ctx;
}

// @Route("/mediatypes/{MediaTypeId}", "PUT")
class UpdateMediaTypes implements IReturn<IdResponse>, IPut, IUpdateDb<MediaTypes>, IConvertible
{
    int? mediaTypeId;
    String? name;

    UpdateMediaTypes({this.mediaTypeId,this.name});
    UpdateMediaTypes.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'mediaTypeId': mediaTypeId,
        'name': name
    };

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "UpdateMediaTypes";
    TypeContext? context = _ctx;
}

// @Route("/playlists/{PlaylistId}", "PUT")
class UpdatePlaylists implements IReturn<IdResponse>, IPut, IUpdateDb<Playlists>, IConvertible
{
    int? playlistId;
    String? name;

    UpdatePlaylists({this.playlistId,this.name});
    UpdatePlaylists.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'playlistId': playlistId,
        'name': name
    };

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "UpdatePlaylists";
    TypeContext? context = _ctx;
}

// @Route("/tracks/{TrackId}", "PUT")
class UpdateTracks implements IReturn<IdResponse>, IPut, IUpdateDb<Tracks>, IConvertible
{
    int? trackId;
    String? name;
    int? albumId;
    int? mediaTypeId;
    int? genreId;
    String? composer;
    int? milliseconds;
    int? bytes;
    double? unitPrice;

    UpdateTracks({this.trackId,this.name,this.albumId,this.mediaTypeId,this.genreId,this.composer,this.milliseconds,this.bytes,this.unitPrice});
    UpdateTracks.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        trackId = json['trackId'];
        name = json['name'];
        albumId = json['albumId'];
        mediaTypeId = json['mediaTypeId'];
        genreId = json['genreId'];
        composer = json['composer'];
        milliseconds = json['milliseconds'];
        bytes = json['bytes'];
        unitPrice = JsonConverters.toDouble(json['unitPrice']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'trackId': trackId,
        'name': name,
        'albumId': albumId,
        'mediaTypeId': mediaTypeId,
        'genreId': genreId,
        'composer': composer,
        'milliseconds': milliseconds,
        'bytes': bytes,
        'unitPrice': unitPrice
    };

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "UpdateTracks";
    TypeContext? context = _ctx;
}

// @Route("/customers", "POST")
class CreateCustomers implements IReturn<IdResponse>, IPost, ICreateDb<Customers>, IConvertible
{
    String? firstName;
    String? lastName;
    String? company;
    String? address;
    String? city;
    String? state;
    String? country;
    String? postalCode;
    String? phone;
    String? fax;
    String? email;
    int? supportRepId;

    CreateCustomers({this.firstName,this.lastName,this.company,this.address,this.city,this.state,this.country,this.postalCode,this.phone,this.fax,this.email,this.supportRepId});
    CreateCustomers.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        firstName = json['firstName'];
        lastName = json['lastName'];
        company = json['company'];
        address = json['address'];
        city = json['city'];
        state = json['state'];
        country = json['country'];
        postalCode = json['postalCode'];
        phone = json['phone'];
        fax = json['fax'];
        email = json['email'];
        supportRepId = json['supportRepId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'firstName': firstName,
        'lastName': lastName,
        'company': company,
        'address': address,
        'city': city,
        'state': state,
        'country': country,
        'postalCode': postalCode,
        'phone': phone,
        'fax': fax,
        'email': email,
        'supportRepId': supportRepId
    };

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "CreateCustomers";
    TypeContext? context = _ctx;
}

// @Route("/employees", "POST")
class CreateEmployees implements IReturn<IdResponse>, IPost, ICreateDb<Employees>, IConvertible
{
    String? lastName;
    String? firstName;
    String? title;
    int? reportsTo;
    DateTime? birthDate;
    DateTime? hireDate;
    String? address;
    String? city;
    String? state;
    String? country;
    String? postalCode;
    String? phone;
    String? fax;
    String? email;

    CreateEmployees({this.lastName,this.firstName,this.title,this.reportsTo,this.birthDate,this.hireDate,this.address,this.city,this.state,this.country,this.postalCode,this.phone,this.fax,this.email});
    CreateEmployees.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        lastName = json['lastName'];
        firstName = json['firstName'];
        title = json['title'];
        reportsTo = json['reportsTo'];
        birthDate = JsonConverters.fromJson(json['birthDate'],'DateTime',context!);
        hireDate = JsonConverters.fromJson(json['hireDate'],'DateTime',context!);
        address = json['address'];
        city = json['city'];
        state = json['state'];
        country = json['country'];
        postalCode = json['postalCode'];
        phone = json['phone'];
        fax = json['fax'];
        email = json['email'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'lastName': lastName,
        'firstName': firstName,
        'title': title,
        'reportsTo': reportsTo,
        'birthDate': JsonConverters.toJson(birthDate,'DateTime',context!),
        'hireDate': JsonConverters.toJson(hireDate,'DateTime',context!),
        'address': address,
        'city': city,
        'state': state,
        'country': country,
        'postalCode': postalCode,
        'phone': phone,
        'fax': fax,
        'email': email
    };

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "CreateEmployees";
    TypeContext? context = _ctx;
}

// @Route("/invoiceitems", "POST")
class CreateInvoiceItems implements IReturn<IdResponse>, IPost, ICreateDb<InvoiceItems>, IConvertible
{
    int? invoiceId;
    int? trackId;
    double? unitPrice;
    int? quantity;

    CreateInvoiceItems({this.invoiceId,this.trackId,this.unitPrice,this.quantity});
    CreateInvoiceItems.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        invoiceId = json['invoiceId'];
        trackId = json['trackId'];
        unitPrice = JsonConverters.toDouble(json['unitPrice']);
        quantity = json['quantity'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'invoiceId': invoiceId,
        'trackId': trackId,
        'unitPrice': unitPrice,
        'quantity': quantity
    };

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "CreateInvoiceItems";
    TypeContext? context = _ctx;
}

// @Route("/invoices", "POST")
class CreateInvoices implements IReturn<IdResponse>, IPost, ICreateDb<Invoices>, IConvertible
{
    int? customerId;
    DateTime? invoiceDate;
    String? billingAddress;
    String? billingCity;
    String? billingState;
    String? billingCountry;
    String? billingPostalCode;
    double? total;

    CreateInvoices({this.customerId,this.invoiceDate,this.billingAddress,this.billingCity,this.billingState,this.billingCountry,this.billingPostalCode,this.total});
    CreateInvoices.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        customerId = json['customerId'];
        invoiceDate = JsonConverters.fromJson(json['invoiceDate'],'DateTime',context!);
        billingAddress = json['billingAddress'];
        billingCity = json['billingCity'];
        billingState = json['billingState'];
        billingCountry = json['billingCountry'];
        billingPostalCode = json['billingPostalCode'];
        total = JsonConverters.toDouble(json['total']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'customerId': customerId,
        'invoiceDate': JsonConverters.toJson(invoiceDate,'DateTime',context!),
        'billingAddress': billingAddress,
        'billingCity': billingCity,
        'billingState': billingState,
        'billingCountry': billingCountry,
        'billingPostalCode': billingPostalCode,
        'total': total
    };

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "CreateInvoices";
    TypeContext? context = _ctx;
}

// @Route("/customers/{CustomerId}", "DELETE")
class DeleteCustomers implements IReturn<IdResponse>, IDelete, IDeleteDb<Customers>, IConvertible
{
    int? customerId;

    DeleteCustomers({this.customerId});
    DeleteCustomers.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "DeleteCustomers";
    TypeContext? context = _ctx;
}

// @Route("/employees/{EmployeeId}", "DELETE")
class DeleteEmployees implements IReturn<IdResponse>, IDelete, IDeleteDb<Employees>, IConvertible
{
    int? employeeId;

    DeleteEmployees({this.employeeId});
    DeleteEmployees.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "DeleteEmployees";
    TypeContext? context = _ctx;
}

// @Route("/invoiceitems/{InvoiceLineId}", "DELETE")
class DeleteInvoiceItems implements IReturn<IdResponse>, IDelete, IDeleteDb<InvoiceItems>, IConvertible
{
    int? invoiceLineId;

    DeleteInvoiceItems({this.invoiceLineId});
    DeleteInvoiceItems.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "DeleteInvoiceItems";
    TypeContext? context = _ctx;
}

// @Route("/invoices/{InvoiceId}", "DELETE")
class DeleteInvoices implements IReturn<IdResponse>, IDelete, IDeleteDb<Invoices>, IConvertible
{
    int? invoiceId;

    DeleteInvoices({this.invoiceId});
    DeleteInvoices.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "DeleteInvoices";
    TypeContext? context = _ctx;
}

// @Route("/customers/{CustomerId}", "PATCH")
class PatchCustomers implements IReturn<IdResponse>, IPatch, IPatchDb<Customers>, IConvertible
{
    int? customerId;
    String? firstName;
    String? lastName;
    String? company;
    String? address;
    String? city;
    String? state;
    String? country;
    String? postalCode;
    String? phone;
    String? fax;
    String? email;
    int? supportRepId;

    PatchCustomers({this.customerId,this.firstName,this.lastName,this.company,this.address,this.city,this.state,this.country,this.postalCode,this.phone,this.fax,this.email,this.supportRepId});
    PatchCustomers.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        customerId = json['customerId'];
        firstName = json['firstName'];
        lastName = json['lastName'];
        company = json['company'];
        address = json['address'];
        city = json['city'];
        state = json['state'];
        country = json['country'];
        postalCode = json['postalCode'];
        phone = json['phone'];
        fax = json['fax'];
        email = json['email'];
        supportRepId = json['supportRepId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'customerId': customerId,
        'firstName': firstName,
        'lastName': lastName,
        'company': company,
        'address': address,
        'city': city,
        'state': state,
        'country': country,
        'postalCode': postalCode,
        'phone': phone,
        'fax': fax,
        'email': email,
        'supportRepId': supportRepId
    };

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "PatchCustomers";
    TypeContext? context = _ctx;
}

// @Route("/employees/{EmployeeId}", "PATCH")
class PatchEmployees implements IReturn<IdResponse>, IPatch, IPatchDb<Employees>, IConvertible
{
    int? employeeId;
    String? lastName;
    String? firstName;
    String? title;
    int? reportsTo;
    DateTime? birthDate;
    DateTime? hireDate;
    String? address;
    String? city;
    String? state;
    String? country;
    String? postalCode;
    String? phone;
    String? fax;
    String? email;

    PatchEmployees({this.employeeId,this.lastName,this.firstName,this.title,this.reportsTo,this.birthDate,this.hireDate,this.address,this.city,this.state,this.country,this.postalCode,this.phone,this.fax,this.email});
    PatchEmployees.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        employeeId = json['employeeId'];
        lastName = json['lastName'];
        firstName = json['firstName'];
        title = json['title'];
        reportsTo = json['reportsTo'];
        birthDate = JsonConverters.fromJson(json['birthDate'],'DateTime',context!);
        hireDate = JsonConverters.fromJson(json['hireDate'],'DateTime',context!);
        address = json['address'];
        city = json['city'];
        state = json['state'];
        country = json['country'];
        postalCode = json['postalCode'];
        phone = json['phone'];
        fax = json['fax'];
        email = json['email'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'employeeId': employeeId,
        'lastName': lastName,
        'firstName': firstName,
        'title': title,
        'reportsTo': reportsTo,
        'birthDate': JsonConverters.toJson(birthDate,'DateTime',context!),
        'hireDate': JsonConverters.toJson(hireDate,'DateTime',context!),
        'address': address,
        'city': city,
        'state': state,
        'country': country,
        'postalCode': postalCode,
        'phone': phone,
        'fax': fax,
        'email': email
    };

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "PatchEmployees";
    TypeContext? context = _ctx;
}

// @Route("/invoiceitems/{InvoiceLineId}", "PATCH")
class PatchInvoiceItems implements IReturn<IdResponse>, IPatch, IPatchDb<InvoiceItems>, IConvertible
{
    int? invoiceLineId;
    int? invoiceId;
    int? trackId;
    double? unitPrice;
    int? quantity;

    PatchInvoiceItems({this.invoiceLineId,this.invoiceId,this.trackId,this.unitPrice,this.quantity});
    PatchInvoiceItems.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        invoiceLineId = json['invoiceLineId'];
        invoiceId = json['invoiceId'];
        trackId = json['trackId'];
        unitPrice = JsonConverters.toDouble(json['unitPrice']);
        quantity = json['quantity'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'invoiceLineId': invoiceLineId,
        'invoiceId': invoiceId,
        'trackId': trackId,
        'unitPrice': unitPrice,
        'quantity': quantity
    };

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "PatchInvoiceItems";
    TypeContext? context = _ctx;
}

// @Route("/invoices/{InvoiceId}", "PATCH")
class PatchInvoices implements IReturn<IdResponse>, IPatch, IPatchDb<Invoices>, IConvertible
{
    int? invoiceId;
    int? customerId;
    DateTime? invoiceDate;
    String? billingAddress;
    String? billingCity;
    String? billingState;
    String? billingCountry;
    String? billingPostalCode;
    double? total;

    PatchInvoices({this.invoiceId,this.customerId,this.invoiceDate,this.billingAddress,this.billingCity,this.billingState,this.billingCountry,this.billingPostalCode,this.total});
    PatchInvoices.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        invoiceId = json['invoiceId'];
        customerId = json['customerId'];
        invoiceDate = JsonConverters.fromJson(json['invoiceDate'],'DateTime',context!);
        billingAddress = json['billingAddress'];
        billingCity = json['billingCity'];
        billingState = json['billingState'];
        billingCountry = json['billingCountry'];
        billingPostalCode = json['billingPostalCode'];
        total = JsonConverters.toDouble(json['total']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'invoiceId': invoiceId,
        'customerId': customerId,
        'invoiceDate': JsonConverters.toJson(invoiceDate,'DateTime',context!),
        'billingAddress': billingAddress,
        'billingCity': billingCity,
        'billingState': billingState,
        'billingCountry': billingCountry,
        'billingPostalCode': billingPostalCode,
        'total': total
    };

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "PatchInvoices";
    TypeContext? context = _ctx;
}

// @Route("/customers/{CustomerId}", "PUT")
class UpdateCustomers implements IReturn<IdResponse>, IPut, IUpdateDb<Customers>, IConvertible
{
    int? customerId;
    String? firstName;
    String? lastName;
    String? company;
    String? address;
    String? city;
    String? state;
    String? country;
    String? postalCode;
    String? phone;
    String? fax;
    String? email;
    int? supportRepId;

    UpdateCustomers({this.customerId,this.firstName,this.lastName,this.company,this.address,this.city,this.state,this.country,this.postalCode,this.phone,this.fax,this.email,this.supportRepId});
    UpdateCustomers.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        customerId = json['customerId'];
        firstName = json['firstName'];
        lastName = json['lastName'];
        company = json['company'];
        address = json['address'];
        city = json['city'];
        state = json['state'];
        country = json['country'];
        postalCode = json['postalCode'];
        phone = json['phone'];
        fax = json['fax'];
        email = json['email'];
        supportRepId = json['supportRepId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'customerId': customerId,
        'firstName': firstName,
        'lastName': lastName,
        'company': company,
        'address': address,
        'city': city,
        'state': state,
        'country': country,
        'postalCode': postalCode,
        'phone': phone,
        'fax': fax,
        'email': email,
        'supportRepId': supportRepId
    };

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "UpdateCustomers";
    TypeContext? context = _ctx;
}

// @Route("/employees/{EmployeeId}", "PUT")
class UpdateEmployees implements IReturn<IdResponse>, IPut, IUpdateDb<Employees>, IConvertible
{
    int? employeeId;
    String? lastName;
    String? firstName;
    String? title;
    int? reportsTo;
    DateTime? birthDate;
    DateTime? hireDate;
    String? address;
    String? city;
    String? state;
    String? country;
    String? postalCode;
    String? phone;
    String? fax;
    String? email;

    UpdateEmployees({this.employeeId,this.lastName,this.firstName,this.title,this.reportsTo,this.birthDate,this.hireDate,this.address,this.city,this.state,this.country,this.postalCode,this.phone,this.fax,this.email});
    UpdateEmployees.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        employeeId = json['employeeId'];
        lastName = json['lastName'];
        firstName = json['firstName'];
        title = json['title'];
        reportsTo = json['reportsTo'];
        birthDate = JsonConverters.fromJson(json['birthDate'],'DateTime',context!);
        hireDate = JsonConverters.fromJson(json['hireDate'],'DateTime',context!);
        address = json['address'];
        city = json['city'];
        state = json['state'];
        country = json['country'];
        postalCode = json['postalCode'];
        phone = json['phone'];
        fax = json['fax'];
        email = json['email'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'employeeId': employeeId,
        'lastName': lastName,
        'firstName': firstName,
        'title': title,
        'reportsTo': reportsTo,
        'birthDate': JsonConverters.toJson(birthDate,'DateTime',context!),
        'hireDate': JsonConverters.toJson(hireDate,'DateTime',context!),
        'address': address,
        'city': city,
        'state': state,
        'country': country,
        'postalCode': postalCode,
        'phone': phone,
        'fax': fax,
        'email': email
    };

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "UpdateEmployees";
    TypeContext? context = _ctx;
}

// @Route("/invoiceitems/{InvoiceLineId}", "PUT")
class UpdateInvoiceItems implements IReturn<IdResponse>, IPut, IUpdateDb<InvoiceItems>, IConvertible
{
    int? invoiceLineId;
    int? invoiceId;
    int? trackId;
    double? unitPrice;
    int? quantity;

    UpdateInvoiceItems({this.invoiceLineId,this.invoiceId,this.trackId,this.unitPrice,this.quantity});
    UpdateInvoiceItems.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        invoiceLineId = json['invoiceLineId'];
        invoiceId = json['invoiceId'];
        trackId = json['trackId'];
        unitPrice = JsonConverters.toDouble(json['unitPrice']);
        quantity = json['quantity'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'invoiceLineId': invoiceLineId,
        'invoiceId': invoiceId,
        'trackId': trackId,
        'unitPrice': unitPrice,
        'quantity': quantity
    };

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "UpdateInvoiceItems";
    TypeContext? context = _ctx;
}

// @Route("/invoices/{InvoiceId}", "PUT")
class UpdateInvoices implements IReturn<IdResponse>, IPut, IUpdateDb<Invoices>, IConvertible
{
    int? invoiceId;
    int? customerId;
    DateTime? invoiceDate;
    String? billingAddress;
    String? billingCity;
    String? billingState;
    String? billingCountry;
    String? billingPostalCode;
    double? total;

    UpdateInvoices({this.invoiceId,this.customerId,this.invoiceDate,this.billingAddress,this.billingCity,this.billingState,this.billingCountry,this.billingPostalCode,this.total});
    UpdateInvoices.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        invoiceId = json['invoiceId'];
        customerId = json['customerId'];
        invoiceDate = JsonConverters.fromJson(json['invoiceDate'],'DateTime',context!);
        billingAddress = json['billingAddress'];
        billingCity = json['billingCity'];
        billingState = json['billingState'];
        billingCountry = json['billingCountry'];
        billingPostalCode = json['billingPostalCode'];
        total = JsonConverters.toDouble(json['total']);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'invoiceId': invoiceId,
        'customerId': customerId,
        'invoiceDate': JsonConverters.toJson(invoiceDate,'DateTime',context!),
        'billingAddress': billingAddress,
        'billingCity': billingCity,
        'billingState': billingState,
        'billingCountry': billingCountry,
        'billingPostalCode': billingPostalCode,
        'total': total
    };

    createResponse() => IdResponse();
    getResponseTypeName() => "IdResponse";
    getTypeName() => "UpdateInvoices";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'chinook.netcore.io', types: <String, TypeInfo> {
    'Albums': TypeInfo(TypeOf.Class, create:() => Albums()),
    'Artists': TypeInfo(TypeOf.Class, create:() => Artists()),
    'Genres': TypeInfo(TypeOf.Class, create:() => Genres()),
    'MediaTypes': TypeInfo(TypeOf.Class, create:() => MediaTypes()),
    'Playlists': TypeInfo(TypeOf.Class, create:() => Playlists()),
    'Tracks': TypeInfo(TypeOf.Class, create:() => Tracks()),
    'Customers': TypeInfo(TypeOf.Class, create:() => Customers()),
    'Employees': TypeInfo(TypeOf.Class, create:() => Employees()),
    'InvoiceItems': TypeInfo(TypeOf.Class, create:() => InvoiceItems()),
    'Invoices': TypeInfo(TypeOf.Class, create:() => Invoices()),
    'HelloResponse': TypeInfo(TypeOf.Class, create:() => HelloResponse()),
    'Hello': TypeInfo(TypeOf.Class, create:() => Hello()),
    'QueryResponse<Albums>': TypeInfo(TypeOf.Class, create:() => QueryResponse<Albums>()),
    'QueryAlbums': TypeInfo(TypeOf.Class, create:() => QueryAlbums()),
    'List<Albums>': TypeInfo(TypeOf.Class, create:() => <Albums>[]),
    'QueryResponse<Artists>': TypeInfo(TypeOf.Class, create:() => QueryResponse<Artists>()),
    'QueryArtists': TypeInfo(TypeOf.Class, create:() => QueryArtists()),
    'List<Artists>': TypeInfo(TypeOf.Class, create:() => <Artists>[]),
    'QueryResponse<Genres>': TypeInfo(TypeOf.Class, create:() => QueryResponse<Genres>()),
    'QueryGenres': TypeInfo(TypeOf.Class, create:() => QueryGenres()),
    'List<Genres>': TypeInfo(TypeOf.Class, create:() => <Genres>[]),
    'QueryResponse<MediaTypes>': TypeInfo(TypeOf.Class, create:() => QueryResponse<MediaTypes>()),
    'QueryMediaTypes': TypeInfo(TypeOf.Class, create:() => QueryMediaTypes()),
    'List<MediaTypes>': TypeInfo(TypeOf.Class, create:() => <MediaTypes>[]),
    'QueryResponse<Playlists>': TypeInfo(TypeOf.Class, create:() => QueryResponse<Playlists>()),
    'QueryPlaylists': TypeInfo(TypeOf.Class, create:() => QueryPlaylists()),
    'List<Playlists>': TypeInfo(TypeOf.Class, create:() => <Playlists>[]),
    'QueryResponse<Tracks>': TypeInfo(TypeOf.Class, create:() => QueryResponse<Tracks>()),
    'QueryTracks': TypeInfo(TypeOf.Class, create:() => QueryTracks()),
    'List<Tracks>': TypeInfo(TypeOf.Class, create:() => <Tracks>[]),
    'QueryResponse<Customers>': TypeInfo(TypeOf.Class, create:() => QueryResponse<Customers>()),
    'QueryCustomers': TypeInfo(TypeOf.Class, create:() => QueryCustomers()),
    'List<Customers>': TypeInfo(TypeOf.Class, create:() => <Customers>[]),
    'QueryResponse<Employees>': TypeInfo(TypeOf.Class, create:() => QueryResponse<Employees>()),
    'QueryEmployees': TypeInfo(TypeOf.Class, create:() => QueryEmployees()),
    'List<Employees>': TypeInfo(TypeOf.Class, create:() => <Employees>[]),
    'QueryResponse<InvoiceItems>': TypeInfo(TypeOf.Class, create:() => QueryResponse<InvoiceItems>()),
    'QueryInvoiceItems': TypeInfo(TypeOf.Class, create:() => QueryInvoiceItems()),
    'List<InvoiceItems>': TypeInfo(TypeOf.Class, create:() => <InvoiceItems>[]),
    'QueryResponse<Invoices>': TypeInfo(TypeOf.Class, create:() => QueryResponse<Invoices>()),
    'QueryInvoices': TypeInfo(TypeOf.Class, create:() => QueryInvoices()),
    'List<Invoices>': TypeInfo(TypeOf.Class, create:() => <Invoices>[]),
    'CreateAlbums': TypeInfo(TypeOf.Class, create:() => CreateAlbums()),
    'CreateArtists': TypeInfo(TypeOf.Class, create:() => CreateArtists()),
    'CreateGenres': TypeInfo(TypeOf.Class, create:() => CreateGenres()),
    'CreateMediaTypes': TypeInfo(TypeOf.Class, create:() => CreateMediaTypes()),
    'CreatePlaylists': TypeInfo(TypeOf.Class, create:() => CreatePlaylists()),
    'CreateTracks': TypeInfo(TypeOf.Class, create:() => CreateTracks()),
    'DeleteAlbums': TypeInfo(TypeOf.Class, create:() => DeleteAlbums()),
    'DeleteArtists': TypeInfo(TypeOf.Class, create:() => DeleteArtists()),
    'DeleteGenres': TypeInfo(TypeOf.Class, create:() => DeleteGenres()),
    'DeleteMediaTypes': TypeInfo(TypeOf.Class, create:() => DeleteMediaTypes()),
    'DeletePlaylists': TypeInfo(TypeOf.Class, create:() => DeletePlaylists()),
    'DeleteTracks': TypeInfo(TypeOf.Class, create:() => DeleteTracks()),
    'PatchAlbums': TypeInfo(TypeOf.Class, create:() => PatchAlbums()),
    'PatchArtists': TypeInfo(TypeOf.Class, create:() => PatchArtists()),
    'PatchGenres': TypeInfo(TypeOf.Class, create:() => PatchGenres()),
    'PatchMediaTypes': TypeInfo(TypeOf.Class, create:() => PatchMediaTypes()),
    'PatchPlaylists': TypeInfo(TypeOf.Class, create:() => PatchPlaylists()),
    'PatchTracks': TypeInfo(TypeOf.Class, create:() => PatchTracks()),
    'UpdateAlbums': TypeInfo(TypeOf.Class, create:() => UpdateAlbums()),
    'UpdateArtists': TypeInfo(TypeOf.Class, create:() => UpdateArtists()),
    'UpdateGenres': TypeInfo(TypeOf.Class, create:() => UpdateGenres()),
    'UpdateMediaTypes': TypeInfo(TypeOf.Class, create:() => UpdateMediaTypes()),
    'UpdatePlaylists': TypeInfo(TypeOf.Class, create:() => UpdatePlaylists()),
    'UpdateTracks': TypeInfo(TypeOf.Class, create:() => UpdateTracks()),
    'CreateCustomers': TypeInfo(TypeOf.Class, create:() => CreateCustomers()),
    'CreateEmployees': TypeInfo(TypeOf.Class, create:() => CreateEmployees()),
    'CreateInvoiceItems': TypeInfo(TypeOf.Class, create:() => CreateInvoiceItems()),
    'CreateInvoices': TypeInfo(TypeOf.Class, create:() => CreateInvoices()),
    'DeleteCustomers': TypeInfo(TypeOf.Class, create:() => DeleteCustomers()),
    'DeleteEmployees': TypeInfo(TypeOf.Class, create:() => DeleteEmployees()),
    'DeleteInvoiceItems': TypeInfo(TypeOf.Class, create:() => DeleteInvoiceItems()),
    'DeleteInvoices': TypeInfo(TypeOf.Class, create:() => DeleteInvoices()),
    'PatchCustomers': TypeInfo(TypeOf.Class, create:() => PatchCustomers()),
    'PatchEmployees': TypeInfo(TypeOf.Class, create:() => PatchEmployees()),
    'PatchInvoiceItems': TypeInfo(TypeOf.Class, create:() => PatchInvoiceItems()),
    'PatchInvoices': TypeInfo(TypeOf.Class, create:() => PatchInvoices()),
    'UpdateCustomers': TypeInfo(TypeOf.Class, create:() => UpdateCustomers()),
    'UpdateEmployees': TypeInfo(TypeOf.Class, create:() => UpdateEmployees()),
    'UpdateInvoiceItems': TypeInfo(TypeOf.Class, create:() => UpdateInvoiceItems()),
    'UpdateInvoices': TypeInfo(TypeOf.Class, create:() => UpdateInvoices()),
});

