// This file was autogenerated. Please do not change.
// All changes will be overwrited on commit.
export interface IFilterRefreshResponse {
    updated?: number;
}

export default class FilterRefreshResponse {
    readonly _updated: number | undefined;

    get updated(): number | undefined {
        return this._updated;
    }

    constructor(props: IFilterRefreshResponse) {
        if (typeof props.updated === 'number') {
            this._updated = props.updated;
        }
    }

    serialize(): IFilterRefreshResponse {
        const data: IFilterRefreshResponse = {
        };
        if (typeof this._updated !== 'undefined') {
            data.updated = this._updated;
        }
        return data;
    }

    validate(): string[] {
        const validate = {
            updated: !this._updated ? true : typeof this._updated === 'number',
        };
        const isError: string[] = [];
        Object.keys(validate).forEach((key) => {
            if (!(validate as any)[key]) {
                isError.push(key);
            }
        });
        return isError;
    }

    update(props: Partial<IFilterRefreshResponse>): FilterRefreshResponse {
        return new FilterRefreshResponse({ ...this.serialize(), ...props });
    }
}
