BokaMera.API.Host

<back to all web services

HomepageSchedulerSettingsQuery

The following routes are available for this service:
GET/homepage/scheduler/settingsGet homepage scheduler settings
import 'package:servicestack/servicestack.dart';

class HomepageSchedulerServiceResponse implements IConvertible
{
    /**
    * The service id.
    */
    // @ApiMember(Description="The service id.")
    int? Id;

    /**
    * The service name.
    */
    // @ApiMember(Description="The service name.")
    String? Name;

    /**
    * The service description.
    */
    // @ApiMember(Description="The service description.")
    String? Description;

    /**
    * The service image url.
    */
    // @ApiMember(Description="The service image url.")
    Uri? ImageUrl;

    HomepageSchedulerServiceResponse({this.Id,this.Name,this.Description,this.ImageUrl});
    HomepageSchedulerServiceResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Name = json['Name'];
        Description = json['Description'];
        ImageUrl = JsonConverters.fromJson(json['ImageUrl'],'Uri',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Name': Name,
        'Description': Description,
        'ImageUrl': JsonConverters.toJson(ImageUrl,'Uri',context!)
    };

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

class HomepageSchedulerResourceResponse implements IConvertible
{
    /**
    * The resource id.
    */
    // @ApiMember(Description="The resource id.")
    int? Id;

    /**
    * The resource name.
    */
    // @ApiMember(Description="The resource name.")
    String? Name;

    /**
    * The resource description.
    */
    // @ApiMember(Description="The resource description.")
    String? Description;

    /**
    * The resource image url.
    */
    // @ApiMember(Description="The resource image url.")
    Uri? ImageUrl;

    HomepageSchedulerResourceResponse({this.Id,this.Name,this.Description,this.ImageUrl});
    HomepageSchedulerResourceResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Name = json['Name'];
        Description = json['Description'];
        ImageUrl = JsonConverters.fromJson(json['ImageUrl'],'Uri',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Name': Name,
        'Description': Description,
        'ImageUrl': JsonConverters.toJson(ImageUrl,'Uri',context!)
    };

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

class HomepageSchedulerFieldResponse implements IConvertible
{
    /**
    * The field id.
    */
    // @ApiMember(Description="The field id.")
    int? Id;

    /**
    * If the field should be shown on booking.
    */
    // @ApiMember(Description="If the field should be shown on booking.")
    bool? ShowOnBooking;

    /**
    * If the field should be shown on tooltip.
    */
    // @ApiMember(Description="If the field should be shown on tooltip.")
    bool? ShowOnTooltip;

    HomepageSchedulerFieldResponse({this.Id,this.ShowOnBooking,this.ShowOnTooltip});
    HomepageSchedulerFieldResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        ShowOnBooking = json['ShowOnBooking'];
        ShowOnTooltip = json['ShowOnTooltip'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'ShowOnBooking': ShowOnBooking,
        'ShowOnTooltip': ShowOnTooltip
    };

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

class HomepageSchedulerFieldOptionsResponse implements IConvertible
{
    /**
    * The field id.
    */
    // @ApiMember(Description="The field id.")
    int? Id;

    /**
    * The field name.
    */
    // @ApiMember(Description="The field name.")
    String? Name;

    /**
    * The field description.
    */
    // @ApiMember(Description="The field description.")
    String? Description;

    /**
    * The field sort order when listing.
    */
    // @ApiMember(Description="The field sort order when listing.")
    int? SortOrder;

    HomepageSchedulerFieldOptionsResponse({this.Id,this.Name,this.Description,this.SortOrder});
    HomepageSchedulerFieldOptionsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Name = json['Name'];
        Description = json['Description'];
        SortOrder = json['SortOrder'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Name': Name,
        'Description': Description,
        'SortOrder': SortOrder
    };

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

class ScheduleViewResponse implements IConvertible
{
    int? Id;
    String? Name;

    ScheduleViewResponse({this.Id,this.Name});
    ScheduleViewResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Name': Name
    };

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

class HomepageSchedulerSettingsQueryResponse implements IConvertible
{
    /**
    * The company id.
    */
    // @ApiMember(Description="The company id.")
    String? CompanyId;

    /**
    * If the user schedule is activated.
    */
    // @ApiMember(Description="If the user schedule is activated.")
    bool? Active;

    /**
    * If the user schedule views id.
    */
    // @ApiMember(Description="If the user schedule views id.")
    int? ScheduleViewId;

    /**
    * If the user schedule time slots in minutes.
    */
    // @ApiMember(Description="If the user schedule time slots in minutes.")
    int? ScheduleTimeSlotMinutes;

    /**
    * If the user schedule time start time.
    */
    // @ApiMember(Description="If the user schedule time start time.")
    Duration? StartTime;

    /**
    * If the user schedule time end time.
    */
    // @ApiMember(Description="If the user schedule time end time.")
    Duration? EndTime;

    /**
    * If the user schedule should contain time exceptions.
    */
    // @ApiMember(Description="If the user schedule should contain time exceptions.")
    bool? ShowTimeExceptions;

