/* Options:
Date: 2025-05-28 10:45:14
Version: 8.40
Tip: To override a DTO option, remove "//" prefix before updating
BaseUrl: https://active-ewebservice.biz/aeservices30/api

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

import 'package:servicestack/servicestack.dart';

// @DataContract
class BaseRequest implements IConvertible
{
    /**
    * This is your AIM API Key provided by Tri-Tech
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="This is your AIM API Key provided by Tri-Tech", IsRequired=true, Name="ApiKey", ParameterType="header")
    String? ApiKey;

    // @DataMember
    // @ApiMember(DataType="string", Name="OAuthToken", ParameterType="header")
    String? OAuthToken;

    BaseRequest({this.ApiKey,this.OAuthToken});
    BaseRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

// @DataContract
class BaseSecureRequest extends BaseRequest implements IConvertible
{
    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="Token", ParameterType="Header")
    String? Token;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="DeviceId", ParameterType="Header")
    String? DeviceId;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", IsRequired=true, Name="AppId", ParameterType="Header")
    String? AppId;

    BaseSecureRequest({this.Token,this.DeviceId,this.AppId});
    BaseSecureRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

// @DataContract
class BaseResponse implements IConvertible
{
    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="BaseResponseResult", Description="", Name="Status", ParameterType="body")
    BaseResponseResult? Status;

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

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

    Map<String, dynamic> toJson() => {
        'Status': JsonConverters.toJson(Status,'BaseResponseResult',context!)
    };

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

// @DataContract
class TimeClockGetResponse extends BaseResponse implements IConvertible
{
    // @DataMember
    bool? CurrentlyClockedIn;

    // @DataMember
    bool? CurrentlyClockedOut;

    // @DataMember
    DateTime? LastClockActivity;

    TimeClockGetResponse({this.CurrentlyClockedIn,this.CurrentlyClockedOut,this.LastClockActivity});
    TimeClockGetResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        CurrentlyClockedIn = json['CurrentlyClockedIn'];
        CurrentlyClockedOut = json['CurrentlyClockedOut'];
        LastClockActivity = JsonConverters.fromJson(json['LastClockActivity'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'CurrentlyClockedIn': CurrentlyClockedIn,
        'CurrentlyClockedOut': CurrentlyClockedOut,
        'LastClockActivity': JsonConverters.toJson(LastClockActivity,'DateTime',context!)
    });

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

/**
* TimeClockRequires active-e Service.
*/
// @Route("/TimeClock", "GET")
// @DataContract
class TimeClockGetRequest extends BaseSecureRequest implements IReturn<TimeClockGetResponse>, IConvertible, IGet
{
    TimeClockGetRequest();
    TimeClockGetRequest.fromJson(Map<String, dynamic> json) : super.fromJson(json);
    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson();
    createResponse() => TimeClockGetResponse();
    getResponseTypeName() => "TimeClockGetResponse";
    getTypeName() => "TimeClockGetRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'active_ewebservice.biz', types: <String, TypeInfo> {
    'BaseRequest': TypeInfo(TypeOf.Class, create:() => BaseRequest()),
    'BaseSecureRequest': TypeInfo(TypeOf.Class, create:() => BaseSecureRequest()),
    'BaseResponse': TypeInfo(TypeOf.Class, create:() => BaseResponse()),
    'BaseResponseResult': TypeInfo(TypeOf.Class, create:() => BaseResponseResult()),
    'TimeClockGetResponse': TypeInfo(TypeOf.Class, create:() => TimeClockGetResponse()),
    'TimeClockGetRequest': TypeInfo(TypeOf.Class, create:() => TimeClockGetRequest()),
});