/* Options:
Date: 2025-04-09 00:53:40
Version: 6.10
Tip: To override a DTO option, remove "//" prefix before updating
BaseUrl: https://staging-api.billiecart.com.au

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

import 'package:servicestack/servicestack.dart';

abstract class PostOperationUnTenanted<TResponse> implements IPost
{
    PostOperationUnTenanted();
    PostOperationUnTenanted.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "PostOperationUnTenanted<$TResponse>";
    TypeContext? context = _ctx;
}

class Organisation implements IIdentifiableResource, IConvertible
{
    String? displayName;
    List<String>? owners;
    bool? isDefault;
    String? id;

    Organisation({this.displayName,this.owners,this.isDefault,this.id});
    Organisation.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        displayName = json['displayName'];
        owners = JsonConverters.fromJson(json['owners'],'List<String>',context!);
        isDefault = json['isDefault'];
        id = json['id'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'displayName': displayName,
        'owners': JsonConverters.toJson(owners,'List<String>',context!),
        'isDefault': isDefault,
        'id': id
    };

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

abstract class IIdentifiableResource
{
    String? id;
}

class PromoteOrganisationOwnerResponse implements IConvertible
{
    ResponseStatus? responseStatus;
    Organisation? organisation;

    PromoteOrganisationOwnerResponse({this.responseStatus,this.organisation});
    PromoteOrganisationOwnerResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

// @Route("/organisations/{Id}/owners", "POST")
class PromoteOrganisationOwnerRequest extends PostOperationUnTenanted<PromoteOrganisationOwnerResponse> implements IReturn<PromoteOrganisationOwnerResponse>, IConvertible
{
    String? id;
    String? userAccountId;

    PromoteOrganisationOwnerRequest({this.id,this.userAccountId});
    PromoteOrganisationOwnerRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

    createResponse() => PromoteOrganisationOwnerResponse();
    getResponseTypeName() => "PromoteOrganisationOwnerResponse";
    getTypeName() => "PromoteOrganisationOwnerRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'staging_api.billiecart.com.au', types: <String, TypeInfo> {
    'PostOperationUnTenanted<TResponse>': TypeInfo(TypeOf.AbstractClass),
    'Organisation': TypeInfo(TypeOf.Class, create:() => Organisation()),
    'IIdentifiableResource': TypeInfo(TypeOf.Interface),
    'PromoteOrganisationOwnerResponse': TypeInfo(TypeOf.Class, create:() => PromoteOrganisationOwnerResponse()),
    'PromoteOrganisationOwnerRequest': TypeInfo(TypeOf.Class, create:() => PromoteOrganisationOwnerRequest()),
});