﻿//----------------------
// <auto-generated>
// </auto-generated>
//----------------------







export class ContainerClass implements IContainerClass {
    customDictionary!: { [key: string]: any; } | undefined;

    constructor(data?: IContainerClass) {
        if (data) {
            for (var property in data) {
                if (data.hasOwnProperty(property))
                    (this as any)[property] = (data as any)[property];
            }
        }
    }

    init(_data?: any) {
        if (_data) {
            if (_data["CustomDictionary"]) {
                this.customDictionary = {} as any;
                for (let key in _data["CustomDictionary"]) {
                    if (_data["CustomDictionary"].hasOwnProperty(key))
                        (this.customDictionary as any)![key] = _data["CustomDictionary"][key];
                }
            }
        }
    }

    static fromJS(data: any): ContainerClass {
        data = typeof data === 'object' ? data : {};
        let result = new ContainerClass();
        result.init(data);
        return result;
    }

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        if (this.customDictionary) {
            data["CustomDictionary"] = {};
            for (let key in this.customDictionary) {
                if (this.customDictionary.hasOwnProperty(key))
                    (data["CustomDictionary"] as any)[key] = (this.customDictionary as any)[key];
            }
        }
        return data;
    }
}

export interface IContainerClass {
    customDictionary: { [key: string]: any; } | undefined;
}