<?php

// This file is auto-generated, don't edit it. Thanks.

namespace AlibabaCloud\SDK\Dingtalk\Vminiapp_1_0\Models;

use AlibabaCloud\Tea\Model;

class RollBackVersionRequest extends Model
{
    /**
     * @description This parameter is required.
     *
     * @var string
     */
    public $bundleId;

    /**
     * @description This parameter is required.
     *
     * @var string
     */
    public $miniAppId;

    /**
     * @description This parameter is required.
     *
     * @var string
     */
    public $rollbackVersion;

    /**
     * @description This parameter is required.
     *
     * @var string
     */
    public $targetVersion;
    protected $_name = [
        'bundleId' => 'bundleId',
        'miniAppId' => 'miniAppId',
        'rollbackVersion' => 'rollbackVersion',
        'targetVersion' => 'targetVersion',
    ];

    public function validate() {}

    public function toMap()
    {
        $res = [];
        if (null !== $this->bundleId) {
            $res['bundleId'] = $this->bundleId;
        }
        if (null !== $this->miniAppId) {
            $res['miniAppId'] = $this->miniAppId;
        }
        if (null !== $this->rollbackVersion) {
            $res['rollbackVersion'] = $this->rollbackVersion;
        }
        if (null !== $this->targetVersion) {
            $res['targetVersion'] = $this->targetVersion;
        }

        return $res;
    }

    /**
     * @param array $map
     *
     * @return RollBackVersionRequest
     */
    public static function fromMap($map = [])
    {
        $model = new self();
        if (isset($map['bundleId'])) {
            $model->bundleId = $map['bundleId'];
        }
        if (isset($map['miniAppId'])) {
            $model->miniAppId = $map['miniAppId'];
        }
        if (isset($map['rollbackVersion'])) {
            $model->rollbackVersion = $map['rollbackVersion'];
        }
        if (isset($map['targetVersion'])) {
            $model->targetVersion = $map['targetVersion'];
        }

        return $model;
    }
}
