<back to all web services

UpdateService

The following routes are available for this service:
PUT/RestApi/apiservice/updateService/{OldUrlName}
import 'package:servicestack/servicestack.dart';

class PropertiesProxy implements IConvertible
{
    String? Name;
    String? PropertyType;
    bool? IsPersistent;
    bool? AllowSort;
    bool? AllowFilter;
    bool? IsKey;

    PropertiesProxy({this.Name,this.PropertyType,this.IsPersistent,this.AllowSort,this.AllowFilter,this.IsKey});
    PropertiesProxy.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Name = json['Name'];
        PropertyType = json['PropertyType'];
        IsPersistent = json['IsPersistent'];
        AllowSort = json['AllowSort'];
        AllowFilter = json['AllowFilter'];
        IsKey = json['IsKey'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Name': Name,
        'PropertyType': PropertyType,
        'IsPersistent': IsPersistent,
        'AllowSort': AllowSort,
        'AllowFilter': AllowFilter,
        'IsKey': IsKey
    };

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

class ContentsProxy implements IConvertible
{
    String? Name;
    bool? ReadOnly;
    String? UrlKey;
    String? ClrType;
    String? Access;
    List<PropertiesProxy>? Properties;
    List<ContentsProxy>? Children;
    bool? AutogenerateProperties;
    String? parentId;

    ContentsProxy({this.Name,this.ReadOnly,this.UrlKey,this.ClrType,this.Access,this.Properties,this.Children,this.AutogenerateProperties,this.parentId});
    ContentsProxy.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Name = json['Name'];
        ReadOnly = json['ReadOnly'];
        UrlKey = json['UrlKey'];
        ClrType = json['ClrType'];
        Access = json['Access'];
        Properties = JsonConverters.fromJson(json['Properties'],'List<PropertiesProxy>',context!);
        Children = JsonConverters.fromJson(json['Children'],'List<ContentsProxy>',context!);
        AutogenerateProperties = json['AutogenerateProperties'];
        parentId = json['parentId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Name': Name,
        'ReadOnly': ReadOnly,
        'UrlKey': UrlKey,
        'ClrType': ClrType,
        'Access': Access,
        'Properties': JsonConverters.toJson(Properties,'List<PropertiesProxy>',context!),
        'Children': JsonConverters.toJson(Children,'List<ContentsProxy>',context!),
        'AutogenerateProperties': AutogenerateProperties,
        'parentId': parentId
    };

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

class ServiceBaseRequest implements IConvertible
{
    String? Route;
    String? Name;
    String? UrlName;
    bool? Enabled;
    String? ApiKey;
    String? AccessControlAllowOrigin;
    bool? AutogenerateTypes;
    String? Access;
    List<ContentsProxy>? Types;
    String? Protocol;

    ServiceBaseRequest({this.Route,this.Name,this.UrlName,this.Enabled,this.ApiKey,this.AccessControlAllowOrigin,this.AutogenerateTypes,this.Access,this.Types,this.Protocol});
    ServiceBaseRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Route = json['Route'];
        Name = json['Name'];
        UrlName = json['UrlName'];
        Enabled = json['Enabled'];
        ApiKey = json['ApiKey'];
        AccessControlAllowOrigin = json['AccessControlAllowOrigin'];
        AutogenerateTypes = json['AutogenerateTypes'];
        Access = json['Access'];
        Types = JsonConverters.fromJson(json['Types'],'List<ContentsProxy>',context!);
        Protocol = json['Protocol'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Route': Route,
        'Name': Name,
        'UrlName': UrlName,
        'Enabled': Enabled,
        'ApiKey': ApiKey,
        'AccessControlAllowOrigin': AccessControlAllowOrigin,
        'AutogenerateTypes': AutogenerateTypes,
        'Access': Access,
        'Types': JsonConverters.toJson(Types,'List<ContentsProxy>',context!),
        'Protocol': Protocol
    };

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

class UpdateService extends ServiceBaseRequest implements IConvertible
{
    String? OldUrlName;

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

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

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

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

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

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

PUT /RestApi/apiservice/updateService/{OldUrlName} HTTP/1.1 
Host: www.asg.com.au 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"OldUrlName":"String","Route":"String","Name":"String","UrlName":"String","Enabled":false,"ApiKey":"String","AccessControlAllowOrigin":"String","AutogenerateTypes":false,"Access":"String","Protocol":"String"}