/* Options:
Date: 2025-05-09 10:52:22
Version: 8.51
Tip: To override a DTO option, remove "//" prefix before updating
BaseUrl: https://blazor-gallery.servicestack.net

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

import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

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;
}

// @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;
}

TypeContext _ctx = TypeContext(library: 'blazor_gallery.servicestack.net', types: <String, TypeInfo> {
    'MediaTypes': TypeInfo(TypeOf.Class, create:() => MediaTypes()),
    'QueryResponse<MediaTypes>': TypeInfo(TypeOf.Class, create:() => QueryResponse<MediaTypes>()),
    'QueryMediaTypes': TypeInfo(TypeOf.Class, create:() => QueryMediaTypes()),
    'List<MediaTypes>': TypeInfo(TypeOf.Class, create:() => <MediaTypes>[]),
});