<?php

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

namespace AlibabaCloud\SDK\Dingtalk\Vcontent_1_0\Models\UploadVideosResponseBody;

use AlibabaCloud\Tea\Model;

class result extends Model
{
    /**
     * @var string[]
     */
    public $failed;

    /**
     * @var int
     */
    public $hasUploaded;

    /**
     * @var int
     */
    public $success;

    /**
     * @var int
     */
    public $total;
    protected $_name = [
        'failed' => 'failed',
        'hasUploaded' => 'hasUploaded',
        'success' => 'success',
        'total' => 'total',
    ];

    public function validate() {}

    public function toMap()
    {
        $res = [];
        if (null !== $this->failed) {
            $res['failed'] = $this->failed;
        }
        if (null !== $this->hasUploaded) {
            $res['hasUploaded'] = $this->hasUploaded;
        }
        if (null !== $this->success) {
            $res['success'] = $this->success;
        }
        if (null !== $this->total) {
            $res['total'] = $this->total;
        }

        return $res;
    }

    /**
     * @param array $map
     *
     * @return result
     */
    public static function fromMap($map = [])
    {
        $model = new self();
        if (isset($map['failed'])) {
            if (!empty($map['failed'])) {
                $model->failed = $map['failed'];
            }
        }
        if (isset($map['hasUploaded'])) {
            $model->hasUploaded = $map['hasUploaded'];
        }
        if (isset($map['success'])) {
            $model->success = $map['success'];
        }
        if (isset($map['total'])) {
            $model->total = $map['total'];
        }

        return $model;
    }
}
