<back to all web services

SettingsRequest

The following routes are available for this service:
All Verbs/RestApi/search/settings
GET/RestApi/search/settings
import 'package:servicestack/servicestack.dart';

class SettingsRequest implements IConvertible
{
    String? IndexId;
    String? SuggestionFields;
    String? SectionName;
    String? Text;
    int? Take;
    int? Skip;

    SettingsRequest({this.IndexId,this.SuggestionFields,this.SectionName,this.Text,this.Take,this.Skip});
    SettingsRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        IndexId = json['IndexId'];
        SuggestionFields = json['SuggestionFields'];
        SectionName = json['SectionName'];
        Text = json['Text'];
        Take = json['Take'];
        Skip = json['Skip'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'IndexId': IndexId,
        'SuggestionFields': SuggestionFields,
        'SectionName': SectionName,
        'Text': Text,
        'Take': Take,
        'Skip': Skip
    };

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

class SettingsResponse implements IConvertible
{
    List<SettingDto>? Results;

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

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

    Map<String, dynamic> toJson() => {
        'Results': JsonConverters.toJson(Results,'List<SettingDto>',context!)
    };

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

class SettingDto implements IConvertible
{
    String? Title;
    String? SectionName;
    String? FullSettingName;
    List<String>? Path;
    String? VisiblePath;
    String? FullPath;

    SettingDto({this.Title,this.SectionName,this.FullSettingName,this.Path,this.VisiblePath,this.FullPath});
    SettingDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Title = json['Title'];
        SectionName = json['SectionName'];
        FullSettingName = json['FullSettingName'];
        Path = JsonConverters.fromJson(json['Path'],'List<String>',context!);
        VisiblePath = json['VisiblePath'];
        FullPath = json['FullPath'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Title': Title,
        'SectionName': SectionName,
        'FullSettingName': FullSettingName,
        'Path': JsonConverters.toJson(Path,'List<String>',context!),
        'VisiblePath': VisiblePath,
        'FullPath': FullPath
    };

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

TypeContext _ctx = TypeContext(library: 'www.asg.com.au', types: <String, TypeInfo> {
    'SettingsRequest': TypeInfo(TypeOf.Class, create:() => SettingsRequest()),
    'SettingsResponse': TypeInfo(TypeOf.Class, create:() => SettingsResponse()),
    'List<SettingDto>': TypeInfo(TypeOf.Class, create:() => <SettingDto>[]),
    'SettingDto': TypeInfo(TypeOf.Class, create:() => SettingDto()),
});

Dart SettingsRequest 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.

POST /RestApi/search/settings HTTP/1.1 
Host: www.asg.com.au 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	SuggestionFields: String,
	SectionName: String,
	Text: String,
	Take: 0,
	Skip: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Results: 
	[
		{
			Title: String,
			SectionName: String,
			FullSettingName: String,
			VisiblePath: String,
			FullPath: String
		}
	]
}