<?php

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

namespace AlibabaCloud\SDK\Dingtalk\Vwiki_2_0\Models;

use AlibabaCloud\SDK\Dingtalk\Vwiki_2_0\Models\GetNodesRequest\option;
use AlibabaCloud\Tea\Model;

class GetNodesRequest extends Model
{
    /**
     * @description This parameter is required.
     *
     * @var string[]
     */
    public $nodeIds;

    /**
     * @var option
     */
    public $option;

    /**
     * @description This parameter is required.
     *
     * @example union_id
     *
     * @var string
     */
    public $operatorId;
    protected $_name = [
        'nodeIds' => 'nodeIds',
        'option' => 'option',
        'operatorId' => 'operatorId',
    ];

    public function validate() {}

    public function toMap()
    {
        $res = [];
        if (null !== $this->nodeIds) {
            $res['nodeIds'] = $this->nodeIds;
        }
        if (null !== $this->option) {
            $res['option'] = null !== $this->option ? $this->option->toMap() : null;
        }
        if (null !== $this->operatorId) {
            $res['operatorId'] = $this->operatorId;
        }

        return $res;
    }

    /**
     * @param array $map
     *
     * @return GetNodesRequest
     */
    public static function fromMap($map = [])
    {
        $model = new self();
        if (isset($map['nodeIds'])) {
            if (!empty($map['nodeIds'])) {
                $model->nodeIds = $map['nodeIds'];
            }
        }
        if (isset($map['option'])) {
            $model->option = option::fromMap($map['option']);
        }
        if (isset($map['operatorId'])) {
            $model->operatorId = $map['operatorId'];
        }

        return $model;
    }
}
