DigiOffice Gateway Web Services

<back to all web services

AddDocument

Requires Authentication
import 'package:servicestack/servicestack.dart';

// @DataContract
class MetaDataField implements IConvertible
{
    // @DataMember
    String? ID;

    // @DataMember
    String? DocumentVeldID;

    // @DataMember
    String? Name;

    // @DataMember
    String? Label;

    // @DataMember
    String? Datatype;

    // @DataMember
    String? PrintLabel;

    // @DataMember
    String? Entity;

    // @DataMember
    String? PrintValue;

    // @DataMember
    String? RegistrationValue;

    // @DataMember
    String? SPSiteColumnName;

    // @DataMember
    String? ShadowName;

    // @DataMember
    String? ShadowDatatype;

    // @DataMember
    String? ShadowSPSiteColumnName;

    // @DataMember
    String? ShadowSPSiteColumnRegistrationValue;

    // @DataMember
    String? ShadowRegistrationValue;

    // @DataMember
    bool? IsKeyField;

    // @DataMember
    bool? KopierenBijNieuweVersie;

    MetaDataField({this.ID,this.DocumentVeldID,this.Name,this.Label,this.Datatype,this.PrintLabel,this.Entity,this.PrintValue,this.RegistrationValue,this.SPSiteColumnName,this.ShadowName,this.ShadowDatatype,this.ShadowSPSiteColumnName,this.ShadowSPSiteColumnRegistrationValue,this.ShadowRegistrationValue,this.IsKeyField,this.KopierenBijNieuweVersie});
    MetaDataField.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ID = json['ID'];
        DocumentVeldID = json['DocumentVeldID'];
        Name = json['Name'];
        Label = json['Label'];
        Datatype = json['Datatype'];
        PrintLabel = json['PrintLabel'];
        Entity = json['Entity'];
        PrintValue = json['PrintValue'];
        RegistrationValue = json['RegistrationValue'];
        SPSiteColumnName = json['SPSiteColumnName'];
        ShadowName = json['ShadowName'];
        ShadowDatatype = json['ShadowDatatype'];
        ShadowSPSiteColumnName = json['ShadowSPSiteColumnName'];
        ShadowSPSiteColumnRegistrationValue = json['ShadowSPSiteColumnRegistrationValue'];
        ShadowRegistrationValue = json['ShadowRegistrationValue'];
        IsKeyField = json['IsKeyField'];
        KopierenBijNieuweVersie = json['KopierenBijNieuweVersie'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ID': ID,
        'DocumentVeldID': DocumentVeldID,
        'Name': Name,
        'Label': Label,
        'Datatype': Datatype,
        'PrintLabel': PrintLabel,
        'Entity': Entity,
        'PrintValue': PrintValue,
        'RegistrationValue': RegistrationValue,
        'SPSiteColumnName': SPSiteColumnName,
        'ShadowName': ShadowName,
        'ShadowDatatype': ShadowDatatype,
        'ShadowSPSiteColumnName': ShadowSPSiteColumnName,
        'ShadowSPSiteColumnRegistrationValue': ShadowSPSiteColumnRegistrationValue,
        'ShadowRegistrationValue': ShadowRegistrationValue,
        'IsKeyField': IsKeyField,
        'KopierenBijNieuweVersie': KopierenBijNieuweVersie
    };

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

class Bookmark implements IConvertible
{
    bool? RemoveLastBreak;
    bool? ReplaceOnChange;
    bool? IsDynamic;

    Bookmark({this.RemoveLastBreak,this.ReplaceOnChange,this.IsDynamic});
    Bookmark.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'RemoveLastBreak': RemoveLastBreak,
        'ReplaceOnChange': ReplaceOnChange,
        'IsDynamic': IsDynamic
    };

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

class Mailings implements IConvertible
{
    Mailings();
    Mailings.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "Mailings";
    TypeContext? context = _ctx;
}

class AttachmentMailing implements IConvertible
{
    AttachmentMailing();
    AttachmentMailing.fromJson(Map<String, dynamic> json) : super();
    fromMap(Map<String, dynamic> json) {
        return this;
    }

