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







export class DisplayValueDictionary implements IDisplayValueDictionary {

    [key: string]: string | any;

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

    init(_data?: any) {
        if (_data) {
            for (var property in _data) {
                if (_data.hasOwnProperty(property))
                    this[property] = _data[property];
            }
        }
    }

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

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        for (var property in this) {
            if (this.hasOwnProperty(property))
                data[property] = this[property];
        }
        return data;
    }
}

export interface IDisplayValueDictionary {

    [key: string]: string | any;
}

export class Test implements ITest {
    foo!: DisplayValueDictionary | undefined;

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

    init(_data?: any) {
        if (_data) {
            this.foo = _data["Foo"] ? DisplayValueDictionary.fromJS(_data["Foo"]) : undefined as any;
        }
    }

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

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["Foo"] = this.foo ? this.foo.toJSON() : undefined as any;
        return data;
    }
}

export interface ITest {
    foo: DisplayValueDictionary | undefined;
}