    /**
    * If allow booking in the scheduler.
    */
    // @ApiMember(Description="If allow booking in the scheduler.")
    bool? EnableBooking;

    /**
    * The homepage schedule services that are selected
    */
    // @ApiMember(Description="The homepage schedule services that are selected")
    List<HomepageSchedulerServiceResponse>? Services;

    /**
    * The homepage schedule resources that are selected
    */
    // @ApiMember(Description="The homepage schedule resources that are selected")
    List<HomepageSchedulerResourceResponse>? Resources;

    /**
    * The homepage schedule fields that are selected
    */
    // @ApiMember(Description="The homepage schedule fields that are selected")
    List<HomepageSchedulerFieldResponse>? Fields;

    /**
    * The homepage schedule fields select from
    */
    // @ApiMember(Description="The homepage schedule fields select from")
    List<HomepageSchedulerFieldOptionsResponse>? FieldOptions;

    /**
    * The available schedule view options to choose from
    */
    // @ApiMember(Description="The available schedule view options to choose from")
    List<ScheduleViewResponse>? ScheduleViewOptions;

    HomepageSchedulerSettingsQueryResponse({this.CompanyId,this.Active,this.ScheduleViewId,this.ScheduleTimeSlotMinutes,this.StartTime,this.EndTime,this.ShowTimeExceptions,this.EnableBooking,this.Services,this.Resources,this.Fields,this.FieldOptions,this.ScheduleViewOptions});
    HomepageSchedulerSettingsQueryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CompanyId = json['CompanyId'];
        Active = json['Active'];
        ScheduleViewId = json['ScheduleViewId'];
        ScheduleTimeSlotMinutes = json['ScheduleTimeSlotMinutes'];
        StartTime = JsonConverters.fromJson(json['StartTime'],'Duration',context!);
        EndTime = JsonConverters.fromJson(json['EndTime'],'Duration',context!);
        ShowTimeExceptions = json['ShowTimeExceptions'];
        EnableBooking = json['EnableBooking'];
        Services = JsonConverters.fromJson(json['Services'],'List<HomepageSchedulerServiceResponse>',context!);
        Resources = JsonConverters.fromJson(json['Resources'],'List<HomepageSchedulerResourceResponse>',context!);
        Fields = JsonConverters.fromJson(json['Fields'],'List<HomepageSchedulerFieldResponse>',context!);
        FieldOptions = JsonConverters.fromJson(json['FieldOptions'],'List<HomepageSchedulerFieldOptionsResponse>',context!);
        ScheduleViewOptions = JsonConverters.fromJson(json['ScheduleViewOptions'],'List<ScheduleViewResponse>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CompanyId': CompanyId,
        'Active': Active,
        'ScheduleViewId': ScheduleViewId,
        'ScheduleTimeSlotMinutes': ScheduleTimeSlotMinutes,
        'StartTime': JsonConverters.toJson(StartTime,'Duration',context!),
        'EndTime': JsonConverters.toJson(EndTime,'Duration',context!),
        'ShowTimeExceptions': ShowTimeExceptions,
        'EnableBooking': EnableBooking,
        'Services': JsonConverters.toJson(Services,'List<HomepageSchedulerServiceResponse>',context!),
        'Resources': JsonConverters.toJson(Resources,'List<HomepageSchedulerResourceResponse>',context!),
        'Fields': JsonConverters.toJson(Fields,'List<HomepageSchedulerFieldResponse>',context!),
        'FieldOptions': JsonConverters.toJson(FieldOptions,'List<HomepageSchedulerFieldOptionsResponse>',context!),
        'ScheduleViewOptions': JsonConverters.toJson(ScheduleViewOptions,'List<ScheduleViewResponse>',context!)
    };

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

class HomepageSchedulerSettingsQuery implements ICompany, ICompanyRequest, IConvertible
{
    /**
    * Enter the company you want to see news for, if blank and you are an admin, your company id will be used
    */
    // @ApiMember(Description="Enter the company you want to see news for, if blank and you are an admin, your company id will be used", ParameterType="query")
    String? CompanyId;

    /**
    * If you want to include the services that is connected
    */
    // @ApiMember(DataType="boolean", Description="If you want to include the services that is connected", ParameterType="query")
    bool? IncludeServices;

    /**
    * If you want to include the resources that is connected
    */
    // @ApiMember(DataType="boolean", Description="If you want to include the resources that is connected", ParameterType="query")
    bool? IncludeResources;

    /**
    * If you want to include the scheduler fields that is connected
    */
    // @ApiMember(DataType="boolean", Description="If you want to include the scheduler fields that is connected", ParameterType="query")
    bool? IncludeFields;

    /**
    * If you want to include the service to select from
    */
    // @ApiMember(DataType="boolean", Description="If you want to include the service to select from", ParameterType="query")
    bool? IncludeServiceOptions;