    Map<String, dynamic> toJson() => {};
    getTypeName() => "AttachmentMailing";
    TypeContext? context = _ctx;
}

abstract class IInformationMessages
{
}

class DocumentResponse implements IConvertible
{
    String? DocumentID;
    String? DocumentNr;
    String? RootDocumentID;
    List<MetaDataField>? MetaData;
    List<Bookmark>? Bookmarks;
    Mailings? Mailings;
    List<AttachmentMailing>? AttachmentsMailings;
    IInformationMessages? Messages;
    String? SourceDocumentPath;
    String? DestinationDocumentPath;
    String? SharePointContentTypeName;
    bool? ZIPAttachments;

    DocumentResponse({this.DocumentID,this.DocumentNr,this.RootDocumentID,this.MetaData,this.Bookmarks,this.Mailings,this.AttachmentsMailings,this.Messages,this.SourceDocumentPath,this.DestinationDocumentPath,this.SharePointContentTypeName,this.ZIPAttachments});
    DocumentResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        DocumentID = json['DocumentID'];
        DocumentNr = json['DocumentNr'];
        RootDocumentID = json['RootDocumentID'];
        MetaData = JsonConverters.fromJson(json['MetaData'],'List<MetaDataField>',context!);
        Bookmarks = JsonConverters.fromJson(json['Bookmarks'],'List<Bookmark>',context!);
        Mailings = JsonConverters.fromJson(json['Mailings'],'Mailings',context!);
        AttachmentsMailings = JsonConverters.fromJson(json['AttachmentsMailings'],'List<AttachmentMailing>',context!);
        Messages = JsonConverters.fromJson(json['Messages'],'IInformationMessages',context!);
        SourceDocumentPath = json['SourceDocumentPath'];
        DestinationDocumentPath = json['DestinationDocumentPath'];
        SharePointContentTypeName = json['SharePointContentTypeName'];
        ZIPAttachments = json['ZIPAttachments'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'DocumentID': DocumentID,
        'DocumentNr': DocumentNr,
        'RootDocumentID': RootDocumentID,
        'MetaData': JsonConverters.toJson(MetaData,'List<MetaDataField>',context!),
        'Bookmarks': JsonConverters.toJson(Bookmarks,'List<Bookmark>',context!),
        'Mailings': JsonConverters.toJson(Mailings,'Mailings',context!),
        'AttachmentsMailings': JsonConverters.toJson(AttachmentsMailings,'List<AttachmentMailing>',context!),
        'Messages': JsonConverters.toJson(Messages,'IInformationMessages',context!),
        'SourceDocumentPath': SourceDocumentPath,
        'DestinationDocumentPath': DestinationDocumentPath,
        'SharePointContentTypeName': SharePointContentTypeName,
        'ZIPAttachments': ZIPAttachments
    };

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

enum DocInfoSilentMode
{
    Off,
    AllowUserInteraction,
    DoNotAllowUserInteraction,
}

class AddDocument implements IConvertible
{
    String? RegistrationProfileID;
    String? DocumentID;
    String? RootDocumentID;
    int? AssignToUserID;
    int? AssignToGroupID;
    List<MetaDataField>? MetaData;
    Mailings? Mailings;
    List<AttachmentMailing>? AttachmentsMailings;
    String? FileID;
    DocInfoSilentMode? SilentMode;
    bool? updateStorageSystem;
    int? MessageQueueId;

