<?php

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

namespace AlibabaCloud\SDK\Dingtalk\Vcard_1_0\Models\CreateAndDeliverWithDelegateRequest;

use AlibabaCloud\Tea\Model;

class imRobotOpenDeliverModel extends Model
{
    /**
     * @var string[]
     */
    public $extension;

    /**
     * @example dingg3xmqdkpaojuakm8
     *
     * @var string
     */
    public $robotCode;

    /**
     * @var string
     */
    public $spaceType;
    protected $_name = [
        'extension' => 'extension',
        'robotCode' => 'robotCode',
        'spaceType' => 'spaceType',
    ];

    public function validate() {}

    public function toMap()
    {
        $res = [];
        if (null !== $this->extension) {
            $res['extension'] = $this->extension;
        }
        if (null !== $this->robotCode) {
            $res['robotCode'] = $this->robotCode;
        }
        if (null !== $this->spaceType) {
            $res['spaceType'] = $this->spaceType;
        }

        return $res;
    }

    /**
     * @param array $map
     *
     * @return imRobotOpenDeliverModel
     */
    public static function fromMap($map = [])
    {
        $model = new self();
        if (isset($map['extension'])) {
            $model->extension = $map['extension'];
        }
        if (isset($map['robotCode'])) {
            $model->robotCode = $map['robotCode'];
        }
        if (isset($map['spaceType'])) {
            $model->spaceType = $map['spaceType'];
        }

        return $model;
    }
}
