<?php

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

namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models;

use AlibabaCloud\Dara\Model;
use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetSmsSignResponseBody\auditInfo;
use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetSmsSignResponseBody\signIspRegisterDetailList;

class GetSmsSignResponseBody extends Model
{
    /**
     * @var int
     */
    public $appIcpRecordId;

    /**
     * @var string
     */
    public $applyScene;

    /**
     * @var auditInfo
     */
    public $auditInfo;

    /**
     * @var bool
     */
    public $authorizationLetterAuditPass;

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

    /**
     * @var string
     */
    public $code;

    /**
     * @var string
     */
    public $createDate;

    /**
     * @var string[]
     */
    public $fileUrlList;

    /**
     * @var string
     */
    public $message;

    /**
     * @var string
     */
    public $orderId;

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

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

    /**
     * @var string
     */
    public $remark;

    /**
     * @var string
     */
    public $requestId;

    /**
     * @var string
     */
    public $signCode;

    /**
     * @var signIspRegisterDetailList[]
     */
    public $signIspRegisterDetailList;

    /**
     * @var string
     */
    public $signName;

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

    /**
     * @var string
     */
    public $signTag;

    /**
     * @var string
     */
    public $signUsage;

    /**
     * @var bool
     */
    public $thirdParty;

    /**
     * @var int
     */
    public $trademarkId;
    protected $_name = [
        'appIcpRecordId' => 'AppIcpRecordId',
        'applyScene' => 'ApplyScene',
        'auditInfo' => 'AuditInfo',
        'authorizationLetterAuditPass' => 'AuthorizationLetterAuditPass',
        'authorizationLetterId' => 'AuthorizationLetterId',
        'code' => 'Code',
        'createDate' => 'CreateDate',
        'fileUrlList' => 'FileUrlList',
        'message' => 'Message',
        'orderId' => 'OrderId',
        'qualificationId' => 'QualificationId',
        'registerResult' => 'RegisterResult',
        'remark' => 'Remark',
        'requestId' => 'RequestId',
        'signCode' => 'SignCode',
        'signIspRegisterDetailList' => 'SignIspRegisterDetailList',
        'signName' => 'SignName',
        'signStatus' => 'SignStatus',
        'signTag' => 'SignTag',
        'signUsage' => 'SignUsage',
        'thirdParty' => 'ThirdParty',
        'trademarkId' => 'TrademarkId',
    ];

    public function validate()
    {
        if (null !== $this->auditInfo) {
            $this->auditInfo->validate();
        }
        if (\is_array($this->fileUrlList)) {
            Model::validateArray($this->fileUrlList);
        }
        if (\is_array($this->signIspRegisterDetailList)) {
            Model::validateArray($this->signIspRegisterDetailList);
        }
        parent::validate();
    }

