AlbaApi

<back to all web services

ContentResolveReqUpdated

The following routes are available for this service:
POST/contentresolve/changelog
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class Entity implements IEntity, IConvertible
{
    String? id;

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

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

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

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

class ChangeHistory implements IConvertible
{
    String? updatedBy;
    DateTime? dateCreated;
    String? element;
    String? old;
    String? new;
    String? status;
    String? approvedBy;
    DateTime? dateApproved;

    ChangeHistory({this.updatedBy,this.dateCreated,this.element,this.old,this.new,this.status,this.approvedBy,this.dateApproved});
    ChangeHistory.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        updatedBy = json['updatedBy'];
        dateCreated = JsonConverters.fromJson(json['dateCreated'],'DateTime',context!);
        element = json['element'];
        old = json['old'];
        new = json['new'];
        status = json['status'];
        approvedBy = json['approvedBy'];
        dateApproved = JsonConverters.fromJson(json['dateApproved'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'updatedBy': updatedBy,
        'dateCreated': JsonConverters.toJson(dateCreated,'DateTime',context!),
        'element': element,
        'old': old,
        'new': new,
        'status': status,
        'approvedBy': approvedBy,
        'dateApproved': JsonConverters.toJson(dateApproved,'DateTime',context!)
    };

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

class ChangeLog extends Entity implements IConvertible
{
    String? referenceId;
    String? country;
    String? language;
    String? section;
    String? itemCode;
    String? itemId;
    List<ChangeHistory>? history;

    ChangeLog({this.referenceId,this.country,this.language,this.section,this.itemCode,this.itemId,this.history});
    ChangeLog.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        referenceId = json['referenceId'];
        country = json['country'];
        language = json['language'];
        section = json['section'];
        itemCode = json['itemCode'];
        itemId = json['itemId'];
        history = JsonConverters.fromJson(json['history'],'List<ChangeHistory>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'referenceId': referenceId,
        'country': country,
        'language': language,
        'section': section,
        'itemCode': itemCode,
        'itemId': itemId,
        'history': JsonConverters.toJson(history,'List<ChangeHistory>',context!)
    });

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

class ContentResolveReqUpdated implements IConvertible
{
    List<ChangeLog>? changeLogs;

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

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

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

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

TypeContext _ctx = TypeContext(library: 'hcbtas_q_albamfs_api.azurewebsites.net', types: <String, TypeInfo> {
    'Entity': TypeInfo(TypeOf.Class, create:() => Entity()),
    'ChangeHistory': TypeInfo(TypeOf.Class, create:() => ChangeHistory()),
    'ChangeLog': TypeInfo(TypeOf.Class, create:() => ChangeLog()),
    'List<ChangeHistory>': TypeInfo(TypeOf.Class, create:() => <ChangeHistory>[]),
    'ContentResolveReqUpdated': TypeInfo(TypeOf.Class, create:() => ContentResolveReqUpdated()),
    'List<ChangeLog>': TypeInfo(TypeOf.Class, create:() => <ChangeLog>[]),
});

Dart ContentResolveReqUpdated 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 /contentresolve/changelog HTTP/1.1 
Host: hcbtas-q-albamfs-api.azurewebsites.net 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	changeLogs: 
	[
		{
			referenceId: String,
			country: String,
			language: String,
			section: String,
			itemCode: String,
			itemId: String,
			history: 
			[
				{
					updatedBy: String,
					dateCreated: 0001-01-01,
					element: String,
					old: String,
					new: String,
					status: String,
					approvedBy: String,
					dateApproved: 0001-01-01
				}
			],
			id: String
		}
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	referenceId: String,
	country: String,
	language: String,
	section: String,
	itemCode: String,
	itemId: String,
	history: 
	[
		{
			updatedBy: String,
			dateCreated: 0001-01-01,
			element: String,
			old: String,
			new: String,
			status: String,
			approvedBy: String,
			dateApproved: 0001-01-01
		}
	],
	id: String
}