AIM Web Services

<back to all web services

GetInstructorScheduleRequest

GetInstructorSchedule
Requires active-e Lesson Scheduling Service

The following routes are available for this service:
POST, GET/api/GetInstructorSchedule
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 BaseResponseResult implements IConvertible
{
    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="StatusCode", ParameterType="body")
    String? StatusCode;

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

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

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

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

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="DomainName", ParameterType="body")
    String? DomainName;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="IPAddress", ParameterType="body")
    String? IpAddress;

    BaseResponseResult({this.StatusCode,this.Login,this.ErrorCode,this.ErrorDisplayText,this.ErrorMessage,this.DomainName,this.IpAddress});
    BaseResponseResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        StatusCode = json['StatusCode'];
        Login = json['Login'];
        ErrorCode = json['ErrorCode'];
        ErrorDisplayText = json['ErrorDisplayText'];
        ErrorMessage = json['ErrorMessage'];
        DomainName = json['DomainName'];
        IpAddress = json['IpAddress'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'StatusCode': StatusCode,
        'Login': Login,
        'ErrorCode': ErrorCode,
        'ErrorDisplayText': ErrorDisplayText,
        'ErrorMessage': ErrorMessage,
        'DomainName': DomainName,
        'IpAddress': IpAddress
    };

    getTypeName() => "BaseResponseResult";
    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 StudentInfoGeneric implements IConvertible
{
    // @DataMember
    String? StudentName;

    // @DataMember
    String? CustomerName;

    // @DataMember
    String? CustomerNumber;

    // @DataMember
    String? CustomerEmail;

    StudentInfoGeneric({this.StudentName,this.CustomerName,this.CustomerNumber,this.CustomerEmail});
    StudentInfoGeneric.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        StudentName = json['StudentName'];
        CustomerName = json['CustomerName'];
        CustomerNumber = json['CustomerNumber'];
        CustomerEmail = json['CustomerEmail'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'StudentName': StudentName,
        'CustomerName': CustomerName,
        'CustomerNumber': CustomerNumber,
        'CustomerEmail': CustomerEmail
    };

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

// @DataContract
class StudentInfoScheduleGeneric extends StudentInfoGeneric implements IConvertible
{
    // @DataMember
    int? ClassMemberId;

    // @DataMember
    bool? MarkedPresent;

    // @DataMember
    bool? MarkedAbsent;

    StudentInfoScheduleGeneric({this.ClassMemberId,this.MarkedPresent,this.MarkedAbsent});
    StudentInfoScheduleGeneric.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

// @DataContract
class ScheduleGeneric implements IConvertible
{
    // @DataMember
    bool? IsAvailability;

    // @DataMember
    String? Location;

    // @DataMember
    DateTime? StartTime;

    // @DataMember
    DateTime? EndTime;

    // @DataMember
    String? Desc;

    // @DataMember
    String? ApptDesc;

    // @DataMember
    String? Color;

    // @DataMember
    String? Area;

    // @DataMember
    bool? Virtual;

    // @DataMember
    List<StudentInfoScheduleGeneric>? Students;

    ScheduleGeneric({this.IsAvailability,this.Location,this.StartTime,this.EndTime,this.Desc,this.ApptDesc,this.Color,this.Area,this.Virtual,this.Students});
    ScheduleGeneric.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        IsAvailability = json['IsAvailability'];
        Location = json['Location'];
        StartTime = JsonConverters.fromJson(json['StartTime'],'DateTime',context!);
        EndTime = JsonConverters.fromJson(json['EndTime'],'DateTime',context!);
        Desc = json['Desc'];
        ApptDesc = json['ApptDesc'];
        Color = json['Color'];
        Area = json['Area'];
        Virtual = json['Virtual'];
        Students = JsonConverters.fromJson(json['Students'],'List<StudentInfoScheduleGeneric>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'IsAvailability': IsAvailability,
        'Location': Location,
        'StartTime': JsonConverters.toJson(StartTime,'DateTime',context!),
        'EndTime': JsonConverters.toJson(EndTime,'DateTime',context!),
        'Desc': Desc,
        'ApptDesc': ApptDesc,
        'Color': Color,
        'Area': Area,
        'Virtual': Virtual,
        'Students': JsonConverters.toJson(Students,'List<StudentInfoScheduleGeneric>',context!)
    };

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

// @DataContract
class InstructorTimeInfo implements IConvertible
{
    // @DataMember
    int? StartHour;

    // @DataMember
    int? StartMinute;

    // @DataMember
    int? EndHour;

    // @DataMember
    int? EndMinute;

    // @DataMember
    int? Increment;

    InstructorTimeInfo({this.StartHour,this.StartMinute,this.EndHour,this.EndMinute,this.Increment});
    InstructorTimeInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        StartHour = json['StartHour'];
        StartMinute = json['StartMinute'];
        EndHour = json['EndHour'];
        EndMinute = json['EndMinute'];
        Increment = json['Increment'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'StartHour': StartHour,
        'StartMinute': StartMinute,
        'EndHour': EndHour,
        'EndMinute': EndMinute,
        'Increment': Increment
    };

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

class InstructorAvailabilityInfo implements IConvertible
{
    // @DataMember
    bool? Sunday;

    // @DataMember
    bool? Monday;

    // @DataMember
    bool? Tuesday;

    // @DataMember
    bool? Wednesday;

    // @DataMember
    bool? Thursday;

    // @DataMember
    bool? Friday;

    // @DataMember
    bool? Saturday;

    InstructorAvailabilityInfo({this.Sunday,this.Monday,this.Tuesday,this.Wednesday,this.Thursday,this.Friday,this.Saturday});
    InstructorAvailabilityInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Sunday = json['Sunday'];
        Monday = json['Monday'];
        Tuesday = json['Tuesday'];
        Wednesday = json['Wednesday'];
        Thursday = json['Thursday'];
        Friday = json['Friday'];
        Saturday = json['Saturday'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Sunday': Sunday,
        'Monday': Monday,
        'Tuesday': Tuesday,
        'Wednesday': Wednesday,
        'Thursday': Thursday,
        'Friday': Friday,
        'Saturday': Saturday
    };

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

// @DataContract
class InstructorInfo implements IConvertible
{
    // @DataMember
    int? Id;

    // @DataMember
    String? Name;

    // @DataMember
    String? Email;

    // @DataMember
    String? Topic;

    // @DataMember
    InstructorAvailabilityInfo? AvailabilityInfo;

    InstructorInfo({this.Id,this.Name,this.Email,this.Topic,this.AvailabilityInfo});
    InstructorInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Name = json['Name'];
        Email = json['Email'];
        Topic = json['Topic'];
        AvailabilityInfo = JsonConverters.fromJson(json['AvailabilityInfo'],'InstructorAvailabilityInfo',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Name': Name,
        'Email': Email,
        'Topic': Topic,
        'AvailabilityInfo': JsonConverters.toJson(AvailabilityInfo,'InstructorAvailabilityInfo',context!)
    };

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

// @DataContract
class ScheduleByInstructor implements IConvertible
{
    // @DataMember
    InstructorInfo? InstructorInfo;

    // @DataMember
    List<ScheduleGeneric>? InstructorSchedule;

    // @DataMember
    InstructorTimeInfo? InstructorTimeInfo;

    ScheduleByInstructor({this.InstructorInfo,this.InstructorSchedule,this.InstructorTimeInfo});
    ScheduleByInstructor.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        InstructorInfo = JsonConverters.fromJson(json['InstructorInfo'],'InstructorInfo',context!);
        InstructorSchedule = JsonConverters.fromJson(json['InstructorSchedule'],'List<ScheduleGeneric>',context!);
        InstructorTimeInfo = JsonConverters.fromJson(json['InstructorTimeInfo'],'InstructorTimeInfo',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'InstructorInfo': JsonConverters.toJson(InstructorInfo,'InstructorInfo',context!),
        'InstructorSchedule': JsonConverters.toJson(InstructorSchedule,'List<ScheduleGeneric>',context!),
        'InstructorTimeInfo': JsonConverters.toJson(InstructorTimeInfo,'InstructorTimeInfo',context!)
    };

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

// @DataContract
class GetInstructorScheduleResponse extends BaseResponse implements IConvertible
{
    // @DataMember
    List<ScheduleGeneric>? InstructorSchedule;

    // @DataMember
    InstructorTimeInfo? InstructorTimeInfo;

    // @DataMember
    List<ScheduleByInstructor>? ScheduleByInstructor;

    GetInstructorScheduleResponse({this.InstructorSchedule,this.InstructorTimeInfo,this.ScheduleByInstructor});
    GetInstructorScheduleResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        InstructorSchedule = JsonConverters.fromJson(json['InstructorSchedule'],'List<ScheduleGeneric>',context!);
        InstructorTimeInfo = JsonConverters.fromJson(json['InstructorTimeInfo'],'InstructorTimeInfo',context!);
        ScheduleByInstructor = JsonConverters.fromJson(json['ScheduleByInstructor'],'List<ScheduleByInstructor>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'InstructorSchedule': JsonConverters.toJson(InstructorSchedule,'List<ScheduleGeneric>',context!),
        'InstructorTimeInfo': JsonConverters.toJson(InstructorTimeInfo,'InstructorTimeInfo',context!),
        'ScheduleByInstructor': JsonConverters.toJson(ScheduleByInstructor,'List<ScheduleByInstructor>',context!)
    });

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

/**
* GetInstructorScheduleRequires active-e Lesson Scheduling Service
*/
// @DataContract
class GetInstructorScheduleRequest extends BaseSecureRequest implements IConvertible
{
    // @DataMember
    int? InstructorId;

    // @DataMember
    DateTime? DateFrom;

    // @DataMember
    DateTime? DateTo;

    // @DataMember
    bool? IncludeAvailability;

    GetInstructorScheduleRequest({this.InstructorId,this.DateFrom,this.DateTo,this.IncludeAvailability});
    GetInstructorScheduleRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        InstructorId = json['InstructorId'];
        DateFrom = JsonConverters.fromJson(json['DateFrom'],'DateTime',context!);
        DateTo = JsonConverters.fromJson(json['DateTo'],'DateTime',context!);
        IncludeAvailability = json['IncludeAvailability'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'InstructorId': InstructorId,
        'DateFrom': JsonConverters.toJson(DateFrom,'DateTime',context!),
        'DateTo': JsonConverters.toJson(DateTo,'DateTime',context!),
        'IncludeAvailability': IncludeAvailability
    });

    getTypeName() => "GetInstructorScheduleRequest";
    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()),
    'BaseResponseResult': TypeInfo(TypeOf.Class, create:() => BaseResponseResult()),
    'BaseResponse': TypeInfo(TypeOf.Class, create:() => BaseResponse()),
    'StudentInfoGeneric': TypeInfo(TypeOf.Class, create:() => StudentInfoGeneric()),
    'StudentInfoScheduleGeneric': TypeInfo(TypeOf.Class, create:() => StudentInfoScheduleGeneric()),
    'ScheduleGeneric': TypeInfo(TypeOf.Class, create:() => ScheduleGeneric()),
    'List<StudentInfoScheduleGeneric>': TypeInfo(TypeOf.Class, create:() => <StudentInfoScheduleGeneric>[]),
    'InstructorTimeInfo': TypeInfo(TypeOf.Class, create:() => InstructorTimeInfo()),
    'InstructorAvailabilityInfo': TypeInfo(TypeOf.Class, create:() => InstructorAvailabilityInfo()),
    'InstructorInfo': TypeInfo(TypeOf.Class, create:() => InstructorInfo()),
    'ScheduleByInstructor': TypeInfo(TypeOf.Class, create:() => ScheduleByInstructor()),
    'List<ScheduleGeneric>': TypeInfo(TypeOf.Class, create:() => <ScheduleGeneric>[]),
    'GetInstructorScheduleResponse': TypeInfo(TypeOf.Class, create:() => GetInstructorScheduleResponse()),
    'List<ScheduleByInstructor>': TypeInfo(TypeOf.Class, create:() => <ScheduleByInstructor>[]),
    'GetInstructorScheduleRequest': TypeInfo(TypeOf.Class, create:() => GetInstructorScheduleRequest()),
});

Dart GetInstructorScheduleRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/GetInstructorSchedule HTTP/1.1 
Host: active-ewebservice.biz 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"InstructorId":0,"DateFrom":"0001-01-01T00:00:00.0000000","DateTo":"0001-01-01T00:00:00.0000000","IncludeAvailability":false,"Token":"String","DeviceId":"String","AppId":"String","ApiKey":"String","OAuthToken":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"InstructorSchedule":[{}],"ScheduleByInstructor":[{"InstructorInfo":{"Id":0,"Name":"String","Email":"String","Topic":"String","AvailabilityInfo":{"Sunday":false,"Monday":false,"Tuesday":false,"Wednesday":false,"Thursday":false,"Friday":false,"Saturday":false}},"InstructorSchedule":[{}]}],"Status":{"StatusCode":"String","Login":"String","ErrorCode":"String","ErrorDisplayText":"String","ErrorMessage":"String","DomainName":"String","IpAddress":"String"}}