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

export default class GetVersionRequest {
    readonly _recheck_now: boolean | undefined;

    /** */
    get recheckNow(): boolean | undefined {
        return this._recheck_now;
    }

    constructor(props: IGetVersionRequest) {
        if (typeof props.recheck_now === 'boolean') {
            this._recheck_now = props.recheck_now;
        }
    }

    serialize(): IGetVersionRequest {
        const data: IGetVersionRequest = {
        };
        if (typeof this._recheck_now !== 'undefined') {
            data.recheck_now = this._recheck_now;
        }
        return data;
    }

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

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