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







export class TypeWithRestrictedProperties implements ITypeWithRestrictedProperties {
    constructor_!: string | undefined;
    init_!: string | undefined;
    fromJS_!: string | undefined;
    toJSON_!: string | undefined;

    constructor(data?: ITypeWithRestrictedProperties) {
        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.constructor_ = _data["Constructor"];
            this.init_ = _data["Init"];
            this.fromJS_ = _data["FromJS"];
            this.toJSON_ = _data["ToJSON"];
        }
    }

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

    toJSON(data?: any) {
        data = typeof data === 'object' ? data : {};
        data["Constructor"] = this.constructor_;
        data["Init"] = this.init_;
        data["FromJS"] = this.fromJS_;
        data["ToJSON"] = this.toJSON_;
        return data;
    }
}

export interface ITypeWithRestrictedProperties {
    constructor_: string | undefined;
    init_: string | undefined;
    fromJS_: string | undefined;
    toJSON_: string | undefined;
}