    public function toArray($noStream = false)
    {
        $res = [];
        if (null !== $this->appIcpRecordId) {
            $res['AppIcpRecordId'] = $this->appIcpRecordId;
        }

        if (null !== $this->applyScene) {
            $res['ApplyScene'] = $this->applyScene;
        }

        if (null !== $this->auditInfo) {
            $res['AuditInfo'] = null !== $this->auditInfo ? $this->auditInfo->toArray($noStream) : $this->auditInfo;
        }

        if (null !== $this->authorizationLetterAuditPass) {
            $res['AuthorizationLetterAuditPass'] = $this->authorizationLetterAuditPass;
        }

        if (null !== $this->authorizationLetterId) {
            $res['AuthorizationLetterId'] = $this->authorizationLetterId;
        }

        if (null !== $this->code) {
            $res['Code'] = $this->code;
        }

        if (null !== $this->createDate) {
            $res['CreateDate'] = $this->createDate;
        }

        if (null !== $this->fileUrlList) {
            if (\is_array($this->fileUrlList)) {
                $res['FileUrlList'] = [];
                $n1 = 0;
                foreach ($this->fileUrlList as $item1) {
                    $res['FileUrlList'][$n1] = $item1;
                    ++$n1;
                }
            }
        }

        if (null !== $this->message) {
            $res['Message'] = $this->message;
        }

        if (null !== $this->orderId) {
            $res['OrderId'] = $this->orderId;
        }

        if (null !== $this->qualificationId) {
            $res['QualificationId'] = $this->qualificationId;
        }

        if (null !== $this->registerResult) {
            $res['RegisterResult'] = $this->registerResult;
        }

        if (null !== $this->remark) {
            $res['Remark'] = $this->remark;
        }

        if (null !== $this->requestId) {
            $res['RequestId'] = $this->requestId;
        }

        if (null !== $this->signCode) {
            $res['SignCode'] = $this->signCode;
        }

        if (null !== $this->signIspRegisterDetailList) {
            if (\is_array($this->signIspRegisterDetailList)) {
                $res['SignIspRegisterDetailList'] = [];
                $n1 = 0;
                foreach ($this->signIspRegisterDetailList as $item1) {
                    $res['SignIspRegisterDetailList'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1;
                    ++$n1;
                }
            }
        }

        if (null !== $this->signName) {
            $res['SignName'] = $this->signName;
        }

        if (null !== $this->signStatus) {
            $res['SignStatus'] = $this->signStatus;
        }

        if (null !== $this->signTag) {
            $res['SignTag'] = $this->signTag;
        }

        if (null !== $this->signUsage) {
            $res['SignUsage'] = $this->signUsage;
        }

        if (null !== $this->thirdParty) {
            $res['ThirdParty'] = $this->thirdParty;
        }

        if (null !== $this->trademarkId) {
            $res['TrademarkId'] = $this->trademarkId;
        }

        return $res;
    }

    public function toMap($noStream = false)
    {
        return $this->toArray($noStream);
    }

    public static function fromMap($map = [])
    {
        $model = new self();
        if (isset($map['AppIcpRecordId'])) {
            $model->appIcpRecordId = $map['AppIcpRecordId'];
        }

        if (isset($map['ApplyScene'])) {
            $model->applyScene = $map['ApplyScene'];
        }

        if (isset($map['AuditInfo'])) {
            $model->auditInfo = auditInfo::fromMap($map['AuditInfo']);
        }

        if (isset($map['AuthorizationLetterAuditPass'])) {
            $model->authorizationLetterAuditPass = $map['AuthorizationLetterAuditPass'];
        }

        if (isset($map['AuthorizationLetterId'])) {
            $model->authorizationLetterId = $map['AuthorizationLetterId'];
        }

        if (isset($map['Code'])) {
            $model->code = $map['Code'];
        }

        if (isset($map['CreateDate'])) {
            $model->createDate = $map['CreateDate'];
        }

        if (isset($map['FileUrlList'])) {
            if (!empty($map['FileUrlList'])) {
                $model->fileUrlList = [];
                $n1 = 0;
                foreach ($map['FileUrlList'] as $item1) {
                    $model->fileUrlList[$n1] = $item1;
                    ++$n1;
                }
            }
        }

        if (isset($map['Message'])) {
            $model->message = $map['Message'];
        }

        if (isset($map['OrderId'])) {
            $model->orderId = $map['OrderId'];
        }

        if (isset($map['QualificationId'])) {
            $model->qualificationId = $map['QualificationId'];
        }

        if (isset($map['RegisterResult'])) {
            $model->registerResult = $map['RegisterResult'];
        }

        if (isset($map['Remark'])) {
            $model->remark = $map['Remark'];
        }

        if (isset($map['RequestId'])) {
            $model->requestId = $map['RequestId'];
        }

        if (isset($map['SignCode'])) {
            $model->signCode = $map['SignCode'];
        }

        if (isset($map['SignIspRegisterDetailList'])) {
            if (!empty($map['SignIspRegisterDetailList'])) {
                $model->signIspRegisterDetailList = [];
                $n1 = 0;
                foreach ($map['SignIspRegisterDetailList'] as $item1) {
                    $model->signIspRegisterDetailList[$n1] = signIspRegisterDetailList::fromMap($item1);
                    ++$n1;
                }
            }
        }

        if (isset($map['SignName'])) {
            $model->signName = $map['SignName'];
        }

        if (isset($map['SignStatus'])) {
            $model->signStatus = $map['SignStatus'];
        }

        if (isset($map['SignTag'])) {
            $model->signTag = $map['SignTag'];
        }

        if (isset($map['SignUsage'])) {
            $model->signUsage = $map['SignUsage'];
        }

        if (isset($map['ThirdParty'])) {
            $model->thirdParty = $map['ThirdParty'];
        }

        if (isset($map['TrademarkId'])) {
            $model->trademarkId = $map['TrademarkId'];
        }

        return $model;
    }
}