    /**
    * If you want to include the resources to select from
    */
    // @ApiMember(DataType="boolean", Description="If you want to include the resources to select from", ParameterType="query")
    bool? IncludeResourceOptions;

    /**
    * If you want to include the scheduler fields to select from
    */
    // @ApiMember(DataType="boolean", Description="If you want to include the scheduler fields to select from", ParameterType="query")
    bool? IncludeFieldOptions;

    /**
    * If you want to include the schedule views to select from
    */
    // @ApiMember(DataType="boolean", Description="If you want to include the schedule views to select from", ParameterType="query")
    bool? IncludeScheduleViewOptions;

    /**
    * The homeage sitepath.
    */
    // @ApiMember(Description="The homeage sitepath.")
    String? SitePath;

    HomepageSchedulerSettingsQuery({this.CompanyId,this.IncludeServices,this.IncludeResources,this.IncludeFields,this.IncludeServiceOptions,this.IncludeResourceOptions,this.IncludeFieldOptions,this.IncludeScheduleViewOptions,this.SitePath});
    HomepageSchedulerSettingsQuery.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CompanyId = json['CompanyId'];
        IncludeServices = json['IncludeServices'];
        IncludeResources = json['IncludeResources'];
        IncludeFields = json['IncludeFields'];
        IncludeServiceOptions = json['IncludeServiceOptions'];
        IncludeResourceOptions = json['IncludeResourceOptions'];
        IncludeFieldOptions = json['IncludeFieldOptions'];
        IncludeScheduleViewOptions = json['IncludeScheduleViewOptions'];
        SitePath = json['SitePath'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CompanyId': CompanyId,
        'IncludeServices': IncludeServices,
        'IncludeResources': IncludeResources,
        'IncludeFields': IncludeFields,
        'IncludeServiceOptions': IncludeServiceOptions,
        'IncludeResourceOptions': IncludeResourceOptions,
        'IncludeFieldOptions': IncludeFieldOptions,
        'IncludeScheduleViewOptions': IncludeScheduleViewOptions,
        'SitePath': SitePath
    };

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

TypeContext _ctx = TypeContext(library: 'testapi.bokamera.se', types: <String, TypeInfo> {
    'HomepageSchedulerServiceResponse': TypeInfo(TypeOf.Class, create:() => HomepageSchedulerServiceResponse()),
    'Uri': TypeInfo(TypeOf.Class, create:() => Uri()),
    'HomepageSchedulerResourceResponse': TypeInfo(TypeOf.Class, create:() => HomepageSchedulerResourceResponse()),
    'HomepageSchedulerFieldResponse': TypeInfo(TypeOf.Class, create:() => HomepageSchedulerFieldResponse()),
    'HomepageSchedulerFieldOptionsResponse': TypeInfo(TypeOf.Class, create:() => HomepageSchedulerFieldOptionsResponse()),
    'ScheduleViewResponse': TypeInfo(TypeOf.Class, create:() => ScheduleViewResponse()),
    'HomepageSchedulerSettingsQueryResponse': TypeInfo(TypeOf.Class, create:() => HomepageSchedulerSettingsQueryResponse()),
    'List<HomepageSchedulerServiceResponse>': TypeInfo(TypeOf.Class, create:() => <HomepageSchedulerServiceResponse>[]),
    'List<HomepageSchedulerResourceResponse>': TypeInfo(TypeOf.Class, create:() => <HomepageSchedulerResourceResponse>[]),
    'List<HomepageSchedulerFieldResponse>': TypeInfo(TypeOf.Class, create:() => <HomepageSchedulerFieldResponse>[]),
    'List<HomepageSchedulerFieldOptionsResponse>': TypeInfo(TypeOf.Class, create:() => <HomepageSchedulerFieldOptionsResponse>[]),
    'List<ScheduleViewResponse>': TypeInfo(TypeOf.Class, create:() => <ScheduleViewResponse>[]),
    'HomepageSchedulerSettingsQuery': TypeInfo(TypeOf.Class, create:() => HomepageSchedulerSettingsQuery()),
});

Dart HomepageSchedulerSettingsQuery DTOs

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

HTTP + JSV

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

GET /homepage/scheduler/settings HTTP/1.1 
Host: testapi.bokamera.se 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Active: False,
	ScheduleViewId: 0,
	ScheduleTimeSlotMinutes: 0,
	StartTime: PT0S,
	EndTime: PT0S,
	ShowTimeExceptions: False,
	EnableBooking: False,
	Services: 
	[
		{
			Id: 0,
			Name: String,
			Description: String
		}
	],
	Resources: 
	[
		{
			Id: 0,
			Name: String,
			Description: String
		}
	],
	Fields: 
	[
		{
			Id: 0,
			ShowOnBooking: False,
			ShowOnTooltip: False
		}
	],
	FieldOptions: 
	[
		{
			Id: 0,
			Name: String,
			Description: String,
			SortOrder: 0
		}
	],
	ScheduleViewOptions: 
	[
		{
			Id: 0,
			Name: String
		}
	]
}