/* Options:
Date: 2025-01-01 15:52:34
Version: 8.51
Tip: To override a DTO option, remove "//" prefix before updating
BaseUrl: https://techstacks.io

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

import 'package:servicestack/servicestack.dart';

class AddOrganizationCategoryResponse implements IConvertible
{
    int? id;
    String? slug;
    ResponseStatus? responseStatus;

    AddOrganizationCategoryResponse({this.id,this.slug,this.responseStatus});
    AddOrganizationCategoryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        slug = json['slug'];
        responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'slug': slug,
        'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
    };

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

// @Route("/orgs/{OrganizationId}/categories", "POST")
class AddOrganizationCategory implements IReturn<AddOrganizationCategoryResponse>, IPost, IConvertible
{
    int? organizationId;
    String? slug;
    String? name;
    String? description;
    List<int>? technologyIds;

    AddOrganizationCategory({this.organizationId,this.slug,this.name,this.description,this.technologyIds});
    AddOrganizationCategory.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        organizationId = json['organizationId'];
        slug = json['slug'];
        name = json['name'];
        description = json['description'];
        technologyIds = JsonConverters.fromJson(json['technologyIds'],'List<int>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'organizationId': organizationId,
        'slug': slug,
        'name': name,
        'description': description,
        'technologyIds': JsonConverters.toJson(technologyIds,'List<int>',context!)
    };

    createResponse() => AddOrganizationCategoryResponse();
    getResponseTypeName() => "AddOrganizationCategoryResponse";
    getTypeName() => "AddOrganizationCategory";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'techstacks.io', types: <String, TypeInfo> {
    'AddOrganizationCategoryResponse': TypeInfo(TypeOf.Class, create:() => AddOrganizationCategoryResponse()),
    'AddOrganizationCategory': TypeInfo(TypeOf.Class, create:() => AddOrganizationCategory()),
});