    AddDocument({this.RegistrationProfileID,this.DocumentID,this.RootDocumentID,this.AssignToUserID,this.AssignToGroupID,this.MetaData,this.Mailings,this.AttachmentsMailings,this.FileID,this.SilentMode,this.updateStorageSystem,this.MessageQueueId});
    AddDocument.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        RegistrationProfileID = json['RegistrationProfileID'];
        DocumentID = json['DocumentID'];
        RootDocumentID = json['RootDocumentID'];
        AssignToUserID = json['AssignToUserID'];
        AssignToGroupID = json['AssignToGroupID'];
        MetaData = JsonConverters.fromJson(json['MetaData'],'List<MetaDataField>',context!);
        Mailings = JsonConverters.fromJson(json['Mailings'],'Mailings',context!);
        AttachmentsMailings = JsonConverters.fromJson(json['AttachmentsMailings'],'List<AttachmentMailing>',context!);
        FileID = json['FileID'];
        SilentMode = JsonConverters.fromJson(json['SilentMode'],'DocInfoSilentMode',context!);
        updateStorageSystem = json['updateStorageSystem'];
        MessageQueueId = json['MessageQueueId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'RegistrationProfileID': RegistrationProfileID,
        'DocumentID': DocumentID,
        'RootDocumentID': RootDocumentID,
        'AssignToUserID': AssignToUserID,
        'AssignToGroupID': AssignToGroupID,
        'MetaData': JsonConverters.toJson(MetaData,'List<MetaDataField>',context!),
        'Mailings': JsonConverters.toJson(Mailings,'Mailings',context!),
        'AttachmentsMailings': JsonConverters.toJson(AttachmentsMailings,'List<AttachmentMailing>',context!),
        'FileID': FileID,
        'SilentMode': JsonConverters.toJson(SilentMode,'DocInfoSilentMode',context!),
        'updateStorageSystem': updateStorageSystem,
        'MessageQueueId': MessageQueueId
    };

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

TypeContext _ctx = TypeContext(library: 'digiofficeapigateway.deltares.nl', types: <String, TypeInfo> {
    'MetaDataField': TypeInfo(TypeOf.Class, create:() => MetaDataField()),
    'Bookmark': TypeInfo(TypeOf.Class, create:() => Bookmark()),
    'Mailings': TypeInfo(TypeOf.Class, create:() => Mailings()),
    'AttachmentMailing': TypeInfo(TypeOf.Class, create:() => AttachmentMailing()),
    'IInformationMessages': TypeInfo(TypeOf.Interface),
    'DocumentResponse': TypeInfo(TypeOf.Class, create:() => DocumentResponse()),
    'List<MetaDataField>': TypeInfo(TypeOf.Class, create:() => <MetaDataField>[]),
    'List<Bookmark>': TypeInfo(TypeOf.Class, create:() => <Bookmark>[]),
    'List<AttachmentMailing>': TypeInfo(TypeOf.Class, create:() => <AttachmentMailing>[]),
    'DocInfoSilentMode': TypeInfo(TypeOf.Enum, enumValues:DocInfoSilentMode.values),
    'AddDocument': TypeInfo(TypeOf.Class, create:() => AddDocument()),
});

Dart AddDocument DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /json/reply/AddDocument HTTP/1.1 
Host: digiofficeapigateway.deltares.nl 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"RegistrationProfileID":"00000000-0000-0000-0000-000000000000","DocumentID":"00000000-0000-0000-0000-000000000000","RootDocumentID":"00000000-0000-0000-0000-000000000000","AssignToUserID":0,"AssignToGroupID":0,"MetaData":[{"ID":"00000000-0000-0000-0000-000000000000","DocumentVeldID":"00000000-0000-0000-0000-000000000000","Name":"String","Label":"String","Datatype":"String","PrintLabel":"String","Entity":"String","PrintValue":"String","RegistrationValue":"String","SPSiteColumnName":"String","ShadowName":"String","ShadowDatatype":"String","ShadowSPSiteColumnName":"String","ShadowSPSiteColumnRegistrationValue":"String","ShadowRegistrationValue":"String","IsKeyField":false,"KopierenBijNieuweVersie":false}],"Mailings":{},"AttachmentsMailings":[{}],"FileID":"00000000-0000-0000-0000-000000000000","SilentMode":"Off","updateStorageSystem":false,"MessageQueueId":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"DocumentID":"00000000-0000-0000-0000-000000000000","DocumentNr":"String","RootDocumentID":"00000000-0000-0000-0000-000000000000","MetaData":[{"ID":"00000000-0000-0000-0000-000000000000","DocumentVeldID":"00000000-0000-0000-0000-000000000000","Name":"String","Label":"String","Datatype":"String","PrintLabel":"String","Entity":"String","PrintValue":"String","RegistrationValue":"String","SPSiteColumnName":"String","ShadowName":"String","ShadowDatatype":"String","ShadowSPSiteColumnName":"String","ShadowSPSiteColumnRegistrationValue":"String","ShadowRegistrationValue":"String","IsKeyField":false,"KopierenBijNieuweVersie":false}],"Bookmarks":[{"RemoveLastBreak":false,"ReplaceOnChange":false,"IsDynamic":false}],"Mailings":{},"AttachmentsMailings":[{}],"Messages":null,"SourceDocumentPath":"String","DestinationDocumentPath":"String","SharePointContentTypeName":"String","ZIPAttachments":false}