From c7f85ffbdaa56c23d51d55d9687d8d4ab8bc648d Mon Sep 17 00:00:00 2001 From: Karlcarlo Date: Thu, 30 Apr 2026 15:19:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E9=98=BF=E9=87=8C?= =?UTF-8?q?=E4=BA=91=E7=9F=AD=E4=BF=A1=E6=9C=8D=E5=8A=A1=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=B9=B6=E4=BC=98=E5=8C=96=E9=AA=8C=E8=AF=81=E7=A0=81=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 引入 alibabacloud/dysmsapi-20170525 依赖,集成阿里云短信服务 - 将短信验证码从6位改为4位,优化用户体验 - 添加聚水潭商品按时间范围同步功能,支持分页拉取 - 增强Cron任务异常处理,添加错误日志记录 - 修复系统附件服务中图片路径处理逻辑 - 更新阿里云SDK相关组件至最新版本 - 添加think-trace调试扩展,便于问题排查 - 优化跨域中间件,使用str_contains替代strpos --- .../add-jst-product-sync-by-time/checklist.md | 5 + .../add-jst-product-sync-by-time/spec.md | 31 + .../add-jst-product-sync-by-time/tasks.md | 13 + .../wecom-addressbook-config/checklist.md | 7 + .trae/specs/wecom-addressbook-config/spec.md | 76 + .trae/specs/wecom-addressbook-config/tasks.md | 19 + adminapi_product_sync_jst_product_分析.md | 568 ++ app/command/BackfillProductSpu.php | 54 + app/command/TestJstSpu.php | 93 + app/controller/admin/Login.php | 4 +- .../admin/v1/product/StoreProduct.php | 146 +- .../admin/v1/statistic/OrderStatistic.php | 5 + app/controller/api/v1/Login.php | 14 +- app/controller/api/v1/system/UserApply.php | 2 +- app/controller/api/v1/user/Channel.php | 2 +- app/controller/api/v1/wechat/Wechat.php | 2 +- app/controller/api/v2/wechat/Routine.php | 4 +- app/controller/api/v2/wechat/Wechat.php | 2 +- app/controller/supplier/Common.php | 15 + app/controller/supplier/Login.php | 2 +- app/haichao/HaichaoBridge.php | 293 +- app/haichao/HaichaoJstServices.php | 166 +- .../callback/event/JstProductEvent.php | 73 +- app/haichao/sync/JstProductSync.php | 2 + app/haichao/sync/JstStorkSync.php | 87 +- app/http/middleware/AllowOriginMiddleware.php | 3 +- app/jobs/product/ProductSyncErp.php | 625 +- app/services/erp/OrderServices.php | 8 +- .../order/StoreOrderRefundServices.php | 13 + app/services/order/StoreOrderServices.php | 31 +- app/services/other/PrivacyPhoneServices.php | 82 +- app/services/other/export/ExportServices.php | 289 +- .../product/product/StoreProductServices.php | 31 +- .../statistic/OrderStatisticServices.php | 14 +- .../system/admin/SystemAdminServices.php | 2 +- .../attachment/SystemAttachmentServices.php | 2 +- app/services/user/LoginServices.php | 2 +- composer.json | 3 +- composer.lock | 283 +- config/console.php | 1 + .../services/erp/storage/jushuitan/Stock.php | 7 +- crmeb/services/sms/storage/Aliyun.php | 37 +- crmeb/utils/Cron.php | 10 +- init_jst_token.php | 62 + public/install/crmeb.sql | 2 - .../mp_view/pages/merchant/apply/index.wxml | 2 +- .../mp_view/pages/users/agent/apply.wxml | 2 +- .../pages/users/binding_phone/index.wxml | 2 +- .../pages/users/distributor/apply.wxml | 2 +- .../mp_view/pages/users/login/index.wxml | 2 +- .../pages/users/retrievePassword/index.wxml | 2 +- .../mp_view/pages/users/supplier/index.wxml | 2 +- .../mp_view/pages/users/user_phone/index.wxml | 2 +- .../pages/users/user_pwd_edit/index.wxml | 2 +- route/admin.php | 2 + test_db_config.php | 118 + test_debug.php | 40 + test_haichao.php | 123 + test_haichao_all.php | 115 + test_haichao_detail.php | 144 + test_haichao_json.php | 85 + test_jst_final_demo.php | 83 + test_simple.php | 71 + test_table.php | 14 + test_token.php | 130 + vendor/alibabacloud/credentials/CHANGELOG.md | 4 + .../alibabacloud/credentials/README-zh-CN.md | 367 +- vendor/alibabacloud/credentials/README.md | 361 +- vendor/alibabacloud/credentials/composer.json | 7 +- .../credentials/src/AccessKeyCredential.php | 16 +- .../credentials/src/BearerTokenCredential.php | 22 +- .../credentials/src/Credential.php | 282 +- .../credentials/src/Credential/Config.php | 266 +- .../src/Credential/CredentialModel.php | 143 + .../src/Credential/RefreshResult.php | 97 + .../credentials/src/Credentials.php | 4 +- .../credentials/src/CredentialsInterface.php | 9 + .../src/CredentialsProviderWrap.php | 76 + .../credentials/src/EcsRamRoleCredential.php | 64 +- .../alibabacloud/credentials/src/Filter.php | 134 - .../CLIProfileCredentialsProvider.php | 193 + .../src/Providers/ChainProvider.php | 5 +- .../credentials/src/Providers/Credentials.php | 87 + .../src/Providers/CredentialsProvider.php | 24 + .../Providers/DefaultCredentialsProvider.php | 175 + .../EcsRamRoleCredentialsProvider.php | 276 + .../src/Providers/EcsRamRoleProvider.php | 94 - ...EnvironmentVariableCredentialsProvider.php | 65 + .../OIDCRoleArnCredentialsProvider.php | 268 + .../Providers/ProfileCredentialsProvider.php | 188 + .../credentials/src/Providers/Provider.php | 82 - .../RamRoleArnCredentialsProvider.php | 321 + .../src/Providers/RamRoleArnProvider.php | 49 - .../RsaKeyPairCredentialsProvider.php | 200 + .../src/Providers/RsaKeyPairProvider.php | 53 - .../Providers/SessionCredentialsProvider.php | 161 + .../Providers/StaticAKCredentialsProvider.php | 78 + .../StaticSTSCredentialsProvider.php | 92 + .../src/Providers/URLCredentialsProvider.php | 126 + .../credentials/src/RamRoleArnCredential.php | 36 +- .../credentials/src/Request/AssumeRole.php | 37 - .../src/Request/GenerateSessionAccessKey.php | 33 - .../credentials/src/Request/Request.php | 118 +- .../credentials/src/RsaKeyPairCredential.php | 35 +- .../credentials/src/StsCredential.php | 23 +- .../credentials/src/Utils/Filter.php | 233 + .../credentials/src/{ => Utils}/Helper.php | 53 +- .../credentials/src/{ => Utils}/MockTrait.php | 26 +- .../.php_cs.dist | 0 vendor/alibabacloud/darabonba/CHANGELOG.md | 86 + vendor/alibabacloud/darabonba/LICENSE.md | 13 + vendor/alibabacloud/darabonba/README.md | 27 + vendor/alibabacloud/darabonba/composer.json | 77 + vendor/alibabacloud/darabonba/src/Dara.php | 372 ++ vendor/alibabacloud/darabonba/src/Date.php | 148 + .../darabonba/src/Exception/DaraException.php | 67 + .../src/Exception/DaraRespException.php | 88 + .../src/Exception/DaraRetryException.php | 21 + .../Exception/DaraUnableRetryException.php | 46 + vendor/alibabacloud/darabonba/src/File.php | 116 + vendor/alibabacloud/darabonba/src/Helper.php | 112 + vendor/alibabacloud/darabonba/src/Model.php | 138 + .../src/Models/ExtendsParameters.php | 39 + .../darabonba/src/Models/FileField.php | 22 + .../darabonba/src/Models/RuntimeOptions.php | 273 + .../darabonba/src/Models/SSEEvent.php | 76 + .../alibabacloud/darabonba/src/Parameter.php | 50 + vendor/alibabacloud/darabonba/src/Request.php | 123 + .../alibabacloud/darabonba/src/Response.php | 379 ++ .../src/RetryPolicy/BackoffPolicy.php | 46 + .../RetryPolicy/EqualJitterBackoffPolicy.php | 27 + .../RetryPolicy/ExponentialBackoffPolicy.php | 27 + .../src/RetryPolicy/FixedBackoffPolicy.php | 24 + .../RetryPolicy/FullJitterBackoffPolicy.php | 27 + .../src/RetryPolicy/RandomBackoffPolicy.php | 26 + .../src/RetryPolicy/RetryCondition.php | 62 + .../src/RetryPolicy/RetryOptions.php | 50 + .../src/RetryPolicy/RetryPolicyContext.php | 64 + vendor/alibabacloud/darabonba/src/Url.php | 152 + .../darabonba/src/Util/ArrayToXml.php | 151 + .../darabonba/src/Util/BytesUtil.php | 96 + .../darabonba/src/Util/Console.php | 116 + .../darabonba/src/Util/FileFormStream.php | 41 + .../src/Util/FileFormStreamTrait.php | 284 + .../src/Util/FileFormStreamTyped.php | 31 + .../darabonba/src/Util/FormUtil.php | 46 + .../darabonba/src/Util/MathUtil.php | 15 + .../darabonba/src/Util/StreamUtil.php | 182 + .../darabonba/src/Util/StringUtil.php | 61 + .../alibabacloud/darabonba/src/Util/XML.php | 61 + .../dysmsapi-20170525/.php-cs-fixer.dist.php | 66 + .../dysmsapi-20170525/ChangeLog.md | 159 + .../dysmsapi-20170525/autoload.php | 2 +- .../dysmsapi-20170525/bootstrap.php | 3 + .../dysmsapi-20170525/composer.json | 18 +- .../dysmsapi-20170525/src/Dysmsapi.php | 5842 +++++++++++++++-- .../src/Models/AddExtCodeSignRequest.php | 104 + .../src/Models/AddExtCodeSignResponse.php | 92 + .../src/Models/AddExtCodeSignResponseBody.php | 118 + .../src/Models/AddShortUrlRequest.php | 35 +- .../src/Models/AddShortUrlResponse.php | 48 +- .../src/Models/AddShortUrlResponseBody.php | 32 +- .../Models/AddShortUrlResponseBody/data.php | 23 +- .../src/Models/AddSmsSignRequest.php | 64 +- .../Models/AddSmsSignRequest/signFileList.php | 19 +- .../src/Models/AddSmsSignResponse.php | 48 +- .../src/Models/AddSmsSignResponseBody.php | 27 +- .../src/Models/AddSmsTemplateRequest.php | 39 +- .../src/Models/AddSmsTemplateResponse.php | 48 +- .../src/Models/AddSmsTemplateResponseBody.php | 27 +- .../ChangeSignatureQualificationRequest.php | 118 + .../ChangeSignatureQualificationResponse.php | 92 + ...angeSignatureQualificationResponseBody.php | 122 + .../data.php | 103 + .../Models/CheckMobilesCardSupportRequest.php | 48 +- .../CheckMobilesCardSupportResponse.php | 48 +- .../CheckMobilesCardSupportResponseBody.php | 39 +- .../data.php | 66 + .../data/queryResult.php | 62 + .../src/Models/ConversionDataIntlRequest.php | 104 + .../src/Models/ConversionDataIntlResponse.php | 92 + .../Models/ConversionDataIntlResponseBody.php | 76 + .../Models/CreateCardSmsTemplateRequest.php | 44 +- .../Models/CreateCardSmsTemplateResponse.php | 48 +- .../CreateCardSmsTemplateResponseBody.php | 32 +- .../data.php | 15 +- .../CreateCardSmsTemplateShrinkRequest.php | 27 +- .../Models/CreateDigitalSignOrderRequest.php | 229 + .../Models/CreateDigitalSignOrderResponse.php | 92 + .../CreateDigitalSignOrderResponseBody.php | 131 + .../CreateDigitalSignOrderShrinkRequest.php | 216 + .../CreateDigitalSmsTemplateRequest.php | 150 + .../templateContents.php | 90 + .../CreateDigitalSmsTemplateResponse.php | 92 + .../CreateDigitalSmsTemplateResponseBody.php | 90 + .../src/Models/CreateSmartShortUrlRequest.php | 118 + .../Models/CreateSmartShortUrlResponse.php | 92 + .../CreateSmartShortUrlResponseBody.php | 108 + .../model_.php | 104 + .../Models/CreateSmsAppIcpRecordRequest.php | 160 + .../Models/CreateSmsAppIcpRecordResponse.php | 92 + .../CreateSmsAppIcpRecordResponseBody.php | 118 + .../CreateSmsAuthorizationLetterRequest.php | 191 + .../CreateSmsAuthorizationLetterResponse.php | 92 + ...eateSmsAuthorizationLetterResponseBody.php | 118 + ...ateSmsAuthorizationLetterShrinkRequest.php | 174 + .../src/Models/CreateSmsSignRequest.php | 247 + .../src/Models/CreateSmsSignResponse.php | 92 + .../src/Models/CreateSmsSignResponseBody.php | 104 + .../src/Models/CreateSmsSignShrinkRequest.php | 230 + .../src/Models/CreateSmsTemplateRequest.php | 233 + .../src/Models/CreateSmsTemplateResponse.php | 92 + .../Models/CreateSmsTemplateResponseBody.php | 118 + .../Models/CreateSmsTemplateShrinkRequest.php | 216 + .../src/Models/CreateSmsTrademarkRequest.php | 146 + .../src/Models/CreateSmsTrademarkResponse.php | 92 + .../Models/CreateSmsTrademarkResponseBody.php | 118 + .../src/Models/DeleteExtCodeSignRequest.php | 104 + .../src/Models/DeleteExtCodeSignResponse.php | 92 + .../Models/DeleteExtCodeSignResponseBody.php | 118 + .../src/Models/DeleteShortUrlRequest.php | 27 +- .../src/Models/DeleteShortUrlResponse.php | 48 +- .../src/Models/DeleteShortUrlResponseBody.php | 23 +- .../Models/DeleteSmsQualificationRequest.php | 104 + .../Models/DeleteSmsQualificationResponse.php | 92 + .../DeleteSmsQualificationResponseBody.php | 118 + .../src/Models/DeleteSmsSignRequest.php | 27 +- .../src/Models/DeleteSmsSignResponse.php | 48 +- .../src/Models/DeleteSmsSignResponseBody.php | 27 +- .../src/Models/DeleteSmsTemplateRequest.php | 27 +- .../src/Models/DeleteSmsTemplateResponse.php | 48 +- .../Models/DeleteSmsTemplateResponseBody.php | 27 +- .../src/Models/GetCardSmsDetailsRequest.php | 174 + .../src/Models/GetCardSmsDetailsResponse.php | 92 + .../Models/GetCardSmsDetailsResponseBody.php | 108 + .../cardSendDetailDTO.php | 108 + .../cardSendDetailDTO/records.php | 188 + .../src/Models/GetCardSmsLinkRequest.php | 47 +- .../src/Models/GetCardSmsLinkResponse.php | 48 +- .../src/Models/GetCardSmsLinkResponseBody.php | 32 +- .../GetCardSmsLinkResponseBody/data.php | 31 +- .../src/Models/GetMediaResourceIdRequest.php | 31 +- .../src/Models/GetMediaResourceIdResponse.php | 48 +- .../Models/GetMediaResourceIdResponseBody.php | 32 +- .../GetMediaResourceIdResponseBody/data.php | 29 +- .../GetOSSInfoForCardTemplateResponse.php | 48 +- .../GetOSSInfoForCardTemplateResponseBody.php | 32 +- .../data.php | 43 +- .../Models/GetOSSInfoForUploadFileRequest.php | 90 + .../GetOSSInfoForUploadFileResponse.php | 92 + .../GetOSSInfoForUploadFileResponseBody.php | 108 + .../model_.php | 118 + .../Models/GetQualificationOssInfoRequest.php | 90 + .../GetQualificationOssInfoResponse.php | 92 + .../GetQualificationOssInfoResponseBody.php | 122 + .../data.php | 118 + .../src/Models/GetSmsOcrOssInfoRequest.php | 90 + .../src/Models/GetSmsOcrOssInfoResponse.php | 92 + .../Models/GetSmsOcrOssInfoResponseBody.php | 122 + .../GetSmsOcrOssInfoResponseBody/model_.php | 132 + .../src/Models/GetSmsSignRequest.php | 90 + .../src/Models/GetSmsSignResponse.php | 92 + .../src/Models/GetSmsSignResponseBody.php | 381 ++ .../GetSmsSignResponseBody/auditInfo.php | 62 + .../signIspRegisterDetailList.php | 108 + .../registerStatusReasons.php | 79 + .../src/Models/GetSmsTemplateListRequest.php | 219 + .../src/Models/GetSmsTemplateListResponse.php | 92 + .../Models/GetSmsTemplateListResponseBody.php | 122 + .../GetSmsTemplateListResponseBody/data.php | 108 + .../data/list_.php | 209 + .../data/list_/templateTag.php | 62 + .../GetSmsTemplateListShrinkRequest.php | 202 + .../src/Models/GetSmsTemplateRequest.php | 90 + .../src/Models/GetSmsTemplateResponse.php | 92 + .../src/Models/GetSmsTemplateResponseBody.php | 357 + .../GetSmsTemplateResponseBody/auditInfo.php | 62 + .../fileUrlList.php | 65 + .../moreDataFileUrlList.php | 65 + .../GetSmsTemplateResponseBody/signList.php | 65 + .../src/Models/ListTagResourcesRequest.php | 91 +- .../Models/ListTagResourcesRequest/tag.php | 19 +- .../src/Models/ListTagResourcesResponse.php | 48 +- .../Models/ListTagResourcesResponseBody.php | 32 +- .../tagResources.php | 36 +- .../tagResources/tagResource.php | 27 +- .../src/Models/ModifySmsSignRequest.php | 64 +- .../ModifySmsSignRequest/signFileList.php | 19 +- .../src/Models/ModifySmsSignResponse.php | 48 +- .../src/Models/ModifySmsSignResponseBody.php | 27 +- .../src/Models/ModifySmsTemplateRequest.php | 43 +- .../src/Models/ModifySmsTemplateResponse.php | 48 +- .../Models/ModifySmsTemplateResponseBody.php | 27 +- .../QueryCardSmsTemplateReportRequest.php | 42 +- .../QueryCardSmsTemplateReportResponse.php | 48 +- ...QueryCardSmsTemplateReportResponseBody.php | 39 +- .../data.php | 75 + .../Models/QueryCardSmsTemplateRequest.php | 15 +- .../Models/QueryCardSmsTemplateResponse.php | 48 +- .../QueryCardSmsTemplateResponseBody.php | 32 +- .../QueryCardSmsTemplateResponseBody/data.php | 44 +- .../Models/QueryDigitalSignByNameRequest.php | 90 + .../Models/QueryDigitalSignByNameResponse.php | 92 + .../QueryDigitalSignByNameResponseBody.php | 131 + .../src/Models/QueryExtCodeSignRequest.php | 132 + .../src/Models/QueryExtCodeSignResponse.php | 92 + .../Models/QueryExtCodeSignResponseBody.php | 122 + .../QueryExtCodeSignResponseBody/data.php | 108 + .../data/list_.php | 104 + .../Models/QueryMobilesCardSupportRequest.php | 103 + .../QueryMobilesCardSupportResponse.php | 92 + .../QueryMobilesCardSupportResponseBody.php | 94 + .../data.php | 66 + .../data/queryResult.php | 62 + .../QueryMobilesCardSupportShrinkRequest.php | 76 + .../QueryPageSmartShortUrlLogRequest.php | 160 + .../QueryPageSmartShortUrlLogResponse.php | 92 + .../QueryPageSmartShortUrlLogResponseBody.php | 108 + .../model/list_.php | 118 + .../model_.php | 122 + .../src/Models/QuerySendDetailsRequest.php | 43 +- .../src/Models/QuerySendDetailsResponse.php | 48 +- .../Models/QuerySendDetailsResponseBody.php | 36 +- .../smsSendDetailDTOs.php | 36 +- .../smsSendDetailDTOs/smsSendDetailDTO.php | 43 +- .../src/Models/QuerySendStatisticsRequest.php | 71 +- .../Models/QuerySendStatisticsResponse.php | 48 +- .../QuerySendStatisticsResponseBody.php | 32 +- .../QuerySendStatisticsResponseBody/data.php | 40 +- .../data/targetList.php | 31 +- .../src/Models/QueryShortUrlRequest.php | 27 +- .../src/Models/QueryShortUrlResponse.php | 48 +- .../src/Models/QueryShortUrlResponseBody.php | 32 +- .../Models/QueryShortUrlResponseBody/data.php | 43 +- .../QuerySingleSmsQualificationRequest.php | 104 + .../QuerySingleSmsQualificationResponse.php | 92 + ...uerySingleSmsQualificationResponseBody.php | 122 + .../data.php | 420 ++ .../data/businessLicensePics.php | 76 + .../data/otherFiles.php | 62 + .../Models/QuerySmsAppIcpRecordRequest.php | 107 + .../Models/QuerySmsAppIcpRecordResponse.php | 92 + .../QuerySmsAppIcpRecordResponseBody.php | 136 + .../QuerySmsAppIcpRecordResponseBody/data.php | 146 + .../QuerySmsAppIcpRecordShrinkRequest.php | 90 + .../QuerySmsAuthorizationLetterRequest.php | 163 + .../QuerySmsAuthorizationLetterResponse.php | 92 + ...uerySmsAuthorizationLetterResponseBody.php | 136 + .../data.php | 174 + ...erySmsAuthorizationLetterShrinkRequest.php | 146 + .../QuerySmsQualificationRecordRequest.php | 188 + .../QuerySmsQualificationRecordResponse.php | 92 + ...uerySmsQualificationRecordResponseBody.php | 122 + .../data.php | 108 + .../data/list_.php | 174 + .../src/Models/QuerySmsSignListRequest.php | 31 +- .../src/Models/QuerySmsSignListResponse.php | 48 +- .../Models/QuerySmsSignListResponseBody.php | 58 +- .../smsSignList.php | 96 +- .../smsSignList/reason.php | 23 +- .../src/Models/QuerySmsSignRequest.php | 27 +- .../src/Models/QuerySmsSignResponse.php | 48 +- .../src/Models/QuerySmsSignResponseBody.php | 37 +- .../Models/QuerySmsTemplateListRequest.php | 31 +- .../Models/QuerySmsTemplateListResponse.php | 48 +- .../QuerySmsTemplateListResponseBody.php | 60 +- .../smsTemplateList.php | 80 +- .../smsTemplateList/reason.php | 23 +- .../src/Models/QuerySmsTemplateRequest.php | 27 +- .../src/Models/QuerySmsTemplateResponse.php | 48 +- .../Models/QuerySmsTemplateResponseBody.php | 51 +- .../src/Models/QuerySmsTrademarkRequest.php | 107 + .../src/Models/QuerySmsTrademarkResponse.php | 92 + .../Models/QuerySmsTrademarkResponseBody.php | 136 + .../QuerySmsTrademarkResponseBody/data.php | 132 + .../Models/QuerySmsTrademarkShrinkRequest.php | 90 + .../src/Models/RequiredPhoneCodeRequest.php | 90 + .../src/Models/RequiredPhoneCodeResponse.php | 92 + .../Models/RequiredPhoneCodeResponseBody.php | 118 + .../src/Models/SendBatchCardSmsRequest.php | 83 +- .../src/Models/SendBatchCardSmsResponse.php | 48 +- .../Models/SendBatchCardSmsResponseBody.php | 32 +- .../SendBatchCardSmsResponseBody/data.php | 35 +- .../src/Models/SendBatchSmsRequest.php | 57 +- .../src/Models/SendBatchSmsResponse.php | 48 +- .../src/Models/SendBatchSmsResponseBody.php | 27 +- .../src/Models/SendCardSmsRequest.php | 100 +- .../Models/SendCardSmsRequest/cardObjects.php | 23 +- .../src/Models/SendCardSmsResponse.php | 48 +- .../src/Models/SendCardSmsResponseBody.php | 32 +- .../Models/SendCardSmsResponseBody/data.php | 35 +- .../src/Models/SendLogisticsSmsRequest.php | 174 + .../src/Models/SendLogisticsSmsResponse.php | 92 + .../Models/SendLogisticsSmsResponseBody.php | 122 + .../SendLogisticsSmsResponseBody/data.php | 48 + .../src/Models/SendSmsRequest.php | 47 +- .../src/Models/SendSmsResponse.php | 48 +- .../src/Models/SendSmsResponseBody.php | 27 +- .../src/Models/SmsConversionIntlRequest.php | 118 + .../src/Models/SmsConversionIntlResponse.php | 92 + .../Models/SmsConversionIntlResponseBody.php | 76 + .../Models/SubmitSmsQualificationRequest.php | 448 ++ .../businessLicensePics.php | 62 + .../otherFiles.php | 48 + .../Models/SubmitSmsQualificationResponse.php | 92 + .../SubmitSmsQualificationResponseBody.php | 118 + .../SubmitSmsQualificationShrinkRequest.php | 412 ++ .../src/Models/TagResourcesRequest.php | 83 +- .../src/Models/TagResourcesRequest/tag.php | 19 +- .../src/Models/TagResourcesResponse.php | 48 +- .../src/Models/TagResourcesResponseBody.php | 23 +- .../src/Models/UntagResourcesRequest.php | 85 +- .../src/Models/UntagResourcesResponse.php | 48 +- .../src/Models/UntagResourcesResponseBody.php | 23 +- .../src/Models/UpdateExtCodeSignRequest.php | 118 + .../src/Models/UpdateExtCodeSignResponse.php | 92 + .../Models/UpdateExtCodeSignResponseBody.php | 118 + .../Models/UpdateSmsQualificationRequest.php | 392 ++ .../businessLicensePics.php | 62 + .../otherFiles.php | 48 + .../Models/UpdateSmsQualificationResponse.php | 92 + .../UpdateSmsQualificationResponseBody.php | 118 + .../UpdateSmsQualificationShrinkRequest.php | 356 + .../src/Models/UpdateSmsSignRequest.php | 247 + .../src/Models/UpdateSmsSignResponse.php | 92 + .../src/Models/UpdateSmsSignResponseBody.php | 104 + .../src/Models/UpdateSmsSignShrinkRequest.php | 230 + .../src/Models/UpdateSmsTemplateRequest.php | 247 + .../src/Models/UpdateSmsTemplateResponse.php | 92 + .../Models/UpdateSmsTemplateResponseBody.php | 118 + .../Models/UpdateSmsTemplateShrinkRequest.php | 230 + .../src/Models/ValidPhoneCodeRequest.php | 104 + .../src/Models/ValidPhoneCodeResponse.php | 92 + .../src/Models/ValidPhoneCodeResponseBody.php | 118 + .../VerifyLogisticsSmsMailNoRequest.php | 118 + .../VerifyLogisticsSmsMailNoResponse.php | 92 + .../VerifyLogisticsSmsMailNoResponseBody.php | 122 + .../data.php | 76 + vendor/alibabacloud/gateway-spi/.gitignore | 15 + vendor/alibabacloud/gateway-spi/.php_cs.dist | 65 + vendor/alibabacloud/gateway-spi/autoload.php | 15 + vendor/alibabacloud/gateway-spi/composer.json | 30 + .../alibabacloud/gateway-spi/src/Client.php | 35 + .../gateway-spi/src/Models/AttributeMap.php | 47 + .../src/Models/InterceptorContext.php | 63 + .../InterceptorContext/configuration.php | 83 + .../src/Models/InterceptorContext/request.php | 220 + .../Models/InterceptorContext/response.php | 54 + vendor/alibabacloud/openapi-core/.gitignore | 15 + vendor/alibabacloud/openapi-core/.php_cs.dist | 65 + vendor/alibabacloud/openapi-core/README-CN.md | 31 + vendor/alibabacloud/openapi-core/README.md | 31 + vendor/alibabacloud/openapi-core/autoload.php | 15 + .../alibabacloud/openapi-core/bootstrap.php | 3 + .../alibabacloud/openapi-core/composer.json | 40 + vendor/alibabacloud/openapi-core/phpunit.xml | 31 + .../src/Exceptions/AlibabaCloudException.php | 60 + .../src/Exceptions/ClientException.php | 25 + .../src/Exceptions/ServerException.php | 13 + .../src/Exceptions/ThrottlingException.php | 25 + .../openapi-core/src/Models/Config.php | 464 ++ .../src/Models/GlobalParameters.php | 87 + .../src/Models/OpenApiRequest.php | 153 + .../openapi-core/src/Models/Params.php | 160 + .../openapi-core/src/Models/SSEResponse.php | 91 + .../openapi-core/src/OpenApiClient.php | 1861 ++++++ vendor/alibabacloud/openapi-core/src/Sm3.php | 183 + .../alibabacloud/openapi-core/src/Utils.php | 770 +++ .../openapi-core/tests/Mock/MockServer.php | 173 + .../openapi-core/tests/OpenApiClientTest.php | 512 ++ .../openapi-core/tests/UtilsTest.php | 586 ++ .../openapi-core/tests/bootstrap.php | 3 + vendor/bin/var-dump-server | 119 + vendor/bin/var-dump-server.bat | 5 + vendor/composer/autoload_classmap.php | 460 ++ vendor/composer/autoload_files.php | 5 +- vendor/composer/autoload_psr4.php | 7 + vendor/composer/autoload_static.php | 500 +- vendor/composer/installed.json | 454 +- vendor/composer/installed.php | 77 +- vendor/services.php | 3 +- vendor/symfony/var-dumper/CHANGELOG.md | 72 + .../symfony/var-dumper/Caster/AmqpCaster.php | 212 + vendor/symfony/var-dumper/Caster/ArgsStub.php | 80 + vendor/symfony/var-dumper/Caster/Caster.php | 170 + .../symfony/var-dumper/Caster/ClassStub.php | 106 + .../symfony/var-dumper/Caster/ConstStub.php | 33 + .../var-dumper/Caster/CutArrayStub.php | 30 + vendor/symfony/var-dumper/Caster/CutStub.php | 64 + .../symfony/var-dumper/Caster/DOMCaster.php | 304 + .../symfony/var-dumper/Caster/DateCaster.php | 127 + .../var-dumper/Caster/DoctrineCaster.php | 62 + vendor/symfony/var-dumper/Caster/DsCaster.php | 70 + .../symfony/var-dumper/Caster/DsPairStub.php | 28 + vendor/symfony/var-dumper/Caster/EnumStub.php | 30 + .../var-dumper/Caster/ExceptionCaster.php | 388 ++ .../symfony/var-dumper/Caster/FiberCaster.php | 43 + .../symfony/var-dumper/Caster/FrameStub.php | 30 + .../symfony/var-dumper/Caster/GmpCaster.php | 32 + .../var-dumper/Caster/ImagineCaster.php | 37 + vendor/symfony/var-dumper/Caster/ImgStub.php | 26 + .../symfony/var-dumper/Caster/IntlCaster.php | 172 + vendor/symfony/var-dumper/Caster/LinkStub.php | 108 + .../var-dumper/Caster/MemcachedCaster.php | 81 + .../var-dumper/Caster/MysqliCaster.php | 33 + .../symfony/var-dumper/Caster/PdoCaster.php | 122 + .../symfony/var-dumper/Caster/PgSqlCaster.php | 156 + .../var-dumper/Caster/ProxyManagerCaster.php | 33 + .../var-dumper/Caster/RdKafkaCaster.php | 186 + .../symfony/var-dumper/Caster/RedisCaster.php | 149 + .../var-dumper/Caster/ReflectionCaster.php | 440 ++ .../var-dumper/Caster/ResourceCaster.php | 100 + .../symfony/var-dumper/Caster/SplCaster.php | 234 + .../symfony/var-dumper/Caster/StubCaster.php | 84 + .../var-dumper/Caster/SymfonyCaster.php | 97 + .../symfony/var-dumper/Caster/TraceStub.php | 36 + .../symfony/var-dumper/Caster/UuidCaster.php | 30 + .../var-dumper/Caster/XmlReaderCaster.php | 91 + .../var-dumper/Caster/XmlResourceCaster.php | 63 + .../var-dumper/Cloner/AbstractCloner.php | 388 ++ .../var-dumper/Cloner/ClonerInterface.php | 23 + vendor/symfony/var-dumper/Cloner/Cursor.php | 43 + vendor/symfony/var-dumper/Cloner/Data.php | 422 ++ .../var-dumper/Cloner/DumperInterface.php | 53 + vendor/symfony/var-dumper/Cloner/Stub.php | 67 + .../symfony/var-dumper/Cloner/VarCloner.php | 286 + .../Command/Descriptor/CliDescriptor.php | 79 + .../Descriptor/DumpDescriptorInterface.php | 23 + .../Command/Descriptor/HtmlDescriptor.php | 119 + .../var-dumper/Command/ServerDumpCommand.php | 112 + .../var-dumper/Dumper/AbstractDumper.php | 197 + .../symfony/var-dumper/Dumper/CliDumper.php | 643 ++ .../ContextProvider/CliContextProvider.php | 32 + .../ContextProviderInterface.php | 22 + .../RequestContextProvider.php | 51 + .../ContextProvider/SourceContextProvider.php | 126 + .../Dumper/ContextualizedDumper.php | 43 + .../var-dumper/Dumper/DataDumperInterface.php | 24 + .../symfony/var-dumper/Dumper/HtmlDumper.php | 986 +++ .../var-dumper/Dumper/ServerDumper.php | 53 + .../Exception/ThrowingCasterException.php | 26 + vendor/symfony/var-dumper/LICENSE | 19 + vendor/symfony/var-dumper/README.md | 15 + .../var-dumper/Resources/bin/var-dump-server | 67 + .../Resources/css/htmlDescriptor.css | 130 + .../var-dumper/Resources/functions/dump.php | 50 + .../var-dumper/Resources/js/htmlDescriptor.js | 10 + .../symfony/var-dumper/Server/Connection.php | 99 + .../symfony/var-dumper/Server/DumpServer.php | 115 + .../var-dumper/Test/VarDumperTestTrait.php | 84 + vendor/symfony/var-dumper/VarDumper.php | 112 + vendor/symfony/var-dumper/composer.json | 49 + vendor/topthink/think-trace/.gitignore | 1 + vendor/topthink/think-trace/LICENSE | 201 + vendor/topthink/think-trace/README.md | 15 + vendor/topthink/think-trace/composer.json | 31 + vendor/topthink/think-trace/src/Console.php | 173 + vendor/topthink/think-trace/src/Html.php | 126 + vendor/topthink/think-trace/src/Service.php | 21 + .../topthink/think-trace/src/TraceDebug.php | 109 + vendor/topthink/think-trace/src/config.php | 10 + .../think-trace/src/tpl/page_trace.tpl | 71 + 商城商品推送到聚水潭分析.md | 465 ++ 聚水潭商品拉取测试报告.md | 159 + 聚水潭测试指南.md | 138 + 565 files changed, 59742 insertions(+), 3391 deletions(-) create mode 100644 .trae/specs/add-jst-product-sync-by-time/checklist.md create mode 100644 .trae/specs/add-jst-product-sync-by-time/spec.md create mode 100644 .trae/specs/add-jst-product-sync-by-time/tasks.md create mode 100644 .trae/specs/wecom-addressbook-config/checklist.md create mode 100644 .trae/specs/wecom-addressbook-config/spec.md create mode 100644 .trae/specs/wecom-addressbook-config/tasks.md create mode 100644 adminapi_product_sync_jst_product_分析.md create mode 100644 app/command/BackfillProductSpu.php create mode 100644 app/command/TestJstSpu.php create mode 100644 init_jst_token.php create mode 100644 test_db_config.php create mode 100644 test_debug.php create mode 100644 test_haichao.php create mode 100644 test_haichao_all.php create mode 100644 test_haichao_detail.php create mode 100644 test_haichao_json.php create mode 100644 test_jst_final_demo.php create mode 100644 test_simple.php create mode 100644 test_table.php create mode 100644 test_token.php create mode 100644 vendor/alibabacloud/credentials/src/Credential/CredentialModel.php create mode 100644 vendor/alibabacloud/credentials/src/Credential/RefreshResult.php create mode 100644 vendor/alibabacloud/credentials/src/CredentialsProviderWrap.php delete mode 100644 vendor/alibabacloud/credentials/src/Filter.php create mode 100644 vendor/alibabacloud/credentials/src/Providers/CLIProfileCredentialsProvider.php create mode 100644 vendor/alibabacloud/credentials/src/Providers/Credentials.php create mode 100644 vendor/alibabacloud/credentials/src/Providers/CredentialsProvider.php create mode 100644 vendor/alibabacloud/credentials/src/Providers/DefaultCredentialsProvider.php create mode 100644 vendor/alibabacloud/credentials/src/Providers/EcsRamRoleCredentialsProvider.php delete mode 100644 vendor/alibabacloud/credentials/src/Providers/EcsRamRoleProvider.php create mode 100644 vendor/alibabacloud/credentials/src/Providers/EnvironmentVariableCredentialsProvider.php create mode 100644 vendor/alibabacloud/credentials/src/Providers/OIDCRoleArnCredentialsProvider.php create mode 100644 vendor/alibabacloud/credentials/src/Providers/ProfileCredentialsProvider.php delete mode 100644 vendor/alibabacloud/credentials/src/Providers/Provider.php create mode 100644 vendor/alibabacloud/credentials/src/Providers/RamRoleArnCredentialsProvider.php delete mode 100644 vendor/alibabacloud/credentials/src/Providers/RamRoleArnProvider.php create mode 100644 vendor/alibabacloud/credentials/src/Providers/RsaKeyPairCredentialsProvider.php delete mode 100644 vendor/alibabacloud/credentials/src/Providers/RsaKeyPairProvider.php create mode 100644 vendor/alibabacloud/credentials/src/Providers/SessionCredentialsProvider.php create mode 100644 vendor/alibabacloud/credentials/src/Providers/StaticAKCredentialsProvider.php create mode 100644 vendor/alibabacloud/credentials/src/Providers/StaticSTSCredentialsProvider.php create mode 100644 vendor/alibabacloud/credentials/src/Providers/URLCredentialsProvider.php delete mode 100644 vendor/alibabacloud/credentials/src/Request/AssumeRole.php delete mode 100644 vendor/alibabacloud/credentials/src/Request/GenerateSessionAccessKey.php create mode 100644 vendor/alibabacloud/credentials/src/Utils/Filter.php rename vendor/alibabacloud/credentials/src/{ => Utils}/Helper.php (76%) rename vendor/alibabacloud/credentials/src/{ => Utils}/MockTrait.php (81%) rename vendor/alibabacloud/{dysmsapi-20170525 => darabonba}/.php_cs.dist (100%) create mode 100644 vendor/alibabacloud/darabonba/CHANGELOG.md create mode 100644 vendor/alibabacloud/darabonba/LICENSE.md create mode 100644 vendor/alibabacloud/darabonba/README.md create mode 100644 vendor/alibabacloud/darabonba/composer.json create mode 100644 vendor/alibabacloud/darabonba/src/Dara.php create mode 100644 vendor/alibabacloud/darabonba/src/Date.php create mode 100644 vendor/alibabacloud/darabonba/src/Exception/DaraException.php create mode 100644 vendor/alibabacloud/darabonba/src/Exception/DaraRespException.php create mode 100644 vendor/alibabacloud/darabonba/src/Exception/DaraRetryException.php create mode 100644 vendor/alibabacloud/darabonba/src/Exception/DaraUnableRetryException.php create mode 100644 vendor/alibabacloud/darabonba/src/File.php create mode 100644 vendor/alibabacloud/darabonba/src/Helper.php create mode 100644 vendor/alibabacloud/darabonba/src/Model.php create mode 100644 vendor/alibabacloud/darabonba/src/Models/ExtendsParameters.php create mode 100644 vendor/alibabacloud/darabonba/src/Models/FileField.php create mode 100644 vendor/alibabacloud/darabonba/src/Models/RuntimeOptions.php create mode 100644 vendor/alibabacloud/darabonba/src/Models/SSEEvent.php create mode 100644 vendor/alibabacloud/darabonba/src/Parameter.php create mode 100644 vendor/alibabacloud/darabonba/src/Request.php create mode 100644 vendor/alibabacloud/darabonba/src/Response.php create mode 100644 vendor/alibabacloud/darabonba/src/RetryPolicy/BackoffPolicy.php create mode 100644 vendor/alibabacloud/darabonba/src/RetryPolicy/EqualJitterBackoffPolicy.php create mode 100644 vendor/alibabacloud/darabonba/src/RetryPolicy/ExponentialBackoffPolicy.php create mode 100644 vendor/alibabacloud/darabonba/src/RetryPolicy/FixedBackoffPolicy.php create mode 100644 vendor/alibabacloud/darabonba/src/RetryPolicy/FullJitterBackoffPolicy.php create mode 100644 vendor/alibabacloud/darabonba/src/RetryPolicy/RandomBackoffPolicy.php create mode 100644 vendor/alibabacloud/darabonba/src/RetryPolicy/RetryCondition.php create mode 100644 vendor/alibabacloud/darabonba/src/RetryPolicy/RetryOptions.php create mode 100644 vendor/alibabacloud/darabonba/src/RetryPolicy/RetryPolicyContext.php create mode 100644 vendor/alibabacloud/darabonba/src/Url.php create mode 100644 vendor/alibabacloud/darabonba/src/Util/ArrayToXml.php create mode 100644 vendor/alibabacloud/darabonba/src/Util/BytesUtil.php create mode 100644 vendor/alibabacloud/darabonba/src/Util/Console.php create mode 100644 vendor/alibabacloud/darabonba/src/Util/FileFormStream.php create mode 100644 vendor/alibabacloud/darabonba/src/Util/FileFormStreamTrait.php create mode 100644 vendor/alibabacloud/darabonba/src/Util/FileFormStreamTyped.php create mode 100644 vendor/alibabacloud/darabonba/src/Util/FormUtil.php create mode 100644 vendor/alibabacloud/darabonba/src/Util/MathUtil.php create mode 100644 vendor/alibabacloud/darabonba/src/Util/StreamUtil.php create mode 100644 vendor/alibabacloud/darabonba/src/Util/StringUtil.php create mode 100644 vendor/alibabacloud/darabonba/src/Util/XML.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/.php-cs-fixer.dist.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/bootstrap.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/AddExtCodeSignRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/AddExtCodeSignResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/AddExtCodeSignResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/ChangeSignatureQualificationRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/ChangeSignatureQualificationResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/ChangeSignatureQualificationResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/ChangeSignatureQualificationResponseBody/data.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportResponseBody/data.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportResponseBody/data/queryResult.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/ConversionDataIntlRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/ConversionDataIntlResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/ConversionDataIntlResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSignOrderRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSignOrderResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSignOrderResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSignOrderShrinkRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSmsTemplateRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSmsTemplateRequest/templateContents.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSmsTemplateResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSmsTemplateResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmartShortUrlRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmartShortUrlResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmartShortUrlResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmartShortUrlResponseBody/model_.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAppIcpRecordRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAppIcpRecordResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAppIcpRecordResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAuthorizationLetterRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAuthorizationLetterResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAuthorizationLetterResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAuthorizationLetterShrinkRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsSignRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsSignResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsSignResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsSignShrinkRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTemplateRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTemplateResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTemplateResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTemplateShrinkRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTrademarkRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTrademarkResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTrademarkResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteExtCodeSignRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteExtCodeSignResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteExtCodeSignResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsQualificationRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsQualificationResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsQualificationResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsResponseBody/cardSendDetailDTO.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsResponseBody/cardSendDetailDTO/records.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForUploadFileRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForUploadFileResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForUploadFileResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForUploadFileResponseBody/model_.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetQualificationOssInfoRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetQualificationOssInfoResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetQualificationOssInfoResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetQualificationOssInfoResponseBody/data.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsOcrOssInfoRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsOcrOssInfoResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsOcrOssInfoResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsOcrOssInfoResponseBody/model_.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponseBody/auditInfo.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponseBody/signIspRegisterDetailList.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponseBody/signIspRegisterDetailList/registerStatusReasons.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponseBody/data.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponseBody/data/list_.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponseBody/data/list_/templateTag.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListShrinkRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody/auditInfo.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody/fileUrlList.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody/moreDataFileUrlList.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody/signList.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateReportResponseBody/data.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryDigitalSignByNameRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryDigitalSignByNameResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryDigitalSignByNameResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignResponseBody/data.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignResponseBody/data/list_.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportResponseBody/data.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportResponseBody/data/queryResult.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportShrinkRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogResponseBody/model/list_.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogResponseBody/model_.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponseBody/data.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponseBody/data/businessLicensePics.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponseBody/data/otherFiles.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordResponseBody/data.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordShrinkRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterResponseBody/data.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterShrinkRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordResponseBody/data.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordResponseBody/data/list_.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkResponseBody/data.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkShrinkRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/RequiredPhoneCodeRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/RequiredPhoneCodeResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/RequiredPhoneCodeResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/SendLogisticsSmsRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/SendLogisticsSmsResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/SendLogisticsSmsResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/SendLogisticsSmsResponseBody/data.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/SmsConversionIntlRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/SmsConversionIntlResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/SmsConversionIntlResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationRequest/businessLicensePics.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationRequest/otherFiles.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationShrinkRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateExtCodeSignRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateExtCodeSignResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateExtCodeSignResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationRequest/businessLicensePics.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationRequest/otherFiles.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationShrinkRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsSignRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsSignResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsSignResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsSignShrinkRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsTemplateRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsTemplateResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsTemplateResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsTemplateShrinkRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/ValidPhoneCodeRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/ValidPhoneCodeResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/ValidPhoneCodeResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/VerifyLogisticsSmsMailNoRequest.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/VerifyLogisticsSmsMailNoResponse.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/VerifyLogisticsSmsMailNoResponseBody.php create mode 100644 vendor/alibabacloud/dysmsapi-20170525/src/Models/VerifyLogisticsSmsMailNoResponseBody/data.php create mode 100644 vendor/alibabacloud/gateway-spi/.gitignore create mode 100644 vendor/alibabacloud/gateway-spi/.php_cs.dist create mode 100644 vendor/alibabacloud/gateway-spi/autoload.php create mode 100644 vendor/alibabacloud/gateway-spi/composer.json create mode 100644 vendor/alibabacloud/gateway-spi/src/Client.php create mode 100644 vendor/alibabacloud/gateway-spi/src/Models/AttributeMap.php create mode 100644 vendor/alibabacloud/gateway-spi/src/Models/InterceptorContext.php create mode 100644 vendor/alibabacloud/gateway-spi/src/Models/InterceptorContext/configuration.php create mode 100644 vendor/alibabacloud/gateway-spi/src/Models/InterceptorContext/request.php create mode 100644 vendor/alibabacloud/gateway-spi/src/Models/InterceptorContext/response.php create mode 100644 vendor/alibabacloud/openapi-core/.gitignore create mode 100644 vendor/alibabacloud/openapi-core/.php_cs.dist create mode 100644 vendor/alibabacloud/openapi-core/README-CN.md create mode 100644 vendor/alibabacloud/openapi-core/README.md create mode 100644 vendor/alibabacloud/openapi-core/autoload.php create mode 100644 vendor/alibabacloud/openapi-core/bootstrap.php create mode 100644 vendor/alibabacloud/openapi-core/composer.json create mode 100644 vendor/alibabacloud/openapi-core/phpunit.xml create mode 100644 vendor/alibabacloud/openapi-core/src/Exceptions/AlibabaCloudException.php create mode 100644 vendor/alibabacloud/openapi-core/src/Exceptions/ClientException.php create mode 100644 vendor/alibabacloud/openapi-core/src/Exceptions/ServerException.php create mode 100644 vendor/alibabacloud/openapi-core/src/Exceptions/ThrottlingException.php create mode 100644 vendor/alibabacloud/openapi-core/src/Models/Config.php create mode 100644 vendor/alibabacloud/openapi-core/src/Models/GlobalParameters.php create mode 100644 vendor/alibabacloud/openapi-core/src/Models/OpenApiRequest.php create mode 100644 vendor/alibabacloud/openapi-core/src/Models/Params.php create mode 100644 vendor/alibabacloud/openapi-core/src/Models/SSEResponse.php create mode 100644 vendor/alibabacloud/openapi-core/src/OpenApiClient.php create mode 100644 vendor/alibabacloud/openapi-core/src/Sm3.php create mode 100644 vendor/alibabacloud/openapi-core/src/Utils.php create mode 100644 vendor/alibabacloud/openapi-core/tests/Mock/MockServer.php create mode 100644 vendor/alibabacloud/openapi-core/tests/OpenApiClientTest.php create mode 100644 vendor/alibabacloud/openapi-core/tests/UtilsTest.php create mode 100644 vendor/alibabacloud/openapi-core/tests/bootstrap.php create mode 100755 vendor/bin/var-dump-server create mode 100755 vendor/bin/var-dump-server.bat create mode 100644 vendor/symfony/var-dumper/CHANGELOG.md create mode 100644 vendor/symfony/var-dumper/Caster/AmqpCaster.php create mode 100644 vendor/symfony/var-dumper/Caster/ArgsStub.php create mode 100644 vendor/symfony/var-dumper/Caster/Caster.php create mode 100644 vendor/symfony/var-dumper/Caster/ClassStub.php create mode 100644 vendor/symfony/var-dumper/Caster/ConstStub.php create mode 100644 vendor/symfony/var-dumper/Caster/CutArrayStub.php create mode 100644 vendor/symfony/var-dumper/Caster/CutStub.php create mode 100644 vendor/symfony/var-dumper/Caster/DOMCaster.php create mode 100644 vendor/symfony/var-dumper/Caster/DateCaster.php create mode 100644 vendor/symfony/var-dumper/Caster/DoctrineCaster.php create mode 100644 vendor/symfony/var-dumper/Caster/DsCaster.php create mode 100644 vendor/symfony/var-dumper/Caster/DsPairStub.php create mode 100644 vendor/symfony/var-dumper/Caster/EnumStub.php create mode 100644 vendor/symfony/var-dumper/Caster/ExceptionCaster.php create mode 100644 vendor/symfony/var-dumper/Caster/FiberCaster.php create mode 100644 vendor/symfony/var-dumper/Caster/FrameStub.php create mode 100644 vendor/symfony/var-dumper/Caster/GmpCaster.php create mode 100644 vendor/symfony/var-dumper/Caster/ImagineCaster.php create mode 100644 vendor/symfony/var-dumper/Caster/ImgStub.php create mode 100644 vendor/symfony/var-dumper/Caster/IntlCaster.php create mode 100644 vendor/symfony/var-dumper/Caster/LinkStub.php create mode 100644 vendor/symfony/var-dumper/Caster/MemcachedCaster.php create mode 100644 vendor/symfony/var-dumper/Caster/MysqliCaster.php create mode 100644 vendor/symfony/var-dumper/Caster/PdoCaster.php create mode 100644 vendor/symfony/var-dumper/Caster/PgSqlCaster.php create mode 100644 vendor/symfony/var-dumper/Caster/ProxyManagerCaster.php create mode 100644 vendor/symfony/var-dumper/Caster/RdKafkaCaster.php create mode 100644 vendor/symfony/var-dumper/Caster/RedisCaster.php create mode 100644 vendor/symfony/var-dumper/Caster/ReflectionCaster.php create mode 100644 vendor/symfony/var-dumper/Caster/ResourceCaster.php create mode 100644 vendor/symfony/var-dumper/Caster/SplCaster.php create mode 100644 vendor/symfony/var-dumper/Caster/StubCaster.php create mode 100644 vendor/symfony/var-dumper/Caster/SymfonyCaster.php create mode 100644 vendor/symfony/var-dumper/Caster/TraceStub.php create mode 100644 vendor/symfony/var-dumper/Caster/UuidCaster.php create mode 100644 vendor/symfony/var-dumper/Caster/XmlReaderCaster.php create mode 100644 vendor/symfony/var-dumper/Caster/XmlResourceCaster.php create mode 100644 vendor/symfony/var-dumper/Cloner/AbstractCloner.php create mode 100644 vendor/symfony/var-dumper/Cloner/ClonerInterface.php create mode 100644 vendor/symfony/var-dumper/Cloner/Cursor.php create mode 100644 vendor/symfony/var-dumper/Cloner/Data.php create mode 100644 vendor/symfony/var-dumper/Cloner/DumperInterface.php create mode 100644 vendor/symfony/var-dumper/Cloner/Stub.php create mode 100644 vendor/symfony/var-dumper/Cloner/VarCloner.php create mode 100644 vendor/symfony/var-dumper/Command/Descriptor/CliDescriptor.php create mode 100644 vendor/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php create mode 100644 vendor/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php create mode 100644 vendor/symfony/var-dumper/Command/ServerDumpCommand.php create mode 100644 vendor/symfony/var-dumper/Dumper/AbstractDumper.php create mode 100644 vendor/symfony/var-dumper/Dumper/CliDumper.php create mode 100644 vendor/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php create mode 100644 vendor/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php create mode 100644 vendor/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php create mode 100644 vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php create mode 100644 vendor/symfony/var-dumper/Dumper/ContextualizedDumper.php create mode 100644 vendor/symfony/var-dumper/Dumper/DataDumperInterface.php create mode 100644 vendor/symfony/var-dumper/Dumper/HtmlDumper.php create mode 100644 vendor/symfony/var-dumper/Dumper/ServerDumper.php create mode 100644 vendor/symfony/var-dumper/Exception/ThrowingCasterException.php create mode 100644 vendor/symfony/var-dumper/LICENSE create mode 100644 vendor/symfony/var-dumper/README.md create mode 100755 vendor/symfony/var-dumper/Resources/bin/var-dump-server create mode 100644 vendor/symfony/var-dumper/Resources/css/htmlDescriptor.css create mode 100644 vendor/symfony/var-dumper/Resources/functions/dump.php create mode 100644 vendor/symfony/var-dumper/Resources/js/htmlDescriptor.js create mode 100644 vendor/symfony/var-dumper/Server/Connection.php create mode 100644 vendor/symfony/var-dumper/Server/DumpServer.php create mode 100644 vendor/symfony/var-dumper/Test/VarDumperTestTrait.php create mode 100644 vendor/symfony/var-dumper/VarDumper.php create mode 100644 vendor/symfony/var-dumper/composer.json create mode 100644 vendor/topthink/think-trace/.gitignore create mode 100644 vendor/topthink/think-trace/LICENSE create mode 100644 vendor/topthink/think-trace/README.md create mode 100644 vendor/topthink/think-trace/composer.json create mode 100644 vendor/topthink/think-trace/src/Console.php create mode 100644 vendor/topthink/think-trace/src/Html.php create mode 100644 vendor/topthink/think-trace/src/Service.php create mode 100644 vendor/topthink/think-trace/src/TraceDebug.php create mode 100644 vendor/topthink/think-trace/src/config.php create mode 100644 vendor/topthink/think-trace/src/tpl/page_trace.tpl create mode 100644 商城商品推送到聚水潭分析.md create mode 100644 聚水潭商品拉取测试报告.md create mode 100644 聚水潭测试指南.md diff --git a/.trae/specs/add-jst-product-sync-by-time/checklist.md b/.trae/specs/add-jst-product-sync-by-time/checklist.md new file mode 100644 index 0000000..a2fd931 --- /dev/null +++ b/.trae/specs/add-jst-product-sync-by-time/checklist.md @@ -0,0 +1,5 @@ +- [ ] `route/admin.php` 中正确添加了 `sync_jst_product_by_time` 路由。 +- [ ] `StoreProduct::sync_jst_product_by_time` 能够正确接收并校验 `start_time` 和 `end_time` 参数。 +- [ ] `HaichaoJstServices::getProductListByTime` 能够正确构建请求参数(包括 `modified_begin` 和 `modified_end`)并返回数据。 +- [ ] `ProductSyncErp` 中的商品处理逻辑成功抽离为 `doProcessProductList`,且原有的按 SPU 同步功能未受影响。 +- [ ] `ProductSyncErp::productFromErpByTime` 能够正确处理聚水潭的分页返回,直到所有页数处理完毕。 diff --git a/.trae/specs/add-jst-product-sync-by-time/spec.md b/.trae/specs/add-jst-product-sync-by-time/spec.md new file mode 100644 index 0000000..93a32f2 --- /dev/null +++ b/.trae/specs/add-jst-product-sync-by-time/spec.md @@ -0,0 +1,31 @@ +# 增加聚水潭商品按时间范围同步功能 Spec + +## Why +当前系统仅支持通过手动输入 SPU 编码列表的方式来同步聚水潭商品。在实际运营中,管理员往往需要批量同步某段时间内(如今天、本周)在聚水潭中新增或修改的商品。增加按时间范围同步的功能可以大大提升操作效率,避免遗漏。 + +## What Changes +- 在后台路由配置文件中新增 `sync_jst_product_by_time` 路由。 +- 在 `StoreProduct` 控制器中新增 `sync_jst_product_by_time` 方法,用于接收 `start_time`、`end_time` 和 `sync` 参数,并分发同步任务。 +- 在 `HaichaoJstServices` 服务类中新增 `getProductListByTime` 方法,封装调用聚水潭 `open/mall/item/query` 接口的时间范围查询逻辑。 +- 在 `ProductSyncErp` 任务类中新增 `productFromErpByTime` 方法,支持按页拉取时间范围内的商品。 +- **重构**: 将 `ProductSyncErp::productFromErp` 中核心的商品数据转换和保存逻辑抽离为 `doProcessProductList` 方法,以便按 SPU 同步和按时间同步复用相同的处理逻辑。 + +## Impact +- Affected specs: 聚水潭商品手动同步功能。 +- Affected code: + - `route/admin.php` + - `app/controller/admin/v1/product/StoreProduct.php` + - `app/haichao/HaichaoJstServices.php` + - `app/jobs/product/ProductSyncErp.php` + +## ADDED Requirements +### Requirement: 按时间范围同步商品 +系统 SHALL 提供一个接口,允许管理员传入开始时间和结束时间,自动拉取聚水潭在该时间范围内修改过的商品,并同步到商城系统中。 + +#### Scenario: 成功发起异步同步任务 +- **WHEN** 管理员调用 `/adminapi/product/sync_jst_product_by_time` 接口,传入有效的 `start_time` 和 `end_time`,且 `sync=0` +- **THEN** 系统返回成功响应,并在后台队列中创建对应的同步任务,按页拉取并更新商品数据。 + +## MODIFIED Requirements +### Requirement: 重构商品同步核心逻辑 +为了避免代码重复,现有的按 SPU 同步商品的逻辑 SHALL 被重构。商品数据的映射、价格计算、SKU 组装和入库逻辑 SHALL 抽取为独立的内部方法,供所有同步入口调用。 diff --git a/.trae/specs/add-jst-product-sync-by-time/tasks.md b/.trae/specs/add-jst-product-sync-by-time/tasks.md new file mode 100644 index 0000000..e37a39c --- /dev/null +++ b/.trae/specs/add-jst-product-sync-by-time/tasks.md @@ -0,0 +1,13 @@ +# Tasks + +- [ ] Task 1: 增加路由和控制器方法 + - [ ] SubTask 1.1: 在 `route/admin.php` 中增加 `POST sync_jst_product_by_time` 路由。 + - [ ] SubTask 1.2: 在 `app/controller/admin/v1/product/StoreProduct.php` 中实现 `sync_jst_product_by_time` 方法,验证时间参数,并根据 `sync` 参数决定是同步执行还是投递异步队列。 + +- [ ] Task 2: 在服务类中增加 API 调用方法 + - [ ] SubTask 2.1: 在 `app/haichao/HaichaoJstServices.php` 中新增 `getProductListByTime(string $startTime, string $endTime, int $pageIndex = 1, int $pageSize = 50)` 方法。 + +- [ ] Task 3: 重构同步任务类并实现时间范围同步 + - [ ] SubTask 3.1: 在 `app/jobs/product/ProductSyncErp.php` 中,将 `productFromErp` 方法内的商品列表遍历处理逻辑提取为受保护的 `doProcessProductList(array $productList, int $supplierId)` 方法。 + - [ ] SubTask 3.2: 修改原 `productFromErp` 方法以调用新抽离的 `doProcessProductList`。 + - [ ] SubTask 3.3: 在 `ProductSyncErp.php` 中新增 `productFromErpByTime(string $startTime, string $endTime, int $supplierId = 0)` 方法,实现分页拉取逻辑,并在每页数据返回后调用 `doProcessProductList`。 diff --git a/.trae/specs/wecom-addressbook-config/checklist.md b/.trae/specs/wecom-addressbook-config/checklist.md new file mode 100644 index 0000000..55db8cd --- /dev/null +++ b/.trae/specs/wecom-addressbook-config/checklist.md @@ -0,0 +1,7 @@ +- [ ] 已列出回调入口路由与调用链路:`/api/work/serve` -> `Wechat::work()` -> `WechatServices::workServe()` -> `Work::serve()` +- [ ] 已列出 Work 基础配置项与系统配置键映射:`corp_id/token/aes_key` -> `wechat_work_corpid/wechat_work_token/wechat_work_aes_key` +- [ ] 已列出 Work 应用配置项(通讯录/客户联系/自建应用)与系统配置键:`wechat_work_address_secret`、`wechat_work_user_secret`、`wechat_work_build_agent_id`、`wechat_work_build_secret` +- [ ] 已说明 `Failed to decode request contents.` 的触发原因与正确校验方式(企业微信 GET 校验、POST 加密回调) +- [ ] 已给出“域名无法配置”的替代接入方案,并明确透明转发必须保持 query/body 不变 +- [ ] 已给出“无法接入回调”的降级方案:使用后台同步成员能力,并标注其删除/全量重建的副作用 +- [ ](可选增强)若实现 `wechat_work_callback_url`,后台表单能正确展示并可复制,空值时回退到 `site_url . '/api/work/serve'` diff --git a/.trae/specs/wecom-addressbook-config/spec.md b/.trae/specs/wecom-addressbook-config/spec.md new file mode 100644 index 0000000..8ffe3f0 --- /dev/null +++ b/.trae/specs/wecom-addressbook-config/spec.md @@ -0,0 +1,76 @@ +# 企业微信通讯录配置项使用逻辑与回调域名替代方案 Spec + +## Why +现网企业微信通讯录/客户联系能力依赖“接收事件服务器”回调地址(如 `https://shop.douba.top/api/work/serve`)来接收成员/部门/客户等变更事件。实际部署中可能遇到企业微信后台无法填写或无法通过校验(域名限制、HTTPS 证书、网络可达性、网关/WAF 等)导致无法上线。 + +本 Spec 的目标是: +- 梳理后端企业微信通讯录相关配置项在代码中的读取、组装与使用路径,便于定位配置错误。 +- 给出当企业微信侧无法配置项目域名时的可行替代配置方式(运维/网络层方案 + 业务层降级方案)。 +- (可选增强)提供独立的“企业微信回调地址”配置项,仅用于展示与复制,避免必须修改全站 `site_url`。 + +## Current Behavior(现状) +### 1) 回调路由入口 +- 企业微信回调入口固定为 `/api/work/serve`,路由映射到 `app\controller\api\v1\wechat\Wechat::work()`,最终调用 `crmeb\services\wechat\Work::serve()`。 +- 后台配置表单中“服务器地址”字段为只读展示:`sys_config('site_url') . '/api/work/serve'`。 + +### 2) 配置项来源与组装 +企业微信配置通过两层组装后交给 EasyWeChat: +- **基础配置**(用于验签/解密/加密回复):`corp_id`、`token`、`aes_key` + - 映射到系统配置键:`wechat_work_corpid`、`wechat_work_token`、`wechat_work_aes_key` +- **应用配置**(用于调用不同能力 API):按类型注入 `secret` / `agent_id` + - 通讯录同步:`wechat_work_address_secret` + - 客户联系:`wechat_work_user_secret` + - 自建应用:`wechat_work_build_agent_id` + `wechat_work_build_secret` + +### 3) 回调验签与事件处理 +- `Work::serve()` 调用 EasyWeChat Work Server 完成 URL 校验与消息解密;解密后消息交给 `app\listener\wechat\WorkListener` 分发。 +- `WorkListener` 处理的关键事件包含: + - 通讯录事件:`change_contact`(成员/部门增删改) + - 客户事件:`change_external_contact` + - 客户群事件:`change_external_chat` + - 客户标签事件:`change_external_tag` + +## Problems(常见问题) +- 直接在浏览器访问回调 URL 或用普通 HTTP 客户端随意请求,会触发 EasyWeChat 的解析失败,出现 `Failed to decode request contents.`;这不代表系统异常,只是请求不是企业微信回调协议(缺少 `echostr/msg_signature` 或正文不是企业微信 XML/加密格式)。 +- 企业微信后台“接收事件服务器”校验失败,常见原因: + - URL 不可公网访问(内网/防火墙/白名单/运营商限制) + - HTTPS 证书链不完整/过期/不被信任 + - 反向代理/WAF 改写了 query/body(导致 `msg_signature` 校验失败) + - 回调域名无法在企业微信侧配置(企业侧安全策略或域名限制) + +## What Changes(拟新增/调整) +### A. 文档化与定位指引(必做) +- 输出一份“配置项—代码使用点—故障排查清单”的说明(本 Spec + checklist)。 +- 明确哪些配置影响“回调校验”,哪些配置只影响“API 调用”。 + +### B. 回调域名替代方案(不改代码即可落地) +- 允许使用“可在企业微信侧配置的域名/网关”作为回调入口,通过透明转发(反向代理/网关/隧道)转发到实际项目的 `/api/work/serve`。 +- 允许在无法接入回调时,使用后台已有的“同步企业微信成员”能力做业务降级(非实时)。 + +### C. 可选增强:增加独立的回调地址配置项(需要改代码) +新增系统配置键(示例):`wechat_work_callback_url` +- 用途:仅用于后台表单展示/复制,默认值仍为 `site_url . '/api/work/serve'`。 +- 不改变实际回调逻辑(仍然由路由 `/api/work/serve` 接收);目的是让运维能把“实际对外可用的回调域名”记录在系统里,减少误配。 + +## Requirements +### Requirement 1: 配置项可追溯 +系统 SHALL 明确以下配置项的用途与作用范围: +- `wechat_work_corpid` / `wechat_work_token` / `wechat_work_aes_key`:影响回调验签解密与企业微信身份 +- `wechat_work_address_secret`:影响通讯录同步相关 API(拉部门、拉成员等) +- `wechat_work_user_secret`:影响客户联系相关 API +- `wechat_work_build_agent_id` + `wechat_work_build_secret`:影响自建应用相关 API + +### Requirement 2: 当域名无法配置时可替代接入 +在企业微信后台无法配置项目域名时,运维 SHALL 能选择以下一种方式完成回调接入: +- 方案 A:配置一个企业微信可接受的域名作为回调入口,并反向代理透明转发到本项目 `/api/work/serve` +- 方案 B:无法接入回调时,使用后台“同步企业微信成员”接口进行人工/定时全量同步作为降级(承认非实时) + +### Requirement 3(可选): 回调地址可配置展示 +系统 SHOULD 提供 `wechat_work_callback_url` 配置项用于展示与复制,默认回退到 `site_url . '/api/work/serve'`。 + +## Impact(影响面) +### 不改代码即可采用 +- 仅影响运维部署方式与企业微信后台填写的回调 URL。 + +### 若做可选增强 +- 影响后台“企业微信配置”表单展示字段。 diff --git a/.trae/specs/wecom-addressbook-config/tasks.md b/.trae/specs/wecom-addressbook-config/tasks.md new file mode 100644 index 0000000..c4ad126 --- /dev/null +++ b/.trae/specs/wecom-addressbook-config/tasks.md @@ -0,0 +1,19 @@ +# Tasks + +- [ ] Task 1: 梳理配置项与使用链路(文档输出) + - [ ] SubTask 1.1: 汇总企业微信回调入口、路由、控制器与服务调用链路。 + - [ ] SubTask 1.2: 汇总企业微信配置项(sys_config 键)与代码读取点、作用范围(回调验签 vs API 调用)。 + - [ ] SubTask 1.3: 汇总回调事件类型与本地处理服务(通讯录/客户/客户群/标签)。 + +- [ ] Task 2: 给出“无法配置域名”的替代接入方式(运维/网络层) + - [ ] SubTask 2.1: 反向代理/网关透明转发方案(保持 query/body 不变,避免验签失败)。 + - [ ] SubTask 2.2: 备用公网域名/子域名方案(同服务器多域名证书)。 + - [ ] SubTask 2.3: 隧道映射方案(frp/ngrok 类,仅建议测试或临时)。 + +- [ ] Task 3: 给出“无法接入回调”的业务降级方式(不改代码) + - [ ] SubTask 3.1: 使用后台“同步企业微信成员”接口触发全量同步(说明副作用与适用场景)。 + - [ ] SubTask 3.2: 建议定时执行策略(如低频全量同步,或按部门增量同步的可拓展方向)。 + +- [ ] Task 4(可选增强): 增加独立的回调地址展示配置项 + - [ ] SubTask 4.1: 增加系统配置键 `wechat_work_callback_url`(若已有配置表/初始化机制则按既有方式接入)。 + - [ ] SubTask 4.2: 修改企业微信配置表单展示字段,优先展示 `wechat_work_callback_url`,空则回退 `site_url . '/api/work/serve'`。 diff --git a/adminapi_product_sync_jst_product_分析.md b/adminapi_product_sync_jst_product_分析.md new file mode 100644 index 0000000..7584a61 --- /dev/null +++ b/adminapi_product_sync_jst_product_分析.md @@ -0,0 +1,568 @@ +# `/adminapi/product/sync_jst_product` 接口分析 + +## 一、接口概览 + +| 属性 | 值 | +|------|-----| +| **接口地址** | `/adminapi/product/sync_jst_product` | +| **请求方法** | `POST` | +| **路由定义** | [admin.php#L1627](file:///home/jone/workspace/CRMEB_PRO/route/admin.php#L1627) | +| **控制器方法** | [StoreProduct.php#L997-1028](file:///home/jone/workspace/CRMEB_PRO/app/controller/admin/v1/product/StoreProduct.php#L997-1028) | +| **核心业务逻辑** | [ProductSyncErp.php#L122-320](file:///home/jone/workspace/CRMEB_PRO/app/jobs/product/ProductSyncErp.php#L122-320) | +| **功能说明** | 从聚水潭ERP手动同步商品到CRMEB平台 | + +--- + +## 二、接口请求 + +### 2.1 请求参数 + +| 参数名 | 类型 | 必填 | 默认值 | 说明 | +|--------|------|------|--------|------| +| `spu_str` | string | ✅ 是 | "" | ERP商品SPU,多个用逗号分隔 | +| `sync` | int | ❌ 否 | 0 | 同步方式:0=异步队列,1=同步执行 | + +### 2.2 请求示例 + +```bash +# 异步同步(默认) +POST /adminapi/product/sync_jst_product +Content-Type: application/json + +{ + "spu_str": "4651127369,5606676507", + "sync": 0 +} + +# 同步执行 +POST /adminapi/product/sync_jst_product +Content-Type: application/json + +{ + "spu_str": "4651127369", + "sync": 1 +} +``` + +--- + +## 三、业务流程 + +### 3.1 整体流程图 + +``` +┌─────────────────────────────────────────────┐ +│ POST /adminapi/product/sync_jst_product │ +└─────────────────┬───────────────────────────┘ + │ + ▼ + ┌─────────────────┐ + │ 参数验证 │ + │ spu_str 不能为空│ + └────────┬────────┘ + │ + ▼ + ┌─────────────────┐ + │ 解析SPU数组 │ + │ 去重 + 过滤空值 │ + └────────┬────────┘ + │ + ▼ + ┌─────────────────┐ + │ 生成TraceID │ + │ jst_xxxxxxxxx │ + └────────┬────────┘ + │ + ▼ + ┌─────────────────────────────────┐ + │ 记录操作日志 │ + │ admin_id, supplier_id, count │ + └────────┬────────────────────────┘ + │ + ┌────────┴────────┐ + │ sync 参数判断 │ + └────────┬────────┘ + │ + ┌────────┴────────┐ + │ sync = 1? │ + └────────┬────────┘ + 是 │ 否 + ┌──────┴──────┐ + ▼ ▼ + ┌────────────┐ ┌─────────────┐ + │ 同步执行 │ │ 异步队列执行 │ + │ productFrom│ │ ProductSync │ + │ Erp() │ │ Erp:: │ + │ │ │ dispatchDo()│ + └──────┬─────┘ └──────┬──────┘ + │ │ + └───────┬───────┘ + ▼ + ┌─────────────────┐ + │ 返回响应 │ + └─────────────────┘ +``` + +--- + +## 四、核心业务逻辑 + +### 4.1 控制器层(StoreProduct::sync_jst_product) + +**文件**: [StoreProduct.php#L997-1028](file:///home/jone/workspace/CRMEB_PRO/app/controller/admin/v1/product/StoreProduct.php#L997-1028) + +```php +public function sync_jst_product() +{ + // 1. 获取请求参数 + [$spuStr, $sync] = $this->request->postMore([ + ['spu_str', ""], // SPU字符串 + ['sync', 0] // 同步方式 + ], true); + + // 2. 参数验证 + if (!$spuStr) { + return $this->fail('请输入ERP商品SPU'); + } + + // 3. 解析SPU数组(去重+过滤空值) + $spus = array_unique(array_filter(explode(',', $spuStr))); + + // 4. 生成追踪ID + $traceId = uniqid('jst_', true); + + // 5. 记录操作日志 + Log::info('admin.manual.jst.product.sync.dispatch', [ + 'trace_id' => $traceId, + 'admin_id' => $this->adminId, + 'admin_type' => $this->adminType, + 'supplier_id' => $this->supplierId, + 'client_ip' => $this->request->ip(), + 'count' => count($spus), + 'spus' => $spus + ]); + + // 6. 根据sync参数选择执行方式 + if ($sync) { + // 同步执行 + foreach ($spus as $spu) { + (new ProductSyncErp())->productFromErp($spu, (int)$this->supplierId); + } + return $this->success('同步完成'); + } else { + // 异步队列执行 + foreach ($spus as $spu) { + ProductSyncErp::dispatchDo('productFromErp', [$spu, (int)$this->supplierId]); + } + return $this->success('正在同步中,请稍后查看'); + } +} +``` + +**关键特性**: +- ✅ 支持批量SPU同步 +- ✅ 支持同步/异步两种模式 +- ✅ 完整的操作日志记录 +- ✅ 支持供应商商品同步 + +--- + +### 4.2 服务层(ProductSyncErp::productFromErp) + +**文件**: [ProductSyncErp.php#L122-320](file:///home/jone/workspace/CRMEB_PRO/app/jobs/product/ProductSyncErp.php#L122-320) + +#### 步骤1: 调用聚水潭API获取商品数据 + +```php +// 调用HaichaoJstServices获取商品详情 +$result = app()->make(HaichaoJstServices::class)->getProductListKuan($spuArr); + +// API调用日志 +Log::info('admin.manual.jst.product.sync.api_result', [ + 'spu' => $spuArr, + 'page_index' => $result['page_index'] ?? null, + 'page_count' => $result['page_count'] ?? null, + 'datas_count' => count($result['datas'] ?? []), + 'result_preview' => json_encode($result), +]); + +// 获取商品列表 +$productList = $result['datas'] ?? []; +``` + +**调用API**: `/open/mall/item/query` +```php +$data = $this->post('open/mall/item/query', [ + 'i_ids' => [$key], // SPU ID数组 + 'page_index' => 1, + 'page_size' => 10, + 'date_field' => '', +])['data']; +``` + +#### 步骤2: 数据转换 + +遍历商品列表,将聚水潭数据转换为CRMEB格式: + +```php +foreach ($productList as $item) { + // 1. 价格计算逻辑 + $salePrice = floatval($item['s_price'] ?? 0); // SPU售价 + $marketPrice = floatval($item['market_price'] ?? 0); // 市场价 + $costPrice = floatval($item['c_price'] ?? 0); // 成本价 + + // 如果SPU价格为空,从SKU中获取 + if ($salePrice <= 0 && $skuRows) { + $salePrice = min(array_column($skuRows, 'sale_price')); + } + + // 2. 构建商品基础信息 + $productInfo = [ + 'image' => $pic, // 商品主图 + 'slider_image' => json_encode([$pic]), // 轮播图 + 'store_name' => $name, // 商品名称 + 'store_info' => $name, // 商品简介 + 'cate_id' => 0, // 分类ID(待设置) + 'price' => $salePrice, // 售价 + 'ot_price' => $marketPrice, // 划线价 + 'delivery_type' => '1,2,3', // 配送方式 + 'freight' => 1, // 运费模板 + 'is_show' => 0, // 默认下架状态 + 'add_time' => time(), // 添加时间 + 'cost' => $costPrice, // 成本价 + 'ficti' => 0, // 虚拟销量 + 'spec_type' => 1, // 规格类型 + 'code' => $item['i_id'], // ERP商品编码 + 'type' => $relationSupplierId ? 2 : 0, // 0=平台商品, 2=供应商商品 + 'relation_id' => $relationSupplierId, // 供应商ID + ]; + + // 3. 构建SKU规格数据 + foreach ($skuRows as $skuIndex => $items) { + $specValue = trim($items['properties_value'] ?? ''); + if ($specValue === '') { + $specValue = trim($items['name'] ?? ''); + } + if ($specValue === '') { + $specValue = '规格' . ($skuIndex + 1); + } + + $value[] = [ + 'code' => $items['sku_id'], // SKU编码 + 'price' => floatval($items['sale_price'] ?? $salePrice), // 售价 + 'ot_price' => floatval($items['market_price'] ?? $marketPrice), // 划线价 + 'cost' => floatval($items['cost_price'] ?? $costPrice), // 成本价 + 'pic' => $items['pic'], // SKU图片 + 'detail' => ['规格' => $specValue], // 规格详情 + 'value1' => $specValue, + 'values' => $specValue, + 'stock' => 0, // 库存(待同步) + ]; + } +} +``` + +#### 步骤3: 判断新增或更新 + +```php +// 检查商品是否已存在 +$pid = $productServices->value(['code' => $item['i_id']], 'id'); +$existed = !!$pid; + +if (!$pid) { + // 新增商品 + $pid = $productServices->ErpProductSave($productInfo); +} + +// 保存SKU规格 +$skuList = $productAttrServices->validateProductAttr($attr, $value, $pid, 0, 0, 0); +$productAttrServices->saveProductAttr($skuList, $pid); +``` + +#### 步骤4: 清除缓存 + +```php +// 清除商品缓存 +$productServices->cacheTag()->clear(); +$productAttrServices->cacheTag()->clear(); +``` + +--- + +## 五、数据映射关系 + +### 5.1 商品主数据 + +| CRMEB字段 | 聚水潭字段 | 说明 | +|-----------|-----------|------| +| `code` | `i_id` | SPU编码(唯一标识)| +| `store_name` | `name` | 商品名称 | +| `price` | `s_price` 或 SKU的最低售价 | 售价 | +| `ot_price` | `market_price` 或 SKU的最高市场价 | 划线价 | +| `cost` | `c_price` 或 SKU的最高成本价 | 成本价 | +| `image` | `pic` 或 SKU[0].pic | 商品主图 | +| `slider_image` | `pic` 的JSON数组 | 轮播图 | +| `type` | `relationSupplierId > 0 ? 2 : 0` | 0=平台商品, 2=供应商商品 | + +### 5.2 SKU规格数据 + +| CRMEB字段 | 聚水潭字段 | 说明 | +|-----------|-----------|------| +| `code` | `sku_id` | SKU编码 | +| `price` | `sale_price` | SKU售价 | +| `ot_price` | `market_price` | SKU市场价 | +| `cost` | `cost_price` | SKU成本价 | +| `pic` | `pic` | SKU图片 | +| `detail` | `properties_value` | 规格属性 | +| `stock` | 0 | 库存(待后续同步)| + +--- + +## 六、价格计算逻辑 + +### 6.1 SPU售价计算 + +``` +1. 优先使用SPU的 s_price +2. 如果 s_price ≤ 0,则从SKU列表中取最低的 sale_price +``` + +### 6.2 市场价计算 + +``` +1. 优先使用SPU的 market_price +2. 如果 market_price ≤ 0,则从SKU列表中取最高的 market_price +``` + +### 6.3 成本价计算 + +``` +1. 优先使用SPU的 c_price +2. 如果 c_price ≤ 0,则从SKU列表中取最高的 cost_price +``` + +--- + +## 七、执行模式对比 + +### 7.1 同步执行(sync=1) + +```php +foreach ($spus as $spu) { + (new ProductSyncErp())->productFromErp($spu, (int)$this->supplierId); +} +return $this->success('同步完成'); +``` + +**特点**: +- ✅ 实时返回结果 +- ✅ 立即看到同步状态 +- ⚠️ 请求超时风险(大量SKU时) +- ⚠️ 用户需要等待 + +**适用场景**: +- 单个SPU同步 +- 小批量同步(<10个) +- 开发测试 + +### 7.2 异步队列执行(sync=0) + +```php +foreach ($spus as $spu) { + ProductSyncErp::dispatchDo('productFromErp', [$spu, (int)$this->supplierId]); +} +return $this->success('正在同步中,请稍后查看'); +``` + +**特点**: +- ✅ 快速响应 +- ✅ 支持大批量同步 +- ✅ 不阻塞用户操作 +- ✅ 队列重试机制 + +**适用场景**: +- 批量SPU同步 +- 大批量同步(>10个) +- 生产环境推荐 + +--- + +## 八、日志追踪 + +### 8.1 操作日志节点 + +| 节点 | 日志Key | 记录内容 | +|------|---------|---------| +| 控制器入口 | `admin.manual.jst.product.sync.dispatch` | trace_id, admin_id, supplier_id, spu数组 | +| API调用 | `admin.manual.jst.product.sync.api_result` | API返回结果,数据量 | +| 遍历商品 | `admin.manual.jst.product.sync.item` | 每个商品的i_id, name, sku数量 | +| 保存商品 | `admin.manual.jst.product.sync.save` | product_id, existed, sku数量 | +| 完成 | `admin.manual.jst.product.sync.finish` | 完成数量 | +| 错误 | `admin.manual.jst.product.sync.error` | 错误信息 | + +### 8.2 日志示例 + +```json +{ + "log_type": "admin.manual.jst.product.sync.dispatch", + "trace_id": "jst_647a8b9c12345", + "admin_id": 1, + "supplier_id": 0, + "count": 2, + "spus": ["4651127369", "5606676507"] +} +``` + +--- + +## 九、错误处理 + +### 9.1 异常捕获 + +```php +try { + // 业务逻辑 +} catch (\Exception $e) { + // 记录错误日志 + response_log_write([ + 'message' => '商品同步失败, 原因: ' . $e->getMessage(), + 'file' => $e->getFile(), + 'line' => $e->getLine() + ]); + + Log::error('admin.manual.jst.product.sync.error', [ + 'spu' => $spuArr, + 'message' => $e->getMessage() + ]); +} +``` + +### 9.2 常见错误 + +| 错误类型 | 原因 | 处理方式 | +|---------|------|---------| +| Token无效 | JST_ACCESS_TOKEN过期 | 重新获取Token | +| SPU不存在 | 聚水潭中无此商品 | 检查SPU编码 | +| 网络超时 | API调用超时 | 队列重试 | +| 数据库错误 | 保存商品失败 | 检查数据库连接 | + +--- + +## 十、性能优化建议 + +### 10.1 当前实现 + +- ✅ 支持批量SPU同步 +- ✅ 异步队列处理 +- ✅ 完整的日志追踪 +- ✅ 商品/SKU数据缓存 + +### 10.2 优化建议 + +#### 建议1: 批量API调用 + +**当前**: 每个SPU调用一次API + +**优化**: +```php +// 批量查询(需要聚水潭API支持) +$data = $this->post('open/mall/item/query', [ + 'i_ids' => $spuArr, // 一次性传入多个SPU +]); +``` + +#### 建议2: 批量保存 + +**当前**: 逐个保存商品 + +**优化**: +```php +// 批量插入 +$productServices->saveAll($productList); +$productAttrServices->saveAll($skuList); +``` + +#### 建议3: 库存同步 + +**当前**: 库存默认为0 + +**优化**: +```php +// 批量查询库存 +$skuIds = array_column($skuRows, 'sku_id'); +$stockMap = $this->getProductListSku(implode(',', $skuIds)); + +// 更新库存 +foreach ($skuList as &$sku) { + $sku['stock'] = $stockMap[$sku['code']]['qty'] ?? 0; +} +``` + +--- + +## 十一、使用示例 + +### 11.1 单个SPU同步 + +```bash +# 异步同步 +curl -X POST /adminapi/product/sync_jst_product \ + -H "Content-Type: application/json" \ + -d '{"spu_str": "4651127369"}' + +# 响应: {"status": 200, "msg": "正在同步中,请稍后查看"} +``` + +### 11.2 批量SPU同步 + +```bash +# 异步同步多个SPU +curl -X POST /adminapi/product/sync_jst_product \ + -H "Content-Type: application/json" \ + -d '{"spu_str": "4651127369,5606676507,5633479406"}' + +# 响应: {"status": 200, "msg": "正在同步中,请稍后查看"} +``` + +### 11.3 同步执行 + +```bash +# 同步执行(立即返回结果) +curl -X POST /adminapi/product/sync_jst_product \ + -H "Content-Type: application/json" \ + -d '{"spu_str": "4651127369", "sync": 1}' + +# 响应: {"status": 200, "msg": "同步完成"} +``` + +--- + +## 十二、总结 + +### 核心流程 + +``` +用户请求 → 参数验证 → 解析SPU → + ↓ +调用聚水潭API → 转换数据格式 → + ↓ +判断新增/更新 → 保存商品和SKU → + ↓ +清除缓存 → 返回结果 +``` + +### 关键特性 + +1. **灵活的执行模式**: 支持同步/异步两种方式 +2. **完整的数据映射**: 聚水潭 → CRMEB 字段映射完整 +3. **智能价格计算**: 自动从SKU中获取最优价格 +4. **完善的日志追踪**: 全链路日志记录 +5. **供应商支持**: 支持平台商品和供应商商品 +6. **错误处理**: 完整的异常捕获和日志记录 + +### 优化方向 + +1. 批量API调用(减少网络请求) +2. 批量数据库操作(提升性能) +3. 库存同步(补充库存数据) +4. 进度查询(实时查看同步状态) diff --git a/app/command/BackfillProductSpu.php b/app/command/BackfillProductSpu.php new file mode 100644 index 0000000..afdfcde --- /dev/null +++ b/app/command/BackfillProductSpu.php @@ -0,0 +1,54 @@ +setName('product:spu:backfill') + ->addOption('chunk', null, Option::VALUE_REQUIRED, '单次处理条数', 200) + ->addOption('limit', null, Option::VALUE_REQUIRED, '最多处理条数(0不限制)', 0) + ->setDescription('Backfill empty product spu'); + } + + protected function execute(Input $input, Output $output) + { + $chunk = max(1, (int)$input->getOption('chunk')); + $limit = max(0, (int)$input->getOption('limit')); + $handled = 0; + + /** @var StoreProductServices $productServices */ + $productServices = app()->make(StoreProductServices::class); + + while (true) { + $query = Db::name('store_product')->where('spu', '')->where('is_del', 0)->order('id', 'asc')->limit($chunk); + if ($limit > 0) { + $query->limit(min($chunk, $limit - $handled)); + } + $rows = $query->field(['id'])->select()->toArray(); + if (!$rows) { + break; + } + foreach ($rows as $row) { + $productServices->ensureSpu((int)$row['id']); + $handled++; + if ($limit > 0 && $handled >= $limit) { + break 2; + } + } + $output->info('handled: ' . $handled); + } + + $output->info('done: ' . $handled); + return 0; + } +} + diff --git a/app/command/TestJstSpu.php b/app/command/TestJstSpu.php new file mode 100644 index 0000000..6a6b667 --- /dev/null +++ b/app/command/TestJstSpu.php @@ -0,0 +1,93 @@ +setName('test_jst_spu') + ->addArgument('spu', Argument::REQUIRED, 'SPU编码') + ->setDescription('测试聚水潭按SPU拉取商品接口'); + } + + protected function execute(Input $input, Output $output) + { + $spu = $input->getArgument('spu'); + + if (empty($spu)) { + $output->error('请提供SPU编码'); + $output->info('用法: php think test_jst_spu SPU编码'); + $output->info('示例: php think test_jst_spu test123'); + return; + } + + $output->info('正在调用聚水潭API获取商品信息...'); + $output->info('SPU: ' . $spu); + $output->newLine(); + + try { + $startTime = microtime(true); + + $haichaoJst = HaichaoJstServices::getServices(); + $result = $haichaoJst->getProductListKuan($spu); + + $endTime = microtime(true); + $costTime = round(($endTime - $startTime) * 1000, 2); + + $output->info('✅ API调用成功! 耗时: ' . $costTime . 'ms'); + $output->newLine(); + + if (empty($result)) { + $output->warning('⚠️ 未获取到任何数据'); + return; + } + + $output->info('📦 获取到的数据:'); + $output->write(json_encode($result, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT)); + $output->newLine(); + + if (isset($result['code'])) { + $output->info('响应码: ' . $result['code']); + } + if (isset($result['msg'])) { + $output->info('响应消息: ' . $result['msg']); + } + if (isset($result['datas'])) { + $output->info('商品数量: ' . count($result['datas'])); + + if (!empty($result['datas'])) { + $output->newLine(); + $output->info('📋 第一个商品信息:'); + $firstProduct = $result['datas'][0]; + $output->writeln(' - SPU ID: ' . ($firstProduct['i_id'] ?? 'N/A')); + $output->writeln(' - 商品名称: ' . ($firstProduct['name'] ?? 'N/A')); + $output->writeln(' - 售价: ' . ($firstProduct['s_price'] ?? 'N/A')); + $output->writeln(' - 市场价: ' . ($firstProduct['market_price'] ?? 'N/A')); + $output->writeln(' - 成本价: ' . ($firstProduct['c_price'] ?? 'N/A')); + + if (isset($firstProduct['skus']) && is_array($firstProduct['skus'])) { + $output->writeln(' - SKU数量: ' . count($firstProduct['skus'])); + } + } + } + + $output->newLine(); + + } catch (\Throwable $e) { + $output->error('❌ API调用失败!'); + $output->error('错误信息: ' . $e->getMessage()); + $output->error('错误文件: ' . $e->getFile() . ':' . $e->getLine()); + $output->newLine(); + $output->info('堆栈跟踪:'); + $output->write($e->getTraceAsString()); + } + } +} diff --git a/app/controller/admin/Login.php b/app/controller/admin/Login.php index 8b9cafb..b89b018 100644 --- a/app/controller/admin/Login.php +++ b/app/controller/admin/Login.php @@ -215,7 +215,7 @@ class Login $verifyCode = CacheService::get('code_' . $phone); if (!$verifyCode) return app('json')->fail('请先获取验证码'); - $verifyCode = substr($verifyCode, 0, 6); + $verifyCode = substr($verifyCode, 0, 4); if ($verifyCode != $code) { CacheService::delete('code_' . $phone); return app('json')->fail('验证码错误'); @@ -262,7 +262,7 @@ class Login $verifyCode = CacheService::get('code_' . $phone); if (!$verifyCode) return app('json')->fail('请先获取验证码'); - $verifyCode = substr($verifyCode, 0, 6); + $verifyCode = substr($verifyCode, 0, 4); if ($verifyCode != $code) { CacheService::delete('code_' . $phone); return app('json')->fail('验证码错误'); diff --git a/app/controller/admin/v1/product/StoreProduct.php b/app/controller/admin/v1/product/StoreProduct.php index f2cedd3..211adca 100644 --- a/app/controller/admin/v1/product/StoreProduct.php +++ b/app/controller/admin/v1/product/StoreProduct.php @@ -996,37 +996,163 @@ class StoreProduct extends AuthController public function sync_jst_product() { - [$spuStr, $sync] = $this->request->postMore([ + [$spuStr, $sync, $startTime, $endTime] = $this->request->postMore([ ['spu_str', ""], - ['sync', 0] + ['sync', 0], + ['start_time', ""], + ['end_time', ""] ], true); + + $traceId = uniqid('jst_sync_', true); + Log::info('admin.manual.jst.product.sync.request', [ + 'trace_id' => $traceId, + 'admin_id' => $this->adminId, + 'admin_type' => $this->adminType, + 'supplier_id' => $this->supplierId, + 'client_ip' => $this->request->ip(), + 'sync' => (int)$sync, + 'spu_str' => (string)$spuStr, + 'start_time' => (string)$startTime, + 'end_time' => (string)$endTime, + 'start_time_is_iso' => is_string($startTime) && str_contains($startTime, 'T'), + 'end_time_is_iso' => is_string($endTime) && str_contains($endTime, 'T'), + ]); + + if ($startTime && $endTime) { + $startTs = strtotime((string)$startTime); + $endTs = strtotime((string)$endTime); + if (!$startTs || !$endTs) { + Log::warning('admin.manual.jst.product.sync_by_time.invalid_time', [ + 'trace_id' => $traceId, + 'start_time' => $startTime, + 'end_time' => $endTime, + ]); + return $this->fail('时间格式错误'); + } + if ($endTs < $startTs) { + Log::warning('admin.manual.jst.product.sync_by_time.invalid_range', [ + 'trace_id' => $traceId, + 'start_time' => $startTime, + 'end_time' => $endTime, + ]); + return $this->fail('时间范围错误'); + } + if (($endTs - $startTs) > 7 * 86400) { + Log::info('admin.manual.jst.product.sync_by_time.range_too_large', [ + 'trace_id' => $traceId, + 'start_time' => $startTime, + 'end_time' => $endTime, + 'range_seconds' => $endTs - $startTs, + ]); + return $this->fail('时间范围不能超过7天'); + } + $startTime = date('Y-m-d H:i:s', $startTs); + $endTime = date('Y-m-d H:i:s', $endTs); + + if ($sync) { + Log::info('admin.manual.jst.product.sync_by_time.run', [ + 'trace_id' => $traceId, + 'start_time' => $startTime, + 'end_time' => $endTime, + 'supplier_id' => $this->supplierId, + ]); + $result = (new ProductSyncErp())->syncProductByTime($startTime, $endTime, (int)$this->supplierId, $traceId, 'sync'); + if (!is_array($result) || empty($result['ok'])) { + return $this->fail('同步失败,请检查日志'); + } + return $this->success('同步完成', $result); + } else { + Log::info('admin.manual.jst.product.sync_by_time.dispatch', [ + 'trace_id' => $traceId, + 'start_time' => $startTime, + 'end_time' => $endTime, + 'supplier_id' => $this->supplierId, + ]); + ProductSyncErp::dispatchDo('syncProductByTime', [$startTime, $endTime, (int)$this->supplierId, $traceId]); + return $this->success('正在按时间范围同步中,请稍后查看', ['trace_id' => $traceId]); + } + } + if (!$spuStr) { - return $this->fail('请输入ERP商品SPU'); + return $this->fail('请输入ERP商品SPU或选择时间范围'); } $spus = array_unique(array_filter(explode(',', $spuStr))); - $traceId = uniqid('jst_', true); + $spusLog = $spus; + $spusTotal = count($spus); + if ($spusTotal > 50) { + $spusLog = array_slice($spus, 0, 50); + } Log::info('admin.manual.jst.product.sync.dispatch', [ 'trace_id' => $traceId, 'admin_id' => $this->adminId, 'admin_type' => $this->adminType, 'supplier_id' => $this->supplierId, 'client_ip' => $this->request->ip(), - 'count' => count($spus), - 'spus' => $spus + 'count' => $spusTotal, + 'spus' => $spusLog, + 'spus_truncated' => $spusTotal > 50 ]); if ($sync) { + $stats = [ + 'ok' => true, + 'mode' => 'spu', + 'trace_id' => $traceId, + 'spu_count' => $spusTotal, + 'fetched' => 0, + 'created' => 0, + 'updated' => 0, + 'skipped' => 0, + 'failed' => 0, + ]; foreach ($spus as $spu) { - (new ProductSyncErp())->productFromErp($spu, (int)$this->supplierId); + $rt = (new ProductSyncErp())->productFromErp($spu, (int)$this->supplierId, $traceId); + if (is_array($rt)) { + foreach (['fetched', 'created', 'updated', 'skipped', 'failed'] as $k) { + $stats[$k] += (int)($rt[$k] ?? 0); + } + } } - return $this->success('同步完成'); + return $this->success('同步完成', $stats); } else { foreach ($spus as $spu) { - ProductSyncErp::dispatchDo('productFromErp', [$spu, (int)$this->supplierId]); + ProductSyncErp::dispatchDo('productFromErp', [$spu, (int)$this->supplierId, $traceId]); } - return $this->success('正在同步中,请稍后查看'); + return $this->success('正在同步中,请稍后查看', ['trace_id' => $traceId, 'task_count' => $spusTotal]); } } + public function upload_jst_itemsku() + { + [$ids] = $this->request->postMore([ + ['ids', []], + ], true); + if (is_string($ids)) { + $ids = array_filter(explode(',', $ids)); + } + $ids = is_array($ids) ? array_values(array_unique(array_map('intval', $ids))) : []; + if (!$ids) { + return $this->fail('请选择商品'); + } + + $traceId = uniqid('jst_itemsku_', true); + Log::info('admin.manual.jst.itemsku.upload.start', [ + 'trace_id' => $traceId, + 'admin_id' => $this->adminId, + 'admin_type' => $this->adminType, + 'supplier_id' => $this->supplierId, + 'client_ip' => $this->request->ip(), + 'product_count' => count($ids), + 'product_ids' => $ids, + ]); + + $rt = app()->make(\app\haichao\HaichaoJstServices::class)->uploadItemSkuByProductIds($ids); + Log::info('admin.manual.jst.itemsku.upload.end', [ + 'trace_id' => $traceId, + 'upload_count' => $rt['upload_count'] ?? null, + ]); + return $this->success($rt); + } + /** * 商品批量操作 * @param StoreProductBatchProcessServices $batchProcessServices diff --git a/app/controller/admin/v1/statistic/OrderStatistic.php b/app/controller/admin/v1/statistic/OrderStatistic.php index 3402af1..5c25d99 100644 --- a/app/controller/admin/v1/statistic/OrderStatistic.php +++ b/app/controller/admin/v1/statistic/OrderStatistic.php @@ -14,6 +14,7 @@ namespace app\controller\admin\v1\statistic; use app\controller\admin\AuthController; use app\services\statistic\OrderStatisticServices; use think\annotation\Inject; +use think\facade\Log; class OrderStatistic extends AuthController { @@ -36,6 +37,10 @@ class OrderStatistic extends AuthController if($this->supplierId > 0){ $where['supplier_id'] = $this->supplierId; } + $params = $this->request->param(); + $paramsJson = json_encode($params, JSON_UNESCAPED_UNICODE); + $whereJson = json_encode($where, JSON_UNESCAPED_UNICODE); + Log::info('adminapi.statistic.order.get_basic supplierId:' . (int)$this->supplierId . ' params:' . ($paramsJson === false ? '' : $paramsJson) . ' where:' . ($whereJson === false ? '' : $whereJson)); $data = $this->services->getBasic($where); return app('json')->success($data); } diff --git a/app/controller/api/v1/Login.php b/app/controller/api/v1/Login.php index 8ef5500..fa4a2f0 100644 --- a/app/controller/api/v1/Login.php +++ b/app/controller/api/v1/Login.php @@ -86,7 +86,7 @@ class Login $verifyCode = CacheService::get('code_' . $phone); if (!$verifyCode) return app('json')->fail('请先获取验证码'); - $verifyCode = substr($verifyCode, 0, 6); + $verifyCode = substr($verifyCode, 0, 4); if ($verifyCode != $captcha) { CacheService::delete('code_' . $phone); return app('json')->fail('验证码错误'); @@ -288,7 +288,7 @@ class Login $verifyCode = CacheService::get('code_' . $account); if (!$verifyCode) return app('json')->fail('请先获取验证码'); - $verifyCode = substr($verifyCode, 0, 6); + $verifyCode = substr($verifyCode, 0, 4); if ($verifyCode != $captcha) return app('json')->fail('验证码错误'); if (strlen(trim($password)) < 6 || strlen(trim($password)) > 16) @@ -318,7 +318,7 @@ class Login $verifyCode = CacheService::get('code_' . $account); if (!$verifyCode) return app('json')->fail('请先获取验证码'); - $verifyCode = substr($verifyCode, 0, 6); + $verifyCode = substr($verifyCode, 0, 4); if ($verifyCode != $captcha) { return app('json')->fail('验证码错误'); } @@ -353,7 +353,7 @@ class Login $verifyCode = CacheService::get('code_' . $phone); if (!$verifyCode) return app('json')->fail('请先获取验证码'); - $verifyCode = substr($verifyCode, 0, 6); + $verifyCode = substr($verifyCode, 0, 4); if ($verifyCode != $captcha) { return app('json')->fail('验证码错误'); } @@ -418,7 +418,7 @@ class Login $verifyCode = CacheService::get('code_' . $phone); if (!$verifyCode) return app('json')->fail('请先获取验证码'); - $verifyCode = substr($verifyCode, 0, 6); + $verifyCode = substr($verifyCode, 0, 4); if ($verifyCode != $captcha) { CacheService::delete('code_' . $phone); return app('json')->fail('验证码错误'); @@ -458,7 +458,7 @@ class Login $verifyCode = CacheService::get('code_' . $phone); if (!$verifyCode) return app('json')->fail('请先获取验证码'); - $verifyCode = substr($verifyCode, 0, 6); + $verifyCode = substr($verifyCode, 0, 4); if ($verifyCode != $captcha) return app('json')->fail('验证码错误'); } @@ -488,7 +488,7 @@ class Login $verifyCode = CacheService::get('code_' . $phone); if (!$verifyCode) return app('json')->fail('请先获取验证码'); - $verifyCode = substr($verifyCode, 0, 6); + $verifyCode = substr($verifyCode, 0, 4); if ($verifyCode != $captcha) return app('json')->fail('验证码错误'); $uid = (int)$request->uid(); diff --git a/app/controller/api/v1/system/UserApply.php b/app/controller/api/v1/system/UserApply.php index 48abfc6..a43803a 100644 --- a/app/controller/api/v1/system/UserApply.php +++ b/app/controller/api/v1/system/UserApply.php @@ -104,7 +104,7 @@ class UserApply $verifyCode = CacheService::get('code_' . $data['phone']); if (!$verifyCode) return app('json')->fail('请先获取验证码'); - $verifyCode = substr($verifyCode, 0, 6); + $verifyCode = substr($verifyCode, 0, 4); if ($verifyCode != $captcha) { return app('json')->fail('验证码错误'); } diff --git a/app/controller/api/v1/user/Channel.php b/app/controller/api/v1/user/Channel.php index 7936dd4..5b16358 100644 --- a/app/controller/api/v1/user/Channel.php +++ b/app/controller/api/v1/user/Channel.php @@ -76,7 +76,7 @@ class Channel $verifyCode = CacheService::get('code_' . $data['phone']); if (!$verifyCode) return app('json')->fail('请先获取验证码'); - $verifyCode = substr($verifyCode, 0, 6); + $verifyCode = substr($verifyCode, 0, 4); if ($verifyCode != $data['code']) { return app('json')->fail('验证码错误'); } diff --git a/app/controller/api/v1/wechat/Wechat.php b/app/controller/api/v1/wechat/Wechat.php index fd79043..7aa48d2 100644 --- a/app/controller/api/v1/wechat/Wechat.php +++ b/app/controller/api/v1/wechat/Wechat.php @@ -127,7 +127,7 @@ class Wechat $verifyCode = CacheService::get('code_' . $phone); if (!$verifyCode) return app('json')->fail('请先获取验证码'); - $verifyCode = substr($verifyCode, 0, 6); + $verifyCode = substr($verifyCode, 0, 4); if ($verifyCode != $captcha) { CacheService::delete('code_' . $phone); return app('json')->fail('验证码错误'); diff --git a/app/controller/api/v2/wechat/Routine.php b/app/controller/api/v2/wechat/Routine.php index 5926e81..a53c6a0 100644 --- a/app/controller/api/v2/wechat/Routine.php +++ b/app/controller/api/v2/wechat/Routine.php @@ -72,7 +72,7 @@ class Routine $verifyCode = CacheService::get('code_' . $phone); if (!$verifyCode) return app('json')->fail('请先获取验证码'); - $verifyCode = substr($verifyCode, 0, 6); + $verifyCode = substr($verifyCode, 0, 4); if ($verifyCode != $captcha) { return app('json')->fail('验证码错误'); } @@ -170,7 +170,7 @@ class Routine $verifyCode = CacheService::get('code_' . $phone); if (!$verifyCode) return app('json')->fail('请先获取验证码'); - $verifyCode = substr($verifyCode, 0, 6); + $verifyCode = substr($verifyCode, 0, 4); if ($verifyCode != $captcha) { CacheService::delete('code_' . $phone); return app('json')->fail('验证码错误'); diff --git a/app/controller/api/v2/wechat/Wechat.php b/app/controller/api/v2/wechat/Wechat.php index 6cec860..8d9cb55 100644 --- a/app/controller/api/v2/wechat/Wechat.php +++ b/app/controller/api/v2/wechat/Wechat.php @@ -112,7 +112,7 @@ class Wechat $verifyCode = CacheService::get('code_' . $phone); if (!$verifyCode) return app('json')->fail('请先获取验证码'); - $verifyCode = substr($verifyCode, 0, 6); + $verifyCode = substr($verifyCode, 0, 4); if ($verifyCode != $captcha) { CacheService::delete('code_' . $phone); return app('json')->fail('验证码错误'); diff --git a/app/controller/supplier/Common.php b/app/controller/supplier/Common.php index 357acaa..6a1c335 100644 --- a/app/controller/supplier/Common.php +++ b/app/controller/supplier/Common.php @@ -108,6 +108,9 @@ class Common extends AuthController */ public function homeStatics(SupplierOrderServices $orderServices) { + if (!(int)$this->supplierId) { + return $this->fail('登录已失效'); + } [$time] = $this->request->getMore([ ['data', '', '', 'time'] ], true); @@ -123,6 +126,9 @@ class Common extends AuthController */ public function orderChart(SupplierOrderServices $orderServices) { + if (!(int)$this->supplierId) { + return $this->fail('登录已失效'); + } [$time] = $this->request->getMore([ ['data', '', '', 'time'] ], true); @@ -138,6 +144,9 @@ class Common extends AuthController */ public function orderType(SupplierOrderServices $orderServices) { + if (!(int)$this->supplierId) { + return $this->fail('登录已失效'); + } [$time] = $this->request->getMore([ ['data', '', '', 'time'] ], true); @@ -153,6 +162,9 @@ class Common extends AuthController */ public function orderChannel(SupplierOrderServices $orderServices) { + if (!(int)$this->supplierId) { + return $this->fail('登录已失效'); + } [$time] = $this->request->getMore([ ['data', '', '', 'time'] ], true); @@ -167,6 +179,9 @@ class Common extends AuthController */ public function jnotice() { + if (!(int)$this->supplierId) { + return $this->fail('登录已失效'); + } /** @var StoreOrderServices $orderServices */ $orderServices = app()->make(StoreOrderServices::class); $orderNum = $orderServices->storeOrderCount((int)$this->supplierId, -1, 'supplier_id'); diff --git a/app/controller/supplier/Login.php b/app/controller/supplier/Login.php index b4b0222..f575f43 100644 --- a/app/controller/supplier/Login.php +++ b/app/controller/supplier/Login.php @@ -168,7 +168,7 @@ class Login $verifyCode = CacheService::get('code_' . $account); if (!$verifyCode) return app('json')->fail('请先获取验证码'); - $verifyCode = substr($verifyCode, 0, 6); + $verifyCode = substr($verifyCode, 0, 4); if ($verifyCode != $captcha) { return app('json')->fail('验证码错误'); } diff --git a/app/haichao/HaichaoBridge.php b/app/haichao/HaichaoBridge.php index d5c1615..7d61d92 100644 --- a/app/haichao/HaichaoBridge.php +++ b/app/haichao/HaichaoBridge.php @@ -15,12 +15,14 @@ abstract class HaichaoBridge 'shopId' => '', ]; + private string $tokenFile = 'runtime/jstdata/jst_token_data.json'; + public function __construct() { $this->api['appid'] = env('JST_APP_KEY', ''); $this->api['appSecret'] = env('JST_APP_SECRET', ''); $this->api['api'] = env('JST_API', 'https://openapi.jushuitan.com/'); - $this->api['access_token'] = env('JST_ACCESS_TOKEN', ''); + $this->api['access_token'] = $this->getToken(); $this->api['shopId'] = (string)env('JST_SHOP_ID', ''); } @@ -29,18 +31,46 @@ abstract class HaichaoBridge return $this->api['shopId']; } - /** - * 聚水潭开放平台请求封装 - * @param string $api - * @param array $data - * @param array $addonBody - * @return array - */ + /** + * 聚水潭开放平台请求封装 + * @param string $api + * @param array $data + * @param array $addonBody + * @return array + */ protected function post(string $api, array $data = [], array $addonBody = []): array + { + return $this->postInternal($api, $data, $addonBody); + } + + private function postInternal(string $api, array $data = [], array $addonBody = [], int $attempt = 0, bool $tokenRefreshed = false): array { if (!$this->api['appid'] || !$this->api['appSecret'] || !$this->api['access_token']) { throw new ValidateException('JST config missing'); } + $apiName = ltrim($api, '/'); + if ($apiName === 'open/inventory/query') { + $skuIdsRaw = $data['sku_ids'] ?? ''; + $skuIdsList = []; + if (is_array($skuIdsRaw)) { + $skuIdsList = array_values(array_filter(array_map('trim', $skuIdsRaw), static fn($v) => $v !== '')); + $skuIdsRaw = implode(',', $skuIdsList); + } else { + $skuIdsRaw = (string)$skuIdsRaw; + $skuIdsList = array_values(array_filter(array_map('trim', explode(',', trim($skuIdsRaw, ", \t\n\r\0\x0B"))), static fn($v) => $v !== '')); + } + Log::info('jst.api.inventory.query.request ' . json_encode([ + 'api' => $apiName, + 'attempt' => $attempt, + 'page_index' => $data['page_index'] ?? null, + 'page_num' => $data['page_num'] ?? null, + 'page_size' => $data['page_size'] ?? null, + 'sku_ids_count' => count($skuIdsList), + 'sku_ids' => $skuIdsList, + 'sku_ids_raw' => $skuIdsRaw, + ], JSON_UNESCAPED_UNICODE)); + } + $this->throttle(); $time = time(); $baseBody = [ 'access_token' => $this->api['access_token'], @@ -58,24 +88,90 @@ abstract class HaichaoBridge 'header' => 'Content-Type: application/json;charset=utf-8', 'content' => http_build_query($baseBody) ]; - $rt = json_decode(file_get_contents("{$this->api['api']}$api", false, stream_context_create($options)), true); + $raw = file_get_contents("{$this->api['api']}$api", false, stream_context_create($options)); + $rt = json_decode((string)$raw, true); + $respPreview = null; + try { + $respPreview = mb_substr((string)$raw, 0, 2000); + } catch (\Throwable $e) { + } + Log::info('jst.api.response ' . json_encode([ + 'api' => $api, + 'code' => $rt['code'] ?? null, + 'msg' => $rt['msg'] ?? null, + 'preview' => $respPreview, + ], JSON_UNESCAPED_UNICODE)); if (!is_array($rt) || !array_key_exists('code', $rt)) { - Log::error('JST response invalid ' . json_encode([ - 'api' => $api, - ], JSON_UNESCAPED_UNICODE)); + Log::error('JST response invalid ' . json_encode([ + 'api' => $api, + ], JSON_UNESCAPED_UNICODE)); throw new ValidateException('JST response invalid'); } if ($rt['code'] != 0) { - Log::error('JST request failed ' . json_encode([ - 'api' => $api, - 'code' => $rt['code'], - 'msg' => (string)($rt['msg'] ?? ''), - ], JSON_UNESCAPED_UNICODE)); + $code = (int)$rt['code']; + if (!$tokenRefreshed && $this->isTokenError($rt)) { + $this->api['access_token'] = $this->getToken(true); + return $this->postInternal($api, $data, $addonBody, $attempt + 1, true); + } + if ($this->isRateLimitError($code) && $attempt < 6) { + $sleepMs = $this->getRateLimitSleepMs($code, $attempt); + usleep($sleepMs * 1000); + return $this->postInternal($api, $data, $addonBody, $attempt + 1, $tokenRefreshed); + } + Log::error('JST request failed ' . json_encode([ + 'api' => $api, + 'code' => $code, + 'msg' => (string)($rt['msg'] ?? ''), + ], JSON_UNESCAPED_UNICODE)); throw new ValidateException($rt['msg'] ?? 'JST error'); } return $rt; } + private function throttle(): void + { + static $lastAt = 0.0; + static $recent = []; + + $minGap = 0.65; + while (true) { + $now = microtime(true); + $gap = $now - $lastAt; + if ($gap < $minGap) { + usleep((int)(($minGap - $gap) * 1000000)); + continue; + } + + $recent = array_values(array_filter($recent, static fn($t) => ($now - $t) < 60)); + if (count($recent) >= 95) { + $oldest = $recent[0] ?? $now; + $wait = 60 - ($now - $oldest) + 0.2; + if ($wait > 0) { + usleep((int)($wait * 1000000)); + continue; + } + } + + $lastAt = microtime(true); + $recent[] = $lastAt; + return; + } + } + + private function isRateLimitError(int $code): bool + { + return $code === 199 || $code === 200; + } + + private function getRateLimitSleepMs(int $code, int $attempt): int + { + $jitter = random_int(0, 300); + if ($code === 200) { + return min(60000, (int)(6000 * (1 + $attempt)) + $jitter); + } + return min(10000, (int)(900 * (1 + $attempt)) + $jitter); + } + private function sign(array $data): string { $computerStr = ""; @@ -85,4 +181,167 @@ abstract class HaichaoBridge $computerStr = $this->api['appSecret'] . $computerStr; return md5($computerStr); } + + private function isTokenError(array $rt): bool + { + $msg = (string)($rt['msg'] ?? ''); + if (!$msg) return false; + $msgLower = strtolower($msg); + return strpos($msgLower, 'access_token') !== false || strpos($msgLower, 'token') !== false; + } + + private function getToken(bool $forceRefresh = false): string + { + $tokenInfo = $this->readTokenInfo(); + if ($tokenInfo === null) { + $tokenInfo = $this->autoInitTokenFile(); + if ($tokenInfo === null) { + throw new ValidateException('JST token missing, please check .env JST_ACCESS_TOKEN config'); + } + } + if (!$forceRefresh && $tokenInfo) { + $accessToken = (string)($tokenInfo['access_token'] ?? ''); + $expiresIn = (int)($tokenInfo['expires_in'] ?? 0); + $tokenTime = (int)($tokenInfo['time'] ?? 0); + if ($accessToken && $expiresIn > 0 && $tokenTime > 0) { + if (time() < ($tokenTime + $expiresIn - 3600)) { + return $accessToken; + } + } + } + + $refreshToken = (string)($tokenInfo['refresh_token'] ?? ''); + if (!$refreshToken) { + $refreshToken = trim((string)env('JST_REFRESH_TOKEN', '')); + } + if ($refreshToken) { + $newTokenInfo = $this->refreshAccessToken($refreshToken); + $this->writeTokenInfo($newTokenInfo); + return (string)$newTokenInfo['access_token']; + } + + $code = (string)env('JST_AUTH_CODE', ''); + if ($code) { + $newTokenInfo = $this->code2accessToken($code); + $this->writeTokenInfo($newTokenInfo); + return (string)$newTokenInfo['access_token']; + } + + throw new ValidateException('JST token missing'); + } + + private function autoInitTokenFile(): ?array + { + $accessToken = (string)env('JST_ACCESS_TOKEN', ''); + $refreshToken = (string)env('JST_REFRESH_TOKEN', ''); + $expiresIn = (int)env('JST_EXPIRES_IN', 2592000); + + if (empty($accessToken)) { + return null; + } + + $tokenInfo = [ + 'access_token' => $accessToken, + 'expires_in' => $expiresIn, + 'refresh_token' => $refreshToken, + 'time' => time(), + ]; + + $this->writeTokenInfo($tokenInfo); + return $tokenInfo; + } + + private function refreshAccessToken(string $refreshToken): array + { + $params = []; + $params['app_key'] = $this->api['appid']; + $params['timestamp'] = time(); + $params['grant_type'] = 'refresh_token'; + $params['charset'] = 'utf-8'; + $params['refresh_token'] = $refreshToken; + $params['scope'] = 'all'; + $params['sign'] = $this->sign($params); + + $url = "{$this->api['api']}openWeb/auth/refreshToken"; + $raw = file_get_contents($url, false, stream_context_create([ + 'http' => [ + 'timeout' => 60, + 'method' => 'POST', + 'header' => 'Content-Type: application/x-www-form-urlencoded;charset=UTF-8', + 'content' => http_build_query($params), + ], + ])); + $rt = json_decode((string)$raw, true); + if (!is_array($rt) || !array_key_exists('code', $rt)) { + throw new ValidateException('JST response invalid'); + } + if ((int)$rt['code'] !== 0) { + throw new ValidateException((string)($rt['msg'] ?? 'JST error')); + } + $data = $rt['data'] ?? []; + if (!is_array($data) || empty($data['access_token'])) { + throw new ValidateException('JST token invalid'); + } + return $data; + } + + private function code2accessToken(string $code): array + { + $params = []; + $params['app_key'] = $this->api['appid']; + $params['timestamp'] = time(); + $params['grant_type'] = 'authorization_code'; + $params['charset'] = 'utf-8'; + $params['code'] = $code; + $params['sign'] = $this->sign($params); + + $url = "{$this->api['api']}openWeb/auth/accessToken"; + $raw = file_get_contents($url, false, stream_context_create([ + 'http' => [ + 'timeout' => 60, + 'method' => 'POST', + 'header' => 'Content-Type: application/x-www-form-urlencoded;charset=UTF-8', + 'content' => http_build_query($params), + ], + ])); + $rt = json_decode((string)$raw, true); + if (!is_array($rt) || !array_key_exists('code', $rt)) { + throw new ValidateException('JST response invalid'); + } + if ((int)$rt['code'] !== 0) { + throw new ValidateException((string)($rt['msg'] ?? 'JST error')); + } + $data = $rt['data'] ?? []; + if (!is_array($data) || empty($data['access_token'])) { + throw new ValidateException('JST token invalid'); + } + return $data; + } + + private function readTokenInfo(): ?array + { + $file = root_path() . $this->tokenFile; + if (!is_file($file)) { + Log::info('JST token file not found, will try to auto init from .env'); + return null; + } + $raw = file_get_contents($file); + if (!$raw) return null; + $arr = json_decode((string)$raw, true); + if (!is_array($arr) || empty($arr['access_token'])) { + Log::warning('JST token file is invalid, will try to auto init from .env'); + return null; + } + return $arr; + } + + private function writeTokenInfo(array $tokenInfo): void + { + $dir = root_path() . 'runtime/jstdata'; + if (!is_dir($dir)) { + mkdir($dir, 0777, true); + } + $tokenInfo['time'] = time(); + file_put_contents(root_path() . $this->tokenFile, json_encode($tokenInfo, JSON_UNESCAPED_UNICODE)); + } } diff --git a/app/haichao/HaichaoJstServices.php b/app/haichao/HaichaoJstServices.php index 6d01277..7af4aa7 100644 --- a/app/haichao/HaichaoJstServices.php +++ b/app/haichao/HaichaoJstServices.php @@ -135,6 +135,12 @@ class HaichaoJstServices extends HaichaoBridge } } } + Log::info('jst.orders_upload.request ' . json_encode([ + 'api' => 'open/jushuitan/orders/upload', + 'oid' => $oid, + 'shop_status' => $status, + 'biz' => $biz, + ], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES)); $num = 3; for ($i = $num; $i >= 0; $i--) { if ($i <= 0) { @@ -652,6 +658,26 @@ class HaichaoJstServices extends HaichaoBridge return $data; } + /** + * 按时间范围获取聚水潭商品列表 + * @param string $startTime 开始时间 Y-m-d H:i:s + * @param string $endTime 结束时间 Y-m-d H:i:s + * @param int $pageIndex 页码 + * @param int $pageSize 每页数量 + * @return array + */ + public function getProductListByTime(string $startTime, string $endTime, int $pageIndex = 1, int $pageSize = 50): array + { + $data = $this->post('open/mall/item/query', [ + 'modified_begin' => $startTime, + 'modified_end' => $endTime, + 'page_index' => $pageIndex, + 'page_size' => $pageSize, + 'date_field' => '', + ])['data']; + return $data; + } + public function getProductListStand(): array { $time = 10; @@ -704,6 +730,94 @@ class HaichaoJstServices extends HaichaoBridge return $data; } + public function uploadItemSku(array $items): array + { + return $this->post('open/jushuitan/itemsku/upload', [ + 'items' => $items, + ]); + } + + public function uploadItemSkuByProductIds(array $productIds): array + { + $productIds = array_values(array_unique(array_map('intval', $productIds))); + if (!$productIds) { + throw new ValidateException('请选择商品'); + } + + $products = \app\model\product\product\StoreProduct::whereIn('id', $productIds) + ->where('is_del', 0) + ->with(['attrValue']) + ->select() + ->toArray(); + + $items = []; + $errors = []; + foreach ($products as $product) { + $iId = trim((string)($product['code'] ?? '')); + $productId = (int)($product['id'] ?? 0); + if (!$iId) { + $errors[] = [ + 'product_id' => $productId, + 'msg' => '商品编码(code)为空', + ]; + continue; + } + + $skuList = $product['attr_value'] ?? ($product['attrValue'] ?? []); + if (!is_array($skuList) || !$skuList) { + $errors[] = [ + 'product_id' => $productId, + 'i_id' => $iId, + 'msg' => '商品规格为空', + ]; + continue; + } + + $productImage = (string)($product['image'] ?? ''); + $productName = (string)($product['store_name'] ?? ''); + $enabled = ((int)($product['is_show'] ?? 0) === 1) ? 1 : -1; + foreach ($skuList as $sku) { + $skuId = trim((string)($sku['code'] ?? '')); + if (!$skuId) { + $errors[] = [ + 'product_id' => $productId, + 'i_id' => $iId, + 'msg' => '规格编码(code)为空', + ]; + continue; + } + $skuImage = (string)($sku['image'] ?? $productImage); + $propertiesValue = (string)($sku['suk'] ?? ''); + $propertiesValue = str_replace(',', ';', $propertiesValue); + + $items[] = [ + 'i_id' => $iId, + 'sku_id' => $skuId, + 'name' => $productName, + 'properties_value' => $propertiesValue, + 's_price' => (float)($sku['price'] ?? ($product['price'] ?? 0)), + 'market_price' => (float)($sku['ot_price'] ?? ($product['ot_price'] ?? 0)), + 'c_price' => (float)($sku['cost'] ?? ($product['cost'] ?? 0)), + 'pic' => $productImage, + 'pic_big' => $productImage, + 'sku_pic' => $skuImage, + 'enabled' => $enabled, + ]; + } + } + + if (!$items) { + throw new ValidateException('没有可同步的商品规格'); + } + + $rt = $this->uploadItemSku($items); + return [ + 'upload_count' => count($items), + 'errors' => $errors, + 'jst' => $rt, + ]; + } + public function getStork(string $ids): array { return $this->post('open/inventory/query', [ @@ -758,28 +872,42 @@ class HaichaoJstServices extends HaichaoBridge return $result; } - public function getInneropenStockAndDetailList($styleCodes): array + public function getInneropenStockAndDetailList(array|string $styleCodes, ?array &$stats = null): array { $rt = []; - $i = 1; - do { - $result = $this->post('open/inventory/query', [ - 'page_index' => $i++, - 'page_size' => 100, - 'sku_ids' => $styleCodes - ])['data']['inventorys'] ?? []; - - // 适配原来的返回格式结构 - $formatResult = []; - foreach ($result as $item) { - $formatResult[] = [ - 'item_code' => $item['sku_id'], - 'stock' => max(0, ($item['qty'] ?? 0) - ($item['order_lock'] ?? 0)) // 实际可用库存 - ]; + $codeList = is_array($styleCodes) ? $styleCodes : explode(',', trim($styleCodes, ", \t\n\r\0\x0B")); + $codeList = array_values(array_filter(array_map('trim', $codeList), static fn($v) => $v !== '')); + + foreach (array_chunk($codeList, 100) as $chunkCodes) { + if ($stats !== null) { + $stats['chunk_count'] = (int)($stats['chunk_count'] ?? 0) + 1; + $stats['request_sku_count'] = (int)($stats['request_sku_count'] ?? 0) + count($chunkCodes); } - $rt = array_merge($formatResult, $rt); - usleep(550); - } while (count($result) == 100); + $i = 1; + do { + if ($stats !== null) { + $stats['api_call_count'] = (int)($stats['api_call_count'] ?? 0) + 1; + } + $result = $this->post('open/inventory/query', [ + 'page_index' => $i++, + 'page_size' => 100, + 'sku_ids' => implode(',', $chunkCodes) + ])['data']['inventorys'] ?? []; + if ($stats !== null) { + $stats['api_resp_row_count'] = (int)($stats['api_resp_row_count'] ?? 0) + count($result); + } + + $formatResult = []; + foreach ($result as $item) { + $formatResult[] = [ + 'item_code' => $item['sku_id'], + 'stock' => max(0, ($item['qty'] ?? 0) - ($item['order_lock'] ?? 0)) + ]; + } + $rt = array_merge($formatResult, $rt); + usleep(550000); + } while (count($result) == 100); + } return $rt; } diff --git a/app/haichao/callback/event/JstProductEvent.php b/app/haichao/callback/event/JstProductEvent.php index 3b50d55..db6f626 100644 --- a/app/haichao/callback/event/JstProductEvent.php +++ b/app/haichao/callback/event/JstProductEvent.php @@ -13,31 +13,82 @@ class JstProductEvent implements JstEvent { try { $param = $request->param(); - $body = json_decode((string)($param['biz'] ?? '{}'), true); + $actionCode = (string)($param['action_code'] ?? ''); + $parseFrom = 'param.biz'; + $bizRaw = (string)($param['biz'] ?? ''); + $body = json_decode($bizRaw !== '' ? $bizRaw : '{}', true); + if (!is_array($body)) { + Log::warning('jst.cb.product_stock.parse_fail ' . json_encode([ + 'action_code' => $actionCode, + 'from' => $parseFrom, + 'biz_raw_len' => strlen($bizRaw), + ], JSON_UNESCAPED_UNICODE)); + $body = []; + } $skuId = (string)($body['skuId'] ?? ''); $stock = (int)($body['qty'] ?? 0); if (!$skuId) { $cont = $request->getContent(); $output = []; parse_str($cont, $output); - $body = json_decode((string)($output['biz'] ?? '{}'), true); + $actionCode = (string)($output['action_code'] ?? $actionCode); + $parseFrom = 'content.parse_str.biz'; + $bizRaw = (string)($output['biz'] ?? ''); + $body = json_decode($bizRaw !== '' ? $bizRaw : '{}', true); + if (!is_array($body)) { + Log::warning('jst.cb.product_stock.parse_fail ' . json_encode([ + 'action_code' => $actionCode, + 'from' => $parseFrom, + 'biz_raw_len' => strlen($bizRaw), + 'content_len' => strlen((string)$cont), + ], JSON_UNESCAPED_UNICODE)); + $body = []; + } $skuId = (string)($body['skuId'] ?? ''); $stock = (int)($body['qty'] ?? 0); } - if (!$skuId) return []; + if (!$skuId) { + Log::warning('jst.cb.product_stock.miss ' . json_encode([ + 'action_code' => $actionCode, + 'from' => $parseFrom, + 'sku_id' => $skuId, + ], JSON_UNESCAPED_UNICODE)); + return []; + } /** @var StoreProductAttrValueServices $spas */ $spas = app()->make(StoreProductAttrValueServices::class); $model = $spas->getOne(['code' => $skuId]); - if ($model) { - $pdt = $model->toArray(); - $id = $pdt['id'] ?? 0; - if ($id) { - $spas->update($id, [ + if (!$model) { + Log::warning('jst.cb.product_stock.not_found ' . json_encode([ + 'action_code' => $actionCode, + 'from' => $parseFrom, + 'sku_id' => $skuId, 'stock' => $stock, - 'sum_stock' => $stock - ]); - } + ], JSON_UNESCAPED_UNICODE)); + return []; } + $pdt = $model->toArray(); + $id = (int)($pdt['id'] ?? 0); + if (!$id) { + Log::warning('jst.cb.product_stock.not_found ' . json_encode([ + 'action_code' => $actionCode, + 'from' => $parseFrom, + 'sku_id' => $skuId, + 'stock' => $stock, + ], JSON_UNESCAPED_UNICODE)); + return []; + } + $spas->update($id, [ + 'stock' => $stock, + 'sum_stock' => $stock + ]); + Log::info('jst.cb.product_stock.updated ' . json_encode([ + 'action_code' => $actionCode, + 'from' => $parseFrom, + 'attr_value_id' => $id, + 'sku_id' => $skuId, + 'stock' => $stock, + ], JSON_UNESCAPED_UNICODE)); } catch (Throwable $e) { Log::error('jst.cb.product_stock.error ' . json_encode([ 'msg' => $e->getMessage(), diff --git a/app/haichao/sync/JstProductSync.php b/app/haichao/sync/JstProductSync.php index 859fb6f..195aa66 100644 --- a/app/haichao/sync/JstProductSync.php +++ b/app/haichao/sync/JstProductSync.php @@ -157,6 +157,7 @@ class JstProductSync extends HaichaoJstServices } else { $productServices->update($pidNow, $productInfo); } + $productServices->ensureSpu((int)$pidNow); ProductStockTips::dispatch([$pidNow, 0]); $attr = [[ 'value' => '规格', @@ -324,6 +325,7 @@ class JstProductSync extends HaichaoJstServices } else { $productServices->update($pid, $productInfo); } + $productServices->ensureSpu((int)$pid); ProductStockTips::dispatch([$pid, 0]); $attr = [[ 'value' => '规格', diff --git a/app/haichao/sync/JstStorkSync.php b/app/haichao/sync/JstStorkSync.php index 65d61ca..22e4b66 100644 --- a/app/haichao/sync/JstStorkSync.php +++ b/app/haichao/sync/JstStorkSync.php @@ -16,45 +16,76 @@ class JstStorkSync extends HaichaoJstServices { public function syncStorkFromInneropenErp(): void { + $startAt = microtime(true); /** @var StoreProductAttrValueServices $storeProductAttrValueServices */ $storeProductAttrValueServices = app()->make(StoreProductAttrValueServices::class); Log::info('jst.stork.sync.start'); - $inventorySkuIds = []; - $skuIds = ''; - $index = 1; - $count = 0; + $codes = []; + $spuIds = []; + $codeIdMap = []; + $codeProductIdMap = []; foreach ($storeProductAttrValueServices->getList(['is_del' => 0]) as $item) { - if ($item['code']) { - $skuIds .= $item['code'] . ','; - $count++; - $inventorySkuIds[$index] = [ - 'length' => $count, - 'ids' => $skuIds, - ]; - if ($count >= 500) { - $skuIds = ''; - $index++; - $count = 0; + $code = (string)($item['code'] ?? ''); + if ($code !== '') { + $codes[] = $code; + $id = (int)($item['id'] ?? 0); + if ($id > 0) { + $codeIdMap[$code] = $id; + } + $productId = (int)($item['product_id'] ?? 0); + if ($productId > 0) { + $spuIds[$productId] = 1; + $codeProductIdMap[$code] = $productId; } } } - $productStock = []; - foreach ($inventorySkuIds as $inventorySkuId) { - foreach ($this->getInneropenStockAndDetailList($inventorySkuId['ids']) as $product) { - $productStock[] = [ - 'code' => $product['item_code'], - 'stock' => $product['stock'] - ]; + $codes = array_values(array_unique($codes)); + Log::info('jst.stork.sync.request_stats ' . json_encode([ + 'spu_count' => count($spuIds), + 'sku_count' => count($codes), + ], JSON_UNESCAPED_UNICODE)); + + $pullStats = []; + $productStockMap = []; + foreach ($this->getInneropenStockAndDetailList($codes, $pullStats) as $product) { + $productStockMap[(string)$product['item_code']] = (int)$product['stock']; + } + $respSpuIds = []; + foreach (array_keys($productStockMap) as $code) { + if (isset($codeProductIdMap[$code])) { + $respSpuIds[$codeProductIdMap[$code]] = 1; } } - Log::info('jst.stork.sync.merge ' . count($productStock)); - foreach ($productStock as $item) { - $storeProductAttrValueServices->update(['code' => $item['code']], [ - 'stock' => $item['stock'], - 'sum_stock' => $item['stock'] + Log::info('jst.stork.sync.response_stats ' . json_encode([ + 'spu_count' => count($respSpuIds), + 'sku_count' => count($productStockMap), + 'api_call_count' => (int)($pullStats['api_call_count'] ?? 0), + 'api_resp_row_count' => (int)($pullStats['api_resp_row_count'] ?? 0), + ], JSON_UNESCAPED_UNICODE)); + + $updatedSkuCount = 0; + $notFoundSkuCount = 0; + foreach ($productStockMap as $code => $stock) { + $id = (int)($codeIdMap[$code] ?? 0); + if ($id < 1) { + $notFoundSkuCount++; + continue; + } + $storeProductAttrValueServices->update($id, [ + 'stock' => $stock, + 'sum_stock' => $stock ]); + $updatedSkuCount++; } - Log::info('jst.stork.sync.end'); + Log::info('jst.stork.sync.finish ' . json_encode([ + 'requested_spu_count' => count($spuIds), + 'requested_sku_count' => count($codes), + 'response_spu_count' => count($respSpuIds), + 'response_sku_count' => count($productStockMap), + 'update_sku_count' => $updatedSkuCount, + 'not_found_sku_count' => $notFoundSkuCount, + 'duration_ms' => (int)round((microtime(true) - $startAt) * 1000), + ], JSON_UNESCAPED_UNICODE)); } public function syncStockFromErp(array $ids): bool diff --git a/app/http/middleware/AllowOriginMiddleware.php b/app/http/middleware/AllowOriginMiddleware.php index 40d4696..a495fdc 100644 --- a/app/http/middleware/AllowOriginMiddleware.php +++ b/app/http/middleware/AllowOriginMiddleware.php @@ -42,8 +42,9 @@ class AllowOriginMiddleware implements MiddlewareInterface $header = Config::get('cookie.header'); $origin = $request->header('origin'); - if ($origin && ('' == $this->cookieDomain || strpos($origin, $this->cookieDomain))) + if ($origin && ('' === $this->cookieDomain || str_contains($origin, $this->cookieDomain))) { $header['Access-Control-Allow-Origin'] = $origin; + } if ($request->method(true) == 'OPTIONS') { $response = Response::create('ok')->code(200)->header($header); } else { diff --git a/app/jobs/product/ProductSyncErp.php b/app/jobs/product/ProductSyncErp.php index 3f71160..d34a033 100644 --- a/app/jobs/product/ProductSyncErp.php +++ b/app/jobs/product/ProductSyncErp.php @@ -8,6 +8,7 @@ use app\services\product\sku\StoreProductAttrValueServices; use app\haichao\HaichaoJstServices; use crmeb\basic\BaseJobs; use crmeb\exceptions\AdminException; +use crmeb\services\erp\Erp as erpServices; use crmeb\traits\QueueTrait; use think\facade\Log; @@ -42,7 +43,7 @@ class ProductSyncErp extends BaseJobs } foreach ($attrs as $item) { if ($item['pic'] && strstr($item['pic'], 'http') === false) { - $siteUrl = sys_config('site_url'); + $siteUrl = app()->make(\crmeb\services\SystemConfigService::class)->get('site_url'); $item['pic'] = $siteUrl . $item['pic']; } @@ -119,10 +120,18 @@ class ProductSyncErp extends BaseJobs * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException */ - public function productFromErp($spuArr, int $supplierId = 0) + public function productFromErp($spuArr, int $supplierId = 0, string $traceId = '') { + $stats = [ + 'trace_id' => $traceId, + 'fetched' => 0, + 'created' => 0, + 'updated' => 0, + 'skipped' => 0, + 'failed' => 0, + ]; try { - Log::info('admin.manual.jst.product.sync.request', ['spu' => $spuArr]); + Log::info('admin.manual.jst.product.sync.request', ['trace_id' => $traceId, 'spu' => $spuArr, 'supplier_id' => $supplierId]); $result = app()->make(HaichaoJstServices::class)->getProductListKuan($spuArr); $resultPreview = null; try { @@ -130,6 +139,7 @@ class ProductSyncErp extends BaseJobs } catch (\Throwable $e) { } Log::info('admin.manual.jst.product.sync.api_result', [ + 'trace_id' => $traceId, 'spu' => $spuArr, 'page_index' => $result['page_index'] ?? null, 'page_count' => $result['page_count'] ?? null, @@ -137,178 +147,29 @@ class ProductSyncErp extends BaseJobs 'result_preview' => $resultPreview, ]); $productList = $result['datas'] ?? []; - $productInfo = []; + $stats['fetched'] = is_array($productList) ? count($productList) : 0; + $stats = $this->mergeStats($stats, $this->processProductList($productList, $supplierId, $traceId, [ + 'mode' => 'spu', + 'spu' => $spuArr, + ])); + /** @var StoreProductServices $productServices */ $productServices = app()->make(StoreProductServices::class); /** @var StoreProductAttrServices $productAttrServices */ $productAttrServices = app()->make(StoreProductAttrServices::class); - - Log::info('admin.manual.jst.product.sync.response', [ - 'spu' => $spuArr, - 'datas_count' => is_array($productList) ? count($productList) : 0 - ]); - $relationSupplierId = $supplierId > 0 ? $supplierId : 0; - foreach ($productList as $item) { - Log::info('admin.manual.jst.product.sync.item', [ - 'spu' => $spuArr, - 'i_id' => $item['i_id'] ?? '', - 'name' => $item['name'] ?? '', - 'sku_count' => isset($item['skus']) && is_array($item['skus']) ? count($item['skus']) : 0 - ]); - $skuRows = isset($item['skus']) && is_array($item['skus']) ? $item['skus'] : []; - $salePrice = floatval($item['s_price'] ?? 0); - if ($salePrice <= 0 && $skuRows) { - $skuSalePrices = []; - foreach ($skuRows as $skuRow) { - if (isset($skuRow['sale_price']) && is_numeric($skuRow['sale_price'])) { - $skuSalePrices[] = floatval($skuRow['sale_price']); - } - } - if ($skuSalePrices) { - $salePrice = min($skuSalePrices); - } - } - $marketPrice = floatval($item['market_price'] ?? 0); - if ($marketPrice <= 0 && $skuRows) { - $skuMarketPrices = []; - foreach ($skuRows as $skuRow) { - if (isset($skuRow['market_price']) && is_numeric($skuRow['market_price'])) { - $skuMarketPrices[] = floatval($skuRow['market_price']); - } - } - if ($skuMarketPrices) { - $marketPrice = max($skuMarketPrices); - } - } - $costPrice = floatval($item['c_price'] ?? ($item['cost_price'] ?? 0)); - if ($costPrice <= 0 && $skuRows) { - $skuCostPrices = []; - foreach ($skuRows as $skuRow) { - if (isset($skuRow['cost_price']) && is_numeric($skuRow['cost_price'])) { - $skuCostPrices[] = floatval($skuRow['cost_price']); - } - } - if ($skuCostPrices) { - $costPrice = max($skuCostPrices); - } - } - $pic = (string)($item['pic'] ?? ($skuRows[0]['pic'] ?? '')); - $name = (string)($item['name'] ?? ($skuRows[0]['name'] ?? '')); - $productInfo = [ - 'image' => $pic, - 'slider_image' => json_encode([$pic]), - 'store_name' => $name, - 'store_info' => $name, - 'cate_id' => 0, - 'price' => $salePrice, - 'ot_price' => $marketPrice, - 'delivery_type' => '1,2,3', - 'freight' => 1, - 'is_show' => 0, - 'add_time' => time(), - 'cost' => $costPrice, - 'ficti' => 0, - 'spec_type' => 1, - 'code' => $item['i_id'], - 'type' => $relationSupplierId ? 2 : 0, - 'relation_id' => $relationSupplierId, - ]; - $detail = $details = $value = []; - $usedSpecValues = []; - foreach ($skuRows as $skuIndex => $items) { - $specValue = trim((string)($items['properties_value'] ?? '')); - if ($specValue === '') { - $specValue = trim((string)($items['name'] ?? '')); - } - if ($specValue === '') { - $specValue = '规格' . ($skuIndex + 1); - } - if (isset($usedSpecValues[$specValue])) { - $specValue = $specValue . '-' . ($skuIndex + 1); - } - $usedSpecValues[$specValue] = 1; - $detail[] = $specValue; - $details[] = [ - 'name' => $specValue, - 'select' => false - ]; - $skuCost = floatval($items['cost_price'] ?? $costPrice); - $skuSettle = $relationSupplierId ? $skuCost : 0.0; - $value[] = [ - 'bar_code' => '', - 'brokerage' => 0, - 'brokerage_two' => 0, - 'code' => (string)($items['sku_id'] ?? ''), - 'settle_price' => $skuSettle, - 'cost' => $skuCost, - 'detail' => ['规格' => $specValue], - 'ot_price' => floatval($items['market_price'] ?? $marketPrice), - 'pic' => (string)$items['pic'], - 'price' => floatval($items['sale_price'] ?? $salePrice), - 'select' => true, - 'value1' => $specValue, - 'values' => $specValue, - 'vip_price' => 0, - 'volume' => 0, - 'weight' => 0, - 'stock' => 0, - ]; - } - if (!$value) { - $specValue = '默认'; - $detail[] = $specValue; - $details[] = [ - 'name' => $specValue, - 'select' => false - ]; - $defCost = floatval($item['c_price'] ?? 0); - $defSettle = $relationSupplierId ? $defCost : 0.0; - $value[] = [ - 'bar_code' => '', - 'brokerage' => 0, - 'brokerage_two' => 0, - 'code' => (string)($item['i_id'] ?? ''), - 'settle_price' => $defSettle, - 'cost' => $defCost, - 'detail' => ['规格' => $specValue], - 'ot_price' => floatval($item['market_price'] ?? 0), - 'pic' => (string)($item['pic'] ?? ''), - 'price' => floatval($item['s_price'] ?? 0), - 'select' => true, - 'value1' => $specValue, - 'values' => $specValue, - 'vip_price' => 0, - 'volume' => 0, - 'weight' => 0, - 'stock' => 0, - ]; - } - $pid = $productServices->value(['code' => $item['i_id']], 'id'); - $existed = !!$pid; - if (!$pid) { - $pid = $productServices->ErpProductSave($productInfo); - } - $attr = [[ - 'value' => '规格', - 'detail' => $detail, - 'details' => $details, - ]]; - - $skuList = $productAttrServices->validateProductAttr($attr, $value, $pid, 0, 0, 0); - $productAttrServices->saveProductAttr($skuList, $pid); - Log::info('admin.manual.jst.product.sync.save', [ - 'spu' => $spuArr, - 'product_id' => $pid, - 'existed' => $existed, - 'sku_saved_count' => isset($skuList['value']) && is_array($skuList['value']) ? count($skuList['value']) : 0 - ]); - } - - //清除数据缓存 $productServices->cacheTag()->clear(); $productAttrServices->cacheTag()->clear(); - Log::info('admin.manual.jst.product.sync.finish', ['spu' => $spuArr, 'count' => count($productList)]); + Log::info('admin.manual.jst.product.sync.finish', [ + 'trace_id' => $traceId, + 'spu' => $spuArr, + 'count' => is_array($productList) ? count($productList) : 0, + 'created' => $stats['created'], + 'updated' => $stats['updated'], + 'skipped' => $stats['skipped'], + 'failed' => $stats['failed'], + ]); + return $stats; } catch (\Exception $e) { response_log_write([ @@ -316,11 +177,433 @@ class ProductSyncErp extends BaseJobs 'file' => $e->getFile(), 'line' => $e->getLine() ]); - Log::error('admin.manual.jst.product.sync.error', ['spu' => $spuArr, 'message' => $e->getMessage()]); + Log::error('admin.manual.jst.product.sync.error', ['trace_id' => $traceId, 'spu' => $spuArr, 'message' => $e->getMessage()]); + $stats['failed']++; + return $stats; } + } + private function mergeStats(array $base, array $delta): array + { + foreach (['fetched', 'created', 'updated', 'skipped', 'failed'] as $key) { + $base[$key] = (int)($base[$key] ?? 0) + (int)($delta[$key] ?? 0); + } + return $base; + } - return true; + private function processProductList($productList, int $supplierId, string $traceId, array $context = []): array + { + $stats = [ + 'fetched' => 0, + 'created' => 0, + 'updated' => 0, + 'skipped' => 0, + 'failed' => 0, + ]; + if (!is_array($productList)) { + return $stats; + } + $stats['fetched'] = count($productList); + $seenCodes = []; + foreach ($productList as $item) { + if (!is_array($item)) { + $stats['skipped']++; + continue; + } + $code = (string)($item['i_id'] ?? ''); + if ($code === '') { + $stats['skipped']++; + continue; + } + if (isset($seenCodes[$code])) { + $stats['skipped']++; + continue; + } + $seenCodes[$code] = 1; + try { + $save = $this->saveProductFromErpData($item, $supplierId); + if (!empty($save['created'])) { + $stats['created']++; + } else { + $stats['updated']++; + } + } catch (\Throwable $e) { + $stats['failed']++; + Log::error('admin.manual.jst.product.sync.item.error', [ + 'trace_id' => $traceId, + 'i_id' => $code, + 'message' => $e->getMessage(), + 'context' => $context, + ]); + } + } + return $stats; + } + + /** + * 按时间范围同步商品 + * @param string $startTime + * @param string $endTime + * @param int $supplierId + * @return bool + */ + public function syncProductByTime(string $startTime, string $endTime, int $supplierId = 0, string $traceId = '', string $mode = 'dispatch') + { + $startTs = strtotime($startTime); + $endTs = strtotime($endTime); + if ($startTs && $endTs) { + $maxSeconds = 7 * 86400; + if (($endTs - $startTs) > $maxSeconds) { + Log::warning('admin.manual.jst.product.sync_by_time.range_too_large', [ + 'trace_id' => $traceId, + 'start_time' => $startTime, + 'end_time' => $endTime, + 'range_seconds' => $endTs - $startTs, + 'max_seconds' => $maxSeconds, + 'supplier_id' => $supplierId, + ]); + return [ + 'ok' => false, + 'error' => '时间范围不能超过7天', + 'trace_id' => $traceId, + ]; + } + } + try { + $stats = [ + 'ok' => true, + 'mode' => $mode, + 'trace_id' => $traceId, + 'start_time' => $startTime, + 'end_time' => $endTime, + 'page_count' => 1, + 'pages_processed' => 0, + 'fetched' => 0, + 'created' => 0, + 'updated' => 0, + 'skipped' => 0, + 'failed' => 0, + ]; + Log::info('admin.manual.jst.product.sync_by_time.start', [ + 'trace_id' => $traceId, + 'start_time' => $startTime, + 'end_time' => $endTime, + 'supplier_id' => $supplierId + ]); + $jstService = app()->make(HaichaoJstServices::class); + $result = $jstService->getProductListByTime($startTime, $endTime, 1, 50); + $pageCount = $result['page_count'] ?? 1; + $stats['page_count'] = (int)$pageCount; + Log::info('admin.manual.jst.product.sync_by_time.api_result', [ + 'trace_id' => $traceId, + 'page' => 1, + 'page_count' => $pageCount, + 'datas_count' => isset($result['datas']) && is_array($result['datas']) ? count($result['datas']) : 0, + ]); + + $pageStats = $this->processProductList($result['datas'] ?? [], $supplierId, $traceId, [ + 'mode' => 'time', + 'page' => 1, + ]); + $stats = $this->mergeStats($stats, $pageStats); + $stats['pages_processed']++; + + if ($pageCount > 1) { + if ($mode === 'sync') { + for ($i = 2; $i <= $pageCount; $i++) { + $pageResult = $jstService->getProductListByTime($startTime, $endTime, $i, 50); + $productList = $pageResult['datas'] ?? []; + $resultPreview = null; + try { + $resultPreview = mb_substr(json_encode($pageResult, JSON_UNESCAPED_UNICODE), 0, 2000); + } catch (\Throwable $e) { + } + Log::info('admin.manual.jst.product.sync_page.api_result', [ + 'trace_id' => $traceId, + 'page' => $i, + 'page_count' => $pageResult['page_count'] ?? null, + 'datas_count' => is_array($productList) ? count($productList) : 0, + 'result_preview' => $resultPreview, + ]); + $stats = $this->mergeStats($stats, $this->processProductList($productList, $supplierId, $traceId, [ + 'mode' => 'time', + 'page' => $i, + ])); + $stats['pages_processed']++; + } + } else { + for ($i = 2; $i <= $pageCount; $i++) { + self::dispatchDo('syncProductPage', [$startTime, $endTime, $i, $supplierId, $traceId]); + } + } + } + + /** @var StoreProductServices $productServices */ + $productServices = app()->make(StoreProductServices::class); + /** @var StoreProductAttrServices $productAttrServices */ + $productAttrServices = app()->make(StoreProductAttrServices::class); + $productServices->cacheTag()->clear(); + $productAttrServices->cacheTag()->clear(); + Log::info('admin.manual.jst.product.sync_by_time.finish', [ + 'trace_id' => $traceId, + 'start_time' => $startTime, + 'end_time' => $endTime, + 'supplier_id' => $supplierId, + 'page_count' => $stats['page_count'], + 'pages_processed' => $stats['pages_processed'], + 'fetched' => $stats['fetched'], + 'created' => $stats['created'], + 'updated' => $stats['updated'], + 'skipped' => $stats['skipped'], + 'failed' => $stats['failed'], + ]); + return $stats; + } catch (\Exception $e) { + Log::error('admin.manual.jst.product.sync_by_time.error', [ + 'trace_id' => $traceId, + 'message' => $e->getMessage(), + 'start_time' => $startTime, + 'end_time' => $endTime + ]); + return [ + 'ok' => false, + 'error' => $e->getMessage(), + 'trace_id' => $traceId, + ]; + } + } + + /** + * 同步特定页码的商品 + * @param string $startTime + * @param string $endTime + * @param int $pageIndex + * @param int $supplierId + * @return bool + */ + public function syncProductPage(string $startTime, string $endTime, int $pageIndex, int $supplierId = 0, string $traceId = '') + { + try { + Log::info('admin.manual.jst.product.sync_page.start', [ + 'trace_id' => $traceId, + 'page' => $pageIndex, + 'start_time' => $startTime, + 'end_time' => $endTime + ]); + $jstService = app()->make(HaichaoJstServices::class); + $result = $jstService->getProductListByTime($startTime, $endTime, $pageIndex, 50); + $productList = $result['datas'] ?? []; + $resultPreview = null; + try { + $resultPreview = mb_substr(json_encode($result, JSON_UNESCAPED_UNICODE), 0, 2000); + } catch (\Throwable $e) { + } + Log::info('admin.manual.jst.product.sync_page.api_result', [ + 'trace_id' => $traceId, + 'page' => $pageIndex, + 'page_count' => $result['page_count'] ?? null, + 'datas_count' => is_array($productList) ? count($productList) : 0, + 'result_preview' => $resultPreview, + ]); + + $stats = $this->processProductList($productList, $supplierId, $traceId, [ + 'mode' => 'time', + 'page' => $pageIndex, + ]); + + /** @var StoreProductServices $productServices */ + $productServices = app()->make(StoreProductServices::class); + /** @var StoreProductAttrServices $productAttrServices */ + $productAttrServices = app()->make(StoreProductAttrServices::class); + $productServices->cacheTag()->clear(); + $productAttrServices->cacheTag()->clear(); + + Log::info('admin.manual.jst.product.sync_page.finish', [ + 'trace_id' => $traceId, + 'page' => $pageIndex, + 'count' => is_array($productList) ? count($productList) : 0, + 'created' => $stats['created'] ?? 0, + 'updated' => $stats['updated'] ?? 0, + 'skipped' => $stats['skipped'] ?? 0, + 'failed' => $stats['failed'] ?? 0, + ]); + return true; + } catch (\Exception $e) { + Log::error('admin.manual.jst.product.sync_page.error', [ + 'trace_id' => $traceId, + 'page' => $pageIndex, + 'message' => $e->getMessage() + ]); + return false; + } + } + + /** + * 保存从ERP获取的商品数据 + * @param array $item + * @param int $supplierId + */ + private function saveProductFromErpData(array $item, int $supplierId = 0): array + { + /** @var StoreProductServices $productServices */ + $productServices = app()->make(StoreProductServices::class); + /** @var StoreProductAttrServices $productAttrServices */ + $productAttrServices = app()->make(StoreProductAttrServices::class); + + $relationSupplierId = $supplierId > 0 ? $supplierId : 0; + Log::info('admin.manual.jst.product.sync.item.process', [ + 'i_id' => $item['i_id'] ?? '', + 'name' => $item['name'] ?? '', + 'sku_count' => isset($item['skus']) && is_array($item['skus']) ? count($item['skus']) : 0 + ]); + $skuRows = isset($item['skus']) && is_array($item['skus']) ? $item['skus'] : []; + $salePrice = floatval($item['s_price'] ?? 0); + if ($salePrice <= 0 && $skuRows) { + $skuSalePrices = []; + foreach ($skuRows as $skuRow) { + if (isset($skuRow['sale_price']) && is_numeric($skuRow['sale_price'])) { + $skuSalePrices[] = floatval($skuRow['sale_price']); + } + } + if ($skuSalePrices) { + $salePrice = min($skuSalePrices); + } + } + $marketPrice = floatval($item['market_price'] ?? 0); + if ($marketPrice <= 0 && $skuRows) { + $skuMarketPrices = []; + foreach ($skuRows as $skuRow) { + if (isset($skuRow['market_price']) && is_numeric($skuRow['market_price'])) { + $skuMarketPrices[] = floatval($skuRow['market_price']); + } + } + if ($skuMarketPrices) { + $marketPrice = max($skuMarketPrices); + } + } + $costPrice = floatval($item['c_price'] ?? ($item['cost_price'] ?? 0)); + if ($costPrice <= 0 && $skuRows) { + $skuCostPrices = []; + foreach ($skuRows as $skuRow) { + if (isset($skuRow['cost_price']) && is_numeric($skuRow['cost_price'])) { + $skuCostPrices[] = floatval($skuRow['cost_price']); + } + } + if ($skuCostPrices) { + $costPrice = max($skuCostPrices); + } + } + $pic = (string)($item['pic'] ?? ($skuRows[0]['pic'] ?? '')); + $name = (string)($item['name'] ?? ($skuRows[0]['name'] ?? '')); + $productInfo = [ + 'image' => $pic, + 'slider_image' => json_encode([$pic]), + 'store_name' => $name, + 'store_info' => $name, + 'cate_id' => 0, + 'price' => $salePrice, + 'ot_price' => $marketPrice, + 'delivery_type' => '1,2,3', + 'freight' => 1, + 'is_show' => 0, + 'add_time' => time(), + 'cost' => $costPrice, + 'ficti' => 0, + 'spec_type' => 1, + 'code' => $item['i_id'], + 'type' => $relationSupplierId ? 2 : 0, + 'relation_id' => $relationSupplierId, + ]; + $detail = $details = $value = []; + $usedSpecValues = []; + foreach ($skuRows as $skuIndex => $items) { + $specValue = trim((string)($items['properties_value'] ?? '')); + if ($specValue === '') { + $specValue = trim((string)($items['name'] ?? '')); + } + if ($specValue === '') { + $specValue = '规格' . ($skuIndex + 1); + } + if (isset($usedSpecValues[$specValue])) { + $specValue = $specValue . '-' . ($skuIndex + 1); + } + $usedSpecValues[$specValue] = 1; + $detail[] = $specValue; + $details[] = [ + 'name' => $specValue, + 'select' => false + ]; + $skuCost = floatval($items['cost_price'] ?? $costPrice); + $skuSettle = $relationSupplierId ? $skuCost : 0.0; + $value[] = [ + 'bar_code' => '', + 'brokerage' => 0, + 'brokerage_two' => 0, + 'code' => (string)($items['sku_id'] ?? ''), + 'settle_price' => $skuSettle, + 'cost' => $skuCost, + 'detail' => ['规格' => $specValue], + 'ot_price' => floatval($items['market_price'] ?? $marketPrice), + 'pic' => (string)$items['pic'], + 'price' => floatval($items['sale_price'] ?? $salePrice), + 'select' => true, + 'value1' => $specValue, + 'values' => $specValue, + 'vip_price' => 0, + 'volume' => 0, + 'weight' => 0, + 'stock' => 0, + ]; + } + if (!$value) { + $specValue = '默认'; + $detail[] = $specValue; + $details[] = [ + 'name' => $specValue, + 'select' => false + ]; + $defCost = floatval($item['c_price'] ?? 0); + $defSettle = $relationSupplierId ? $defCost : 0.0; + $value[] = [ + 'bar_code' => '', + 'brokerage' => 0, + 'brokerage_two' => 0, + 'code' => (string)($item['i_id'] ?? ''), + 'settle_price' => $defSettle, + 'cost' => $defCost, + 'detail' => ['规格' => $specValue], + 'ot_price' => floatval($item['market_price'] ?? 0), + 'pic' => (string)($item['pic'] ?? ''), + 'price' => floatval($item['s_price'] ?? 0), + 'select' => true, + 'value1' => $specValue, + 'values' => $specValue, + 'vip_price' => 0, + 'volume' => 0, + 'weight' => 0, + 'stock' => 0, + ]; + } + $pid = $productServices->value(['code' => $item['i_id']], 'id'); + $existed = !!$pid; + if (!$pid) { + $pid = $productServices->ErpProductSave($productInfo); + } + $productServices->ensureSpu((int)$pid); + $attr = [[ + 'value' => '规格', + 'detail' => $detail, + 'details' => $details, + ]]; + + $skuList = $productAttrServices->validateProductAttr($attr, $value, $pid, 0, 0, 0); + $productAttrServices->saveProductAttr($skuList, $pid); + Log::info('admin.manual.jst.product.sync.save', [ + 'product_id' => $pid, + 'existed' => $existed, + 'sku_saved_count' => isset($skuList['value']) && is_array($skuList['value']) ? count($skuList['value']) : 0 + ]); + return ['created' => !$existed, 'product_id' => $pid, 'existed' => $existed]; } /** @@ -412,7 +695,7 @@ class ProductSyncErp extends BaseJobs } // 更新平台商品库存 - $defaultShopId = (int)sys_config('jst_default_shopid'); + $defaultShopId = (int)app()->make(\crmeb\services\SystemConfigService::class)->get('jst_default_shopid'); if ($defaultShopId == $erpShopId) { $this->updateStoreProductValueStock($data); } diff --git a/app/services/erp/OrderServices.php b/app/services/erp/OrderServices.php index 124ff6d..dc21f3d 100644 --- a/app/services/erp/OrderServices.php +++ b/app/services/erp/OrderServices.php @@ -80,6 +80,12 @@ class OrderServices $biz = array_merge($biz, $this->getAddress($order['user_address'])); + Log::info('jst.orders_upload.request ' . json_encode([ + 'api' => 'open/jushuitan/orders/upload', + 'oid' => $oid, + 'biz' => $biz, + ], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES)); + $num = 3; for ($i = $num; $i >= 0; $i--) { if ($i <= 0) { @@ -544,7 +550,7 @@ class OrderServices public function getShopId(int $erpShopId): int { if ($erpShopId < 1) { - $erpShopId = sys_config('jst_default_shopid'); + $erpShopId = (int)app('sysConfig')->get('jst_default_shopid'); } return (int)$erpShopId; diff --git a/app/services/order/StoreOrderRefundServices.php b/app/services/order/StoreOrderRefundServices.php index 64ec307..2c91f0f 100644 --- a/app/services/order/StoreOrderRefundServices.php +++ b/app/services/order/StoreOrderRefundServices.php @@ -727,6 +727,19 @@ class StoreOrderRefundServices extends BaseServices OrderStatusJob::dispatch([$order['id'], 'refund_price', ['change_message' => '退款给用户:' . bcadd($online_refund_amount, $yue_refund_amount, 2) . '元; ' . $admin, 'change_manager_id' => request()->adminId(), 'change_manager_type' => 'admin']]); return $order; }); + if ($order['private_bind_id'] && (int)$order['private_phone_status'] === 1 && $order['user_phone']) { + try { + $privacyPhoneServices = app()->make(\app\services\other\PrivacyPhoneServices::class); + if ($privacyPhoneServices->unbindForOrder((string)$order['user_phone'], (string)$order['private_bind_id'])) { + $this->storeOrderServices->update($order['id'], ['private_phone_status' => 0]); + } + } catch (\Throwable $e) { + \think\facade\Log::error('退款解绑隐私小号失败 order_id={order_id} error={error}', [ + 'order_id' => $order['id'], + 'error' => $e->getMessage(), + ]); + } + } //订单同意退款事件 event('order.refund', [$refundData, $order, 'order_refund', (int)$id]); return true; diff --git a/app/services/order/StoreOrderServices.php b/app/services/order/StoreOrderServices.php index 4e3f46c..3024833 100644 --- a/app/services/order/StoreOrderServices.php +++ b/app/services/order/StoreOrderServices.php @@ -2027,6 +2027,19 @@ HTML; throw new ValidateException('订单号' . $order['order_id'] . ',取消订单失败'); } }); + if ($order['private_bind_id'] && (int)$order['private_phone_status'] === 1 && $order['user_phone']) { + try { + $privacyPhoneServices = app()->make(\app\services\other\PrivacyPhoneServices::class); + if ($privacyPhoneServices->unbindForOrder((string)$order['user_phone'], (string)$order['private_bind_id'])) { + $this->dao->update($order['id'], ['private_phone_status' => 0]); + } + } catch (\Throwable $e) { + \think\facade\Log::error('取消订单解绑隐私小号失败 order_id={order_id} error={error}', [ + 'order_id' => $order['id'], + 'error' => $e->getMessage(), + ]); + } + } //订单取消事件 event('order.cancel', [$order]); return true; @@ -2139,7 +2152,12 @@ HTML; public function getExportList(array $where, array $with = [], int $limit = 0) { if ($limit) { - [$page] = $this->getPageValue(); + $page = 1; + if (!empty($where['id'])) { + $page = 1; + } else { + [$page] = $this->getPageValue(); + } } else { [$page, $limit] = $this->getPageValue(); } @@ -2151,10 +2169,17 @@ HTML; foreach ($list as &$item) { /** @var StoreOrderCartInfoServices $orderCart */ $orderCart = app()->make(StoreOrderCartInfoServices::class); - $_info = $orderCart->getCartColunm(['oid' => $item['id']], 'cart_info', 'unique'); + $_info = $orderCart->getCartColunm(['oid' => $item['id']], 'cart_id,type,relation_id,is_gift,cart_num,refund_num,cart_info', 'unique'); foreach ($_info as $k => $v) { - $cart_info = is_string($v) ? json_decode($v, true) : $v; + $cart_info = is_string($v['cart_info']) ? json_decode($v['cart_info'], true) : $v['cart_info']; if (!isset($cart_info['productInfo'])) $cart_info['productInfo'] = []; + $cart_info['cart_num'] = $v['cart_num'] ?? ($cart_info['cart_num'] ?? 0); + $cart_info['refund_num'] = $v['refund_num'] ?? 0; + $cart_info['cart_id'] = $v['cart_id'] ?? ($cart_info['id'] ?? 0); + $cart_info['_relation_type'] = $v['type'] ?? 0; + $cart_info['_relation_id'] = $v['relation_id'] ?? 0; + $cart_info['is_gift'] = $v['is_gift'] ?? ($cart_info['is_gift'] ?? 0); + $cart_info['unique'] = $k; $_info[$k] = $cart_info; unset($cart_info); } diff --git a/app/services/other/PrivacyPhoneServices.php b/app/services/other/PrivacyPhoneServices.php index 579104a..0cb1f4f 100644 --- a/app/services/other/PrivacyPhoneServices.php +++ b/app/services/other/PrivacyPhoneServices.php @@ -23,6 +23,35 @@ use think\facade\Log; */ class PrivacyPhoneServices extends BaseServices { + /** + * 标准化AX小号:从后往前截取11位手机号 + * @param string $number + * @return string + */ + private function normalizeAxNumber(string $number): string + { + if ($number === '') { + return ''; + } + + return strlen($number) > 11 ? substr($number, -11) : $number; + } + + /** + * 日志上下文转字符串(ThinkPHP日志上下文仅支持占位符替换) + * @param mixed $value + * @return string + */ + private function toLogString($value): string + { + if (is_string($value)) { + return $value; + } + + $json = json_encode($value, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); + return $json === false ? var_export($value, true) : $json; + } + /** * API地址 */ @@ -122,10 +151,10 @@ class PrivacyPhoneServices extends BaseServices 'decoded' => json_decode($response, true) ?? [] ]; - Log::info('隐私小号API请求', [ + Log::info('隐私小号API请求 url={url} params={params} result={result}', [ 'url' => $url, - 'params' => $params, - 'result' => $result + 'params' => $this->toLogString($params), + 'result' => $this->toLogString($result), ]); return $result; @@ -267,23 +296,33 @@ class PrivacyPhoneServices extends BaseServices return $result; } - $bindResult = $this->axBind($number, $realPhone); + $bindNumber = $this->normalizeAxNumber($number); + if (strlen($bindNumber) !== 11) { + Log::error('隐私小号格式异常 raw_number={raw_number} bind_number={bind_number}', [ + 'raw_number' => $number, + 'bind_number' => $bindNumber, + ]); + return $result; + } + + $bindResult = $this->axBind($bindNumber, $realPhone); if (!empty($bindResult['success']) && $bindResult['code'] == 200) { $result = [ - 'user_phone' => $number, + 'user_phone' => $bindNumber, 'bind_id' => $realPhone, 'status' => 1 ]; - Log::info('隐私小号绑定成功', [ - 'privacy_phone' => $number, - 'real_phone' => $realPhone + Log::info('隐私小号绑定成功 privacy_phone={privacy_phone} real_phone={real_phone}', [ + 'privacy_phone' => $bindNumber, + 'real_phone' => $realPhone, ]); } } catch (\Exception $e) { - Log::error('隐私小号绑定异常', [ + Log::error('隐私小号绑定异常 real_phone={real_phone} ax_number={ax_number} error={error}', [ 'real_phone' => $realPhone, - 'error' => $e->getMessage() + 'ax_number' => $bindNumber ?? ($number ?? ''), + 'error' => $e->getMessage(), ]); } @@ -306,21 +345,30 @@ class PrivacyPhoneServices extends BaseServices return false; } + $unbindPhone = $this->normalizeAxNumber($privacyPhone); + if (strlen($unbindPhone) !== 11) { + Log::error('隐私小号格式异常 privacy_phone={privacy_phone} unbind_phone={unbind_phone}', [ + 'privacy_phone' => $privacyPhone, + 'unbind_phone' => $unbindPhone, + ]); + return false; + } + try { - $result = $this->unAxBind($privacyPhone, $realPhone); + $result = $this->unAxBind($unbindPhone, $realPhone); if (!empty($result['success']) && $result['code'] == 200) { - Log::info('隐私小号解绑成功', [ - 'privacy_phone' => $privacyPhone, - 'real_phone' => $realPhone + Log::info('隐私小号解绑成功 privacy_phone={privacy_phone} real_phone={real_phone}', [ + 'privacy_phone' => $unbindPhone, + 'real_phone' => $realPhone, ]); return true; } } catch (\Exception $e) { - Log::error('隐私小号解绑异常', [ - 'privacy_phone' => $privacyPhone, + Log::error('隐私小号解绑异常 privacy_phone={privacy_phone} real_phone={real_phone} error={error}', [ + 'privacy_phone' => $unbindPhone, 'real_phone' => $realPhone, - 'error' => $e->getMessage() + 'error' => $e->getMessage(), ]); } diff --git a/app/services/other/export/ExportServices.php b/app/services/other/export/ExportServices.php index d7c9249..d945a26 100644 --- a/app/services/other/export/ExportServices.php +++ b/app/services/other/export/ExportServices.php @@ -14,10 +14,14 @@ namespace app\services\other\export; use app\model\product\stock\StockRecord; use app\services\BaseServices; use app\jobs\system\ExportExcelJob; +use app\model\order\StoreOrderRefund; +use app\model\order\StoreOrderStatus; use app\services\order\StoreOrderServices; use app\services\pay\PayServices; +use app\services\product\label\StoreProductLabelServices; use app\services\product\product\StoreDescriptionServices; use app\services\product\sku\StoreProductAttrResultServices; +use app\services\supplier\SystemSupplierServices; use app\services\user\UserServices; use crmeb\services\SpreadsheetExcelService; @@ -729,9 +733,11 @@ class ExportServices extends BaseServices $header = ['订单ID', '订单编号', '性别', '电话', '收货人姓名', '收货人电话', '收货地址', '商品信息', '商品总数', '总价格', '实际支付', '邮费', '会员优惠金额', '优惠卷金额', '积分抵扣金额', '支付状态', '支付时间', '订单状态', '下单时间', '用户备注']; $header = [ - '订单号', '订单类型', '订单状态', '下单时间', '买家姓名(uid)', '买家手机号', '收货地址', '商品名称', '商品数量', '商品金额合计', '邮费', - '会员优惠', '优惠券优惠', '积分抵扣', '活动优惠', '首单优惠', '改价优惠', '实付金额', '实付邮费', '支付方式', + '订单号', '订单类型', '订单状态', '下单时间', '买家姓名(uid)', '用户名称', '买家手机号', '收货地址', + '商品名称', '商品标签', 'SPU', '款式编码', '商品编号', '商品规格', '商品数量', '商品金额合计', '结算价', '商品来源', + '邮费', '会员优惠', '优惠券优惠', '积分抵扣', '活动优惠', '首单优惠', '改价优惠', '实付金额', '实付邮费', '支付方式', '支付状态', '支付时间', '订单配送方式', '快递公司(单号)/送货人姓名(手机号)', + '退款状态', '退款金额', '分销员', '分销佣金', '订单发货时间', // '售后状态', '售后类型', '售后件数', '退款金额', '退款时间', '退货备注' ]; $title = ['订单导出', '订单信息' . time(), ' 生成时间:' . date('Y-m-d H:i:s', time())]; @@ -744,6 +750,96 @@ class ExportServices extends BaseServices $export = []; $filekey = []; if (!empty($data)) { + $userList = []; + $spreadList = []; + $orderStatusTime = []; + $refundCartMap = []; + $supplierList = []; + $labelNameMap = []; + if (!$type) { + $userServices = app()->make(UserServices::class); + $uids = array_values(array_unique(array_column($data, 'uid'))); + $userList = $uids ? $userServices->getColumn([['uid', 'IN', $uids]], 'uid,nickname,spread_uid', 'uid') : []; + $spreadUids = $userList ? array_values(array_filter(array_unique(array_column($userList, 'spread_uid')))) : []; + $spreadList = $spreadUids ? $userServices->getColumn([['uid', 'IN', $spreadUids]], 'uid,nickname', 'uid') : []; + + $orderIds = array_values(array_unique(array_column($data, 'id'))); + $statusRows = StoreOrderStatus::whereIn('oid', $orderIds) + ->whereIn('change_type', ['delivery', 'delivery_goods', 'delivery_part_split', 'delivery_split', 'delivery_fictitious']) + ->field(['oid', 'change_type', 'change_time']) + ->order('change_time desc') + ->select() + ->toArray(); + foreach ($statusRows as $row) { + $oid = (int)$row['oid']; + $changeType = (string)$row['change_type']; + if (!isset($orderStatusTime[$oid][$changeType])) { + $orderStatusTime[$oid][$changeType] = (int)$row['change_time']; + } + } + + $refundRows = StoreOrderRefund::whereIn('store_order_id', $orderIds) + ->where('is_cancel', 0) + ->where('is_del', 0) + ->whereIn('refund_type', [0, 1, 2, 4, 5, 6]) + ->field(['store_order_id', 'refund_type', 'cart_info']) + ->select() + ->toArray(); + foreach ($refundRows as $refund) { + $oid = (int)$refund['store_order_id']; + $refundType = (int)$refund['refund_type']; + $cartInfo = $refund['cart_info'] ?? []; + foreach ($cartInfo as $cart) { + $cartId = (int)($cart['id'] ?? 0); + $qty = (int)($cart['cart_num'] ?? 0); + if (!$cartId || !$qty) { + continue; + } + if (!isset($refundCartMap[$oid][$cartId])) { + $refundCartMap[$oid][$cartId] = ['refunding_qty' => 0, 'refunded_qty' => 0]; + } + if ($refundType === 6) { + $refundCartMap[$oid][$cartId]['refunded_qty'] += $qty; + } else { + $refundCartMap[$oid][$cartId]['refunding_qty'] += $qty; + } + } + } + + $supplierIds = []; + $labelIds = []; + foreach ($data as $o) { + foreach ($o['_info'] ?? [] as $cart) { + $productInfo = $cart['productInfo'] ?? []; + $supplierId = (int)($productInfo['supplier_id'] ?? 0); + if ($supplierId > 0) { + $supplierIds[$supplierId] = $supplierId; + } elseif ((int)($cart['_relation_type'] ?? 0) === 2 && (int)($cart['_relation_id'] ?? 0) > 0) { + $supplierId = (int)$cart['_relation_id']; + $supplierIds[$supplierId] = $supplierId; + } + $storeLabelId = $productInfo['store_label_id'] ?? []; + $storeLabelId = is_string($storeLabelId) ? array_map('intval', array_filter(explode(',', $storeLabelId))) : (is_array($storeLabelId) ? $storeLabelId : []); + foreach ($storeLabelId as $lid) { + $lid = (int)$lid; + if ($lid > 0) { + $labelIds[$lid] = $lid; + } + } + } + } + + $supplierService = app()->make(SystemSupplierServices::class); + $supplierList = $supplierIds ? $supplierService->getColumn([['id', 'IN', array_values($supplierIds)]], 'id,supplier_name', 'id') : []; + + $labelService = app()->make(StoreProductLabelServices::class); + $labelList = $labelIds ? $labelService->getLabelCache(array_values($labelIds), ['id', 'label_name'], false) : []; + foreach ($labelList as $label) { + if (isset($label['id'])) { + $labelNameMap[(int)$label['id']] = (string)($label['label_name'] ?? ''); + } + } + } $i = 0; foreach ($data as $item) { if (!$type) { @@ -805,24 +901,9 @@ class ExportServices extends BaseServices } else if ($item['paid'] == 1 && $item['refund_status'] == 3) { $item['status_name'] = '部分退款'; } - $goodsName = []; $vip_sum_price = 0; - foreach ($item['_info'] as $k => $v) { - $suk = ''; - if (isset($v['productInfo']['attrInfo'])) { - if (isset($v['productInfo']['attrInfo']['suk'])) { - $suk = '(' . $v['productInfo']['attrInfo']['suk'] . ')'; - } - } - if (isset($v['productInfo']['store_name'])) { - $goodsName[] = implode(' ', - [ - $v['productInfo']['store_name'], - $suk, - "[{$v['cart_num']} * {$v['truePrice']}]", - ]); - } - $vip_sum_price = bcadd((string)$vip_sum_price, bcmul($v['vip_truePrice'], $v['cart_num'] ? $v['cart_num'] : 1, 4), 2); + foreach ($item['_info'] as $v) { + $vip_sum_price = bcadd((string)$vip_sum_price, bcmul((string)($v['vip_truePrice'] ?? 0), (string)($v['cart_num'] ? $v['cart_num'] : 1), 4), 2); } // if ($item['sex'] == 1) $sex_name = '男'; // else if ($item['sex'] == 2) $sex_name = '女'; @@ -856,32 +937,134 @@ class ExportServices extends BaseServices 'send' => '配送', default => '暂无', }; - $one_data = [ - 'order_id' => $item['order_id'], - 'order_type' => $item['pink_name'] ?? '普通订单', - 'status_name' => $item['status_name'] ?? '未知状态', - 'add_time' => empty($item['add_time']) ? '' : date('Y-m-d H:i:s', (int)$item['add_time']), - 'real_name' => $item['real_name'] . '(' . $item['uid'] . ')', - 'user_phone' => $item['user_phone'], - 'user_address' => $item['user_address'], - 'goods_name' => $goodsName ? implode("\n", $goodsName) : '', - 'total_num' => $item['total_num'], - 'total_price' => $item['total_price'], - 'total_postage' => $item['total_postage'], - 'vip_sum_price' => $vip_sum_price, - 'coupon_price' => $item['coupon_price'], - 'deduction_price' => $item['deduction_price'] ?? 0, - 'promotions_price' => $item['promotions_price'] ?? 0, - 'first_order_price' => $item['first_order_price'] ?? 0, - 'change_price' => $item['change_price'] ?? 0, - 'pay_price' => $item['pay_price'], - 'pay_postage' => $item['pay_postage'], - 'pay_type_name' => $item['pay_type_name'], - 'pay_status' => $item['paid'] ? '已支付' : '未支付', - 'pay_time' => empty($item['pay_time']) ? '' : date('Y-m-d H:i:s', (int)$item['pay_time']), - 'delivery_type' => $delivery_type, - 'delivery_info' => $item['delivery_name'] . '(' . $item['delivery_id'] . ')', - ]; + $orderLevelDeliveryTime = ''; + $oid = (int)$item['id']; + $timeMap = $orderStatusTime[$oid] ?? []; + $deliveryTime = $timeMap['delivery'] ?? ($timeMap['delivery_goods'] ?? ($timeMap['delivery_part_split'] ?? ($timeMap['delivery_split'] ?? ($timeMap['delivery_fictitious'] ?? 0)))); + if ($deliveryTime) { + $orderLevelDeliveryTime = date('Y-m-d H:i:s', $deliveryTime); + } + + $currentUser = $userList[(int)$item['uid']] ?? []; + $userNickname = (string)($currentUser['nickname'] ?? ''); + $spreadUid = (int)($currentUser['spread_uid'] ?? 0); + $spreadNickname = $spreadUid ? (string)($spreadList[$spreadUid]['nickname'] ?? '') : ''; + if ($spreadUid && $spreadUid === (int)$item['uid'] && $spreadNickname !== '') { + $spreadNickname .= '(自购)'; + } + + foreach ($item['_info'] as $v) { + $productInfo = $v['productInfo'] ?? []; + $attrInfo = $productInfo['attrInfo'] ?? []; + + $storeName = (string)($productInfo['store_name'] ?? ''); + $suk = (string)($attrInfo['suk'] ?? ''); + $productLabelNames = []; + if (!empty($productInfo['store_label']) && is_array($productInfo['store_label'])) { + foreach ($productInfo['store_label'] as $label) { + $name = (string)($label['label_name'] ?? ($label['label'] ?? '')); + if ($name !== '') { + $productLabelNames[] = $name; + } + } + } else { + $storeLabelId = $productInfo['store_label_id'] ?? []; + $storeLabelId = is_string($storeLabelId) ? array_map('intval', array_filter(explode(',', $storeLabelId))) : (is_array($storeLabelId) ? $storeLabelId : []); + foreach ($storeLabelId as $lid) { + $name = $labelNameMap[(int)$lid] ?? ''; + if ($name !== '') { + $productLabelNames[] = $name; + } + } + } + $productLabelText = $productLabelNames ? implode(',', array_values(array_unique($productLabelNames))) : ''; + + $supplierId = (int)($productInfo['supplier_id'] ?? 0); + if (!$supplierId && (int)($v['_relation_type'] ?? 0) === 2) { + $supplierId = (int)($v['_relation_id'] ?? 0); + } + $productSource = $supplierId ? (string)($supplierList[$supplierId]['supplier_name'] ?? '') : '平台'; + + $cartId = (int)($v['cart_id'] ?? 0); + $refundedQty = (int)($refundCartMap[$oid][$cartId]['refunded_qty'] ?? 0); + $refundingQty = (int)($refundCartMap[$oid][$cartId]['refunding_qty'] ?? 0); + $refundQty = $refundedQty + $refundingQty; + + $cartNum = (int)($v['cart_num'] ?? 0); + $truePrice = (string)($v['truePrice'] ?? 0); + $productAmount = bcmul($truePrice, (string)$cartNum, 2); + + $refundStatus = ''; + if ($refundQty > 0) { + if ($refundingQty > 0) { + $refundStatus = '退款中'; + } else { + $refundStatus = $refundQty >= $cartNum ? '退款成功(全额退款)' : '退款成功(部分退款)'; + } + } + $refundAmount = $refundQty > 0 ? bcmul($truePrice, (string)$refundQty, 2) : ''; + + $settlePrice = (string)($attrInfo['settle_price'] ?? 0); + $oneBrokerage = $v['one_brokerage'] ?? null; + if ($oneBrokerage === null) { + $oneBrokerage = bcmul((string)($attrInfo['brokerage'] ?? 0), (string)$cartNum, 2); + } + $twoBrokerage = $v['two_brokerage'] ?? null; + if ($twoBrokerage === null) { + $twoBrokerage = bcmul((string)($attrInfo['brokerage_two'] ?? 0), (string)$cartNum, 2); + } + $commission = bcadd((string)$oneBrokerage, (string)$twoBrokerage, 2); + + $one_data = [ + 'order_id' => $item['order_id'], + 'order_type' => $item['pink_name'] ?? '普通订单', + 'status_name' => $item['status_name'] ?? '未知状态', + 'add_time' => empty($item['add_time']) ? '' : date('Y-m-d H:i:s', (int)$item['add_time']), + 'real_name' => $item['real_name'] . '(' . $item['uid'] . ')', + 'user_nickname' => $userNickname, + 'user_phone' => $item['user_phone'], + 'user_address' => $item['user_address'], + 'goods_name' => $storeName, + 'goods_label' => $productLabelText, + 'spu' => (string)($productInfo['spu'] ?? ''), + 'style_code' => (string)($productInfo['code'] ?? ''), + 'sku_code' => (string)($attrInfo['code'] ?? ''), + 'goods_suk' => $suk, + 'cart_num' => $cartNum, + 'product_amount' => $productAmount, + 'settle_price' => $settlePrice, + 'product_source' => $productSource, + 'total_postage' => $item['total_postage'], + 'vip_sum_price' => $vip_sum_price, + 'coupon_price' => $item['coupon_price'], + 'deduction_price' => $item['deduction_price'] ?? 0, + 'promotions_price' => $item['promotions_price'] ?? 0, + 'first_order_price' => $item['first_order_price'] ?? 0, + 'change_price' => $item['change_price'] ?? 0, + 'pay_price' => $item['pay_price'], + 'pay_postage' => $item['pay_postage'], + 'pay_type_name' => $item['pay_type_name'], + 'pay_status' => $item['paid'] ? '已支付' : '未支付', + 'pay_time' => empty($item['pay_time']) ? '' : date('Y-m-d H:i:s', (int)$item['pay_time']), + 'delivery_type' => $delivery_type, + 'delivery_info' => $item['delivery_name'] . '(' . $item['delivery_id'] . ')', + 'refund_status' => $refundStatus, + 'refund_amount' => $refundAmount, + 'spread_nickname' => $spreadNickname, + 'spread_commission' => $commission, + 'delivery_time' => $orderLevelDeliveryTime, + ]; + + if ($export_type == 1) { + $export[] = $one_data; + if ($i == 0) { + $filekey = array_keys($one_data); + } + } else { + $export[] = array_values($one_data); + } + $i++; + } } else { if (isset($item['pinkStatus']) && $item['pinkStatus'] != 2) { continue; @@ -937,15 +1120,17 @@ class ExportServices extends BaseServices 'pay_time' => $item['pay_time'] ? date('Y-m-d H:i:s', (int)$item['pay_time']) : '暂无', ]; } - if ($export_type == 1) { - $export[] = $one_data; - if ($i == 0) { - $filekey = array_keys($one_data); + if ($type) { + if ($export_type == 1) { + $export[] = $one_data; + if ($i == 0) { + $filekey = array_keys($one_data); + } + } else { + $export[] = array_values($one_data); } - } else { - $export[] = array_values($one_data); + $i++; } - $i++; } } if ($export_type == 1) { diff --git a/app/services/product/product/StoreProductServices.php b/app/services/product/product/StoreProductServices.php index ec2e1c8..3d3e784 100644 --- a/app/services/product/product/StoreProductServices.php +++ b/app/services/product/product/StoreProductServices.php @@ -797,6 +797,35 @@ class StoreProductServices extends BaseServices return substr(implode('', array_map('ord', str_split(substr(uniqid(), 7, 13), 1))), 0, 8) . str_pad((string)mt_rand(1, 99999), 5, '0', STR_PAD_LEFT); } + protected function createUniqueSpu(): string + { + $tries = 0; + do { + $spu = $this->createSpu(); + $tries++; + } while ($tries < 20 && $this->dao->be(['spu' => $spu], 'spu')); + return $spu; + } + + public function ensureSpu(int $productId): string + { + $spu = (string)$this->dao->value(['id' => $productId], 'spu'); + if ($spu !== '') { + return $spu; + } + $spu = $this->createUniqueSpu(); + $this->update($productId, ['spu' => $spu]); + return $spu; + } + + public function ErpProductSave(array $data): int + { + if (!isset($data['spu']) || $data['spu'] === '') { + $data['spu'] = $this->createUniqueSpu(); + } + return (int)$this->dao->ErpProductSave($data); + } + /** * 新增编辑商品 * @param int $id @@ -1531,7 +1560,7 @@ class StoreProductServices extends BaseServices } } [$page, $limit] = $this->getPageValue(); - $field = ['id,relation_id,type,pid,delivery_type,product_type,store_name,cate_id,image,IFNULL(sales, 0) + IFNULL(ficti, 0) as sales,price,stock,activity,ot_price,spec_type,recommend_image,unit_name,is_vip,vip_price,is_presale_product,is_vip_product,system_form_id,is_presale_product,presale_start_time,presale_end_time,is_limit,limit_num,video_open,video_link,freight,star,store_label_id,brand_id,min_qty']; + $field = ['id,spu,relation_id,type,pid,delivery_type,product_type,store_name,cate_id,image,IFNULL(sales, 0) + IFNULL(ficti, 0) as sales,price,stock,activity,ot_price,spec_type,recommend_image,unit_name,is_vip,vip_price,is_presale_product,is_vip_product,system_form_id,is_presale_product,presale_start_time,presale_end_time,is_limit,limit_num,video_open,video_link,freight,star,store_label_id,brand_id,min_qty']; $list = $this->dao->getSearchList($where, $page, $limit, $field, 'sales desc,id desc', ['couponId']); if ($list) { /** @var MemberCardServices $memberCardService */ diff --git a/app/services/statistic/OrderStatisticServices.php b/app/services/statistic/OrderStatisticServices.php index 96e1184..e668e43 100644 --- a/app/services/statistic/OrderStatisticServices.php +++ b/app/services/statistic/OrderStatisticServices.php @@ -31,15 +31,13 @@ class OrderStatisticServices extends BaseServices $orderService = app()->make(StoreOrderServices::class); $data['pay_price'] = $orderService->sum(['paid' => 1, 'pid' => 0, 'time' => $where['time'], 'supplier_id' => $supplier_id], 'pay_price', true); $data['pay_count'] = $orderService->count(['paid' => 1, 'pid' => 0, 'time' => $where['time'], 'supplier_id' => $supplier_id]); - $times = explode('-', $where['time']); - if(count($times) > 1){ - $times = [ - 'start_time'=>$times[0], - 'end_time'=>$times[1] . ' 23:59:59' - ]; + $refundWhere = ['refund_type' => 6, 'time' => explode('-', $where['time']), 'is_cancel' => 0, 'is_del' => 0]; + if ($supplier_id !== '') { + $refundWhere['supplier_id'] = $supplier_id; } - $data['refund_price'] = app()->make(StoreOrderRefundServices::class)->sum(['refund_type' => 6, 'time' => explode('-', $where['time'])],'refund_price', true); - $data['refund_count'] = app()->make(StoreOrderRefundServices::class)->count(['refund_type' => 6, 'time' => explode('-', $where['time'])]); + $refundService = app()->make(StoreOrderRefundServices::class); + $data['refund_price'] = $refundService->sum($refundWhere, 'refund_price', true); + $data['refund_count'] = $refundService->count($refundWhere); $data['coupon_price'] = $orderService->sum(['paid' => 1, 'pid' => 0, 'time' => $where['time'], 'supplier_id' => $supplier_id], 'coupon_price', true); $data['coupon_count'] = $orderService->search(['paid' => 1, 'pid' => 0, 'time' => $where['time'], 'is_coupon' => 1, 'supplier_id' => $supplier_id])->count(); return $data; diff --git a/app/services/system/admin/SystemAdminServices.php b/app/services/system/admin/SystemAdminServices.php index 7753136..2030821 100644 --- a/app/services/system/admin/SystemAdminServices.php +++ b/app/services/system/admin/SystemAdminServices.php @@ -394,7 +394,7 @@ class SystemAdminServices extends BaseServices $verifyCode = CacheService::get('code_' . $data['phone']); if (!$verifyCode) throw new AdminException('请先获取验证码'); - $verifyCode = substr($verifyCode, 0, 6); + $verifyCode = substr($verifyCode, 0, 4); if ($verifyCode != $data['code']) { CacheService::delete('code_' . $data['phone']); throw new AdminException('验证码错误'); diff --git a/app/services/system/attachment/SystemAttachmentServices.php b/app/services/system/attachment/SystemAttachmentServices.php index c5c3c1c..4eda1e2 100644 --- a/app/services/system/attachment/SystemAttachmentServices.php +++ b/app/services/system/attachment/SystemAttachmentServices.php @@ -65,7 +65,7 @@ class SystemAttachmentServices extends BaseServices if ($item['file_type'] == 1) { if ($site_url) { $item['satt_dir'] = (strpos($item['satt_dir'], $site_url) !== false || strstr($item['satt_dir'], 'http') !== false) ? $item['satt_dir'] : $site_url . $item['satt_dir']; - $item['att_dir'] = (strpos($item['att_dir'], $site_url) !== false || strstr($item['att_dir'], 'http') !== false) ? $item['satt_dir'] : $site_url . $item['att_dir']; + $item['att_dir'] = (strpos($item['att_dir'], $site_url) !== false || strstr($item['att_dir'], 'http') !== false) ? $item['att_dir'] : $site_url . $item['att_dir']; } } $item['att_size'] = formatFileSize($item['att_size']); diff --git a/app/services/user/LoginServices.php b/app/services/user/LoginServices.php index ae2be65..7ff0df0 100644 --- a/app/services/user/LoginServices.php +++ b/app/services/user/LoginServices.php @@ -167,7 +167,7 @@ class LoginServices extends BaseServices if (CacheService::get('code_' . $phone)) throw new ValidateException($time . '分钟内有效'); mt_srand(); - $code = rand(100000, 999999); + $code = rand(1000, 9999); $data['code'] = $code; $data['time'] = $time; $res = SmsJob::dispatch([$phone, $data, 'VERIFICATION_CODE_TIME']); diff --git a/composer.json b/composer.json index e2cc97b..3c6257a 100755 --- a/composer.json +++ b/composer.json @@ -48,7 +48,8 @@ "joypack/tencent-map": "^1.0", "topthink/think-throttle": "^2.0", "topthink/think-image": "^1.0", - "endroid/qr-code": "^4.8" + "endroid/qr-code": "^4.8", + "alibabacloud/dysmsapi-20170525": "^4.5" }, "require-dev": { "symfony/var-dumper": ">=4.2", diff --git a/composer.lock b/composer.lock index 49d5d0a..0590395 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2f9e40fa2073aef40ba0f8ab8cfd38df", + "content-hash": "896ca6dc319244fd3f1db248c6b9d8be", "packages": [ { "name": "adbario/php-dot-notation", @@ -59,6 +59,281 @@ }, "time": "2022-10-14T20:31:46+00:00" }, + { + "name": "alibabacloud/credentials", + "version": "1.2.3", + "source": { + "type": "git", + "url": "https://github.com/aliyun/credentials-php.git", + "reference": "f6d1986e7b7be8da781d0b99f24c92d9860ba0c1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/aliyun/credentials-php/zipball/f6d1986e7b7be8da781d0b99f24c92d9860ba0c1", + "reference": "f6d1986e7b7be8da781d0b99f24c92d9860ba0c1", + "shasum": "" + }, + "require": { + "adbario/php-dot-notation": "^2.2", + "alibabacloud/tea": "^3.0", + "ext-curl": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-openssl": "*", + "ext-simplexml": "*", + "ext-xmlwriter": "*", + "guzzlehttp/guzzle": "^6.3|^7.0", + "php": ">=5.6" + }, + "require-dev": { + "composer/composer": "^1.8", + "drupal/coder": "^8.3", + "ext-dom": "*", + "ext-pcre": "*", + "ext-sockets": "*", + "ext-spl": "*", + "mikey179/vfsstream": "^1.6", + "monolog/monolog": "^1.24", + "phpunit/phpunit": "^5.7|^6.6|^9.3", + "psr/cache": "^1.0", + "symfony/dotenv": "^3.4", + "symfony/var-dumper": "^3.4" + }, + "suggest": { + "ext-sockets": "To use client-side monitoring" + }, + "type": "library", + "autoload": { + "psr-4": { + "AlibabaCloud\\Credentials\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Alibaba Cloud SDK", + "email": "sdk-team@alibabacloud.com", + "homepage": "http://www.alibabacloud.com" + } + ], + "description": "Alibaba Cloud Credentials for PHP", + "homepage": "https://www.alibabacloud.com/", + "keywords": [ + "alibaba", + "alibabacloud", + "aliyun", + "client", + "cloud", + "credentials", + "library", + "sdk", + "tool" + ], + "support": { + "issues": "https://github.com/aliyun/credentials-php/issues", + "source": "https://github.com/aliyun/credentials-php" + }, + "time": "2025-04-18T09:09:46+00:00" + }, + { + "name": "alibabacloud/darabonba", + "version": "v1.0.4", + "source": { + "type": "git", + "url": "https://github.com/alibabacloud-sdk-php/darabonba.git", + "reference": "b1ccea693258ea68e455e330922406f3afe10e9c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/alibabacloud-sdk-php/darabonba/zipball/b1ccea693258ea68e455e330922406f3afe10e9c", + "reference": "b1ccea693258ea68e455e330922406f3afe10e9c", + "shasum": "" + }, + "require": { + "adbario/php-dot-notation": "^2.4", + "alibabacloud/tea": "^3.2", + "ext-curl": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-openssl": "*", + "ext-simplexml": "*", + "ext-xmlwriter": "*", + "guzzlehttp/guzzle": "^6.3|^7.0", + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35|^5.4.3|^9.3", + "symfony/dotenv": "^3.4", + "symfony/var-dumper": "^3.4" + }, + "suggest": { + "ext-sockets": "To use client-side monitoring" + }, + "type": "library", + "autoload": { + "psr-4": { + "AlibabaCloud\\Dara\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Alibaba Cloud SDK", + "email": "sdk-team@alibabacloud.com", + "homepage": "http://www.alibabacloud.com" + } + ], + "description": "Client of Darabonba for PHP", + "homepage": "https://www.alibabacloud.com/", + "keywords": [ + "alibabacloud", + "client", + "cloud", + "tea" + ], + "support": { + "issues": "https://github.com/aliyun/tea-php/issues", + "source": "https://github.com/aliyun/tea-php" + }, + "time": "2025-12-15T10:15:24+00:00" + }, + { + "name": "alibabacloud/dysmsapi-20170525", + "version": "4.5.1", + "source": { + "type": "git", + "url": "https://github.com/alibabacloud-sdk-php/Dysmsapi-20170525.git", + "reference": "1361ecae87674e883cc6e1251033693e3ba0e38d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/alibabacloud-sdk-php/Dysmsapi-20170525/zipball/1361ecae87674e883cc6e1251033693e3ba0e38d", + "reference": "1361ecae87674e883cc6e1251033693e3ba0e38d", + "shasum": "" + }, + "require": { + "alibabacloud/darabonba": "^1.0.0", + "alibabacloud/openapi-core": "^1.0.0", + "php": ">5.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Alibaba Cloud SDK", + "email": "sdk-team@alibabacloud.com" + } + ], + "description": "Alibaba Cloud Dysmsapi (20170525) SDK Library for PHP", + "support": { + "source": "https://github.com/alibabacloud-sdk-php/Dysmsapi-20170525/tree/4.5.1" + }, + "time": "2026-04-07T18:19:34+00:00" + }, + { + "name": "alibabacloud/gateway-spi", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/alibabacloud-sdk-php/alibabacloud-gateway-spi.git", + "reference": "7440f77750c329d8ab252db1d1d967314ccd1fcb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/alibabacloud-sdk-php/alibabacloud-gateway-spi/zipball/7440f77750c329d8ab252db1d1d967314ccd1fcb", + "reference": "7440f77750c329d8ab252db1d1d967314ccd1fcb", + "shasum": "" + }, + "require": { + "alibabacloud/credentials": "^1.1", + "php": ">5.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Darabonba\\GatewaySpi\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Alibaba Cloud SDK", + "email": "sdk-team@alibabacloud.com" + } + ], + "description": "Alibaba Cloud Gateway SPI Client", + "support": { + "source": "https://github.com/alibabacloud-sdk-php/alibabacloud-gateway-spi/tree/1.0.0" + }, + "time": "2022-07-14T05:31:35+00:00" + }, + { + "name": "alibabacloud/openapi-core", + "version": "1.0.9", + "source": { + "type": "git", + "url": "https://github.com/alibabacloud-sdk-php/openapi-core.git", + "reference": "7b241b2a0e71f70629e2ecdc5cbe8c8b6b3a7567" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/alibabacloud-sdk-php/openapi-core/zipball/7b241b2a0e71f70629e2ecdc5cbe8c8b6b3a7567", + "reference": "7b241b2a0e71f70629e2ecdc5cbe8c8b6b3a7567", + "shasum": "" + }, + "require": { + "alibabacloud/credentials": "^1.2.2", + "alibabacloud/darabonba": "^1", + "alibabacloud/gateway-spi": "^1", + "php": ">5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35|^5.4.3|^9.3", + "symfony/dotenv": "^3.4", + "symfony/var-dumper": "^3.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Darabonba\\OpenApi\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Alibaba Cloud SDK", + "email": "sdk-team@alibabacloud.com" + } + ], + "description": "Alibaba Cloud OpenApi Client Core", + "support": { + "issues": "https://github.com/alibabacloud-sdk-php/openapi-core/issues", + "source": "https://github.com/alibabacloud-sdk-php/openapi-core/tree/1.0.9" + }, + "time": "2026-01-15T06:47:29+00:00" + }, { "name": "alibabacloud/tea", "version": "3.2.1", @@ -6011,7 +6286,7 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { @@ -6023,6 +6298,6 @@ "ext-openssl": "*", "ext-swoole": "*" }, - "platform-dev": [], - "plugin-api-version": "2.3.0" + "platform-dev": {}, + "plugin-api-version": "2.9.0" } diff --git a/config/console.php b/config/console.php index e7465e0..8b11884 100644 --- a/config/console.php +++ b/config/console.php @@ -23,5 +23,6 @@ return [ 'clear:cache' => \app\command\ClearCache::class, 'reset:password' => \app\command\ResetAdminPwd::class, 'holiday_gift_push_task' => \app\command\HolidayGiftPushTask::class, + 'product:spu:backfill' => \app\command\BackfillProductSpu::class, ], ]; diff --git a/crmeb/services/erp/storage/jushuitan/Stock.php b/crmeb/services/erp/storage/jushuitan/Stock.php index 0065015..0874f8a 100644 --- a/crmeb/services/erp/storage/jushuitan/Stock.php +++ b/crmeb/services/erp/storage/jushuitan/Stock.php @@ -15,6 +15,7 @@ use app\services\product\sku\StoreProductAttrValueServices; use crmeb\exceptions\AdminException; use crmeb\services\erp\AccessToken; use crmeb\services\erp\storage\Jushuitan; +use think\facade\Log; class Stock { @@ -39,7 +40,7 @@ class Stock /** * 同步商品库存 - * @param array $ids + * @param string $ids * @return void * @throws \Exception */ @@ -115,6 +116,8 @@ class Stock $params = $this->getParams($biz); //请求平台接口 + $skuIdsList = array_values(array_filter(array_map('trim', explode(',', trim($codeStr, ", \t\n\r\0\x0B"))), static fn($v) => $v !== '')); + Log::info('jst.api.stock.inventoryQuery.request', ['url' => $url, 'sku_ids_count' => count($skuIdsList), 'sku_ids' => $skuIdsList, 'sku_ids_raw' => $codeStr]); $request = $this->postRequest($url, $params); return $request["data"]; } @@ -148,4 +151,4 @@ class Stock return call_user_func_array([$this->jushuitan, $name], $arguments); } -} \ No newline at end of file +} diff --git a/crmeb/services/sms/storage/Aliyun.php b/crmeb/services/sms/storage/Aliyun.php index 5c012af..388e563 100644 --- a/crmeb/services/sms/storage/Aliyun.php +++ b/crmeb/services/sms/storage/Aliyun.php @@ -14,7 +14,8 @@ namespace crmeb\services\sms\storage; use AlibabaCloud\SDK\Dysmsapi\V20170525\Dysmsapi; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SendSmsRequest; use AlibabaCloud\Tea\Exception\TeaError; -use AlibabaCloud\Tea\Utils\Utils\RuntimeOptions; +// use AlibabaCloud\Tea\Utils\Utils\RuntimeOptions; +use AlibabaCloud\Dara\Models\RuntimeOptions; use crmeb\basic\BaseSmss; use crmeb\exceptions\ApiException; use Darabonba\OpenApi\Models\Config as AliConfig; @@ -33,6 +34,39 @@ class Aliyun extends BaseSmss protected $AccessKeySecret = ''; protected $SignName = ''; + private function ensureAliyunSdkAutoload(): void + { + static $inited = false; + if ($inited) { + return; + } + $inited = true; + + $rootDir = dirname(__DIR__, 4) . DIRECTORY_SEPARATOR; + $map = [ + 'AlibabaCloud\\Tea\\Utils\\' => $rootDir . 'vendor' . DIRECTORY_SEPARATOR . 'alibabacloud' . DIRECTORY_SEPARATOR . 'tea-utils' . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR, + 'Darabonba\\OpenApi\\' => $rootDir . 'vendor' . DIRECTORY_SEPARATOR . 'alibabacloud' . DIRECTORY_SEPARATOR . 'darabonba-openapi' . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR, + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\' => $rootDir . 'vendor' . DIRECTORY_SEPARATOR . 'alibabacloud' . DIRECTORY_SEPARATOR . 'dysmsapi-20170525' . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR, + ]; + + foreach ($map as $prefix => $baseDir) { + if (!is_dir($baseDir)) { + continue; + } + spl_autoload_register(static function ($class) use ($prefix, $baseDir) { + $len = strlen($prefix); + if (strncmp($class, $prefix, $len) !== 0) { + return; + } + $relative = substr($class, $len); + $file = $baseDir . str_replace('\\', DIRECTORY_SEPARATOR, $relative) . '.php'; + if (is_file($file)) { + require_once $file; + } + }); + } + } + /** * @param array $config * @return mixed|void @@ -57,6 +91,7 @@ class Aliyun extends BaseSmss if (empty($phone)) { return $this->setError('电话号码不能为空'); } + $this->ensureAliyunSdkAutoload(); $config = new AliConfig([ "accessKeyId" => $this->AccessKeyId, "accessKeySecret" => $this->AccessKeySecret diff --git a/crmeb/utils/Cron.php b/crmeb/utils/Cron.php index b7180de..6903871 100644 --- a/crmeb/utils/Cron.php +++ b/crmeb/utils/Cron.php @@ -71,7 +71,15 @@ class Cron */ protected function runInSandbox(callable $callable) { - $callable(); + try { + $callable(); + } catch (\Throwable $e) { + Log::error('cron.sandbox.error ' . json_encode([ + 'message' => $e->getMessage(), + 'file' => $e->getFile(), + 'line' => $e->getLine(), + ], JSON_UNESCAPED_UNICODE)); + } } /** diff --git a/init_jst_token.php b/init_jst_token.php new file mode 100644 index 0000000..2e9d662 --- /dev/null +++ b/init_jst_token.php @@ -0,0 +1,62 @@ +#!/usr/bin/env php +initialize(); + +echo "========================================\n"; +echo "初始化聚水潭Token文件\n"; +echo "========================================\n\n"; + +$tokenFile = __DIR__ . '/runtime/jstdata/jst_token_data.json'; +$dir = dirname($tokenFile); + +if (!is_dir($dir)) { + mkdir($dir, 0777, true); + echo "✅ 创建目录: {$dir}\n\n"; +} + +$accessToken = env('JST_ACCESS_TOKEN', ''); +$refreshToken = env('JST_REFRESH_TOKEN', ''); +$expiresIn = env('JST_EXPIRES_IN', 2592000); + +if (empty($accessToken)) { + echo "❌ .env中的JST_ACCESS_TOKEN为空\n"; + echo "请先在.env中配置有效的JST_ACCESS_TOKEN\n\n"; + exit(1); +} + +$tokenInfo = [ + 'access_token' => $accessToken, + 'expires_in' => (int)$expiresIn, + 'refresh_token' => $refreshToken, + 'time' => time(), +]; + +$json = json_encode($tokenInfo, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT); + +file_put_contents($tokenFile, $json); + +echo "✅ Token文件已创建: {$tokenFile}\n\n"; +echo "文件内容:\n"; +echo $json . "\n\n"; + +echo "字段说明:\n"; +echo " - access_token: 访问令牌\n"; +echo " - expires_in: 有效期(秒),默认30天\n"; +echo " - refresh_token: 刷新令牌(用于自动续期)\n"; +echo " - time: 创建时间戳\n\n"; + +if (empty($refreshToken)) { + echo "⚠️ 警告: refresh_token为空,将无法自动刷新Token\n"; + echo "建议在.env中添加:\n"; + echo "JST_REFRESH_TOKEN=你的刷新令牌\n\n"; +} + +echo "========================================\n"; +echo "初始化完成!\n"; +echo "========================================\n"; diff --git a/public/install/crmeb.sql b/public/install/crmeb.sql index 0245f2f..2fc904e 100644 --- a/public/install/crmeb.sql +++ b/public/install/crmeb.sql @@ -57521,5 +57521,3 @@ INSERT INTO `eb_city_area` (`id`, `path`, `parent_id`, `type`, `name`, `level`, (44705, '/30722/30792/44689/', 44689, 'street', '新州镇', 4, '460400116000', 0, '2023-11-02 04:28:19'), (44706, '/30722/30792/44689/', 44689, 'street', '洋浦经济开发区', 4, '460400499000', 0, '2023-11-02 04:28:19'), (44707, '/30722/30792/44689/', 44689, 'street', '华南热作学院', 4, '460400500000', 0, '2023-11-02 04:28:19'); - - diff --git a/public/statics/mp_view/pages/merchant/apply/index.wxml b/public/statics/mp_view/pages/merchant/apply/index.wxml index f4f333d..053742c 100644 --- a/public/statics/mp_view/pages/merchant/apply/index.wxml +++ b/public/statics/mp_view/pages/merchant/apply/index.wxml @@ -1 +1 @@ -请填写以下信息* 采购商名称 * 联系人 * 联系电话 * 验证码 * 省市区 请选择省市区{{addressText}}* 详细地址 申请备注* 资质图片 (图片最多可上传8张,图片格式支持JPG、PNG、JPEG)上传图片申请说明{{''+channel_apply_explain+''}}已阅读并同意《采购商认证协议》采购商认证协议知道了 \ No newline at end of file +请填写以下信息* 采购商名称 * 联系人 * 联系电话 * 验证码 * 省市区 请选择省市区{{addressText}}* 详细地址 申请备注* 资质图片 (图片最多可上传8张,图片格式支持JPG、PNG、JPEG)上传图片申请说明{{''+channel_apply_explain+''}}已阅读并同意《采购商认证协议》采购商认证协议知道了 \ No newline at end of file diff --git a/public/statics/mp_view/pages/users/agent/apply.wxml b/public/statics/mp_view/pages/users/agent/apply.wxml index 91913b8..07ed77e 100644 --- a/public/statics/mp_view/pages/users/agent/apply.wxml +++ b/public/statics/mp_view/pages/users/agent/apply.wxml @@ -1 +1 @@ -请填写以下信息代理商名称用户姓名邀请码联系电话验证码请上传营业执照及相关资质证明图片(图片最多可上传8张,图片格式支持JPG、PNG、JPEG)上传图片申请说明{{''+division_apply_explain+''}}已阅读并同意《代理商协议》提交申请代理商协议知道了 \ No newline at end of file +请填写以下信息代理商名称用户姓名邀请码联系电话验证码请上传营业执照及相关资质证明图片(图片最多可上传8张,图片格式支持JPG、PNG、JPEG)上传图片申请说明{{''+division_apply_explain+''}}已阅读并同意《代理商协议》提交申请代理商协议知道了 \ No newline at end of file diff --git a/public/statics/mp_view/pages/users/binding_phone/index.wxml b/public/statics/mp_view/pages/users/binding_phone/index.wxml index 9e2fcbb..77bb40f 100644 --- a/public/statics/mp_view/pages/users/binding_phone/index.wxml +++ b/public/statics/mp_view/pages/users/binding_phone/index.wxml @@ -1 +1 @@ -{{''+pageTitle+''}}{{''+(pageType==1?'绑定手机号':'手机号登录')+''}}{{''+(pageType==1?'登录注册需绑定手机号':'首次登录会自动注册')+''}}{{''+(pageType==1?'绑定手机号':'立即登录')+''}}已阅读并同意《用户协议》 与《隐私协议》 \ No newline at end of file +{{''+pageTitle+''}}{{''+(pageType==1?'绑定手机号':'手机号登录')+''}}{{''+(pageType==1?'登录注册需绑定手机号':'首次登录会自动注册')+''}}{{''+(pageType==1?'绑定手机号':'立即登录')+''}}已阅读并同意《用户协议》 与《隐私协议》 \ No newline at end of file diff --git a/public/statics/mp_view/pages/users/distributor/apply.wxml b/public/statics/mp_view/pages/users/distributor/apply.wxml index a447160..e431bf7 100644 --- a/public/statics/mp_view/pages/users/distributor/apply.wxml +++ b/public/statics/mp_view/pages/users/distributor/apply.wxml @@ -1 +1 @@ -请填写以下信息用户昵称{{form.nickname}}用户ID{{form.uid}}分销员姓名手机号验证码申请说明{{''+brokerage_apply_explain+''}}已阅读并同意《分销说明》提交申请分销说明知道了 \ No newline at end of file +请填写以下信息用户昵称{{form.nickname}}用户ID{{form.uid}}分销员姓名手机号验证码申请说明{{''+brokerage_apply_explain+''}}已阅读并同意《分销说明》提交申请分销说明知道了 \ No newline at end of file diff --git a/public/statics/mp_view/pages/users/login/index.wxml b/public/statics/mp_view/pages/users/login/index.wxml index 5fd9087..8e4cfcf 100644 --- a/public/statics/mp_view/pages/users/login/index.wxml +++ b/public/statics/mp_view/pages/users/login/index.wxml @@ -1 +1 @@ -{{''+pageTitle+''}}{{''+(current?'快速登录':'账号登录')+''}} 首次登录会自动注册 忘记密码 立即登录 {{current?'账号登录':'手机号登录'}}已阅读并同意《用户协议》 与《隐私协议》 \ No newline at end of file +{{''+pageTitle+''}}{{''+(current?'快速登录':'账号登录')+''}} 首次登录会自动注册 忘记密码 立即登录 {{current?'账号登录':'手机号登录'}}已阅读并同意《用户协议》 与《隐私协议》 \ No newline at end of file diff --git a/public/statics/mp_view/pages/users/retrievePassword/index.wxml b/public/statics/mp_view/pages/users/retrievePassword/index.wxml index 058a3c7..039426e 100644 --- a/public/statics/mp_view/pages/users/retrievePassword/index.wxml +++ b/public/statics/mp_view/pages/users/retrievePassword/index.wxml @@ -1 +1 @@ -{{''+pageTitle+''}} 找回密码 确认 立即登录 \ No newline at end of file +{{''+pageTitle+''}} 找回密码 确认 立即登录 \ No newline at end of file diff --git a/public/statics/mp_view/pages/users/supplier/index.wxml b/public/statics/mp_view/pages/users/supplier/index.wxml index 590f234..55e2f72 100644 --- a/public/statics/mp_view/pages/users/supplier/index.wxml +++ b/public/statics/mp_view/pages/users/supplier/index.wxml @@ -1 +1 @@ -申请记录请填写以下信息供应商名称用户姓名联系电话验证码请上传营业执照及相关资质证明图片(图片最多可上传8张,图片格式支持JPG、PNG、JPEG)上传图片申请说明{{''+supplier_apply_explain+''}}已阅读并同意《供应商协议》提交申请供应商协议知道了 \ No newline at end of file +申请记录请填写以下信息供应商名称用户姓名联系电话验证码请上传营业执照及相关资质证明图片(图片最多可上传8张,图片格式支持JPG、PNG、JPEG)上传图片申请说明{{''+supplier_apply_explain+''}}已阅读并同意《供应商协议》提交申请供应商协议知道了 \ No newline at end of file diff --git a/public/statics/mp_view/pages/users/user_phone/index.wxml b/public/statics/mp_view/pages/users/user_phone/index.wxml index 00eb95d..9f4fce7 100644 --- a/public/statics/mp_view/pages/users/user_phone/index.wxml +++ b/public/statics/mp_view/pages/users/user_phone/index.wxml @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/public/statics/mp_view/pages/users/user_pwd_edit/index.wxml b/public/statics/mp_view/pages/users/user_pwd_edit/index.wxml index a24e4cb..e4bd418 100644 --- a/public/statics/mp_view/pages/users/user_pwd_edit/index.wxml +++ b/public/statics/mp_view/pages/users/user_pwd_edit/index.wxml @@ -1 +1 @@ -
{{"当前手机号:"+phone}}
\ No newline at end of file +
{{"当前手机号:"+phone}}
\ No newline at end of file diff --git a/route/admin.php b/route/admin.php index 524ecde..47d5386 100644 --- a/route/admin.php +++ b/route/admin.php @@ -1625,6 +1625,8 @@ Route::group('adminapi', function () { Route::post('import_erp_product', 'v1.product.StoreProduct/import_erp_product')->option(['real_name' => '导入ERP商品到平台']); //手动同步聚水潭商品 Route::post('sync_jst_product', 'v1.product.StoreProduct/sync_jst_product')->option(['real_name' => '手动同步聚水潭商品']); + //批量上传商品到聚水潭 + Route::post('upload_jst_itemsku', 'v1.product.StoreProduct/upload_jst_itemsku')->option(['real_name' => '批量上传商品到聚水潭']); //保存还未提交数据 Route::post('cache', 'v1.product.StoreProduct/saveCacheData')->option(['real_name' => '保存还未提交数据']); //删除退出未保存的数据 diff --git a/test_db_config.php b/test_db_config.php new file mode 100644 index 0000000..f56112c --- /dev/null +++ b/test_db_config.php @@ -0,0 +1,118 @@ +#!/usr/bin/env php +initialize(); + +echo "✅ 应用初始化成功!\n\n"; + +try { + + echo "1️⃣ 查询数据库配置...\n\n"; + + $configModel = new \app\model\system\config\SystemConfig(); + + $configs = $configModel->whereIn('name', [ + 'jst_login_account', + 'jst_login_password', + 'jst_appkey', + 'jst_appsecret' + ])->select(); + + echo "找到以下配置:\n"; + foreach ($configs as $config) { + $value = $config['value']; + if (in_array($config['name'], ['jst_login_password', 'jst_appsecret'])) { + echo " - {$config['name']}: " . (empty($value) ? '❌ 未配置' : '✅ 已配置(' . strlen($value) . '位)') . "\n"; + } else { + echo " - {$config['name']}: " . (empty($value) ? '❌ 未配置' : $value) . "\n"; + } + } + + echo "\n"; + + $loginAccount = $configs->where('name', 'jst_login_account')->value('value', ''); + $loginPassword = $configs->where('name', 'jst_login_password')->value('value', ''); + + if (empty($loginAccount) || empty($loginPassword)) { + echo "⚠️ 数据库中缺少登录凭证\n\n"; + + echo "建议:\n"; + echo "1. 前往后台: 系统设置 → ERP配置\n"; + echo "2. 填写聚水潭登录账号和密码\n"; + echo "3. 保存配置\n\n"; + + echo "或者直接在.env文件中添加:\n"; + echo "JST_LOGIN_ACCOUNT=你的账号\n"; + echo "JST_LOGIN_PASSWORD=你的密码\n\n"; + + exit(1); + } + + echo "✅ 找到登录凭证!\n\n"; + + echo "2️⃣ 尝试刷新Token...\n\n"; + + try { + $haichaoJst = \app\haichao\HaichaoJstServices::getServices(); + + echo "正在调用authLogin...\n"; + $haichaoJst->authLogin($loginAccount, $loginPassword); + + echo "✅ 登录成功!\n\n"; + + $envFile = __DIR__ . '/.env'; + $envContent = file_get_contents($envFile); + preg_match('/JST_ACCESS_TOKEN\s*=\s*(.*)/', $envContent, $matches); + $newToken = isset($matches[1]) ? trim($matches[1]) : ''; + + echo "新Token: " . substr($newToken, 0, 20) . "...\n\n"; + + echo "3️⃣ 测试新Token...\n\n"; + + $result = $haichaoJst->getProductListStand(); + + echo "✅ API调用成功!\n\n"; + + if (!empty($result)) { + echo "📦 获取到 " . count($result) . " 条商品数据\n\n"; + + if (isset($result[0])) { + echo "📋 示例商品:\n"; + $product = $result[0]; + echo json_encode($product, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT) . "\n\n"; + } + } else { + echo "⚠️ 未获取到商品数据\n"; + echo "可能原因:\n"; + echo "1. 聚水潭系统中没有商品\n"; + echo "2. 时间范围内没有修改过的商品\n\n"; + } + + } catch (\Throwable $e) { + echo "❌ 刷新失败: " . $e->getMessage() . "\n\n"; + echo "请检查:\n"; + echo "1. 聚水潭账号密码是否正确\n"; + echo "2. 聚水潭应用是否已授权\n"; + echo "3. 应用Key和Secret是否正确\n\n"; + } + + echo "========================================\n"; + echo "完成\n"; + echo "========================================\n"; + +} catch (\Throwable $e) { + echo "\n❌ 发生错误!\n"; + echo "错误信息: " . $e->getMessage() . "\n"; + echo "错误文件: " . $e->getFile() . ":" . $e->getLine() . "\n"; + echo "\n堆栈跟踪:\n" . $e->getTraceAsString() . "\n"; + exit(1); +} diff --git a/test_debug.php b/test_debug.php new file mode 100644 index 0000000..38e7768 --- /dev/null +++ b/test_debug.php @@ -0,0 +1,40 @@ +#!/usr/bin/env php +initialize(); + +try { + + $haichaoJst = \app\haichao\HaichaoJstServices::getServices(); + + echo "1️⃣ 测试 getProductListStand()...\n\n"; + $result1 = $haichaoJst->getProductListStand(); + echo "返回类型: " . gettype($result1) . "\n"; + echo "原始数据:\n"; + print_r($result1); + + echo "\n2️⃣ 测试 getInneropenItemList()...\n\n"; + try { + $result2 = $haichaoJst->getInneropenItemList(); + echo "返回类型: " . gettype($result2) . "\n"; + echo "数据数量: " . count($result2) . "\n"; + if (!empty($result2)) { + echo "第一条数据:\n"; + print_r($result2[0]); + } + } catch (\Throwable $e) { + echo "❌ 失败: " . $e->getMessage() . "\n"; + } + +} catch (\Throwable $e) { + echo "\n❌ 错误: " . $e->getMessage() . "\n"; +} diff --git a/test_haichao.php b/test_haichao.php new file mode 100644 index 0000000..53e3afd --- /dev/null +++ b/test_haichao.php @@ -0,0 +1,123 @@ +#!/usr/bin/env php +initialize(); + +echo "✅ 应用初始化成功!\n\n"; + +try { + + echo "1️⃣ 测试HaichaoJstServices方法...\n\n"; + + try { + $haichaoJst = \app\haichao\HaichaoJstServices::getServices(); + + if (empty($spu)) { + echo "用法: php test_haichao.php SPU编码\n"; + echo "示例: php test_haichao.php test123\n"; + echo " php test_haichao.php SPU001,SPU002\n\n"; + + echo "2️⃣ 尝试获取示例数据(getProductListStand)...\n\n"; + + try { + echo "正在调用聚水潭API...\n"; + $result = $haichaoJst->getProductListStand(); + + echo "✅ API调用成功!\n\n"; + + if (empty($result)) { + echo "⚠️ 未获取到任何数据\n"; + echo "可能原因:\n"; + echo " 1. 聚水潭系统中没有商品\n"; + echo " 2. 时间范围内没有修改过的商品\n"; + echo " 3. API配置有误\n\n"; + } else { + echo "📦 获取到 " . count($result) . " 条商品数据\n\n"; + + if (!empty($result) && isset($result[0])) { + echo "📋 示例商品:\n"; + $product = $result[0]; + echo json_encode($product, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT) . "\n\n"; + } + } + } catch (\Throwable $e) { + echo "❌ getProductListStand失败: " . $e->getMessage() . "\n"; + echo "错误文件: " . $e->getFile() . ":" . $e->getLine() . "\n\n"; + } + + exit(0); + } + + echo "正在调用HaichaoJstServices::getProductListKuan...\n"; + echo "SPU: " . $spu . "\n\n"; + + $result = $haichaoJst->getProductListKuan($spu); + + echo "✅ API调用成功!\n\n"; + + if (empty($result)) { + echo "⚠️ 未获取到任何数据\n\n"; + } else { + echo "📦 获取到的数据:\n\n"; + echo json_encode($result, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT) . "\n\n"; + + if (isset($result['code'])) { + echo "响应码: " . $result['code'] . "\n"; + } + if (isset($result['msg'])) { + echo "响应消息: " . $result['msg'] . "\n"; + } + if (isset($result['datas'])) { + echo "商品数量: " . count($result['datas']) . "\n"; + + if (!empty($result['datas'])) { + echo "\n📋 第一个商品信息:\n"; + $firstProduct = $result['datas'][0]; + echo " - SPU ID: " . ($firstProduct['i_id'] ?? 'N/A') . "\n"; + echo " - 商品名称: " . ($firstProduct['name'] ?? 'N/A') . "\n"; + echo " - 售价: " . ($firstProduct['s_price'] ?? 'N/A') . "\n"; + echo " - 市场价: " . ($firstProduct['market_price'] ?? 'N/A') . "\n"; + echo " - 成本价: " . ($firstProduct['c_price'] ?? 'N/A') . "\n"; + + if (isset($firstProduct['skus']) && is_array($firstProduct['skus'])) { + echo " - SKU数量: " . count($firstProduct['skus']) . "\n"; + + if (!empty($firstProduct['skus'])) { + echo "\n 📋 第一个SKU:\n"; + $firstSku = $firstProduct['skus'][0]; + echo " - SKU ID: " . ($firstSku['sku_id'] ?? 'N/A') . "\n"; + echo " - SKU名称: " . ($firstSku['properties_value'] ?? 'N/A') . "\n"; + echo " - 售价: " . ($firstSku['sale_price'] ?? 'N/A') . "\n"; + } + } + } + } + } + } catch (\Throwable $e) { + echo "❌ HaichaoJstServices测试失败: " . $e->getMessage() . "\n"; + echo "错误文件: " . $e->getFile() . ":" . $e->getLine() . "\n"; + echo "\n堆栈跟踪:\n" . $e->getTraceAsString() . "\n\n"; + } + + echo "\n========================================\n"; + echo "测试完成\n"; + echo "========================================\n"; + +} catch (\Throwable $e) { + echo "\n❌ 发生错误!\n"; + echo "错误信息: " . $e->getMessage() . "\n"; + echo "错误文件: " . $e->getFile() . ":" . $e->getLine() . "\n"; + echo "\n堆栈跟踪:\n" . $e->getTraceAsString() . "\n"; + exit(1); +} diff --git a/test_haichao_all.php b/test_haichao_all.php new file mode 100644 index 0000000..7e4f9d2 --- /dev/null +++ b/test_haichao_all.php @@ -0,0 +1,115 @@ +#!/usr/bin/env php +initialize(); + +echo "✅ 应用初始化成功!\n\n"; + +try { + + $haichaoJst = \app\haichao\HaichaoJstServices::getServices(); + + echo "1️⃣ 测试全量拉取方法 (getProductList)...\n\n"; + + $result = $haichaoJst->getProductList(); + + echo "✅ API调用成功!\n\n"; + echo "返回数据结构:\n"; + echo " - cursor: " . ($result['cursor'] ?? 'N/A') . "\n"; + echo " - data_count: " . ($result['data_count'] ?? 'N/A') . "\n"; + echo " - page_index: " . ($result['page_index'] ?? 'N/A') . "\n"; + echo " - page_count: " . ($result['page_count'] ?? 'N/A') . "\n"; + echo " - page_size: " . ($result['page_size'] ?? 'N/A') . "\n"; + echo " - has_next: " . (($result['has_next'] ?? false) ? '是' : '否') . "\n"; + + if (isset($result['datas']) && !empty($result['datas'])) { + echo "\n📦 获取到 " . count($result['datas']) . " 条商品数据\n\n"; + + foreach ($result['datas'] as $index => $product) { + echo str_repeat("=", 70) . "\n"; + echo "📋 商品 #" . ($index + 1) . "\n"; + echo str_repeat("-", 70) . "\n"; + echo " SPU ID: " . ($product['i_id'] ?? 'N/A') . "\n"; + echo " 商品名称: " . ($product['name'] ?? 'N/A') . "\n"; + echo " 售价: " . ($product['s_price'] ?? 'N/A') . "\n"; + echo " 市场价: " . ($product['market_price'] ?? 'N/A') . "\n"; + echo " 成本价: " . ($product['c_price'] ?? 'N/A') . "\n"; + echo " 图片: " . ($product['pic'] ?? 'N/A') . "\n"; + + if (isset($product['skus']) && is_array($product['skus'])) { + echo " SKU数量: " . count($product['skus']) . "\n"; + + foreach ($product['skus'] as $skuIndex => $sku) { + echo " SKU #" . ($skuIndex + 1) . ":\n"; + echo " - SKU ID: " . ($sku['sku_id'] ?? 'N/A') . "\n"; + echo " - 规格: " . ($sku['properties_value'] ?? 'N/A') . "\n"; + echo " - 售价: " . ($sku['sale_price'] ?? 'N/A') . "\n"; + echo " - 市场价: " . ($sku['market_price'] ?? 'N/A') . "\n"; + echo " - 成本价: " . ($sku['cost_price'] ?? 'N/A') . "\n"; + } + } + echo "\n"; + } + + echo str_repeat("=", 70) . "\n"; + echo "完整JSON数据:\n"; + echo str_repeat("-", 70) . "\n"; + echo json_encode($result, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT) . "\n"; + + } else { + echo "\n⚠️ datas数组为空\n\n"; + echo "可能原因:\n"; + echo " 1. 聚水潭系统中没有商品\n"; + echo " 2. 时间范围内没有修改过的商品\n"; + echo " 3. 拉取配置有问题\n\n"; + + echo "完整返回:\n"; + echo json_encode($result, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT) . "\n"; + } + + echo "\n2️⃣ 尝试其他方法...\n\n"; + + echo "2.1 测试 getProductListShop()...\n"; + try { + $result2 = $haichaoJst->getProductListShop(); + echo " ✅ 成功\n"; + echo " 返回: " . count($result2) . " 条\n"; + if (!empty($result2)) { + echo " 第一条: " . json_encode($result2[0] ?? [], JSON_UNESCAPED_UNICODE) . "\n"; + } + } catch (\Throwable $e) { + echo " ❌ 失败: " . $e->getMessage() . "\n"; + } + + echo "\n2.2 测试 getInneropenItemList()...\n"; + try { + $result3 = $haichaoJst->getInneropenItemList(); + echo " ✅ 成功\n"; + echo " 返回: " . count($result3) . " 条\n"; + if (!empty($result3)) { + echo " 第一条: " . json_encode($result3[0] ?? [], JSON_UNESCAPED_UNICODE) . "\n"; + } + } catch (\Throwable $e) { + echo " ❌ 失败: " . $e->getMessage() . "\n"; + } + + echo "\n========================================\n"; + echo "测试完成\n"; + echo "========================================\n"; + +} catch (\Throwable $e) { + echo "\n❌ 发生错误!\n"; + echo "错误信息: " . $e->getMessage() . "\n"; + echo "错误文件: " . $e->getFile() . ":" . $e->getLine() . "\n"; + echo "\n堆栈跟踪:\n" . $e->getTraceAsString() . "\n"; + exit(1); +} diff --git a/test_haichao_detail.php b/test_haichao_detail.php new file mode 100644 index 0000000..d036521 --- /dev/null +++ b/test_haichao_detail.php @@ -0,0 +1,144 @@ +#!/usr/bin/env php +initialize(); + +echo "✅ 应用初始化成功!\n\n"; + +try { + + echo "1️⃣ 测试HaichaoJstServices方法...\n\n"; + + $haichaoJst = \app\haichao\HaichaoJstServices::getServices(); + + if (empty($spu)) { + echo "用法: php test_haichao_detail.php SPU编码\n"; + echo "示例: php test_haichao_detail.php test123\n\n"; + + echo "2️⃣ 尝试获取示例数据(getProductListStand)...\n\n"; + + try { + echo "正在调用聚水潭API...\n"; + $result = $haichaoJst->getProductListStand(); + + echo "✅ API调用成功!\n\n"; + + if (empty($result)) { + echo "⚠️ 未获取到任何数据\n"; + echo "可能原因:\n"; + echo " 1. 聚水潭系统中没有商品\n"; + echo " 2. 时间范围内没有修改过的商品\n\n"; + } else { + echo "📦 获取到 " . count($result) . " 条商品数据\n\n"; + + $index = 1; + foreach ($result as $product) { + echo str_repeat("=", 60) . "\n"; + echo "📋 商品 #" . $index . "\n"; + echo str_repeat("-", 60) . "\n"; + $index++; + echo " SPU ID: " . ($product['i_id'] ?? 'N/A') . "\n"; + echo " 商品名称: " . ($product['name'] ?? 'N/A') . "\n"; + echo " 售价: " . ($product['s_price'] ?? 'N/A') . "\n"; + echo " 市场价: " . ($product['market_price'] ?? 'N/A') . "\n"; + echo " 成本价: " . ($product['c_price'] ?? 'N/A') . "\n"; + echo " 图片: " . ($product['pic'] ?? 'N/A') . "\n"; + + if (isset($product['skus']) && is_array($product['skus'])) { + echo " SKU数量: " . count($product['skus']) . "\n"; + + $skuIndex = 1; + foreach ($product['skus'] as $sku) { + echo " SKU #" . $skuIndex . ":\n"; + $skuIndex++; + echo " - SKU ID: " . ($sku['sku_id'] ?? 'N/A') . "\n"; + echo " - 规格: " . ($sku['properties_value'] ?? 'N/A') . "\n"; + echo " - 售价: " . ($sku['sale_price'] ?? 'N/A') . "\n"; + echo " - 市场价: " . ($sku['market_price'] ?? 'N/A') . "\n"; + echo " - 成本价: " . ($sku['cost_price'] ?? 'N/A') . "\n"; + } + } + echo "\n"; + } + + echo str_repeat("=", 60) . "\n"; + echo "完整JSON数据:\n"; + echo str_repeat("-", 60) . "\n"; + echo json_encode($result, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT) . "\n"; + } + } catch (\Throwable $e) { + echo "❌ getProductListStand失败: " . $e->getMessage() . "\n"; + echo "错误文件: " . $e->getFile() . ":" . $e->getLine() . "\n\n"; + } + + exit(0); + } + + echo "正在调用HaichaoJstServices::getProductListKuan...\n"; + echo "SPU: " . $spu . "\n\n"; + + $result = $haichaoJst->getProductListKuan($spu); + + echo "✅ API调用成功!\n\n"; + + if (empty($result)) { + echo "⚠️ 未获取到任何数据\n\n"; + } else { + echo "📦 获取到的数据:\n\n"; + echo json_encode($result, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT) . "\n\n"; + + if (isset($result['code'])) { + echo "响应码: " . $result['code'] . "\n"; + } + if (isset($result['msg'])) { + echo "响应消息: " . $result['msg'] . "\n"; + } + if (isset($result['datas'])) { + echo "商品数量: " . count($result['datas']) . "\n"; + + if (!empty($result['datas'])) { + echo "\n📋 第一个商品信息:\n"; + $firstProduct = $result['datas'][0]; + echo " - SPU ID: " . ($firstProduct['i_id'] ?? 'N/A') . "\n"; + echo " - 商品名称: " . ($firstProduct['name'] ?? 'N/A') . "\n"; + echo " - 售价: " . ($firstProduct['s_price'] ?? 'N/A') . "\n"; + echo " - 市场价: " . ($firstProduct['market_price'] ?? 'N/A') . "\n"; + echo " - 成本价: " . ($firstProduct['c_price'] ?? 'N/A') . "\n"; + + if (isset($firstProduct['skus']) && is_array($firstProduct['skus'])) { + echo " - SKU数量: " . count($firstProduct['skus']) . "\n"; + + if (!empty($firstProduct['skus'])) { + echo "\n 📋 第一个SKU:\n"; + $firstSku = $firstProduct['skus'][0]; + echo " - SKU ID: " . ($firstSku['sku_id'] ?? 'N/A') . "\n"; + echo " - SKU名称: " . ($firstSku['properties_value'] ?? 'N/A') . "\n"; + echo " - 售价: " . ($firstSku['sale_price'] ?? 'N/A') . "\n"; + } + } + } + } + } + + echo "\n========================================\n"; + echo "测试完成\n"; + echo "========================================\n"; + +} catch (\Throwable $e) { + echo "\n❌ 发生错误!\n"; + echo "错误信息: " . $e->getMessage() . "\n"; + echo "错误文件: " . $e->getFile() . ":" . $e->getLine() . "\n"; + echo "\n堆栈跟踪:\n" . $e->getTraceAsString() . "\n"; + exit(1); +} diff --git a/test_haichao_json.php b/test_haichao_json.php new file mode 100644 index 0000000..85080b0 --- /dev/null +++ b/test_haichao_json.php @@ -0,0 +1,85 @@ +#!/usr/bin/env php +initialize(); + +echo "✅ 应用初始化成功!\n\n"; + +try { + + $haichaoJst = \app\haichao\HaichaoJstServices::getServices(); + + if (empty($spu)) { + echo "测试 getProductListStand 方法...\n\n"; + + $result = $haichaoJst->getProductListStand(); + + echo "✅ API调用成功!\n\n"; + echo "返回数据类型: " . gettype($result) . "\n"; + + if (is_array($result)) { + echo "顶层键值:\n"; + foreach (array_keys($result) as $key) { + echo " - {$key}\n"; + } + + if (isset($result['datas']) && is_array($result['datas'])) { + echo "\n📦 datas数组包含 " . count($result['datas']) . " 个元素\n\n"; + + if (!empty($result['datas'])) { + echo "第一个元素:\n"; + print_r($result['datas'][0]); + } else { + echo "⚠️ datas数组为空\n"; + } + } else if (isset($result[0])) { + echo "\n📦 第一个元素:\n"; + print_r($result[0]); + } else { + echo "\n完整返回:\n"; + print_r($result); + } + } else { + echo "\n完整返回:\n"; + print_r($result); + } + + echo "\n\n"; + echo "完整JSON:\n"; + echo json_encode($result, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT); + echo "\n"; + + } else { + echo "测试 getProductListKuan 方法...\n\n"; + echo "SPU: " . $spu . "\n\n"; + + $result = $haichaoJst->getProductListKuan($spu); + + echo "✅ API调用成功!\n\n"; + echo "完整JSON:\n"; + echo json_encode($result, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT); + echo "\n"; + } + + echo "\n========================================\n"; + echo "测试完成\n"; + echo "========================================\n"; + +} catch (\Throwable $e) { + echo "\n❌ 发生错误!\n"; + echo "错误信息: " . $e->getMessage() . "\n"; + echo "错误文件: " . $e->getFile() . ":" . $e->getLine() . "\n"; + echo "\n堆栈跟踪:\n" . $e->getTraceAsString() . "\n"; + exit(1); +} diff --git a/test_jst_final_demo.php b/test_jst_final_demo.php new file mode 100644 index 0000000..b66b97b --- /dev/null +++ b/test_jst_final_demo.php @@ -0,0 +1,83 @@ +#!/usr/bin/env php +initialize(); + +echo "✅ 应用初始化成功!\n\n"; + +try { + + $haichaoJst = \app\haichao\HaichaoJstServices::getServices(); + + echo "正在从聚水潭拉取商品数据...\n\n"; + + $result = $haichaoJst->getProductListStand(); + + echo "✅ API调用成功!\n\n"; + + if (empty($result)) { + echo "⚠️ 未获取到任何商品数据\n\n"; + exit(0); + } + + echo "📊 统计信息:\n"; + echo " - 获取商品数量: " . count($result) . " 个\n\n"; + + foreach ($result as $index => $product) { + $num = (int)$index + 1; + echo str_repeat("=", 80) . "\n"; + echo "商品 #{$num}\n"; + echo str_repeat("-", 80) . "\n"; + + echo "【基本信息】\n"; + echo " SPU ID: " . ($product['i_id'] ?? 'N/A') . "\n"; + echo " 商品名称: " . ($product['name'] ?? 'N/A') . "\n"; + echo " 售价: ¥" . ($product['s_price'] ?? 'N/A') . "\n"; + echo " 市场价: ¥" . ($product['market_price'] ?? 'N/A') . "\n"; + echo " 成本价: ¥" . ($product['c_price'] ?? 'N/A') . "\n"; + echo " 图片URL: " . ($product['pic'] ?? 'N/A') . "\n"; + + if (isset($product['skus']) && is_array($product['skus']) && count($product['skus']) > 0) { + echo "\n【SKU规格】\n"; + echo " SKU数量: " . count($product['skus']) . " 个\n\n"; + + foreach ($product['skus'] as $skuIndex => $sku) { + $skuNum = $skuIndex + 1; + echo " ┌─ SKU #{$skuNum}\n"; + echo " │ SKU ID: " . ($sku['sku_id'] ?? 'N/A') . "\n"; + echo " │ 规格属性: " . ($sku['properties_value'] ?? 'N/A') . "\n"; + echo " │ 售价: ¥" . ($sku['sale_price'] ?? 'N/A') . "\n"; + echo " │ 市场价: ¥" . ($sku['market_price'] ?? 'N/A') . "\n"; + echo " │ 成本价: ¥" . ($sku['cost_price'] ?? 'N/A') . "\n"; + echo " └─────────────────────────────────────────\n"; + } + } + + echo "\n"; + } + + echo str_repeat("=", 80) . "\n"; + echo "完整JSON数据:\n"; + echo str_repeat("-", 80) . "\n"; + echo json_encode($result, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT) . "\n\n"; + + echo "========================================\n"; + echo "✅ 测试完成!成功拉取 " . count($result) . " 个商品\n"; + echo "========================================\n"; + +} catch (\Throwable $e) { + echo "\n❌ 发生错误!\n"; + echo "错误信息: " . $e->getMessage() . "\n"; + echo "错误文件: " . $e->getFile() . ":" . $e->getLine() . "\n"; + echo "\n堆栈跟踪:\n" . $e->getTraceAsString() . "\n"; + exit(1); +} diff --git a/test_simple.php b/test_simple.php new file mode 100644 index 0000000..1efd3e4 --- /dev/null +++ b/test_simple.php @@ -0,0 +1,71 @@ +#!/usr/bin/env php +initialize(); + +echo "✅ 应用初始化成功!\n\n"; + +try { + + $db = \think\facade\Db::connect(); + + $configs = $db->query("SELECT * FROM eb_system_config WHERE `name` IN ('jst_login_account', 'jst_login_password', 'jst_appkey', 'jst_appsecret')"); + + echo "数据库配置:\n"; + foreach ($configs as $config) { + $name = $config['name'] ?? 'N/A'; + $value = $config['value'] ?? ''; + + if (in_array($name, ['jst_login_password', 'jst_appsecret'])) { + echo " - {$name}: " . (empty($value) ? '❌ 未配置' : '✅ 已配置(' . strlen($value) . '位)') . "\n"; + } else { + echo " - {$name}: " . (empty($value) ? '❌ 未配置' : $value) . "\n"; + } + } + + echo "\n"; + + $loginAccount = $configs[array_search('jst_login_account', array_column($configs, 'name'))]['value'] ?? ''; + $loginPassword = $configs[array_search('jst_login_password', array_column($configs, 'name'))]['value'] ?? ''; + + if (empty($loginAccount) || empty($loginPassword)) { + echo "⚠️ 数据库中缺少登录凭证\n\n"; + echo "请先在后台ERP配置中填写账号密码\n\n"; + exit(0); + } + + echo "✅ 找到登录凭证!\n"; + echo "尝试刷新Token...\n\n"; + + try { + $haichaoJst = \app\haichao\HaichaoJstServices::getServices(); + $haichaoJst->authLogin($loginAccount, $loginPassword); + echo "✅ 登录成功!\n\n"; + + echo "正在测试商品拉取...\n"; + $result = $haichaoJst->getProductListStand(); + + if (!empty($result)) { + echo "✅ 成功获取到 " . count($result) . " 条商品!\n\n"; + echo json_encode($result[0] ?? [], JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT); + echo "\n\n"; + } else { + echo "⚠️ 未获取到商品\n"; + } + + } catch (\Throwable $e) { + echo "❌ 失败: " . $e->getMessage() . "\n\n"; + } + +} catch (\Throwable $e) { + echo "错误: " . $e->getMessage() . "\n"; +} diff --git a/test_table.php b/test_table.php new file mode 100644 index 0000000..336925b --- /dev/null +++ b/test_table.php @@ -0,0 +1,14 @@ +#!/usr/bin/env php +initialize(); + +$db = \think\facade\Db::connect(); + +$configs = $db->query("DESCRIBE eb_system_config"); +print_r($configs); diff --git a/test_token.php b/test_token.php new file mode 100644 index 0000000..3097914 --- /dev/null +++ b/test_token.php @@ -0,0 +1,130 @@ +#!/usr/bin/env php +initialize(); + +echo "✅ 应用初始化成功!\n\n"; + +try { + + echo "1️⃣ 读取当前配置...\n\n"; + + $envFile = __DIR__ . '/.env'; + $envContent = file_get_contents($envFile); + + preg_match('/JST_APP_KEY\s*=\s*(.*)/', $envContent, $matches); + $appKey = isset($matches[1]) ? trim($matches[1]) : ''; + + preg_match('/JST_APP_SECRET\s*=\s*(.*)/', $envContent, $matches); + $appSecret = isset($matches[1]) ? trim($matches[1]) : ''; + + preg_match('/JST_ACCESS_TOKEN\s*=\s*(.*)/', $envContent, $matches); + $accessToken = isset($matches[1]) ? trim($matches[1]) : ''; + + echo "JST_APP_KEY: " . $appKey . "\n"; + echo "JST_APP_SECRET: " . (empty($appSecret) ? '❌ 未配置' : '✅ 已配置') . "\n"; + echo "JST_ACCESS_TOKEN: " . (empty($accessToken) ? '❌ 未配置' : substr($accessToken, 0, 20) . '...') . "\n\n"; + + if (empty($appKey) || empty($appSecret) || empty($accessToken)) { + echo "⚠️ 配置不完整,请检查.env文件\n\n"; + exit(1); + } + + echo "2️⃣ 测试当前Token是否有效...\n\n"; + + try { + $haichaoJst = \app\haichao\HaichaoJstServices::getServices(); + + echo "正在调用API测试Token...\n"; + $result = $haichaoJst->getProductListStand(); + + echo "✅ Token有效!\n\n"; + + if (!empty($result)) { + echo "📦 获取到 " . count($result) . " 条商品数据\n\n"; + + if (isset($result[0])) { + echo "📋 示例商品:\n"; + $product = $result[0]; + echo json_encode($product, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT) . "\n\n"; + } + } + + } catch (\Throwable $e) { + echo "❌ Token无效: " . $e->getMessage() . "\n\n"; + + echo "3️⃣ 尝试通过用户名密码登录获取新Token...\n\n"; + + preg_match('/JST_LOGIN_ACCOUNT\s*=\s*(.*)/', $envContent, $matches); + $loginAccount = isset($matches[1]) ? trim($matches[1]) : ''; + + preg_match('/JST_LOGIN_PASSWORD\s*=\s*(.*)/', $envContent, $matches); + $loginPassword = isset($matches[1]) ? trim($matches[1]) : ''; + + echo "登录账号: " . (empty($loginAccount) ? '❌ 未配置' : $loginAccount) . "\n"; + echo "登录密码: " . (empty($loginPassword) ? '❌ 未配置' : '✅ 已配置') . "\n\n"; + + if (empty($loginAccount) || empty($loginPassword)) { + echo "⚠️ 无法刷新Token,缺少登录凭证\n"; + echo "请在.env文件中添加:\n"; + echo "JST_LOGIN_ACCOUNT=你的聚水潭账号\n"; + echo "JST_LOGIN_PASSWORD=你的聚水潭密码\n\n"; + exit(1); + } + + echo "正在尝试登录...\n"; + + try { + $haichaoJst->authLogin($loginAccount, $loginPassword); + + $envContent = file_get_contents($envFile); + preg_match('/JST_ACCESS_TOKEN\s*=\s*(.*)/', $envContent, $matches); + $newToken = isset($matches[1]) ? trim($matches[1]) : ''; + + echo "✅ 登录成功! 新Token: " . substr($newToken, 0, 20) . "...\n\n"; + + echo "4️⃣ 再次测试API...\n\n"; + + $result = $haichaoJst->getProductListStand(); + + echo "✅ API调用成功!\n\n"; + + if (!empty($result)) { + echo "📦 获取到 " . count($result) . " 条商品数据\n\n"; + + if (isset($result[0])) { + echo "📋 示例商品:\n"; + $product = $result[0]; + echo json_encode($product, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT) . "\n\n"; + } + } + + } catch (\Throwable $e2) { + echo "❌ 登录失败: " . $e2->getMessage() . "\n\n"; + echo "请检查:\n"; + echo "1. 聚水潭账号密码是否正确\n"; + echo "2. 聚水潭应用是否已授权\n"; + echo "3. 应用Key和Secret是否正确\n\n"; + } + } + + echo "========================================\n"; + echo "检查完成\n"; + echo "========================================\n"; + +} catch (\Throwable $e) { + echo "\n❌ 发生错误!\n"; + echo "错误信息: " . $e->getMessage() . "\n"; + echo "错误文件: " . $e->getFile() . ":" . $e->getLine() . "\n"; + echo "\n堆栈跟踪:\n" . $e->getTraceAsString() . "\n"; + exit(1); +} diff --git a/vendor/alibabacloud/credentials/CHANGELOG.md b/vendor/alibabacloud/credentials/CHANGELOG.md index 6180270..703a558 100644 --- a/vendor/alibabacloud/credentials/CHANGELOG.md +++ b/vendor/alibabacloud/credentials/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 1.2.0 - 2024-10-17 + +- Refactor all credentials providers. + ## 1.1.3 - 2020-12-24 - Require guzzle ^6.3|^7.0 diff --git a/vendor/alibabacloud/credentials/README-zh-CN.md b/vendor/alibabacloud/credentials/README-zh-CN.md index 262cad9..5ef6ecd 100644 --- a/vendor/alibabacloud/credentials/README-zh-CN.md +++ b/vendor/alibabacloud/credentials/README-zh-CN.md @@ -1,41 +1,57 @@ [English](/README.md) | 简体中文 +![](https://aliyunsdk-pages.alicdn.com/icons/AlibabaCloud.svg) # Alibaba Cloud Credentials for PHP + +[![PHP CI](https://github.com/aliyun/credentials-php/actions/workflows/ci.yml/badge.svg)](https://github.com/aliyun/credentials-php/actions/workflows/ci.yml) +[![codecov](https://codecov.io/gh/aliyun/credentials-php/graph/badge.svg?token=YIkSjtfKbB)](https://codecov.io/gh/aliyun/credentials-php) [![Latest Stable Version](https://poser.pugx.org/alibabacloud/credentials/v/stable)](https://packagist.org/packages/alibabacloud/credentials) [![composer.lock](https://poser.pugx.org/alibabacloud/credentials/composerlock)](https://packagist.org/packages/alibabacloud/credentials) [![Total Downloads](https://poser.pugx.org/alibabacloud/credentials/downloads)](https://packagist.org/packages/alibabacloud/credentials) [![License](https://poser.pugx.org/alibabacloud/credentials/license)](https://packagist.org/packages/alibabacloud/credentials) -[![codecov](https://codecov.io/gh/aliyun/credentials-php/branch/master/graph/badge.svg)](https://codecov.io/gh/aliyun/credentials-php) -[![Travis Build Status](https://travis-ci.org/aliyun/credentials-php.svg?branch=master)](https://travis-ci.org/aliyun/credentials-php) -[![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/6jxpwmhyfipagtge/branch/master?svg=true)](https://ci.appveyor.com/project/aliyun/credentials-php) - - -![](https://aliyunsdk-pages.alicdn.com/icons/AlibabaCloud.svg) - Alibaba Cloud Credentials for PHP 是帮助 PHP 开发者管理凭据的工具。 - ## 先决条件 + 您的系统需要满足[先决条件](/docs/zh-CN/0-Prerequisites.md),包括 PHP> = 5.6。 我们强烈建议使用cURL扩展,并使用TLS后端编译cURL 7.16.2+。 - ## 安装依赖 + 如果已在系统上[全局安装 Composer](https://getcomposer.org/doc/00-intro.md#globally),请直接在项目目录中运行以下内容来安装 Alibaba Cloud Credentials for PHP 作为依赖项: -``` + +```sh composer require alibabacloud/credentials ``` + > 一些用户可能由于网络问题无法安装,可以使用[阿里云 Composer 全量镜像](https://developer.aliyun.com/composer)。 请看[安装](/docs/zh-CN/1-Installation.md)有关通过 Composer 和其他方式安装的详细信息。 - ## 快速使用 + 在您开始之前,您需要注册阿里云帐户并获取您的[凭证](https://usercenter.console.aliyun.com/#/manage/ak)。 ### 凭证类型 +#### 使用默认凭据链 +当您在初始化凭据客户端不传入任何参数时,Credentials工具会使用默认凭据链方式初始化客户端。默认凭据的读取逻辑请参见[默认凭据链](#默认凭证提供程序链)。 + +```php +getCredential(); +$credential->getAccessKeyId(); +$credential->getAccessKeySecret(); +$credential->getSecurityToken(); +``` + #### AccessKey 通过[用户信息管理][ak]设置 access_key,它们具有该账户完全的权限,请妥善保管。有时出于安全考虑,您不能把具有完全访问权限的主账户 AccessKey 交于一个项目的开发者使用,您可以[创建RAM子账户][ram]并为子账户[授权][permissions],使用RAM子用户的 AccessKey 来进行API调用。 @@ -44,20 +60,19 @@ composer require alibabacloud/credentials getAccessKeyId(); -$credential->getAccessKeySecret(); +use AlibabaCloud\Credentials\Credential\Config; // Access Key -$ak = new Credential([ - 'type' => 'access_key', - 'access_key_id' => '', - 'access_key_secret' => '', +$config = new Config([ + 'type' => 'access_key', + 'accessKeyId' => '', + 'accessKeySecret' => '', ]); -$ak->getAccessKeyId(); -$ak->getAccessKeySecret(); +$client = new Credential($config); + +$credential = $client->getCredential(); +$credential->getAccessKeyId(); +$credential->getAccessKeySecret(); ``` #### STS @@ -68,102 +83,256 @@ $ak->getAccessKeySecret(); 'sts', - 'access_key_id' => '', - 'accessKey_secret' => '', - 'security_token' => '', +$config = new Config([ + 'type' => 'sts', + 'accessKeyId' => '', + 'accessKeySecret' => '', + 'securityToken' => '', ]); -$sts->getAccessKeyId(); -$sts->getAccessKeySecret(); -$sts->getSecurityToken(); +$client = new Credential($config); + +$credential = $client->getCredential(); +$credential->getAccessKeyId(); +$credential->getAccessKeySecret(); +$credential->getSecurityToken(); ``` #### RamRoleArn -通过指定[RAM角色][RAM Role],让凭证自动申请维护 STS Token。你可以通过为 `Policy` 赋值来限制获取到的 STS Token 的权限。 +通过指定RAM角色的ARN(Alibabacloud Resource Name),Credentials工具可以帮助开发者前往STS换取STS Token。您也可以通过为 `Policy` 赋值来限制RAM角色到一个更小的权限集合。 ```php 'ram_role_arn', - 'access_key_id' => '', - 'access_key_secret' => '', - 'role_arn' => '', - 'role_session_name' => '', - 'policy' => '', +$config = new Config([ + 'type' => 'ram_role_arn', + 'accessKeyId' => '', + 'accessKeySecret' => '', + // 要扮演的RAM角色ARN,示例值:acs:ram::123456789012****:role/adminrole,可以通过环境变量ALIBABA_CLOUD_ROLE_ARN设置role_arn + 'roleArn' => '', + // 角色会话名称,可以通过环境变量ALIBABA_CLOUD_ROLE_SESSION_NAME设置role_session_name + 'roleSessionName' => '', + // 设置更小的权限策略,非必填。示例值:{"Statement": [{"Action": ["*"],"Effect": "Allow","Resource": ["*"]}],"Version":"1"} + 'policy' => '', + // 设置session过期时间,非必填。 + 'roleSessionExpiration' => 3600, ]); -$ramRoleArn->getAccessKeyId(); -$ramRoleArn->getAccessKeySecret(); -$ramRoleArn->getRoleArn(); -$ramRoleArn->getRoleSessionName(); -$ramRoleArn->getPolicy(); +$client = new Credential($config); + +$credential = $client->getCredential(); +$credential->getAccessKeyId(); +$credential->getAccessKeySecret(); +$credential->getSecurityToken(); ``` #### EcsRamRole -通过指定角色名称,让凭证自动申请维护 STS Token +ECS和ECI实例均支持绑定实例RAM角色,当在实例中使用Credentials工具时,将自动获取实例绑定的RAM角色,并通过访问元数据服务获取RAM角色的STS Token,以完成凭据客户端的初始化。 + +实例元数据服务器支持加固模式和普通模式两种访问方式,Credentials工具默认使用加固模式(IMDSv2)获取访问凭据。若使用加固模式时发生异常,您可以通过设置disableIMDSv1来执行不同的异常处理逻辑: + +- 当值为false(默认值)时,会使用普通模式继续获取访问凭据。 + +- 当值为true时,表示只能使用加固模式获取访问凭据,会抛出异常。 + +服务端是否支持IMDSv2,取决于您在服务器的配置。 ```php 'ecs_ram_role', - 'role_name' => '', +$config = new Config([ + 'type' => 'ecs_ram_role', + // 选填,该ECS角色的角色名称,不填会自动获取,但是建议加上以减少请求次数,可以通过环境变量ALIBABA_CLOUD_ECS_METADATA设置role_name + 'roleName' => '', + // 选填,是否强制关闭IMDSv1,即必须使用IMDSv2加固模式,可以通过环境变量ALIBABA_CLOUD_IMDSV1_DISABLED设置 + 'disableIMDSv1' => true, ]); -$ecsRamRole->getRoleName(); -// Note: `role_name` is optional. It will be retrieved automatically if not set. It is highly recommended to set it up to reduce requests. +$client = new Credential($config); + +$credential = $client->getCredential(); +$credential->getAccessKeyId(); +$credential->getAccessKeySecret(); +$credential->getSecurityToken(); ``` -#### RsaKeyPair +#### OIDCRoleArn -通过指定公钥Id和私钥文件,让凭证自动申请维护 AccessKey。仅支持日本站。 +在容器服务 Kubernetes 版中设置了Worker节点RAM角色后,对应节点内的Pod中的应用也就可以像ECS上部署的应用一样,通过元数据服务(Meta Data Server)获取关联角色的STS Token。但如果容器集群上部署的是不可信的应用(比如部署您的客户提交的应用,代码也没有对您开放),您可能并不希望它们能通过元数据服务获取Worker节点关联实例RAM角色的STS Token。为了避免影响云上资源的安全,同时又能让这些不可信的应用安全地获取所需的 STS Token,实现应用级别的权限最小化,您可以使用RRSA(RAM Roles for Service Account)功能。阿里云容器集群会为不同的应用Pod创建和挂载相应的服务账户OIDC Token文件,并将相关配置信息注入到环境变量中,Credentials工具通过获取环境变量的配置信息,调用STS服务的AssumeRoleWithOIDC - OIDC角色SSO时获取扮演角色的临时身份凭证接口换取绑定角色的STS Token。详情请参见[通过RRSA配置ServiceAccount的RAM权限实现Pod权限隔离](https://help.aliyun.com/zh/ack/ack-managed-and-ack-dedicated/user-guide/use-rrsa-to-authorize-pods-to-access-different-cloud-services#task-2142941)。 ```php 'rsa_key_pair', - 'public_key_id' => '', - 'private_key_file' => '', +$config = new Config([ + 'type' => 'oidc_role_arn', + // OIDC提供商ARN,可以通过环境变量ALIBABA_CLOUD_OIDC_PROVIDER_ARN设置oidc_provider_arn + 'oidcProviderArn' => '', + // OIDC Token文件路径,可以通过环境变量ALIBABA_CLOUD_OIDC_TOKEN_FILE设置oidc_token_file_path + 'oidcTokenFilePath' => '', + // 要扮演的RAM角色ARN,示例值:acs:ram::123456789012****:role/adminrole,可以通过环境变量ALIBABA_CLOUD_ROLE_ARN设置role_arn + 'roleArn' => '', + // 角色会话名称,可以通过环境变量ALIBABA_CLOUD_ROLE_SESSION_NAME设置role_session_name + 'roleSessionName' => '', + // 设置更小的权限策略,非必填。示例值:{"Statement": [{"Action": ["*"],"Effect": "Allow","Resource": ["*"]}],"Version":"1"} + 'policy' => '', + # 设置session过期时间 + 'roleSessionExpiration' => 3600, ]); -$rsaKeyPair->getPublicKeyId(); -$rsaKeyPair->getPrivateKey(); +$client = new Credential($config); + +$credential = $client->getCredential(); +$credential->getAccessKeyId(); +$credential->getAccessKeySecret(); +$credential->getSecurityToken(); +``` + +#### Credentials URI + +通过指定提供凭证的自定义网络服务地址,让凭证自动申请维护 STS Token。 + +```php + 'credentials_uri', + // 凭证的 URI,格式为http://local_or_remote_uri/,可以通过环境变量ALIBABA_CLOUD_CREDENTIALS_URI设置credentials_uri + 'credentialsURI' => '', +]); +$client = new Credential($config); + +$credential = $client->getCredential(); +$credential->getAccessKeyId(); +$credential->getAccessKeySecret(); +$credential->getSecurityToken(); ``` #### Bearer Token -如呼叫中心(CCC)需用此凭证,请自行申请维护 Bearer Token。 +目前只有云呼叫中心 CCC 这款产品支持 Bearer Token 的凭据初始化方式。 ```php 'bearer_token', - 'bearer_token' => '', +$config = new Config([ + 'type' => 'bearer', + // 填入您的Bearer Token + 'bearerToken' => '', ]); -$bearerToken->getBearerToken(); -$bearerToken->getSignature(); +$client = new Credential($config); + +$credential = $client->getCredential(); +$credential->getBearerToken(); ``` ## 默认凭证提供程序链 -默认凭证提供程序链查找可用的凭证,寻找顺序如下: -### 1. 环境凭证 -程序首先会在环境变量里寻找环境凭证,如果定义了 `ALIBABA_CLOUD_ACCESS_KEY_ID` 和 `ALIBABA_CLOUD_ACCESS_KEY_SECRET` 环境变量且不为空,程序将使用他们创建默认凭证。 +当您的程序开发环境和生产环境采用不同的凭据类型,常见做法是在代码中获取当前环境信息,编写获取不同凭据的分支代码。借助Credentials工具的默认凭据链,您可以用同一套代码,通过程序之外的配置来控制不同环境下的凭据获取方式。当您在不传入参数的情况下,直接使用$credential = new Credential();初始化凭据客户端时,阿里云SDK将会尝试按照如下顺序查找相关凭据信息。 -### 2. 配置文件 -> 如果用户主目录存在默认文件 `~/.alibabacloud/credentials` (Windows 为 `C:\Users\USER_NAME\.alibabacloud\credentials`),程序会自动创建指定类型和名称的凭证。默认文件可以不存在,但解析错误会抛出异常。 凭证名称不分大小写,若凭证同名,后者会覆盖前者。不同的项目、工具之间可以共用这个配置文件,因为超出项目之外,也不会被意外提交到版本控制。Windows 上可以使用环境变量引用到主目录 %UserProfile%。类 Unix 的系统可以使用环境变量 $HOME 或 ~ (tilde)。 可以通过定义 `ALIBABA_CLOUD_CREDENTIALS_FILE` 环境变量修改默认文件的路径。 +### 1. 使用环境变量 + +Credentials工具会优先在环境变量中获取凭据信息。 + +- 如果系统环境变量 `ALIBABA_CLOUD_ACCESS_KEY_ID`(密钥Key) 和 `ALIBABA_CLOUD_ACCESS_KEY_SECRET`(密钥Value) 不为空,Credentials工具会优先使用它们作为默认凭据。 + +- 如果系统环境变量 `ALIBABA_CLOUD_ACCESS_KEY_ID`(密钥Key)、`ALIBABA_CLOUD_ACCESS_KEY_SECRET`(密钥Value)、`ALIBABA_CLOUD_SECURITY_TOKEN`(Token)均不为空,Credentials工具会优先使用STS Token作为默认凭据。 + +### 2. 使用OIDC RAM角色 +若不存在优先级更高的凭据信息,Credentials工具会在环境变量中获取如下内容: + +`ALIBABA_CLOUD_ROLE_ARN`:RAM角色名称ARN; + +`ALIBABA_CLOUD_OIDC_PROVIDER_ARN`:OIDC提供商ARN; + +`ALIBABA_CLOUD_OIDC_TOKEN_FILE`:OIDC Token文件路径; + +若以上三个环境变量都已设置内容,Credentials将会使用变量内容调用STS服务的[AssumeRoleWithOIDC - OIDC角色SSO时获取扮演角色的临时身份凭证](https://help.aliyun.com/zh/ram/developer-reference/api-sts-2015-04-01-assumerolewithoidc)接口换取STS Token作为默认凭据。 + +### 3. 使用 Aliyun CLI 工具的 config.json 配置文件 + +若不存在优先级更高的凭据信息,Credentials工具会优先在如下位置查找 `config.json` 文件是否存在: +Linux系统:`~/.aliyun/config.json` +Windows系统: `C:\Users\USER_NAME\.aliyun\config.json` +如果文件存在,程序将会使用配置文件中 `current` 指定的凭据信息初始化凭据客户端。当然,您也可以通过环境变量 `ALIBABA_CLOUD_PROFILE` 来指定凭据信息,例如设置 `ALIBABA_CLOUD_PROFILE` 的值为 `AK`。 + +在config.json配置文件中每个module的值代表了不同的凭据信息获取方式: + +- AK:使用用户的Access Key作为凭据信息; +- RamRoleArn:使用RAM角色的ARN来获取凭据信息; +- EcsRamRole:利用ECS绑定的RAM角色来获取凭据信息; +- OIDC:通过OIDC ARN和OIDC Token来获取凭据信息; +- ChainableRamRoleArn:采用角色链的方式,通过指定JSON文件中的其他凭据,以重新获取新的凭据信息。 + +配置示例信息如下: + +```json +{ + "current": "AK", + "profiles": [ + { + "name": "AK", + "mode": "AK", + "access_key_id": "access_key_id", + "access_key_secret": "access_key_secret" + }, + { + "name": "RamRoleArn", + "mode": "RamRoleArn", + "access_key_id": "access_key_id", + "access_key_secret": "access_key_secret", + "ram_role_arn": "ram_role_arn", + "ram_session_name": "ram_session_name", + "expired_seconds": 3600, + "sts_region": "cn-hangzhou" + }, + { + "name": "EcsRamRole", + "mode": "EcsRamRole", + "ram_role_name": "ram_role_name" + }, + { + "name": "OIDC", + "mode": "OIDC", + "ram_role_arn": "ram_role_arn", + "oidc_token_file": "path/to/oidc/file", + "oidc_provider_arn": "oidc_provider_arn", + "ram_session_name": "ram_session_name", + "expired_seconds": 3600, + "sts_region": "cn-hangzhou" + }, + { + "name": "ChainableRamRoleArn", + "mode": "ChainableRamRoleArn", + "source_profile": "AK", + "ram_role_arn": "ram_role_arn", + "ram_session_name": "ram_session_name", + "expired_seconds": 3600, + "sts_region": "cn-hangzhou" + } + ] +} +``` + +### 4. 使用配置文件 +> +> 如果用户主目录存在默认文件 `~/.alibabacloud/credentials` (Windows 为 `C:\Users\USER_NAME\.alibabacloud\credentials`),程序会自动创建指定类型和名称的凭证。您也可通过环境变量 `ALIBABA_CLOUD_CREDENTIALS_FILE` 指定配置文件路径。如果文件存在,程序将会使用配置文件中 default 指定的凭据信息初始化凭据客户端。当然,您也可以通过环境变量 `ALIBABA_CLOUD_PROFILE` 来指定凭据信息,例如设置 `ALIBABA_CLOUD_PROFILE` 的值为 `client1`。 + +配置示例信息如下: ```ini [default] @@ -183,68 +352,72 @@ role_arn = role_arn role_session_name = session_name [project3] -type = rsa_key_pair # 认证方式为 rsa_key_pair -public_key_id = publicKeyId # Public Key ID -private_key_file = /your/pk.pem # Private Key 文件 +type=oidc_role_arn # 认证方式为 oidc_role_arn +oidc_provider_arn=oidc_provider_arn +oidc_token_file_path=oidc_token_file_path +role_arn=role_arn +role_session_name=session_name ``` -### 3. 实例 RAM 角色 -如果定义了环境变量 `ALIBABA_CLOUD_ECS_METADATA` 且不为空,程序会将该环境变量的值作为角色名称,请求 `http://100.100.100.200/latest/meta-data/ram/security-credentials/` 获取临时安全凭证作为默认凭证。 +### 5. 使用 ECS 实例RAM角色 -### 自定义凭证提供程序链 -可通过自定义程序链代替默认程序链的寻找顺序,也可以自行编写闭包传入提供者。 -```php - = 5.6. We strongly recommend using the cURL extension and compiling cURL 7.16.2+ using the TLS backend. - ## Installation + If you have [Globally Install Composer](https://getcomposer.org/doc/00-intro.md#globally) on your system, install Alibaba Cloud Credentials for PHP as a dependency by running the following directly in the project directory: -``` + +```sh composer require alibabacloud/credentials ``` + > Some users may not be able to install due to network problems, you can switch to the [Alibaba Cloud Composer Mirror](https://developer.aliyun.com/composer). See [Installation](/docs/zh-CN/1-Installation.md) for details on installing through Composer and other means. - ## Quick Examples + Before you begin, you need to sign up for an Alibaba Cloud account and retrieve your [Credentials](https://usercenter.console.aliyun.com/#/manage/ak). ### Credential Type +#### Default credential provider chain + +If you do not specify a method to initialize a Credentials client, the default credential provider chain is used. For more information, see the Default credential provider chain section of this topic. + +```php +getCredential(); +$credential->getAccessKeyId(); +$credential->getAccessKeySecret(); +$credential->getSecurityToken(); +``` + #### AccessKey Setup access_key credential through [User Information Management][ak], it have full authority over the account, please keep it safe. Sometimes for security reasons, you cannot hand over a primary account AccessKey with full access to the developer of a project. You may create a sub-account [RAM Sub-account][ram] , grant its [authorization][permissions],and use the AccessKey of RAM Sub-account. @@ -44,20 +62,19 @@ Setup access_key credential through [User Information Management][ak], it have f getAccessKeyId(); -$credential->getAccessKeySecret(); +use AlibabaCloud\Credentials\Credential\Config; // Access Key -$ak = new Credential([ - 'type' => 'access_key', - 'access_key_id' => '', - 'access_key_secret' => '', +$config = new Config([ + 'type' => 'access_key', + 'accessKeyId' => '', + 'accessKeySecret' => '', ]); -$ak->getAccessKeyId(); -$ak->getAccessKeySecret(); +$client = new Credential($config); + +$credential = $client->getCredential(); +$credential->getAccessKeyId(); +$credential->getAccessKeySecret(); ``` #### STS @@ -68,16 +85,20 @@ Create a temporary security credential by applying Temporary Security Credential 'sts', - 'access_key_id' => '', - 'accessKey_secret' => '', - 'security_token' => '', +$config = new Config([ + 'type' => 'sts', + 'accessKeyId' => '', + 'accessKeySecret' => '', + 'securityToken' => '', ]); -$sts->getAccessKeyId(); -$sts->getAccessKeySecret(); -$sts->getSecurityToken(); +$client = new Credential($config); + +$credential = $client->getCredential(); +$credential->getAccessKeyId(); +$credential->getAccessKeySecret(); +$credential->getSecurityToken(); ``` #### RamRoleArn @@ -88,56 +109,116 @@ By specifying [RAM Role][RAM Role], the credential will be able to automatically 'ram_role_arn', - 'access_key_id' => '', - 'access_key_secret' => '', - 'role_arn' => '', - 'role_session_name' => '', - 'policy' => '', +$config = new Config([ + 'type' => 'ram_role_arn', + 'accessKeyId' => '', + 'accessKeySecret' => '', + // Specify the ARN of the RAM role to be assumed. Example: acs:ram::123456789012****:role/adminrole. + 'roleArn' => '', + // Specify the name of the role session. + 'roleSessionName' => '', + // Optional. Specify limited permissions for the RAM role. Example: {"Statement": [{"Action": ["*"],"Effect": "Allow","Resource": ["*"]}],"Version":"1"}. + 'policy' => '', + // Optional. Specify the expiration of the session + 'roleSessionExpiration' => 3600, ]); -$ramRoleArn->getAccessKeyId(); -$ramRoleArn->getAccessKeySecret(); -$ramRoleArn->getRoleArn(); -$ramRoleArn->getRoleSessionName(); -$ramRoleArn->getPolicy(); +$client = new Credential($config); + +$credential = $client->getCredential(); +$credential->getAccessKeyId(); +$credential->getAccessKeySecret(); +$credential->getSecurityToken(); ``` #### EcsRamRole -By specifying the role name, the credential will be able to automatically request maintenance of STS Token. +Both ECS and ECI instances support binding instance RAM roles. When the Credentials tool is used in an instance, the RAM role bound to the instance will be automatically obtained, and the STS Token of the RAM role will be obtained by accessing the metadata service to complete the initialization of the credential client. + +The instance metadata server supports two access modes: hardened mode and normal mode. The Credentials tool uses hardened mode (IMDSv2) by default to obtain access credentials. If an exception occurs when using hardened mode, you can set disableIMDSv1 to perform different exception handling logic: + +- When the value is false (default value), the normal mode will continue to be used to obtain access credentials. + +- When the value is true, it means that only hardened mode can be used to obtain access credentials, and an exception will be thrown. + +Whether the server supports IMDSv2 depends on your configuration on the server. ```php 'ecs_ram_role', - 'role_name' => '', +$config = new Config([ + 'type' => 'ecs_ram_role', + // Optional. Specify the name of the RAM role of the ECS instance. If you do not specify this parameter, its value is automatically obtained. To reduce the number of requests, we recommend that you specify this parameter. + 'roleName' => '', + //Optional, whether to forcibly disable IMDSv1, that is, to use IMDSv2 hardening mode, which can be set by the environment variable ALIBABA_CLOUD_IMDSV1_DISABLED + 'disableIMDSv1' => true, ]); -$ecsRamRole->getRoleName(); -// Note: `role_name` is optional. It will be retrieved automatically if not set. It is highly recommended to set it up to reduce requests. +$client = new Credential($config); + +$credential = $client->getCredential(); +$credential->getAccessKeyId(); +$credential->getAccessKeySecret(); +$credential->getSecurityToken(); ``` -#### RsaKeyPair - -By specifying the public key Id and the private key file, the credential will be able to automatically request maintenance of the AccessKey before sending the request. Only Japan station is supported. +#### OIDCRoleArn +After you attach a RAM role to a worker node in an Container Service for Kubernetes, applications in the pods on the worker node can use the metadata server to obtain an STS token the same way in which applications on ECS instances do. However, if an untrusted application is deployed on the worker node, such as an application that is submitted by your customer and whose code is unavailable to you, you may not want the application to use the metadata server to obtain an STS token of the RAM role attached to the worker node. To ensure the security of cloud resources and enable untrusted applications to securely obtain required STS tokens, you can use the RAM Roles for Service Accounts (RRSA) feature to grant minimum necessary permissions to an application. In this case, the ACK cluster creates a service account OpenID Connect (OIDC) token file, associates the token file with a pod, and then injects relevant environment variables into the pod. Then, the Credentials tool uses the environment variables to call the AssumeRoleWithOIDC operation of STS and obtains an STS token of the RAM role. For more information about the RRSA feature, see [Use RRSA to authorize different pods to access different cloud services](https://www.alibabacloud.com/help/en/ack/ack-managed-and-ack-dedicated/user-guide/use-rrsa-to-authorize-pods-to-access-different-cloud-services#task-2142941). ```php 'rsa_key_pair', - 'public_key_id' => '', - 'private_key_file' => '', +$config = new Config([ + 'type' => 'oidc_role_arn', + // Specify the ARN of the OIDC IdP by specifying the ALIBABA_CLOUD_OIDC_PROVIDER_ARN environment variable. + 'oidcProviderArn' => '', + // Specify the path of the OIDC token file by specifying the ALIBABA_CLOUD_OIDC_TOKEN_FILE environment variable. + 'oidcTokenFilePath' => '', + // Specify the ARN of the RAM role by specifying the ALIBABA_CLOUD_ROLE_ARN environment variable. + 'roleArn' => '', + // Specify the role session name by specifying the ALIBABA_CLOUD_ROLE_SESSION_NAME environment variable. + 'roleSessionName' => '', + // Optional. Specify limited permissions for the RAM role. Example: {"Statement": [{"Action": ["*"],"Effect": "Allow","Resource": ["*"]}],"Version":"1"}. + 'policy' => '', + // Optional. Specify the validity period of the session. + 'roleSessionExpiration' => 3600, ]); -$rsaKeyPair->getPublicKeyId(); -$rsaKeyPair->getPrivateKey(); +$client = new Credential($config); + +$credential = $client->getCredential(); +$credential->getAccessKeyId(); +$credential->getAccessKeySecret(); +$credential->getSecurityToken(); +``` + +#### Credentials URI + +By specifying the url, the credential will be able to automatically request maintenance of STS Token. + +```php + 'credentials_uri', + // Format: http url. `credentialsURI` can be replaced by setting environment variable: ALIBABA_CLOUD_CREDENTIALS_URI + 'credentialsURI' => '', +]); +$client = new Credential($config); + +$credential = $client->getCredential(); +$credential->getAccessKeyId(); +$credential->getAccessKeySecret(); +$credential->getSecurityToken(); ``` #### Bearer Token @@ -148,24 +229,110 @@ If credential is required by the Cloud Call Centre (CCC), please apply for Beare 'bearer_token', - 'bearer_token' => '', +$config = new Config([ + 'type' => 'bearer', + 'bearerToken' => '', ]); -$bearerToken->getBearerToken(); -$bearerToken->getSignature(); +$client = new Credential($config); + +$credential = $client->getCredential(); +$credential->getBearerToken(); ``` ## Default credential provider chain -The default credential provider chain looks for available credentials, looking in the following order: + +If you want to use different types of credentials in the development and production environments of your application, you generally need to obtain the environment information from the code and write code branches to obtain different credentials for the development and production environments. The default credential provider chain of the Credentials tool allows you to use the same code to obtain credentials for different environments based on configurations independent of the application. If you use $credential = new Credential(); to initialize a Credentials client without specifying an initialization method, the Credentials tool obtains the credential information in the following order: ### 1. Environmental certificate -The program first looks for environment credentials in the environment variable. If the `ALIBABA_CLOUD_ACCESS_KEY_ID` and `ALIBABA_CLOUD_ACCESS_KEY_SECRET` environment variables are defined and not empty, the program will use them to create default credentials. -### 2. Configuration file -> If the user's home directory has the default file `~/.alibabacloud/credentials` (Windows is `C:\Users\USER_NAME\.alibabacloud\credentials`), the program will automatically create credentials with the specified type and name. The default file may not exist, but parsing errors will throw an exception. The voucher name is not case sensitive. If the voucher has the same name, the latter will overwrite the former. This configuration file can be shared between different projects and tools, and it will not be accidentally submitted to version control because it is outside the project. Environment variables can be referenced to the home directory %UserProfile% on Windows. Unix-like systems can use the environment variable $HOME or ~ (tilde). The path to the default file can be modified by defining the `ALIBABA_CLOUD_CREDENTIALS_FILE` environment variable. +Look for environment credentials in environment variable. +- If the `ALIBABA_CLOUD_ACCESS_KEY_ID` and `ALIBABA_CLOUD_ACCESS_KEY_SECRET` environment variables are defined and are not empty, the program will use them to create default credentials. +- If the `ALIBABA_CLOUD_ACCESS_KEY_ID`, `ALIBABA_CLOUD_ACCESS_KEY_SECRET` and `ALIBABA_CLOUD_SECURITY_TOKEN` environment variables are defined and are not empty, the program will use them to create temporary security credentials(STS). Note: This token has an expiration time, it is recommended to use it in a temporary environment. +### 2. The RAM role of an OIDC IdP + +If no credentials are found in the previous step, the Credentials tool obtains the values of the following environment variables: + +`ALIBABA_CLOUD_ROLE_ARN`: the ARN of the RAM role. + +`ALIBABA_CLOUD_OIDC_PROVIDER_ARN`: the ARN of the OIDC IdP. + +`ALIBABA_CLOUD_OIDC_TOKEN_FILE`: the path of the OIDC token file. + +If the preceding three environment variables are specified, the Credentials tool uses the environment variables to call the [AssumeRoleWithOIDC](https://www.alibabacloud.com/help/en/ram/developer-reference/api-sts-2015-04-01-assumerolewithoidc) operation of STS to obtain an STS token as the default credential. + +### 3. Using the config.json Configuration File of Aliyun CLI Tool +If there is no higher-priority credential information, the Credentials tool will first check the following locations to see if the config.json file exists: + +Linux system: `~/.aliyun/config.json` +Windows system: `C:\Users\USER_NAME\.aliyun\config.json` +If the file exists, the program will use the credential information specified by `current` in the configuration file to initialize the credentials client. Of course, you can also use the environment variable `ALIBABA_CLOUD_PROFILE` to specify the credential information, for example by setting the value of `ALIBABA_CLOUD_PROFILE` to `AK`. + +In the config.json configuration file, the value of each module represents different ways to obtain credential information: + +- AK: Use the Access Key of the user as credential information; +- RamRoleArn: Use the ARN of the RAM role to obtain credential information; +- EcsRamRole: Use the RAM role bound to the ECS to obtain credential information; +- OIDC: Obtain credential information through OIDC ARN and OIDC Token; +- ChainableRamRoleArn: Use the role chaining method to obtain new credential information by specifying other credentials in the JSON file. + +The configuration example information is as follows: + +```json +{ + "current": "AK", + "profiles": [ + { + "name": "AK", + "mode": "AK", + "access_key_id": "access_key_id", + "access_key_secret": "access_key_secret" + }, + { + "name": "RamRoleArn", + "mode": "RamRoleArn", + "access_key_id": "access_key_id", + "access_key_secret": "access_key_secret", + "ram_role_arn": "ram_role_arn", + "ram_session_name": "ram_session_name", + "expired_seconds": 3600, + "sts_region": "cn-hangzhou" + }, + { + "name": "EcsRamRole", + "mode": "EcsRamRole", + "ram_role_name": "ram_role_name" + }, + { + "name": "OIDC", + "mode": "OIDC", + "ram_role_arn": "ram_role_arn", + "oidc_token_file": "path/to/oidc/file", + "oidc_provider_arn": "oidc_provider_arn", + "ram_session_name": "ram_session_name", + "expired_seconds": 3600, + "sts_region": "cn-hangzhou" + }, + { + "name": "ChainableRamRoleArn", + "mode": "ChainableRamRoleArn", + "source_profile": "AK", + "ram_role_arn": "ram_role_arn", + "ram_session_name": "ram_session_name", + "expired_seconds": 3600, + "sts_region": "cn-hangzhou" + } + ] +} +``` + +### 4. Configuration file +> +> If the user's home directory has the default file `~/.alibabacloud/credentials` (Windows is `C:\Users\USER_NAME\.alibabacloud\credentials`), the program will automatically create credentials with the specified type and name. You can also specify the configuration file path by configuring the `ALIBABA_CLOUD_CREDENTIALS_FILE` environment variable. If the configuration file exists, the application initializes a Credentials client by using the credential information that is specified by default in the configuration file. You can also configure the `ALIBABA_CLOUD_PROFILE` environment variable to modify the default credential information that is read. + +Configuration example: ```ini [default] type = access_key # Authentication method is access_key @@ -184,68 +351,72 @@ role_arn = role_arn role_session_name = session_name [project3] -type = rsa_key_pair # Authentication method is rsa_key_pair -public_key_id = publicKeyId # Public Key ID -private_key_file = /your/pk.pem # Private Key File +type=oidc_role_arn # Authentication method is oidc_role_arn +oidc_provider_arn=oidc_provider_arn +oidc_token_file_path=oidc_token_file_path +role_arn=role_arn +role_session_name=session_name ``` -### 3. Instance RAM role -If the environment variable `ALIBABA_CLOUD_ECS_METADATA` is defined and not empty, the program will take the value of the environment variable as the role name and request `http://100.100.100.200/latest/meta-data/ram/security-credentials/` to get the temporary Security credentials are used as default credentials. +### 5. Instance RAM role -### Custom credential provider chain -You can replace the default order of the program chain by customizing the program chain, or you can write the closure to the provider. -```php -accessKeyId = $access_key_id; + $this->accessKeyId = $access_key_id; $this->accessKeySecret = $access_key_secret; } @@ -69,4 +72,15 @@ class AccessKeyCredential implements CredentialsInterface { return ''; } + /** + * @inheritDoc + */ + public function getCredential() + { + return new CredentialModel([ + 'accessKeyId' => $this->accessKeyId, + 'accessKeySecret' => $this->accessKeySecret, + 'type' => 'access_key', + ]); + } } diff --git a/vendor/alibabacloud/credentials/src/BearerTokenCredential.php b/vendor/alibabacloud/credentials/src/BearerTokenCredential.php index fb57430..34fab6f 100644 --- a/vendor/alibabacloud/credentials/src/BearerTokenCredential.php +++ b/vendor/alibabacloud/credentials/src/BearerTokenCredential.php @@ -2,6 +2,8 @@ namespace AlibabaCloud\Credentials; +use AlibabaCloud\Credentials\Utils\Filter; +use AlibabaCloud\Credentials\Credential\CredentialModel; use AlibabaCloud\Credentials\Signature\BearerTokenSignature; /** @@ -18,13 +20,13 @@ class BearerTokenCredential implements CredentialsInterface /** * BearerTokenCredential constructor. * - * @param $bearerToken + * @param $bearer_token */ - public function __construct($bearerToken) + public function __construct($bearer_token) { - Filter::bearerToken($bearerToken); + Filter::bearerToken($bearer_token); - $this->bearerToken = $bearerToken; + $this->bearerToken = $bearer_token; } /** @@ -50,4 +52,16 @@ class BearerTokenCredential implements CredentialsInterface { return new BearerTokenSignature(); } + + /** + * @inheritDoc + */ + public function getCredential() + { + return new CredentialModel([ + 'bearerToken' => $this->bearerToken, + 'type' => 'bearer', + ]); + } + } diff --git a/vendor/alibabacloud/credentials/src/Credential.php b/vendor/alibabacloud/credentials/src/Credential.php index 5ff5859..fb89018 100644 --- a/vendor/alibabacloud/credentials/src/Credential.php +++ b/vendor/alibabacloud/credentials/src/Credential.php @@ -3,153 +3,188 @@ namespace AlibabaCloud\Credentials; use AlibabaCloud\Credentials\Credential\Config; +use AlibabaCloud\Credentials\Credential\CredentialModel; +use AlibabaCloud\Credentials\Providers\DefaultCredentialsProvider; +use AlibabaCloud\Credentials\Providers\EcsRamRoleCredentialsProvider; +use AlibabaCloud\Credentials\Providers\OIDCRoleArnCredentialsProvider; +use AlibabaCloud\Credentials\Providers\RamRoleArnCredentialsProvider; +use AlibabaCloud\Credentials\Providers\RsaKeyPairCredentialsProvider; +use AlibabaCloud\Credentials\Providers\StaticAKCredentialsProvider; +use AlibabaCloud\Credentials\Providers\StaticSTSCredentialsProvider; +use AlibabaCloud\Credentials\Providers\URLCredentialsProvider; +use AlibabaCloud\Credentials\Utils\Helper; +use GuzzleHttp\Exception\GuzzleException; use InvalidArgumentException; -use ReflectionClass; -use ReflectionException; -use ReflectionParameter; +use RuntimeException; /** * Class Credential * * @package AlibabaCloud\Credentials * - * @mixin AccessKeyCredential - * @mixin BearerTokenCredential - * @mixin EcsRamRoleCredential - * @mixin RamRoleArnCredential - * @mixin RsaKeyPairCredential */ class Credential { - /** - * @var array - */ - protected $config = []; /** - * @var array + * Version of the Client */ - protected $types = [ - 'access_key' => AccessKeyCredential::class, - 'sts' => StsCredential::class, - 'ecs_ram_role' => EcsRamRoleCredential::class, - 'ram_role_arn' => RamRoleArnCredential::class, - 'rsa_key_pair' => RsaKeyPairCredential::class, - ]; + const VERSION = '1.1.5'; /** - * @var AccessKeyCredential|BearerTokenCredential|EcsRamRoleCredential|RamRoleArnCredential|RsaKeyPairCredential + * @var Config + */ + protected $config; + + /** + * @var CredentialsInterface */ protected $credential; - /** - * @var string - */ - protected $type; - /** * Credential constructor. * * @param array|Config $config - * - * @throws ReflectionException */ public function __construct($config = []) { - if ($config instanceof Config) { - $config = $this->parse($config); - } - if ($config !== []) { - $this->config = array_change_key_case($config); - $this->parseConfig(); + if (\is_array($config)) { + if (empty($config)) { + $this->config = null; + } else { + $this->config = new Config($this->parseConfig($config)); + } } else { - $this->credential = Credentials::get()->getCredential(); + $this->config = $config; } + $this->credential = $this->getCredentials($this->config); } /** - * @param Config $config + * @param array $config * * @return array */ - private function parse($config) + private function parseConfig($config) { - $config = get_object_vars($config); - $res = []; - foreach ($config as $key => $value) { - $res[$this->toUnderScore($key)] = $value; + $res = []; + foreach (\array_change_key_case($config) as $key => $value) { + $res[Helper::snakeToCamelCase($key)] = $value; } return $res; } - private function toUnderScore($str) - { - $dstr = preg_replace_callback('/([A-Z]+)/', function ($matchs) { - return '_' . strtolower($matchs[0]); - }, $str); - return trim(preg_replace('/_{2,}/', '_', $dstr), '_'); - } + /** - * @throws ReflectionException - */ - private function parseConfig() - { - if (!isset($this->config['type'])) { - throw new InvalidArgumentException('Missing required type option'); - } - - $this->type = $this->config['type']; - if (!isset($this->types[$this->type])) { - throw new InvalidArgumentException( - 'Invalid type option, support: ' . - implode(', ', array_keys($this->types)) - ); - } - - $class = new ReflectionClass($this->types[$this->type]); - $parameters = []; - /** - * @var $parameter ReflectionParameter - */ - foreach ($class->getConstructor()->getParameters() as $parameter) { - $parameters[] = $this->getValue($parameter); - } - - $this->credential = $class->newInstance(...$parameters); - } - - /** - * @param ReflectionParameter $parameter + * Credentials getter. + * + * @param Config $config + * @return CredentialsInterface * - * @return string|array - * @throws ReflectionException */ - protected function getValue(ReflectionParameter $parameter) + private function getCredentials($config) { - if ($parameter->name === 'config' || $parameter->name === 'credential') { - return $this->config; + if (is_null($config)) { + return new CredentialsProviderWrap('default', new DefaultCredentialsProvider()); } - - foreach ($this->config as $key => $value) { - if (strtolower($parameter->name) === $key) { - return $value; - } + switch ($config->type) { + case 'access_key': + $provider = new StaticAKCredentialsProvider([ + 'accessKeyId' => $config->accessKeyId, + 'accessKeySecret' => $config->accessKeySecret, + ]); + return new CredentialsProviderWrap('access_key', $provider); + case 'sts': + $provider = new StaticSTSCredentialsProvider([ + 'accessKeyId' => $config->accessKeyId, + 'accessKeySecret' => $config->accessKeySecret, + 'securityToken' => $config->securityToken, + ]); + return new CredentialsProviderWrap('sts', $provider); + case 'bearer': + return new BearerTokenCredential($config->bearerToken); + case 'ram_role_arn': + if (!is_null($config->securityToken) && $config->securityToken !== '') { + $innerProvider = new StaticSTSCredentialsProvider([ + 'accessKeyId' => $config->accessKeyId, + 'accessKeySecret' => $config->accessKeySecret, + 'securityToken' => $config->securityToken, + ]); + } else { + $innerProvider = new StaticAKCredentialsProvider([ + 'accessKeyId' => $config->accessKeyId, + 'accessKeySecret' => $config->accessKeySecret, + ]); + } + $provider = new RamRoleArnCredentialsProvider([ + 'credentialsProvider' => $innerProvider, + 'roleArn' => $config->roleArn, + 'roleSessionName' => $config->roleSessionName, + 'policy' => $config->policy, + 'durationSeconds' => $config->roleSessionExpiration, + 'externalId' => $config->externalId, + 'stsEndpoint' => $config->STSEndpoint, + ], [ + 'connectTimeout' => $config->connectTimeout, + 'readTimeout' => $config->readTimeout, + ]); + return new CredentialsProviderWrap('ram_role_arn', $provider); + case 'rsa_key_pair': + $provider = new RsaKeyPairCredentialsProvider([ + 'publicKeyId' => $config->publicKeyId, + 'privateKeyFile' => $config->privateKeyFile, + 'durationSeconds' => $config->roleSessionExpiration, + 'stsEndpoint' => $config->STSEndpoint, + ], [ + 'connectTimeout' => $config->connectTimeout, + 'readTimeout' => $config->readTimeout, + ]); + return new CredentialsProviderWrap('rsa_key_pair', $provider); + case 'ecs_ram_role': + $provider = new EcsRamRoleCredentialsProvider([ + 'roleName' => $config->roleName, + 'disableIMDSv1' => $config->disableIMDSv1, + ], [ + 'connectTimeout' => $config->connectTimeout, + 'readTimeout' => $config->readTimeout, + ]); + return new CredentialsProviderWrap('ecs_ram_role', $provider); + case 'oidc_role_arn': + $provider = new OIDCRoleArnCredentialsProvider([ + 'roleArn' => $config->roleArn, + 'oidcProviderArn' => $config->oidcProviderArn, + 'oidcTokenFilePath' => $config->oidcTokenFilePath, + 'roleSessionName' => $config->roleSessionName, + 'policy' => $config->policy, + 'durationSeconds' => $config->roleSessionExpiration, + 'stsEndpoint' => $config->STSEndpoint, + ], [ + 'connectTimeout' => $config->connectTimeout, + 'readTimeout' => $config->readTimeout, + ]); + return new CredentialsProviderWrap('oidc_role_arn', $provider); + case "credentials_uri": + $provider = new URLCredentialsProvider([ + 'credentialsURI' => $config->credentialsURI, + ], [ + 'connectTimeout' => $config->connectTimeout, + 'readTimeout' => $config->readTimeout, + ]); + return new CredentialsProviderWrap('credentials_uri', $provider); + default: + throw new InvalidArgumentException('Unsupported credential type option: ' . $config->type . ', support: access_key, sts, bearer, ecs_ram_role, ram_role_arn, rsa_key_pair, oidc_role_arn, credentials_uri'); } - - if ($parameter->isDefaultValueAvailable()) { - return $parameter->getDefaultValue(); - } - - throw new InvalidArgumentException("Missing required {$parameter->name} option in config for {$this->type}"); } /** - * @return AccessKeyCredential|BearerTokenCredential|EcsRamRoleCredential|RamRoleArnCredential|RsaKeyPairCredential + * @return CredentialModel + * @throws RuntimeException + * @throws GuzzleException */ public function getCredential() { - return $this->credential; + return $this->credential->getCredential(); } /** @@ -157,17 +192,68 @@ class Credential */ public function getConfig() { - return $this->config; + return $this->config->toMap(); } /** + * @deprecated use getCredential() instead + * * @return string + * @throws RuntimeException + * @throws GuzzleException */ public function getType() { - return $this->type; + return $this->credential->getCredential()->getType(); } + /** + * @deprecated use getCredential() instead + * + * @return string + * @throws RuntimeException + * @throws GuzzleException + */ + public function getAccessKeyId() + { + return $this->credential->getCredential()->getAccessKeyId(); + } + + /** + * @deprecated use getCredential() instead + * + * @return string + * @throws RuntimeException + * @throws GuzzleException + */ + public function getAccessKeySecret() + { + return $this->credential->getCredential()->getAccessKeySecret(); + } + + /** + * @deprecated use getCredential() instead + * + * @return string + * @throws RuntimeException + * @throws GuzzleException + */ + public function getSecurityToken() + { + return $this->credential->getCredential()->getSecurityToken(); + } + + /** + * @deprecated use getCredential() instead + * + * @return string + * @throws RuntimeException + * @throws GuzzleException + */ + public function getBearerToken() + { + return $this->credential->getCredential()->getBearerToken(); + } /** * @param string $name diff --git a/vendor/alibabacloud/credentials/src/Credential/Config.php b/vendor/alibabacloud/credentials/src/Credential/Config.php index 3fa1608..1fb57e3 100644 --- a/vendor/alibabacloud/credentials/src/Credential/Config.php +++ b/vendor/alibabacloud/credentials/src/Credential/Config.php @@ -2,49 +2,269 @@ namespace AlibabaCloud\Credentials\Credential; -class Config +use AlibabaCloud\Tea\Model; + +class Config extends Model { + public function validate() + { + } + public function toMap() + { + $res = []; + if (null !== $this->accessKeyId) { + $res['accessKeyId'] = $this->accessKeyId; + } + if (null !== $this->accessKeySecret) { + $res['accessKeySecret'] = $this->accessKeySecret; + } + if (null !== $this->securityToken) { + $res['securityToken'] = $this->securityToken; + } + if (null !== $this->bearerToken) { + $res['bearerToken'] = $this->bearerToken; + } + if (null !== $this->durationSeconds) { + $res['durationSeconds'] = $this->durationSeconds; + } + if (null !== $this->roleArn) { + $res['roleArn'] = $this->roleArn; + } + if (null !== $this->policy) { + $res['policy'] = $this->policy; + } + if (null !== $this->roleSessionExpiration) { + $res['roleSessionExpiration'] = $this->roleSessionExpiration; + } + if (null !== $this->roleSessionName) { + $res['roleSessionName'] = $this->roleSessionName; + } + if (null !== $this->publicKeyId) { + $res['publicKeyId'] = $this->publicKeyId; + } + if (null !== $this->privateKeyFile) { + $res['privateKeyFile'] = $this->privateKeyFile; + } + if (null !== $this->roleName) { + $res['roleName'] = $this->roleName; + } + if (null !== $this->credentialsURI) { + $res['credentialsURI'] = $this->credentialsURI; + } + if (null !== $this->type) { + $res['type'] = $this->type; + } + if (null !== $this->STSEndpoint) { + $res['STSEndpoint'] = $this->STSEndpoint; + } + if (null !== $this->externalId) { + $res['externalId'] = $this->externalId; + } + return $res; + } /** + * @param array $map + * @return Config + */ + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['accessKeyId'])) { + $model->accessKeyId = $map['accessKeyId']; + } + if (isset($map['accessKeySecret'])) { + $model->accessKeySecret = $map['accessKeySecret']; + } + if (isset($map['securityToken'])) { + $model->securityToken = $map['securityToken']; + } + if (isset($map['bearerToken'])) { + $model->bearerToken = $map['bearerToken']; + } + if (isset($map['durationSeconds'])) { + $model->durationSeconds = $map['durationSeconds']; + } + if (isset($map['roleArn'])) { + $model->roleArn = $map['roleArn']; + } + if (isset($map['policy'])) { + $model->policy = $map['policy']; + } + if (isset($map['roleSessionExpiration'])) { + $model->roleSessionExpiration = $map['roleSessionExpiration']; + } + if (isset($map['roleSessionName'])) { + $model->roleSessionName = $map['roleSessionName']; + } + if (isset($map['publicKeyId'])) { + $model->publicKeyId = $map['publicKeyId']; + } + if (isset($map['privateKeyFile'])) { + $model->privateKeyFile = $map['privateKeyFile']; + } + if (isset($map['roleName'])) { + $model->roleName = $map['roleName']; + } + if (isset($map['credentialsURI'])) { + $model->credentialsURI = $map['credentialsURI']; + } + if (isset($map['type'])) { + $model->type = $map['type']; + } + if (isset($map['STSEndpoint'])) { + $model->STSEndpoint = $map['STSEndpoint']; + } + if (isset($map['externalId'])) { + $model->externalId = $map['externalId']; + } + return $model; + } + /** + * @description credential type + * @example access_key * @var string */ public $type = 'default'; - public $accessKeyId = ""; + /** + * @description accesskey id + * @var string + */ + public $accessKeyId; - public $accessKeySecret = ""; + /** + * @description accesskey secret + * @var string + */ + public $accessKeySecret; - public $securityToken = ""; + /** + * @description security token + * @var string + */ + public $securityToken; - public $bearerToken = ""; + /** + * @description bearer token + * @var string + */ + public $bearerToken; - public $roleName = ""; + /** + * @description role name + * @var string + */ + public $roleName; - public $roleArn = ""; + /** + * @description role arn + * @var string + */ + public $roleArn; - public $roleSessionName = ""; + /** + * @description oidc provider arn + * @var string + */ + public $oidcProviderArn; - public $host = ""; + /** + * @description oidc token file path + * @var string + */ + public $oidcTokenFilePath; - public $publicKeyId = ""; + /** + * @description role session expiration + * @example 3600 + * @var int + */ + public $roleSessionExpiration; - public $privateKeyFile = ""; + /** + * @description role session name + * @var string + */ + public $roleSessionName; - public $readTimeout = 0; + /** + * @description role arn policy + * @var string + */ + public $policy; - public $connectTimeout = 0; + /** + * @description external id for ram role arn + * @var string + */ + public $externalId; + /** + * @description sts endpoint + * @var string + */ + public $STSEndpoint; + + public $publicKeyId; + + public $privateKeyFile; + + /** + * @description read timeout + * @var int + */ + public $readTimeout; + + /** + * @description connection timeout + * @var int + */ + public $connectTimeout; + + /** + * @description disable IMDS v1 + * @var bool + */ + public $disableIMDSv1; + + /** + * @description credentials URI + * @var string + */ + public $credentialsURI; + + /** + * @deprecated + */ + public $metadataTokenDuration; + + /** + * @deprecated + */ + public $durationSeconds; + + /** + * @deprecated + */ + public $host; + + /** + * @deprecated + */ + public $expiration; + + /** + * @deprecated + */ public $certFile = ""; + /** + * @deprecated + */ public $certPassword = ""; - public $proxy = ""; - - public $expiration = 0; - - public function __construct($config) - { - foreach ($config as $k => $v) { - $this->{$k} = $v; - } - } + /** + * @internal + */ + public $proxy; } diff --git a/vendor/alibabacloud/credentials/src/Credential/CredentialModel.php b/vendor/alibabacloud/credentials/src/Credential/CredentialModel.php new file mode 100644 index 0000000..8d516d9 --- /dev/null +++ b/vendor/alibabacloud/credentials/src/Credential/CredentialModel.php @@ -0,0 +1,143 @@ +accessKeyId) { + $res['accessKeyId'] = $this->accessKeyId; + } + if (null !== $this->accessKeySecret) { + $res['accessKeySecret'] = $this->accessKeySecret; + } + if (null !== $this->securityToken) { + $res['securityToken'] = $this->securityToken; + } + if (null !== $this->bearerToken) { + $res['bearerToken'] = $this->bearerToken; + } + if (null !== $this->type) { + $res['type'] = $this->type; + } + if (null !== $this->providerName) { + $res['providerName'] = $this->providerName; + } + return $res; + } + /** + * @param array $map + * @return CredentialModel + */ + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['accessKeyId'])) { + $model->accessKeyId = $map['accessKeyId']; + } + if (isset($map['accessKeySecret'])) { + $model->accessKeySecret = $map['accessKeySecret']; + } + if (isset($map['securityToken'])) { + $model->securityToken = $map['securityToken']; + } + if (isset($map['bearerToken'])) { + $model->bearerToken = $map['bearerToken']; + } + if (isset($map['type'])) { + $model->type = $map['type']; + } + if(isset($map['providerName'])){ + $model->providerName = $map['providerName']; + } + return $model; + } + /** + * @description accesskey id + * @var string + */ + public $accessKeyId; + + /** + * @description accesskey secret + * @var string + */ + public $accessKeySecret; + + /** + * @description security token + * @var string + */ + public $securityToken; + + /** + * @description bearer token + * @var string + */ + public $bearerToken; + + /** + * @description type + * @example access_key + * @var string + */ + public $type; + + /** + * @description provider name + * @example cli_profile/static_ak + * @var string + */ + public $providerName; + + /** + * @return string + */ + public function getAccessKeyId() + { + return $this->accessKeyId; + } + + /** + * @return string + */ + public function getAccessKeySecret() + { + return $this->accessKeySecret; + } + + /** + * @return string + */ + public function getSecurityToken() + { + return $this->securityToken; + } + + /** + * @return string + */ + public function getBearerToken() + { + return $this->bearerToken; + } + + public function getType() + { + return $this->type; + } + + public function getProviderName() + { + return $this->providerName; + } + +} diff --git a/vendor/alibabacloud/credentials/src/Credential/RefreshResult.php b/vendor/alibabacloud/credentials/src/Credential/RefreshResult.php new file mode 100644 index 0000000..af1c202 --- /dev/null +++ b/vendor/alibabacloud/credentials/src/Credential/RefreshResult.php @@ -0,0 +1,97 @@ +credentials = $credentials; + $this->staleTime = $staleTime; + $this->prefetchTime = $prefetchTime; + } + public function validate() {} + public function toMap() + { + $res = []; + if (null !== $this->staleTime) { + $res['staleTime'] = $this->staleTime; + } + if (null !== $this->prefetchTime) { + $res['prefetchTime'] = $this->prefetchTime; + } + if (null !== $this->credentials) { + $res['credentials'] = $this->credentials; + } + return $res; + } + /** + * @param array $map + * @return RefreshResult + */ + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['staleTime'])) { + $model->staleTime = $map['staleTime']; + } + if (isset($map['prefetchTime'])) { + $model->staleTime = $map['prefetchTime']; + } + if (isset($map['credentials'])) { + $model->staleTime = $map['credentials']; + } + return $model; + } + /** + * @description staleTime + * @var int + */ + public $staleTime; + + /** + * @description prefetchTime + * @var int + */ + public $prefetchTime; + + /** + * @description credentials + * @var Credentials + */ + public $credentials; + + + /** + * @return Credentials + */ + public function credentials() + { + return $this->credentials; + } + + /** + * @var int + */ + public function staleTime() + { + return $this->staleTime; + } + + /** + * @var int + */ + public function prefetchTime() + { + return $this->prefetchTime; + } +} diff --git a/vendor/alibabacloud/credentials/src/Credentials.php b/vendor/alibabacloud/credentials/src/Credentials.php index 11e68ab..f064b86 100644 --- a/vendor/alibabacloud/credentials/src/Credentials.php +++ b/vendor/alibabacloud/credentials/src/Credentials.php @@ -3,6 +3,8 @@ namespace AlibabaCloud\Credentials; use AlibabaCloud\Credentials\Providers\ChainProvider; +use AlibabaCloud\Credentials\Utils\Filter; +use AlibabaCloud\Credentials\Utils\MockTrait; use ReflectionException; use RuntimeException; @@ -99,4 +101,4 @@ class Credentials self::$credentials[\strtolower($name)] = \array_change_key_case($credential); } -} +} \ No newline at end of file diff --git a/vendor/alibabacloud/credentials/src/CredentialsInterface.php b/vendor/alibabacloud/credentials/src/CredentialsInterface.php index e8ff0fb..0d109e2 100644 --- a/vendor/alibabacloud/credentials/src/CredentialsInterface.php +++ b/vendor/alibabacloud/credentials/src/CredentialsInterface.php @@ -2,9 +2,11 @@ namespace AlibabaCloud\Credentials; +use AlibabaCloud\Credentials\Credential\CredentialModel; use AlibabaCloud\Credentials\Signature\SignatureInterface; /** + * @internal This class is intended for internal use within the package. * Interface CredentialsInterface * * @codeCoverageIgnore @@ -12,12 +14,19 @@ use AlibabaCloud\Credentials\Signature\SignatureInterface; interface CredentialsInterface { /** + * @deprecated * @return string */ public function __toString(); /** + * @deprecated * @return SignatureInterface */ public function getSignature(); + + /** + * @return CredentialModel + */ + public function getCredential(); } diff --git a/vendor/alibabacloud/credentials/src/CredentialsProviderWrap.php b/vendor/alibabacloud/credentials/src/CredentialsProviderWrap.php new file mode 100644 index 0000000..4e8611e --- /dev/null +++ b/vendor/alibabacloud/credentials/src/CredentialsProviderWrap.php @@ -0,0 +1,76 @@ +typeName = $typeName; + $this->credentialsProvider = $credentialsProvider; + } + + /** + * @inheritDoc + */ + public function getCredential() + { + $credentials = $this->credentialsProvider->getCredentials(); + return new CredentialModel([ + 'accessKeyId' => $credentials->getAccessKeyId(), + 'accessKeySecret' => $credentials->getAccessKeySecret(), + 'securityToken' => $credentials->getSecurityToken(), + 'type' => $this->typeName, + 'providerName' => $credentials->getProviderName(), + ]); + } + + /** + * @param string $name + * @param array $arguments + * + * @return mixed + */ + public function __call($name, $arguments) + { + return $this->credentialsProvider->$name($arguments); + } + + public function __toString() + { + return "credentialsProviderWrap#$this->typeName"; + } + + /** + * @return ShaHmac1Signature + */ + public function getSignature() + { + return null; + } +} \ No newline at end of file diff --git a/vendor/alibabacloud/credentials/src/EcsRamRoleCredential.php b/vendor/alibabacloud/credentials/src/EcsRamRoleCredential.php index 08d8fda..ba66c0d 100644 --- a/vendor/alibabacloud/credentials/src/EcsRamRoleCredential.php +++ b/vendor/alibabacloud/credentials/src/EcsRamRoleCredential.php @@ -2,15 +2,18 @@ namespace AlibabaCloud\Credentials; -use AlibabaCloud\Credentials\Providers\EcsRamRoleProvider; -use AlibabaCloud\Credentials\Request\Request; +use AlibabaCloud\Credentials\Providers\EcsRamRoleCredentialsProvider; +use AlibabaCloud\Credentials\Credential\CredentialModel; use AlibabaCloud\Credentials\Signature\ShaHmac1Signature; +use AlibabaCloud\Credentials\Request\Request; +use AlibabaCloud\Credentials\Utils\Filter; use Exception; use GuzzleHttp\Exception\GuzzleException; use InvalidArgumentException; use RuntimeException; /** + * @deprecated * Use the RAM role of an ECS instance to complete the authentication. */ class EcsRamRoleCredential implements CredentialsInterface @@ -21,16 +24,33 @@ class EcsRamRoleCredential implements CredentialsInterface */ private $roleName; + /** + * @var boolean + */ + private $disableIMDSv1; + + /** + * @var int + */ + private $metadataTokenDuration; + + /** * EcsRamRoleCredential constructor. * * @param $role_name */ - public function __construct($role_name = null) + public function __construct($role_name = null, $disable_imdsv1 = false, $metadata_token_duration = 21600) { Filter::roleName($role_name); $this->roleName = $role_name; + + Filter::disableIMDSv1($disable_imdsv1); + + $this->disableIMDSv1 = $disable_imdsv1; + + $this->metadataTokenDuration = $metadata_token_duration; } /** @@ -56,8 +76,8 @@ class EcsRamRoleCredential implements CredentialsInterface public function getRoleNameFromMeta() { $options = [ - 'http_errors' => false, - 'timeout' => 1, + 'http_errors' => false, + 'timeout' => 1, 'connect_timeout' => 1, ]; @@ -75,7 +95,7 @@ class EcsRamRoleCredential implements CredentialsInterface throw new RuntimeException('Error retrieving credentials from result: ' . $result->getBody()); } - $role_name = (string)$result; + $role_name = (string) $result; if (!$role_name) { throw new RuntimeException('Error retrieving credentials from result is empty'); } @@ -110,13 +130,18 @@ class EcsRamRoleCredential implements CredentialsInterface } /** - * @return StsCredential + * @return AlibabaCloud\Credentials\Providers\Credentials * @throws Exception * @throws GuzzleException */ protected function getSessionCredential() { - return (new EcsRamRoleProvider($this))->get(); + $params = [ + "roleName" => $this->roleName, + 'disableIMDSv1' => $this->disableIMDSv1, + 'metadataTokenDuration' => $this->metadataTokenDuration, + ]; + return (new EcsRamRoleCredentialsProvider($params))->getCredentials(); } /** @@ -148,4 +173,27 @@ class EcsRamRoleCredential implements CredentialsInterface { return $this->getSessionCredential()->getExpiration(); } + + /** + * @return bool + */ + public function isDisableIMDSv1() + { + return $this->disableIMDSv1; + } + + /** + * @inheritDoc + */ + public function getCredential() + { + $credentials = $this->getSessionCredential(); + return new CredentialModel([ + 'accessKeyId' => $credentials->getAccessKeyId(), + 'accessKeySecret' => $credentials->getAccessKeySecret(), + 'securityToken' => $credentials->getSecurityToken(), + 'type' => 'ecs_ram_role', + ]); + } + } diff --git a/vendor/alibabacloud/credentials/src/Filter.php b/vendor/alibabacloud/credentials/src/Filter.php deleted file mode 100644 index d17ec4c..0000000 --- a/vendor/alibabacloud/credentials/src/Filter.php +++ /dev/null @@ -1,134 +0,0 @@ -filterProfileName($params); + } + + private function filterProfileName(array $params) + { + if (Helper::envNotEmpty('ALIBABA_CLOUD_PROFILE')) { + $this->profileName = Helper::env('ALIBABA_CLOUD_PROFILE'); + } + + if (isset($params['profileName'])) { + $this->profileName = $params['profileName']; + } + } + + /** + * @return bool + */ + private function shouldReloadCredentialsProvider() + { + if (is_null($this->credentialsProvider)) { + return true; + } + + return false; + } + + /** + * @return CredentialsProvider + */ + protected function reloadCredentialsProvider($profileFile, $profileName) + { + if (!Helper::inOpenBasedir($profileFile)) { + throw new RuntimeException('Unable to open credentials file: ' . $profileFile); + } + + if (!\is_readable($profileFile) || !\is_file($profileFile)) { + throw new RuntimeException('Credentials file is not readable: ' . $profileFile); + } + + $jsonContent = \file_get_contents($profileFile); + $fileArray = json_decode($jsonContent, true); + + if (\is_array($fileArray) && !empty($fileArray)) { + if (is_null($profileName) || $profileName === '') { + $profileName = $fileArray['current']; + } + if (isset($fileArray['profiles'])) { + foreach ($fileArray['profiles'] as $profile) { + if (Helper::unsetReturnNull($profile, 'name') === $profileName) { + switch (Helper::unsetReturnNull($profile, 'mode')) { + case 'AK': + return new StaticAKCredentialsProvider([ + 'accessKeyId' => Helper::unsetReturnNull($profile, 'access_key_id'), + 'accessKeySecret' => Helper::unsetReturnNull($profile, 'access_key_secret'), + ]); + case 'StsToken': + return new StaticSTSCredentialsProvider([ + 'accessKeyId' => Helper::unsetReturnNull($profile, 'access_key_id'), + 'accessKeySecret' => Helper::unsetReturnNull($profile, 'access_key_secret'), + 'securityToken' => Helper::unsetReturnNull($profile, 'sts_token'), + ]); + case 'RamRoleArn': + $innerProvider = new StaticAKCredentialsProvider([ + 'accessKeyId' => Helper::unsetReturnNull($profile, 'access_key_id'), + 'accessKeySecret' => Helper::unsetReturnNull($profile, 'access_key_secret'), + ]); + return new RamRoleArnCredentialsProvider([ + 'credentialsProvider' => $innerProvider, + 'roleArn' => Helper::unsetReturnNull($profile, 'ram_role_arn'), + 'roleSessionName' => Helper::unsetReturnNull($profile, 'ram_session_name'), + 'durationSeconds' => Helper::unsetReturnNull($profile, 'expired_seconds'), + 'policy' => Helper::unsetReturnNull($profile, 'policy'), + 'externalId' => Helper::unsetReturnNull($profile, 'external_id'), + 'stsRegionId' => Helper::unsetReturnNull($profile, 'sts_region'), + 'enableVpc' => Helper::unsetReturnNull($profile, 'enable_vpc'), + ]); + case 'EcsRamRole': + return new EcsRamRoleCredentialsProvider([ + 'roleName' => Helper::unsetReturnNull($profile, 'ram_role_name'), + ]); + case 'OIDC': + return new OIDCRoleArnCredentialsProvider([ + 'roleArn' => Helper::unsetReturnNull($profile, 'ram_role_arn'), + 'oidcProviderArn' => Helper::unsetReturnNull($profile, 'oidc_provider_arn'), + 'oidcTokenFilePath' => Helper::unsetReturnNull($profile, 'oidc_token_file'), + 'roleSessionName' => Helper::unsetReturnNull($profile, 'ram_session_name'), + 'durationSeconds' => Helper::unsetReturnNull($profile, 'expired_seconds'), + 'policy' => Helper::unsetReturnNull($profile, 'policy'), + 'stsRegionId' => Helper::unsetReturnNull($profile, 'sts_region'), + 'enableVpc' => Helper::unsetReturnNull($profile, 'enable_vpc'), + ]); + case 'ChainableRamRoleArn': + $previousProvider = $this->reloadCredentialsProvider($profileFile, Helper::unsetReturnNull($profile, 'source_profile')); + return new RamRoleArnCredentialsProvider([ + 'credentialsProvider' => $previousProvider, + 'roleArn' => Helper::unsetReturnNull($profile, 'ram_role_arn'), + 'roleSessionName' => Helper::unsetReturnNull($profile, 'ram_session_name'), + 'durationSeconds' => Helper::unsetReturnNull($profile, 'expired_seconds'), + 'policy' => Helper::unsetReturnNull($profile, 'policy'), + 'externalId' => Helper::unsetReturnNull($profile, 'external_id'), + 'stsRegionId' => Helper::unsetReturnNull($profile, 'sts_region'), + 'enableVpc' => Helper::unsetReturnNull($profile, 'enable_vpc'), + ]); + default: + throw new RuntimeException('Unsupported credential mode from CLI credentials file: ' . Helper::unsetReturnNull($profile, 'mode')); + } + } + } + } + } + throw new RuntimeException('Failed to get credential from CLI credentials file: ' . $profileFile); + } + /** + * Get credential. + * + * @return Credentials + * @throws RuntimeException + */ + public function getCredentials() + { + if (Helper::envNotEmpty('ALIBABA_CLOUD_CLI_PROFILE_DISABLED') && Helper::env('ALIBABA_CLOUD_CLI_PROFILE_DISABLED') === true) { + throw new RuntimeException('CLI credentials file is disabled'); + } + $cliProfileFile = self::getDefaultFile(); + if ($this->shouldReloadCredentialsProvider()) { + $this->credentialsProvider = $this->reloadCredentialsProvider($cliProfileFile, $this->profileName); + } + + $credentials = $this->credentialsProvider->getCredentials(); + return new Credentials([ + 'accessKeyId' => $credentials->getAccessKeyId(), + 'accessKeySecret' => $credentials->getAccessKeySecret(), + 'securityToken' => $credentials->getSecurityToken(), + 'providerName' => $this->getProviderName() . '/' . $this->credentialsProvider->getProviderName(), + ]); + } + + /** + * Get the default credential file. + * + * @return string + */ + private function getDefaultFile() + { + return Helper::getHomeDirectory() . + DIRECTORY_SEPARATOR . + '.aliyun' . + DIRECTORY_SEPARATOR . + 'config.json'; + } + + /** + * @return string + */ + public function getProviderName() + { + return 'cli_profile'; + } +} diff --git a/vendor/alibabacloud/credentials/src/Providers/ChainProvider.php b/vendor/alibabacloud/credentials/src/Providers/ChainProvider.php index 83cb650..d6c1540 100644 --- a/vendor/alibabacloud/credentials/src/Providers/ChainProvider.php +++ b/vendor/alibabacloud/credentials/src/Providers/ChainProvider.php @@ -3,12 +3,13 @@ namespace AlibabaCloud\Credentials\Providers; use AlibabaCloud\Credentials\Credentials; -use AlibabaCloud\Credentials\Helper; +use AlibabaCloud\Credentials\Utils\Helper; use Closure; use InvalidArgumentException; use RuntimeException; /** + * @deprecated * Class ChainProvider * * @package AlibabaCloud\Credentials\Providers @@ -184,4 +185,4 @@ class ChainProvider } }; } -} +} \ No newline at end of file diff --git a/vendor/alibabacloud/credentials/src/Providers/Credentials.php b/vendor/alibabacloud/credentials/src/Providers/Credentials.php new file mode 100644 index 0000000..bfd4fe3 --- /dev/null +++ b/vendor/alibabacloud/credentials/src/Providers/Credentials.php @@ -0,0 +1,87 @@ + $v) { + $this->{$k} = $v; + } + } + } + + /** + * @return string + */ + public function getAccessKeyId() + { + return $this->accessKeyId; + } + + /** + * @return string + */ + public function getAccessKeySecret() + { + return $this->accessKeySecret; + } + + /** + * @return string + */ + public function getSecurityToken() + { + return $this->securityToken; + } + + /** + * @return int + */ + public function getExpiration() + { + return $this->expiration; + } + + /** + * @return string + */ + public function getProviderName() + { + return $this->providerName; + } +} diff --git a/vendor/alibabacloud/credentials/src/Providers/CredentialsProvider.php b/vendor/alibabacloud/credentials/src/Providers/CredentialsProvider.php new file mode 100644 index 0000000..ddbd1a1 --- /dev/null +++ b/vendor/alibabacloud/credentials/src/Providers/CredentialsProvider.php @@ -0,0 +1,24 @@ +filterReuseLastProviderEnabled($params); + $this->createDefaultChain(); + Filter::reuseLastProviderEnabled($this->reuseLastProviderEnabled); + } + + private function filterReuseLastProviderEnabled(array $params) + { + $this->reuseLastProviderEnabled = true; + if (isset($params['reuseLastProviderEnabled'])) { + $this->reuseLastProviderEnabled = $params['reuseLastProviderEnabled']; + } + } + + private function createDefaultChain() + { + self::$defaultProviders = [ + new EnvironmentVariableCredentialsProvider(), + ]; + if ( + Helper::envNotEmpty('ALIBABA_CLOUD_ROLE_ARN') + && Helper::envNotEmpty('ALIBABA_CLOUD_OIDC_PROVIDER_ARN') + && Helper::envNotEmpty('ALIBABA_CLOUD_OIDC_TOKEN_FILE') + ) { + array_push( + self::$defaultProviders, + new OIDCRoleArnCredentialsProvider() + ); + } + array_push( + self::$defaultProviders, + new CLIProfileCredentialsProvider() + ); + array_push( + self::$defaultProviders, + new ProfileCredentialsProvider() + ); + array_push( + self::$defaultProviders, + new EcsRamRoleCredentialsProvider() + ); + if (Helper::envNotEmpty('ALIBABA_CLOUD_CREDENTIALS_URI')) { + array_push( + self::$defaultProviders, + new URLCredentialsProvider() + ); + } + } + + /** + * @param CredentialsProvider ...$providers + */ + public static function set(...$providers) + { + if (empty($providers)) { + throw new InvalidArgumentException('No providers in chain'); + } + + foreach ($providers as $provider) { + if (!$provider instanceof CredentialsProvider) { + throw new InvalidArgumentException('Providers must all be CredentialsProvider'); + } + } + + self::$customChain = $providers; + } + + /** + * @return bool + */ + public static function hasCustomChain() + { + return (bool) self::$customChain; + } + + public static function flush() + { + self::$customChain = []; + } + + /** + * Get credential. + * + * @return Credentials + * @throws RuntimeException + */ + public function getCredentials() + { + if ($this->reuseLastProviderEnabled && !is_null($this->lastUsedCredentialsProvider)) { + $credentials = $this->lastUsedCredentialsProvider->getCredentials(); + return new Credentials([ + 'accessKeyId' => $credentials->getAccessKeyId(), + 'accessKeySecret' => $credentials->getAccessKeySecret(), + 'securityToken' => $credentials->getSecurityToken(), + 'providerName' => $this->getProviderName() . '/' . $this->lastUsedCredentialsProvider->getProviderName(), + ]); + } + + $providerChain = array_merge( + self::$customChain, + self::$defaultProviders + ); + + $exceptionMessages = []; + + foreach ($providerChain as $provider) { + try { + $credentials = $provider->getCredentials(); + $this->lastUsedCredentialsProvider = $provider; + return new Credentials([ + 'accessKeyId' => $credentials->getAccessKeyId(), + 'accessKeySecret' => $credentials->getAccessKeySecret(), + 'securityToken' => $credentials->getSecurityToken(), + 'providerName' => $this->getProviderName() . '/' . $provider->getProviderName(), + ]); + } catch (Exception $exception) { + array_push($exceptionMessages, basename(str_replace('\\', '/', get_class($provider))) . ': ' . $exception->getMessage()); + } + } + throw new RuntimeException('Unable to load credentials from any of the providers in the chain: ' . implode(', ', $exceptionMessages)); + + } + + /** + * @inheritDoc + */ + public function getProviderName() + { + return "default"; + } +} \ No newline at end of file diff --git a/vendor/alibabacloud/credentials/src/Providers/EcsRamRoleCredentialsProvider.php b/vendor/alibabacloud/credentials/src/Providers/EcsRamRoleCredentialsProvider.php new file mode 100644 index 0000000..8dffb50 --- /dev/null +++ b/vendor/alibabacloud/credentials/src/Providers/EcsRamRoleCredentialsProvider.php @@ -0,0 +1,276 @@ +filterOptions($options); + $this->filterRoleName($params); + $this->filterDisableECSIMDSv1($params); + Filter::roleName($this->roleName); + Filter::disableIMDSv1($this->disableIMDSv1); + } + + private function filterOptions(array $options) + { + if (isset($options['connectTimeout'])) { + $this->connectTimeout = $options['connectTimeout']; + } + + if (isset($options['readTimeout'])) { + $this->readTimeout = $options['readTimeout']; + } + + Filter::timeout($this->connectTimeout, $this->readTimeout); + } + + private function filterRoleName(array $params) + { + if (Helper::envNotEmpty('ALIBABA_CLOUD_ECS_METADATA')) { + $this->roleName = Helper::env('ALIBABA_CLOUD_ECS_METADATA'); + } + + if (isset($params['roleName'])) { + $this->roleName = $params['roleName']; + } + } + + private function filterDisableECSIMDSv1($params) + { + if (Helper::envNotEmpty('ALIBABA_CLOUD_IMDSV1_DISABLED')) { + $this->disableIMDSv1 = Helper::env('ALIBABA_CLOUD_IMDSV1_DISABLED') === true ? true : false; + } + + if (isset($params['disableIMDSv1'])) { + $this->disableIMDSv1 = $params['disableIMDSv1']; + } + } + + /** + * Get credentials by request. + * + * @return RefreshResult + * @throws InvalidArgumentException + * @throws RuntimeException + * @throws GuzzleException + */ + public function refreshCredentials() + { + if (Helper::envNotEmpty('ALIBABA_CLOUD_ECS_METADATA_DISABLED') && Helper::env('ALIBABA_CLOUD_ECS_METADATA_DISABLED') === true) { + throw new RuntimeException('IMDS credentials is disabled'); + } + + if (is_null($this->roleName) || $this->roleName === '') { + $this->roleName = $this->getRoleNameFromMeta(); + } + + $url = $this->metadataHost . $this->ecsUri . $this->roleName; + $options = Request::commonOptions(); + $options['read_timeout'] = $this->readTimeout; + $options['connect_timeout'] = $this->connectTimeout; + + $metadataToken = $this->getMetadataToken(); + if (!is_null($metadataToken)) { + $options['headers']['X-aliyun-ecs-metadata-token'] = $metadataToken; + } + + $result = Request::createClient()->request('GET', $url, $options); + + if ($result->getStatusCode() === 404) { + throw new InvalidArgumentException('The role was not found in the instance' . (string) $result); + } + + if ($result->getStatusCode() !== 200) { + throw new RuntimeException('Error refreshing credentials from IMDS, statusCode: ' . $result->getStatusCode() . ', result: ' . (string) $result); + } + + $credentials = $result->toArray(); + + if (!isset($credentials['AccessKeyId']) || !isset($credentials['AccessKeySecret']) || !isset($credentials['SecurityToken'])) { + throw new RuntimeException('Error retrieving credentials from IMDS result:' . $result->toJson()); + } + + if (!isset($credentials['Code']) || $credentials['Code'] !== 'Success') { + throw new RuntimeException('Error retrieving credentials from IMDS result, Code is not Success:' . $result->toJson()); + } + + return new RefreshResult(new Credentials([ + 'accessKeyId' => $credentials['AccessKeyId'], + 'accessKeySecret' => $credentials['AccessKeySecret'], + 'securityToken' => $credentials['SecurityToken'], + 'expiration' => \strtotime($credentials['Expiration']), + 'providerName' => $this->getProviderName(), + ]), $this->getStaleTime(strtotime($credentials["Expiration"])), $this->getPrefetchTime(strtotime($credentials["Expiration"]))); + } + + /** + * @return string + * @throws InvalidArgumentException + * @throws RuntimeException + * @throws GuzzleException + */ + private function getRoleNameFromMeta() + { + $options = Request::commonOptions(); + $options['read_timeout'] = $this->readTimeout; + $options['connect_timeout'] = $this->connectTimeout; + + $metadataToken = $this->getMetadataToken(); + if (!is_null($metadataToken)) { + $options['headers']['X-aliyun-ecs-metadata-token'] = $metadataToken; + } + + $result = Request::createClient()->request( + 'GET', + 'http://100.100.100.200/latest/meta-data/ram/security-credentials/', + $options + ); + + if ($result->getStatusCode() === 404) { + throw new InvalidArgumentException('The role name was not found in the instance' . (string) $result); + } + + if ($result->getStatusCode() !== 200) { + throw new RuntimeException('Error retrieving role name from result: ' . (string) $result); + } + + $role_name = (string) $result; + if (!$role_name) { + throw new RuntimeException('Error retrieving role name from result is empty'); + } + + return $role_name; + } + + /** + * Get metadata token by request. + * + * @return string + * @throws RuntimeException + * @throws GuzzleException + */ + private function getMetadataToken() + { + $url = $this->metadataHost . $this->metadataTokenUri; + $options = Request::commonOptions(); + $options['read_timeout'] = $this->readTimeout; + $options['connect_timeout'] = $this->connectTimeout; + $options['headers']['X-aliyun-ecs-metadata-token-ttl-seconds'] = $this->metadataTokenDuration; + + $result = Request::createClient()->request('PUT', $url, $options); + + if ($result->getStatusCode() != 200) { + if ($this->disableIMDSv1) { + throw new RuntimeException('Failed to get token from ECS Metadata Service. HttpCode= ' . $result->getStatusCode()); + } + return null; + } + return (string) $result; + } + + /** + * @var int + */ + public function getPrefetchTime($expiration) + { + return $expiration <= 0 ? + time() + (5 * 60) : + time() + (60 * 60); + } + + /** + * @return string + */ + public function key() + { + return 'ecs_ram_role#roleName#' . $this->roleName; + } + + /** + * @return string + */ + public function getProviderName() + { + return 'ecs_ram_role'; + } + + /** + * @return string + */ + public function getRoleName() + { + return $this->roleName; + } + + /** + * @return bool + */ + public function isDisableIMDSv1() + { + return $this->disableIMDSv1; + } +} diff --git a/vendor/alibabacloud/credentials/src/Providers/EcsRamRoleProvider.php b/vendor/alibabacloud/credentials/src/Providers/EcsRamRoleProvider.php deleted file mode 100644 index 828bdad..0000000 --- a/vendor/alibabacloud/credentials/src/Providers/EcsRamRoleProvider.php +++ /dev/null @@ -1,94 +0,0 @@ -getCredentialsInCache(); - - if ($result === null) { - $result = $this->request(); - - if (!isset($result['AccessKeyId'], $result['AccessKeySecret'], $result['SecurityToken'])) { - throw new RuntimeException($this->error); - } - - $this->cache($result->toArray()); - } - - return new StsCredential( - $result['AccessKeyId'], - $result['AccessKeySecret'], - strtotime($result['Expiration']), - $result['SecurityToken'] - ); - } - - /** - * Get credentials by request. - * - * @return ResponseInterface - * @throws Exception - * @throws GuzzleException - */ - public function request() - { - $credential = $this->credential; - $url = $this->uri . $credential->getRoleName(); - - $options = [ - 'http_errors' => false, - 'timeout' => 1, - 'connect_timeout' => 1, - ]; - - $result = Request::createClient()->request('GET', $url, $options); - - if ($result->getStatusCode() === 404) { - $message = 'The role was not found in the instance'; - throw new InvalidArgumentException($message); - } - - if ($result->getStatusCode() !== 200) { - throw new RuntimeException('Error retrieving credentials from result: ' . $result->toJson()); - } - - return $result; - } -} diff --git a/vendor/alibabacloud/credentials/src/Providers/EnvironmentVariableCredentialsProvider.php b/vendor/alibabacloud/credentials/src/Providers/EnvironmentVariableCredentialsProvider.php new file mode 100644 index 0000000..b6dd579 --- /dev/null +++ b/vendor/alibabacloud/credentials/src/Providers/EnvironmentVariableCredentialsProvider.php @@ -0,0 +1,65 @@ + $accessKeyId, + 'accessKeySecret' => $accessKeySecret, + 'securityToken' => $securityToken, + 'providerName' => $this->getProviderName(), + ]); + } + + return new Credentials([ + 'accessKeyId' => $accessKeyId, + 'accessKeySecret' => $accessKeySecret, + 'providerName' => $this->getProviderName(), + ]); + } + + /** + * @inheritDoc + */ + public function getProviderName() + { + return "env"; + } +} diff --git a/vendor/alibabacloud/credentials/src/Providers/OIDCRoleArnCredentialsProvider.php b/vendor/alibabacloud/credentials/src/Providers/OIDCRoleArnCredentialsProvider.php new file mode 100644 index 0000000..18fe6ec --- /dev/null +++ b/vendor/alibabacloud/credentials/src/Providers/OIDCRoleArnCredentialsProvider.php @@ -0,0 +1,268 @@ +filterOptions($options); + $this->filterRoleArn($params); + $this->filterOIDCProviderArn($params); + $this->filterOIDCTokenFilePath($params); + $this->filterRoleSessionName($params); + $this->filterDurationSeconds($params); + $this->filterPolicy($params); + $this->filterSTSEndpoint($params); + } + + private function filterRoleArn(array $params) + { + if (Helper::envNotEmpty('ALIBABA_CLOUD_ROLE_ARN')) { + $this->roleArn = Helper::env('ALIBABA_CLOUD_ROLE_ARN'); + } + + if (isset($params['roleArn'])) { + $this->roleArn = $params['roleArn']; + } + + Filter::roleArn($this->roleArn); + } + + private function filterOIDCProviderArn(array $params) + { + if (Helper::envNotEmpty('ALIBABA_CLOUD_OIDC_PROVIDER_ARN')) { + $this->oidcProviderArn = Helper::env('ALIBABA_CLOUD_OIDC_PROVIDER_ARN'); + } + + if (isset($params['oidcProviderArn'])) { + $this->oidcProviderArn = $params['oidcProviderArn']; + } + + Filter::oidcProviderArn($this->oidcProviderArn); + } + + private function filterOIDCTokenFilePath(array $params) + { + if (Helper::envNotEmpty('ALIBABA_CLOUD_OIDC_TOKEN_FILE')) { + $this->oidcTokenFilePath = Helper::env('ALIBABA_CLOUD_OIDC_TOKEN_FILE'); + } + + if (isset($params['oidcTokenFilePath'])) { + $this->oidcTokenFilePath = $params['oidcTokenFilePath']; + } + + Filter::oidcTokenFilePath($this->oidcTokenFilePath); + } + + private function filterRoleSessionName(array $params) + { + if (Helper::envNotEmpty('ALIBABA_CLOUD_ROLE_SESSION_NAME')) { + $this->roleSessionName = Helper::env('ALIBABA_CLOUD_ROLE_SESSION_NAME'); + } + + if (isset($params['roleSessionName'])) { + $this->roleSessionName = $params['roleSessionName']; + } + + if (is_null($this->roleSessionName) || $this->roleSessionName === '') { + $this->roleSessionName = 'phpSdkRoleSessionName'; + } + } + + private function filterDurationSeconds(array $params) + { + if (isset($params['durationSeconds'])) { + if (is_int($params['durationSeconds'])) { + $this->durationSeconds = $params['durationSeconds']; + } + } + if ($this->durationSeconds < 900) { + throw new InvalidArgumentException('Role session expiration should be in the range of 900s - max session duration'); + } + } + + private function filterPolicy(array $params) + { + if (isset($params['policy'])) { + if (is_string($params['policy'])) { + $this->policy = $params['policy']; + } + + if (is_array($params['policy'])) { + $this->policy = json_encode($params['policy']); + } + } + } + + private function filterSTSEndpoint(array $params) + { + $prefix = 'sts'; + if (Helper::envNotEmpty('ALIBABA_CLOUD_VPC_ENDPOINT_ENABLED') || (isset($params['enableVpc']) && $params['enableVpc'] === true)) { + $prefix = 'sts-vpc'; + } + if (Helper::envNotEmpty('ALIBABA_CLOUD_STS_REGION')) { + $this->stsEndpoint = $prefix . '.' . Helper::env('ALIBABA_CLOUD_STS_REGION') . '.aliyuncs.com'; + } + + if (isset($params['stsRegionId'])) { + $this->stsEndpoint = $prefix . '.' . $params['stsRegionId'] . '.aliyuncs.com'; + } + + if (isset($params['stsEndpoint'])) { + $this->stsEndpoint = $params['stsEndpoint']; + } + + if (is_null($this->stsEndpoint) || $this->stsEndpoint === '') { + $this->stsEndpoint = 'sts.aliyuncs.com'; + } + } + + private function filterOptions(array $options) + { + if (isset($options['connectTimeout'])) { + $this->connectTimeout = $options['connectTimeout']; + } + + if (isset($options['readTimeout'])) { + $this->readTimeout = $options['readTimeout']; + } + + Filter::timeout($this->connectTimeout, $this->readTimeout); + } + + /** + * Get credentials by request. + * + * @return RefreshResult + * @throws RuntimeException + * @throws GuzzleException + */ + public function refreshCredentials() + { + $options = Request::commonOptions(); + $options['read_timeout'] = $this->readTimeout; + $options['connect_timeout'] = $this->connectTimeout; + + $options['query']['Action'] = 'AssumeRoleWithOIDC'; + $options['query']['Version'] = '2015-04-01'; + $options['query']['Format'] = 'JSON'; + $options['query']['Timestamp'] = gmdate('Y-m-d\TH:i:s\Z'); + $options['query']['RoleArn'] = $this->roleArn; + $options['query']['OIDCProviderArn'] = $this->oidcProviderArn; + try { + $oidcToken = file_get_contents($this->oidcTokenFilePath); + $options['query']['OIDCToken'] = $oidcToken; + } catch (Exception $exception) { + throw new InvalidArgumentException($exception->getMessage()); + } + $options['query']['RoleSessionName'] = $this->roleSessionName; + $options['query']['DurationSeconds'] = (string) $this->durationSeconds; + if (!is_null($this->policy)) { + $options['query']['Policy'] = $this->policy; + } + + $url = (new Uri())->withScheme('https')->withHost($this->stsEndpoint); + + $result = Request::createClient()->request('POST', $url, $options); + + if ($result->getStatusCode() !== 200) { + throw new RuntimeException('Error refreshing credentials from OIDC, statusCode: ' . $result->getStatusCode() . ', result: ' . (string) $result); + } + + $json = $result->toArray(); + $credentials = $json['Credentials']; + + if (!isset($credentials['AccessKeyId']) || !isset($credentials['AccessKeySecret']) || !isset($credentials['SecurityToken'])) { + throw new RuntimeException('Error retrieving credentials from OIDC result:' . $result->toJson()); + } + + return new RefreshResult(new Credentials([ + 'accessKeyId' => $credentials['AccessKeyId'], + 'accessKeySecret' => $credentials['AccessKeySecret'], + 'securityToken' => $credentials['SecurityToken'], + 'expiration' => \strtotime($credentials['Expiration']), + 'providerName' => $this->getProviderName(), + ]), $this->getStaleTime(strtotime($credentials['Expiration']))); + } + + public function key() + { + return 'oidc_role_arn#roleArn#' . $this->roleArn . '#oidcProviderArn#' . $this->oidcProviderArn . '#roleSessionName#' . $this->roleSessionName; + } + + public function getProviderName() + { + return 'oidc_role_arn'; + } +} diff --git a/vendor/alibabacloud/credentials/src/Providers/ProfileCredentialsProvider.php b/vendor/alibabacloud/credentials/src/Providers/ProfileCredentialsProvider.php new file mode 100644 index 0000000..ab07efe --- /dev/null +++ b/vendor/alibabacloud/credentials/src/Providers/ProfileCredentialsProvider.php @@ -0,0 +1,188 @@ +filterProfileName($params); + $this->filterProfileFile(); + } + + private function filterProfileName(array $params) + { + if (Helper::envNotEmpty('ALIBABA_CLOUD_PROFILE')) { + $this->profileName = Helper::env('ALIBABA_CLOUD_PROFILE'); + } + + if (isset($params['profileName'])) { + $this->profileName = $params['profileName']; + } + + if (is_null($this->profileName) || $this->profileName === '') { + $this->profileName = 'default'; + } + } + + private function filterProfileFile() + { + $this->profileFile = Helper::envNotEmpty('ALIBABA_CLOUD_CREDENTIALS_FILE'); + + if (!$this->profileFile) { + $this->profileFile = self::getDefaultFile(); + } + } + + /** + * @return bool + */ + private function shouldReloadCredentialsProvider() + { + if (is_null($this->credentialsProvider)) { + return true; + } + + return false; + } + + /** + * @return CredentialsProvider + */ + private function reloadCredentialsProvider($profileFile, $profileName) + { + if (!Helper::inOpenBasedir($profileFile)) { + throw new RuntimeException('Unable to open credentials file: ' . $profileFile); + } + + if (!\is_readable($profileFile) || !\is_file($profileFile)) { + throw new RuntimeException('Credentials file is not readable: ' . $profileFile); + } + + $fileArray = \parse_ini_file($profileFile, true); + + if (\is_array($fileArray) && !empty($fileArray)) { + $credentialsConfigures = []; + foreach (\array_change_key_case($fileArray) as $name => $configures) { + if ($name === $profileName) { + $credentialsConfigures = $configures; + break; + } + } + if (\is_array($credentialsConfigures) && !empty($credentialsConfigures)) { + switch (Helper::unsetReturnNull($credentialsConfigures, 'type')) { + case 'access_key': + return new StaticAKCredentialsProvider([ + 'accessKeyId' => Helper::unsetReturnNull($credentialsConfigures, 'access_key_id'), + 'accessKeySecret' => Helper::unsetReturnNull($credentialsConfigures, 'access_key_secret'), + ]); + case 'ram_role_arn': + $innerProvider = new StaticAKCredentialsProvider([ + 'accessKeyId' => Helper::unsetReturnNull($credentialsConfigures, 'access_key_id'), + 'accessKeySecret' => Helper::unsetReturnNull($credentialsConfigures, 'access_key_secret'), + ]); + return new RamRoleArnCredentialsProvider([ + 'credentialsProvider' => $innerProvider, + 'roleArn' => Helper::unsetReturnNull($credentialsConfigures, 'role_arn'), + 'roleSessionName' => Helper::unsetReturnNull($credentialsConfigures, 'role_session_name'), + 'policy' => Helper::unsetReturnNull($credentialsConfigures, 'policy'), + ]); + case 'ecs_ram_role': + return new EcsRamRoleCredentialsProvider([ + 'roleName' => Helper::unsetReturnNull($credentialsConfigures, 'role_name'), + ]); + case 'oidc_role_arn': + return new OIDCRoleArnCredentialsProvider([ + 'roleArn' => Helper::unsetReturnNull($credentialsConfigures, 'role_arn'), + 'oidcProviderArn' => Helper::unsetReturnNull($credentialsConfigures, 'oidc_provider_arn'), + 'oidcTokenFilePath' => Helper::unsetReturnNull($credentialsConfigures, 'oidc_token_file_path'), + 'roleSessionName' => Helper::unsetReturnNull($credentialsConfigures, 'role_session_name'), + 'policy' => Helper::unsetReturnNull($credentialsConfigures, 'policy'), + ]); + case 'rsa_key_pair': + return new RsaKeyPairCredentialsProvider([ + 'publicKeyId' => Helper::unsetReturnNull($credentialsConfigures, 'public_key_id'), + 'privateKeyFile' => Helper::unsetReturnNull($credentialsConfigures, 'private_key_file'), + ]); + default: + throw new RuntimeException('Unsupported credential type from credentials file: ' . Helper::unsetReturnNull($credentialsConfigures, 'type')); + } + } + } + throw new RuntimeException('Failed to get credential from credentials file: ' . $profileFile); + } + /** + * Get credential. + * + * @return Credentials + * @throws RuntimeException + */ + public function getCredentials() + { + if ($this->shouldReloadCredentialsProvider()) { + $this->credentialsProvider = $this->reloadCredentialsProvider($this->profileFile, $this->profileName); + } + + $credentials = $this->credentialsProvider->getCredentials(); + return new Credentials([ + 'accessKeyId' => $credentials->getAccessKeyId(), + 'accessKeySecret' => $credentials->getAccessKeySecret(), + 'securityToken' => $credentials->getSecurityToken(), + 'providerName' => $this->getProviderName() . '/' . $this->credentialsProvider->getProviderName(), + ]); + + } + + /** + * Get the default credential file. + * + * @return string + */ + private function getDefaultFile() + { + return Helper::getHomeDirectory() . + DIRECTORY_SEPARATOR . + '.alibabacloud' . + DIRECTORY_SEPARATOR . + 'credentials'; + } + + /** + * @return string + */ + public function getProviderName() + { + return 'profile'; + } +} diff --git a/vendor/alibabacloud/credentials/src/Providers/Provider.php b/vendor/alibabacloud/credentials/src/Providers/Provider.php deleted file mode 100644 index e1e869d..0000000 --- a/vendor/alibabacloud/credentials/src/Providers/Provider.php +++ /dev/null @@ -1,82 +0,0 @@ -credential = $credential; - $this->config = $config; - } - - /** - * Get the credentials from the cache in the validity period. - * - * @return array|null - */ - public function getCredentialsInCache() - { - if (isset(self::$credentialsCache[(string)$this->credential])) { - $result = self::$credentialsCache[(string)$this->credential]; - if (\strtotime($result['Expiration']) - \time() >= $this->expirationSlot) { - return $result; - } - } - - return null; - } - - /** - * Cache credentials. - * - * @param array $credential - */ - protected function cache(array $credential) - { - self::$credentialsCache[(string)$this->credential] = $credential; - } -} diff --git a/vendor/alibabacloud/credentials/src/Providers/RamRoleArnCredentialsProvider.php b/vendor/alibabacloud/credentials/src/Providers/RamRoleArnCredentialsProvider.php new file mode 100644 index 0000000..b69f6c5 --- /dev/null +++ b/vendor/alibabacloud/credentials/src/Providers/RamRoleArnCredentialsProvider.php @@ -0,0 +1,321 @@ +filterOptions($options); + $this->filterCredentials($params); + $this->filterRoleArn($params); + $this->filterRoleSessionName($params); + $this->filterDurationSeconds($params); + $this->filterPolicy($params); + $this->filterExternalId($params); + $this->filterSTSEndpoint($params); + } + + private function filterRoleArn(array $params) + { + if (Helper::envNotEmpty('ALIBABA_CLOUD_ROLE_ARN')) { + $this->roleArn = Helper::env('ALIBABA_CLOUD_ROLE_ARN'); + } + + if (isset($params['roleArn'])) { + $this->roleArn = $params['roleArn']; + } + + Filter::roleArn($this->roleArn); + } + + private function filterRoleSessionName(array $params) + { + if (Helper::envNotEmpty('ALIBABA_CLOUD_ROLE_SESSION_NAME')) { + $this->roleSessionName = Helper::env('ALIBABA_CLOUD_ROLE_SESSION_NAME'); + } + + if (isset($params['roleSessionName'])) { + $this->roleSessionName = $params['roleSessionName']; + } + + if (is_null($this->roleSessionName) || $this->roleSessionName === '') { + $this->roleSessionName = 'phpSdkRoleSessionName'; + } + } + + private function filterDurationSeconds(array $params) + { + if (isset($params['durationSeconds'])) { + if (is_int($params['durationSeconds'])) { + $this->durationSeconds = $params['durationSeconds']; + } + } + if ($this->durationSeconds < 900) { + throw new InvalidArgumentException('Role session expiration should be in the range of 900s - max session duration'); + } + } + + private function filterPolicy(array $params) + { + if (isset($params['policy'])) { + if (is_string($params['policy'])) { + $this->policy = $params['policy']; + } + + if (is_array($params['policy'])) { + $this->policy = json_encode($params['policy']); + } + } + } + + private function filterExternalId(array $params) + { + if (isset($params['externalId'])) { + if (is_string($params['externalId'])) { + $this->externalId = $params['externalId']; + } + } + } + + private function filterSTSEndpoint(array $params) + { + $prefix = 'sts'; + if (Helper::envNotEmpty('ALIBABA_CLOUD_VPC_ENDPOINT_ENABLED') || (isset($params['enableVpc']) && $params['enableVpc'] === true)) { + $prefix = 'sts-vpc'; + } + if (Helper::envNotEmpty('ALIBABA_CLOUD_STS_REGION')) { + $this->stsEndpoint = $prefix . '.' . Helper::env('ALIBABA_CLOUD_STS_REGION') . '.aliyuncs.com'; + } + + if (isset($params['stsRegionId'])) { + $this->stsEndpoint = $prefix . '.' . $params['stsRegionId'] . '.aliyuncs.com'; + } + + if (isset($params['stsEndpoint'])) { + $this->stsEndpoint = $params['stsEndpoint']; + } + + if (is_null($this->stsEndpoint) || $this->stsEndpoint === '') { + $this->stsEndpoint = 'sts.aliyuncs.com'; + } + } + + private function filterCredentials(array $params) + { + if (isset($params['credentialsProvider'])) { + if (!($params['credentialsProvider'] instanceof CredentialsProvider)) { + throw new InvalidArgumentException('Invalid credentialsProvider option for ram_role_arn'); + } + $this->credentialsProvider = $params['credentialsProvider']; + } else if (isset($params['accessKeyId']) && isset($params['accessKeySecret']) && isset($params['securityToken'])) { + Filter::accessKey($params['accessKeyId'], $params['accessKeySecret']); + Filter::securityToken($params['securityToken']); + $this->credentialsProvider = new StaticSTSCredentialsProvider($params); + } else if (isset($params['accessKeyId']) && isset($params['accessKeySecret'])) { + Filter::accessKey($params['accessKeyId'], $params['accessKeySecret']); + $this->credentialsProvider = new StaticAKCredentialsProvider($params); + } else { + throw new InvalidArgumentException('Missing required credentials option for ram_role_arn'); + } + } + + private function filterOptions(array $options) + { + if (isset($options['connectTimeout'])) { + $this->connectTimeout = $options['connectTimeout']; + } + + if (isset($options['readTimeout'])) { + $this->readTimeout = $options['readTimeout']; + } + + Filter::timeout($this->connectTimeout, $this->readTimeout); + } + + /** + * Get credentials by request. + * + * @return RefreshResult + * @throws RuntimeException + * @throws GuzzleException + */ + public function refreshCredentials() + { + $options = Request::commonOptions(); + $options['read_timeout'] = $this->readTimeout; + $options['connect_timeout'] = $this->connectTimeout; + + $options['query']['Action'] = 'AssumeRole'; + $options['query']['Version'] = '2015-04-01'; + $options['query']['Format'] = 'JSON'; + $options['query']['Timestamp'] = gmdate('Y-m-d\TH:i:s\Z'); + $options['query']['SignatureMethod'] = 'HMAC-SHA1'; + $options['query']['SignatureVersion'] = '1.0'; + $options['query']['SignatureNonce'] = Request::uuid(json_encode($options['query'])); + $options['query']['RoleArn'] = $this->roleArn; + $options['query']['RoleSessionName'] = $this->roleSessionName; + $options['query']['DurationSeconds'] = (string) $this->durationSeconds; + if (!is_null($this->policy) && $this->policy !== '') { + $options['query']['Policy'] = $this->policy; + } + if (!is_null($this->externalId) && $this->externalId !== '') { + $options['query']['ExternalId'] = $this->externalId; + } + + $sessionCredentials = $this->credentialsProvider->getCredentials(); + $options['query']['AccessKeyId'] = $sessionCredentials->getAccessKeyId(); + if (!is_null($sessionCredentials->getSecurityToken())) { + $options['query']['SecurityToken'] = $sessionCredentials->getSecurityToken(); + } + $options['query']['Signature'] = Request::shaHmac1sign( + Request::signString('GET', $options['query']), + $sessionCredentials->getAccessKeySecret() . '&' + ); + + $url = (new Uri())->withScheme('https')->withHost($this->stsEndpoint); + + $result = Request::createClient()->request('GET', $url, $options); + + if ($result->getStatusCode() !== 200) { + throw new RuntimeException('Error refreshing credentials from RamRoleArn, statusCode: ' . $result->getStatusCode() . ', result: ' . (string) $result); + } + + $json = $result->toArray(); + $credentials = $json['Credentials']; + + if (!isset($credentials['AccessKeyId']) || !isset($credentials['AccessKeySecret']) || !isset($credentials['SecurityToken'])) { + throw new RuntimeException('Error retrieving credentials from RamRoleArn result:' . $result->toJson()); + } + + return new RefreshResult(new Credentials([ + 'accessKeyId' => $credentials['AccessKeyId'], + 'accessKeySecret' => $credentials['AccessKeySecret'], + 'securityToken' => $credentials['SecurityToken'], + 'expiration' => \strtotime($credentials['Expiration']), + 'providerName' => $this->getProviderName(), + ]), $this->getStaleTime(strtotime($credentials['Expiration']))); + } + + public function key() + { + $credentials = $this->credentialsProvider->getCredentials(); + return 'ram_role_arn#credential#' . $credentials->getAccessKeyId() . '#roleArn#' . $this->roleArn . '#roleSessionName#' . $this->roleSessionName; + } + + public function getProviderName() + { + return 'ram_role_arn/' . $this->credentialsProvider->getProviderName(); + } + + /** + * @return string + */ + public function getRoleArn() + { + return $this->roleArn; + } + + /** + * @return string + */ + public function getRoleSessionName() + { + return $this->roleSessionName; + } + + /** + * @return string + */ + public function getPolicy() + { + return $this->policy; + } + + /** + * @deprecated + * @return string + */ + public function getOriginalAccessKeyId() + { + return $this->credentialsProvider->getCredentials()->getAccessKeyId(); + } + + /** + * @deprecated + * @return string + */ + public function getOriginalAccessKeySecret() + { + return $this->credentialsProvider->getCredentials()->getAccessKeySecret(); + } +} diff --git a/vendor/alibabacloud/credentials/src/Providers/RamRoleArnProvider.php b/vendor/alibabacloud/credentials/src/Providers/RamRoleArnProvider.php deleted file mode 100644 index c6a8729..0000000 --- a/vendor/alibabacloud/credentials/src/Providers/RamRoleArnProvider.php +++ /dev/null @@ -1,49 +0,0 @@ -getCredentialsInCache(); - - if (null === $credential) { - $result = (new AssumeRole($this->credential))->request(); - - if ($result->getStatusCode() !== 200) { - throw new RuntimeException(isset($result['Message']) ? $result['Message'] : (string)$result->getBody()); - } - - if (!isset($result['Credentials']['AccessKeyId'], - $result['Credentials']['AccessKeySecret'], - $result['Credentials']['SecurityToken'])) { - throw new RuntimeException($this->error); - } - - $credential = $result['Credentials']; - $this->cache($credential); - } - - return new StsCredential( - $credential['AccessKeyId'], - $credential['AccessKeySecret'], - strtotime($credential['Expiration']), - $credential['SecurityToken'] - ); - } -} diff --git a/vendor/alibabacloud/credentials/src/Providers/RsaKeyPairCredentialsProvider.php b/vendor/alibabacloud/credentials/src/Providers/RsaKeyPairCredentialsProvider.php new file mode 100644 index 0000000..8c85db6 --- /dev/null +++ b/vendor/alibabacloud/credentials/src/Providers/RsaKeyPairCredentialsProvider.php @@ -0,0 +1,200 @@ +filterOptions($options); + $this->filterDurationSeconds($params); + $this->filterSTSEndpoint($params); + $this->publicKeyId = isset($params['publicKeyId']) ? $params['publicKeyId'] : null; + $privateKeyFile = isset($params['privateKeyFile']) ? $params['privateKeyFile'] : null; + Filter::publicKeyId($this->publicKeyId); + Filter::privateKeyFile($privateKeyFile); + + try { + $this->privateKey = file_get_contents($privateKeyFile); + } catch (Exception $exception) { + throw new InvalidArgumentException($exception->getMessage()); + } + } + + private function filterOptions(array $options) + { + if (isset($options['connectTimeout'])) { + $this->connectTimeout = $options['connectTimeout']; + } + + if (isset($options['readTimeout'])) { + $this->readTimeout = $options['readTimeout']; + } + + Filter::timeout($this->connectTimeout, $this->readTimeout); + } + + private function filterDurationSeconds(array $params) + { + if (isset($params['durationSeconds'])) { + if (is_int($params['durationSeconds'])) { + $this->durationSeconds = $params['durationSeconds']; + } + } + if ($this->durationSeconds < 900) { + throw new InvalidArgumentException('Role session expiration should be in the range of 900s - max session duration'); + } + } + + private function filterSTSEndpoint(array $params) + { + if (isset($params['stsEndpoint'])) { + $this->stsEndpoint = $params['stsEndpoint']; + } + + if (is_null($this->stsEndpoint) || $this->stsEndpoint === '') { + $this->stsEndpoint = 'sts.ap-northeast-1.aliyuncs.com'; + } + } + + + /** + * Get credentials by request. + * + * @return RefreshResult + * @throws RuntimeException + * @throws GuzzleException + */ + public function refreshCredentials() + { + $options = Request::commonOptions(); + $options['read_timeout'] = $this->readTimeout; + $options['connect_timeout'] = $this->connectTimeout; + + $options['query']['Action'] = 'GenerateSessionAccessKey'; + $options['query']['Version'] = '2015-04-01'; + $options['query']['Format'] = 'JSON'; + $options['query']['Timestamp'] = gmdate('Y-m-d\TH:i:s\Z'); + $options['query']['SignatureMethod'] = 'SHA256withRSA'; + $options['query']['SignatureType'] = 'PRIVATEKEY'; + $options['query']['SignatureVersion'] = '1.0'; + $options['query']['SignatureNonce'] = Request::uuid(json_encode($options['query'])); + $options['query']['DurationSeconds'] = (string) $this->durationSeconds; + $options['query']['AccessKeyId'] = $this->publicKeyId; + $options['query']['Signature'] = Request::shaHmac256WithRsasign( + Request::signString('GET', $options['query']), + $this->privateKey + ); + + $url = (new Uri())->withScheme('https')->withHost($this->stsEndpoint); + + $result = Request::createClient()->request('GET', $url, $options); + + if ($result->getStatusCode() !== 200) { + throw new RuntimeException('Error refreshing credentials from RsaKeyPair, statusCode: ' . $result->getStatusCode() . ', result: ' . (string) $result); + } + + $json = $result->toArray(); + + if (!isset($json['SessionAccessKey']['SessionAccessKeyId']) || !isset($json['SessionAccessKey']['SessionAccessKeySecret'])) { + throw new RuntimeException('Error retrieving credentials from RsaKeyPair result:' . $result->toJson()); + } + + $credentials = []; + $credentials['AccessKeyId'] = $json['SessionAccessKey']['SessionAccessKeyId']; + $credentials['AccessKeySecret'] = $json['SessionAccessKey']['SessionAccessKeySecret']; + $credentials['Expiration'] = $json['SessionAccessKey']['Expiration']; + $credentials['SecurityToken'] = null; + + + return new RefreshResult(new Credentials([ + 'accessKeyId' => $credentials['AccessKeyId'], + 'accessKeySecret' => $credentials['AccessKeySecret'], + 'securityToken' => $credentials['SecurityToken'], + 'expiration' => \strtotime($credentials['Expiration']), + 'providerName' => $this->getProviderName(), + ]), $this->getStaleTime(strtotime($credentials['Expiration']))); + } + + public function key() + { + return 'rsa_key_pair#publicKeyId#' . $this->publicKeyId; + } + + public function getProviderName() + { + return 'rsa_key_pair'; + } + + /** + * @return string + */ + public function getPublicKeyId() + { + return $this->publicKeyId; + } + + /** + * @return mixed + */ + public function getPrivateKey() + { + return $this->privateKey; + } +} diff --git a/vendor/alibabacloud/credentials/src/Providers/RsaKeyPairProvider.php b/vendor/alibabacloud/credentials/src/Providers/RsaKeyPairProvider.php deleted file mode 100644 index c2d03fc..0000000 --- a/vendor/alibabacloud/credentials/src/Providers/RsaKeyPairProvider.php +++ /dev/null @@ -1,53 +0,0 @@ -getCredentialsInCache(); - - if ($credential === null) { - $result = (new GenerateSessionAccessKey($this->credential))->request(); - - if ($result->getStatusCode() !== 200) { - throw new RuntimeException(isset($result['Message']) ? $result['Message'] : (string)$result->getBody()); - } - - if (!isset($result['SessionAccessKey']['SessionAccessKeyId'], - $result['SessionAccessKey']['SessionAccessKeySecret'])) { - throw new RuntimeException($this->error); - } - - $credential = $result['SessionAccessKey']; - $this->cache($credential); - } - - return new StsCredential( - $credential['SessionAccessKeyId'], - $credential['SessionAccessKeySecret'], - strtotime($credential['Expiration']) - ); - } -} diff --git a/vendor/alibabacloud/credentials/src/Providers/SessionCredentialsProvider.php b/vendor/alibabacloud/credentials/src/Providers/SessionCredentialsProvider.php new file mode 100644 index 0000000..60b92de --- /dev/null +++ b/vendor/alibabacloud/credentials/src/Providers/SessionCredentialsProvider.php @@ -0,0 +1,161 @@ +key()])) { + $result = self::$credentialsCache[$this->key()]; + return $result; + } + return null; + } + + /** + * Cache credentials. + * + * @param RefreshResult $credential + */ + protected function cache(RefreshResult $credential) + { + self::$credentialsCache[$this->key()] = $credential; + } + + /** + * Get credential. + * + * @return Credentials + */ + public function getCredentials() + { + if ($this->cacheIsStale() || $this->shouldInitiateCachePrefetch()) { + $result = $this->refreshCache(); + $this->cache($result); + } + + $result = $this->getCredentialsInCache(); + + return $result->credentials(); + } + + /** + * @return RefreshResult + */ + protected function refreshCache() + { + try { + return $this->handleFetchedSuccess($this->refreshCredentials()); + } catch (\Exception $e) { + return $this->handleFetchedFailure($e); + } + } + + /** + * @return RefreshResult + * @throws \Exception + */ + protected function handleFetchedFailure(\Exception $e) + { + $currentCachedValue = $this->getCredentialsInCache(); + if (is_null($currentCachedValue)) { + throw $e; + } + + if (time() < $currentCachedValue->staleTime()) { + return $currentCachedValue; + } + + throw $e; + } + /** + * @return RefreshResult + */ + protected function handleFetchedSuccess(RefreshResult $value) + { + $now = time(); + // 过期时间大于15分钟,不用管 + if ($now < $value->staleTime()) { + return $value; + } + // 不足或等于15分钟,但未过期,下次会再次刷新 + if ($now < $value->staleTime() + 15 * 60) { + $value->staleTime = $now; + return $value; + } + // 已过期,看缓存,缓存若大于15分钟,返回缓存,若小于15分钟,则稍后重试 + if (is_null($this->getCredentialsInCache())) { + throw new \Exception("The fetched credentials have expired and no cache is available."); + } else if ($now < $this->getCredentialsInCache()->staleTime()) { + return $this->getCredentialsInCache(); + } else { + // 返回成功,延长有效期 1 分钟 + $expectation = mt_rand(50, 70); + $value->staleTime = time() + $expectation; + return $value; + } + } + + /** + * @return bool + */ + protected function cacheIsStale() + { + return is_null($this->getCredentialsInCache()) || time() >= $this->getCredentialsInCache()->staleTime(); + } + + /** + * @return bool + */ + protected function shouldInitiateCachePrefetch() + { + return is_null($this->getCredentialsInCache()) || time() >= $this->getCredentialsInCache()->prefetchTime(); + } + + /** + * @return int + */ + public function getStaleTime($expiration) + { + return $expiration <= 0 ? + time() + (60 * 60) : + $expiration - (15 * 60); + } + + /** + * @return RefreshResult + */ + abstract function refreshCredentials(); + + /** + * Get the toString of the credentials provider as the key. + * + * @return string + */ + abstract function key(); +} diff --git a/vendor/alibabacloud/credentials/src/Providers/StaticAKCredentialsProvider.php b/vendor/alibabacloud/credentials/src/Providers/StaticAKCredentialsProvider.php new file mode 100644 index 0000000..7e73cd0 --- /dev/null +++ b/vendor/alibabacloud/credentials/src/Providers/StaticAKCredentialsProvider.php @@ -0,0 +1,78 @@ +filterAK($params); + } + + private function filterAK(array $params) + { + if (Helper::envNotEmpty('ALIBABA_CLOUD_ACCESS_KEY_ID')) { + $this->accessKeyId = Helper::env('ALIBABA_CLOUD_ACCESS_KEY_ID'); + } + + if (Helper::envNotEmpty('ALIBABA_CLOUD_ACCESS_KEY_SECRET')) { + $this->accessKeySecret = Helper::env('ALIBABA_CLOUD_ACCESS_KEY_SECRET'); + } + + if (isset($params['accessKeyId'])) { + $this->accessKeyId = $params['accessKeyId']; + } + if (isset($params['accessKeySecret'])) { + $this->accessKeySecret = $params['accessKeySecret']; + } + + Filter::accessKey($this->accessKeyId, $this->accessKeySecret); + } + + /** + * Get credential. + * + * @return Credentials + */ + public function getCredentials() + { + return new Credentials([ + 'accessKeyId' => $this->accessKeyId, + 'accessKeySecret' => $this->accessKeySecret, + 'providerName' => $this->getProviderName(), + ]); + } + + /** + * @inheritDoc + */ + public function getProviderName() + { + return "static_ak"; + } +} \ No newline at end of file diff --git a/vendor/alibabacloud/credentials/src/Providers/StaticSTSCredentialsProvider.php b/vendor/alibabacloud/credentials/src/Providers/StaticSTSCredentialsProvider.php new file mode 100644 index 0000000..957b25d --- /dev/null +++ b/vendor/alibabacloud/credentials/src/Providers/StaticSTSCredentialsProvider.php @@ -0,0 +1,92 @@ +filterSTS($params); + } + + private function filterSTS(array $params) + { + if (Helper::envNotEmpty('ALIBABA_CLOUD_ACCESS_KEY_ID')) { + $this->accessKeyId = Helper::env('ALIBABA_CLOUD_ACCESS_KEY_ID'); + } + + if (Helper::envNotEmpty('ALIBABA_CLOUD_ACCESS_KEY_SECRET')) { + $this->accessKeySecret = Helper::env('ALIBABA_CLOUD_ACCESS_KEY_SECRET'); + } + + if (Helper::envNotEmpty('ALIBABA_CLOUD_SECURITY_TOKEN')) { + $this->securityToken = Helper::env('ALIBABA_CLOUD_SECURITY_TOKEN'); + } + + if (isset($params['accessKeyId'])) { + $this->accessKeyId = $params['accessKeyId']; + } + if (isset($params['accessKeySecret'])) { + $this->accessKeySecret = $params['accessKeySecret']; + } + if (isset($params['securityToken'])) { + $this->securityToken = $params['securityToken']; + } + + Filter::accessKey($this->accessKeyId, $this->accessKeySecret); + Filter::securityToken($this->securityToken); + } + + /** + * Get credential. + * + * @return Credentials + */ + public function getCredentials() + { + return new Credentials([ + 'accessKeyId' => $this->accessKeyId, + 'accessKeySecret' => $this->accessKeySecret, + 'securityToken' => $this->securityToken, + 'providerName' => $this->getProviderName(), + ]); + } + + /** + * @inheritDoc + */ + public function getProviderName() + { + return "static_sts"; + } +} \ No newline at end of file diff --git a/vendor/alibabacloud/credentials/src/Providers/URLCredentialsProvider.php b/vendor/alibabacloud/credentials/src/Providers/URLCredentialsProvider.php new file mode 100644 index 0000000..617c19f --- /dev/null +++ b/vendor/alibabacloud/credentials/src/Providers/URLCredentialsProvider.php @@ -0,0 +1,126 @@ +filterOptions($options); + $this->filterCredentialsURI($params); + } + + private function filterOptions(array $options) + { + if (isset($options['connectTimeout'])) { + $this->connectTimeout = $options['connectTimeout']; + } + + if (isset($options['readTimeout'])) { + $this->readTimeout = $options['readTimeout']; + } + + Filter::timeout($this->connectTimeout, $this->readTimeout); + } + + private function filterCredentialsURI(array $params) + { + if (Helper::envNotEmpty('ALIBABA_CLOUD_CREDENTIALS_URI')) { + $this->credentialsURI = Helper::env('ALIBABA_CLOUD_CREDENTIALS_URI'); + } + + if (isset($params['credentialsURI'])) { + $this->credentialsURI = $params['credentialsURI']; + } + + Filter::credentialsURI($this->credentialsURI); + } + + /** + * Get credentials by request. + * + * @return RefreshResult + * @throws InvalidArgumentException + * @throws RuntimeException + * @throws GuzzleException + */ + public function refreshCredentials() + { + $options = Request::commonOptions(); + $options['read_timeout'] = $this->readTimeout; + $options['connect_timeout'] = $this->connectTimeout; + + $result = Request::createClient()->request('GET', $this->credentialsURI, $options); + + if ($result->getStatusCode() !== 200) { + throw new RuntimeException('Error refreshing credentials from credentialsURI, statusCode: ' . $result->getStatusCode() . ', result: ' . (string) $result); + } + + $credentials = $result->toArray(); + + if (!isset($credentials['AccessKeyId']) || !isset($credentials['AccessKeySecret']) || !isset($credentials['SecurityToken']) || !isset($credentials['Expiration'])) { + throw new RuntimeException('Error retrieving credentials from credentialsURI result:' . $result->toJson()); + } + + return new RefreshResult(new Credentials([ + 'accessKeyId' => $credentials['AccessKeyId'], + 'accessKeySecret' => $credentials['AccessKeySecret'], + 'securityToken' => $credentials['SecurityToken'], + 'expiration' => \strtotime($credentials['Expiration']), + 'providerName' => $this->getProviderName(), + ]), $this->getStaleTime(strtotime($credentials['Expiration']))); + } + + + /** + * @return string + */ + public function key() + { + return 'credential_uri#' . $this->credentialsURI; + } + + /** + * @return string + */ + public function getProviderName() + { + return 'credential_uri'; + } +} diff --git a/vendor/alibabacloud/credentials/src/RamRoleArnCredential.php b/vendor/alibabacloud/credentials/src/RamRoleArnCredential.php index b82c608..ed75640 100644 --- a/vendor/alibabacloud/credentials/src/RamRoleArnCredential.php +++ b/vendor/alibabacloud/credentials/src/RamRoleArnCredential.php @@ -2,13 +2,16 @@ namespace AlibabaCloud\Credentials; -use AlibabaCloud\Credentials\Providers\RamRoleArnProvider; +use AlibabaCloud\Credentials\Providers\RamRoleArnCredentialsProvider; +use AlibabaCloud\Credentials\Credential\CredentialModel; use AlibabaCloud\Credentials\Signature\ShaHmac1Signature; +use AlibabaCloud\Credentials\Utils\Filter; use Exception; use GuzzleHttp\Exception\GuzzleException; use InvalidArgumentException; /** + * @deprecated * Use the AssumeRole of the RAM account to complete the authentication. */ class RamRoleArnCredential implements CredentialsInterface @@ -57,10 +60,10 @@ class RamRoleArnCredential implements CredentialsInterface Filter::accessKey($credential['access_key_id'], $credential['access_key_secret']); - $this->config = $config; - $this->accessKeyId = $credential['access_key_id']; + $this->config = $config; + $this->accessKeyId = $credential['access_key_id']; $this->accessKeySecret = $credential['access_key_secret']; - $this->roleArn = $credential['role_arn']; + $this->roleArn = $credential['role_arn']; $this->roleSessionName = $credential['role_session_name']; } @@ -177,13 +180,20 @@ class RamRoleArnCredential implements CredentialsInterface } /** - * @return StsCredential + * @return AlibabaCloud\Credentials\Providers\Credentials * @throws Exception * @throws GuzzleException */ protected function getSessionCredential() { - return (new RamRoleArnProvider($this))->get(); + $params = [ + 'accessKeyId' => $this->accessKeyId, + 'accessKeySecret' => $this->accessKeyId, + 'roleArn' => $this->roleArn, + 'roleSessionName' => $this->roleSessionName, + 'policy' => $this->policy, + ]; + return (new RamRoleArnCredentialsProvider($params))->getCredentials(); } /** @@ -215,4 +225,18 @@ class RamRoleArnCredential implements CredentialsInterface { return $this->getSessionCredential()->getExpiration(); } + + /** + * @inheritDoc + */ + public function getCredential() + { + $credentials = $this->getSessionCredential(); + return new CredentialModel([ + 'accessKeyId' => $credentials->getAccessKeyId(), + 'accessKeySecret' => $credentials->getAccessKeySecret(), + 'securityToken' => $credentials->getSecurityToken(), + 'type' => 'ram_role_arn', + ]); + } } diff --git a/vendor/alibabacloud/credentials/src/Request/AssumeRole.php b/vendor/alibabacloud/credentials/src/Request/AssumeRole.php deleted file mode 100644 index 962a733..0000000 --- a/vendor/alibabacloud/credentials/src/Request/AssumeRole.php +++ /dev/null @@ -1,37 +0,0 @@ -signature = new ShaHmac1Signature(); - $this->credential = $arnCredential; - $this->uri = $this->uri->withHost('sts.aliyuncs.com'); - $this->options['verify'] = false; - $this->options['query']['RoleArn'] = $arnCredential->getRoleArn(); - $this->options['query']['RoleSessionName'] = $arnCredential->getRoleSessionName(); - $this->options['query']['DurationSeconds'] = Provider::DURATION_SECONDS; - $this->options['query']['AccessKeyId'] = $this->credential->getOriginalAccessKeyId(); - $this->options['query']['Version'] = '2015-04-01'; - $this->options['query']['Action'] = 'AssumeRole'; - $this->options['query']['RegionId'] = 'cn-hangzhou'; - if ($arnCredential->getPolicy()) { - $this->options['query']['Policy'] = $arnCredential->getPolicy(); - } - } -} diff --git a/vendor/alibabacloud/credentials/src/Request/GenerateSessionAccessKey.php b/vendor/alibabacloud/credentials/src/Request/GenerateSessionAccessKey.php deleted file mode 100644 index 35db585..0000000 --- a/vendor/alibabacloud/credentials/src/Request/GenerateSessionAccessKey.php +++ /dev/null @@ -1,33 +0,0 @@ -signature = new ShaHmac256WithRsaSignature(); - $this->credential = $credential; - $this->uri = $this->uri->withHost('sts.ap-northeast-1.aliyuncs.com'); - $this->options['verify'] = false; - $this->options['query']['Version'] = '2015-04-01'; - $this->options['query']['Action'] = 'GenerateSessionAccessKey'; - $this->options['query']['RegionId'] = 'cn-hangzhou'; - $this->options['query']['AccessKeyId'] = $credential->getPublicKeyId(); - $this->options['query']['PublicKeyId'] = $credential->getPublicKeyId(); - $this->options['query']['DurationSeconds'] = Provider::DURATION_SECONDS; - } -} diff --git a/vendor/alibabacloud/credentials/src/Request/Request.php b/vendor/alibabacloud/credentials/src/Request/Request.php index 1bf1418..f0ba62f 100644 --- a/vendor/alibabacloud/credentials/src/Request/Request.php +++ b/vendor/alibabacloud/credentials/src/Request/Request.php @@ -3,19 +3,16 @@ namespace AlibabaCloud\Credentials\Request; use AlibabaCloud\Credentials\Credentials; -use AlibabaCloud\Credentials\EcsRamRoleCredential; -use AlibabaCloud\Credentials\Helper; -use AlibabaCloud\Credentials\RamRoleArnCredential; -use AlibabaCloud\Credentials\Signature\ShaHmac1Signature; -use AlibabaCloud\Credentials\Signature\ShaHmac256WithRsaSignature; -use Exception; +use AlibabaCloud\Credentials\Utils\Helper; use GuzzleHttp\Client; use GuzzleHttp\HandlerStack; use GuzzleHttp\Middleware; -use GuzzleHttp\Psr7\Uri; use AlibabaCloud\Tea\Response; use Psr\Http\Message\ResponseInterface; +use Exception; +use InvalidArgumentException; + /** * RESTful RPC Request. */ @@ -28,67 +25,33 @@ class Request const CONNECT_TIMEOUT = 5; /** - * Request Timeout + * Request Read Timeout */ - const TIMEOUT = 10; + const READ_TIMEOUT = 5; /** * @var array */ private static $config = []; - /** - * @var array - */ - public $options = []; /** - * @var Uri + * + * @return array */ - public $uri; - - /** - * @var EcsRamRoleCredential|RamRoleArnCredential - */ - protected $credential; - - /** - * @var ShaHmac256WithRsaSignature|ShaHmac1Signature - */ - protected $signature; - - /** - * Request constructor. - */ - public function __construct() + public static function commonOptions() { - $this->uri = (new Uri())->withScheme('https'); - $this->options['http_errors'] = false; - $this->options['connect_timeout'] = self::CONNECT_TIMEOUT; - $this->options['timeout'] = self::TIMEOUT; + $options = []; + $options['http_errors'] = false; + $options['connect_timeout'] = self::CONNECT_TIMEOUT; + $options['read_timeout'] = self::READ_TIMEOUT; + $options['headers']['User-Agent'] = Helper::getUserAgent(); // Turn on debug mode based on environment variable. if (strtolower(Helper::env('DEBUG')) === 'sdk') { - $this->options['debug'] = true; + $options['debug'] = true; } - } - - /** - * @return ResponseInterface - * @throws Exception - */ - public function request() - { - $this->options['query']['Format'] = 'JSON'; - $this->options['query']['SignatureMethod'] = $this->signature->getMethod(); - $this->options['query']['SignatureVersion'] = $this->signature->getVersion(); - $this->options['query']['SignatureNonce'] = self::uuid(json_encode($this->options['query'])); - $this->options['query']['Timestamp'] = gmdate('Y-m-d\TH:i:s\Z'); - $this->options['query']['Signature'] = $this->signature->sign( - self::signString('GET', $this->options['query']), - $this->credential->getOriginalAccessKeySecret() . '&' - ); - return self::createClient()->request('GET', (string)$this->uri, $this->options); + return $options; } /** @@ -118,6 +81,53 @@ class Request return $method . '&%2F&' . self::percentEncode(substr($canonicalized, 1)); } + /** + * @param string $string + * @param string $accessKeySecret + * + * @return string + */ + public static function shaHmac1sign($string, $accessKeySecret) + { + return base64_encode(hash_hmac('sha1', $string, $accessKeySecret, true)); + } + + /** + * @param string $string + * @param string $accessKeySecret + * + * @return string + */ + public static function shaHmac256sign($string, $accessKeySecret) + { + return base64_encode(hash_hmac('sha256', $string, $accessKeySecret, true)); + } + + /** + * @param string $string + * @param string $privateKey + * + * @return string + */ + public static function shaHmac256WithRsasign($string, $privateKey) + { + $binarySignature = ''; + try { + openssl_sign( + $string, + $binarySignature, + $privateKey, + \OPENSSL_ALGO_SHA256 + ); + } catch (Exception $exception) { + throw new InvalidArgumentException( + $exception->getMessage() + ); + } + + return base64_encode($binarySignature); + } + /** * @param string $string * @@ -140,6 +150,8 @@ class Request { if (Credentials::hasMock()) { $stack = HandlerStack::create(Credentials::getMock()); + $history = Credentials::getHandlerHistory(); + $stack->push($history); } else { $stack = HandlerStack::create(); } diff --git a/vendor/alibabacloud/credentials/src/RsaKeyPairCredential.php b/vendor/alibabacloud/credentials/src/RsaKeyPairCredential.php index bb47f6b..12e719e 100644 --- a/vendor/alibabacloud/credentials/src/RsaKeyPairCredential.php +++ b/vendor/alibabacloud/credentials/src/RsaKeyPairCredential.php @@ -2,13 +2,16 @@ namespace AlibabaCloud\Credentials; -use AlibabaCloud\Credentials\Providers\RsaKeyPairProvider; +use AlibabaCloud\Credentials\Providers\RsaKeyPairCredentialsProvider; +use AlibabaCloud\Credentials\Credential\CredentialModel; use AlibabaCloud\Credentials\Signature\ShaHmac1Signature; +use AlibabaCloud\Credentials\Utils\Filter; use Exception; use GuzzleHttp\Exception\GuzzleException; use InvalidArgumentException; /** + * @deprecated * Use the RSA key pair to complete the authentication (supported only on Japanese site) */ class RsaKeyPairCredential implements CredentialsInterface @@ -19,6 +22,11 @@ class RsaKeyPairCredential implements CredentialsInterface */ private $publicKeyId; + /** + * @var string + */ + private $privateKeyFile; + /** * @var string */ @@ -42,7 +50,8 @@ class RsaKeyPairCredential implements CredentialsInterface Filter::privateKeyFile($private_key_file); $this->publicKeyId = $public_key_id; - $this->config = $config; + $this->privateKeyFile = $private_key_file; + $this->config = $config; try { $this->privateKey = file_get_contents($private_key_file); } catch (Exception $exception) { @@ -117,13 +126,17 @@ class RsaKeyPairCredential implements CredentialsInterface } /** - * @return StsCredential + * @return AlibabaCloud\Credentials\Providers\Credentials * @throws Exception * @throws GuzzleException */ protected function getSessionCredential() { - return (new RsaKeyPairProvider($this))->get(); + $params = [ + 'publicKeyId' => $this->publicKeyId, + 'privateKeyFile' => $this->privateKeyFile, + ]; + return (new RsaKeyPairCredentialsProvider($params))->getCredentials(); } /** @@ -155,4 +168,18 @@ class RsaKeyPairCredential implements CredentialsInterface { return $this->getSessionCredential()->getExpiration(); } + + /** + * @inheritDoc + */ + public function getCredential() + { + $credentials = $this->getSessionCredential(); + return new CredentialModel([ + 'accessKeyId' => $credentials->getAccessKeyId(), + 'accessKeySecret' => $credentials->getAccessKeySecret(), + 'securityToken' => $credentials->getSecurityToken(), + 'type' => 'rsa_key_pair', + ]); + } } diff --git a/vendor/alibabacloud/credentials/src/StsCredential.php b/vendor/alibabacloud/credentials/src/StsCredential.php index 89a3a84..709a8ee 100644 --- a/vendor/alibabacloud/credentials/src/StsCredential.php +++ b/vendor/alibabacloud/credentials/src/StsCredential.php @@ -2,9 +2,12 @@ namespace AlibabaCloud\Credentials; +use AlibabaCloud\Credentials\Utils\Filter; +use AlibabaCloud\Credentials\Credential\CredentialModel; use AlibabaCloud\Credentials\Signature\ShaHmac1Signature; /** + * @deprecated * Use the STS Token to complete the authentication. */ class StsCredential implements CredentialsInterface @@ -42,10 +45,10 @@ class StsCredential implements CredentialsInterface { Filter::accessKey($access_key_id, $access_key_secret); Filter::expiration($expiration); - $this->accessKeyId = $access_key_id; + $this->accessKeyId = $access_key_id; $this->accessKeySecret = $access_key_secret; - $this->expiration = $expiration; - $this->securityToken = $security_token; + $this->expiration = $expiration; + $this->securityToken = $security_token; } /** @@ -95,4 +98,18 @@ class StsCredential implements CredentialsInterface { return new ShaHmac1Signature(); } + + /** + * @inheritDoc + */ + public function getCredential() + { + return new CredentialModel([ + 'accessKeyId' => $this->accessKeyId, + 'accessKeySecret' => $this->accessKeySecret, + 'securityToken' => $this->securityToken, + 'type' => 'sts', + ]); + } + } diff --git a/vendor/alibabacloud/credentials/src/Utils/Filter.php b/vendor/alibabacloud/credentials/src/Utils/Filter.php new file mode 100644 index 0000000..959fd8f --- /dev/null +++ b/vendor/alibabacloud/credentials/src/Utils/Filter.php @@ -0,0 +1,233 @@ + Some users may not be able to install due to network problems, you can try to switch the Composer mirror. + +## Changelog + +Detailed changes for each release are documented in the [release notes](CHANGELOG.md). + +## License + +[Apache-2.0](LICENSE.md) + +Copyright (c) 2009-present, Alibaba Cloud All rights reserved. diff --git a/vendor/alibabacloud/darabonba/composer.json b/vendor/alibabacloud/darabonba/composer.json new file mode 100644 index 0000000..4601982 --- /dev/null +++ b/vendor/alibabacloud/darabonba/composer.json @@ -0,0 +1,77 @@ +{ + "name": "alibabacloud/darabonba", + "homepage": "https://www.alibabacloud.com/", + "description": "Client of Darabonba for PHP", + "keywords": [ + "tea", + "client", + "alibabacloud", + "cloud" + ], + "type": "library", + "license": "Apache-2.0", + "support": { + "source": "https://github.com/aliyun/tea-php", + "issues": "https://github.com/aliyun/tea-php/issues" + }, + "authors": [ + { + "name": "Alibaba Cloud SDK", + "email": "sdk-team@alibabacloud.com", + "homepage": "http://www.alibabacloud.com" + } + ], + "require": { + "php": ">=5.5", + "ext-curl": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-openssl": "*", + "ext-simplexml": "*", + "ext-xmlwriter": "*", + "adbario/php-dot-notation": "^2.4", + "alibabacloud/tea": "^3.2", + "guzzlehttp/guzzle": "^6.3|^7.0" + }, + "require-dev": { + "symfony/dotenv": "^3.4", + "phpunit/phpunit": "^4.8.35|^5.4.3|^9.3", + "symfony/var-dumper": "^3.4" + }, + "suggest": { + "ext-sockets": "To use client-side monitoring" + }, + "autoload": { + "psr-4": { + "AlibabaCloud\\Dara\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "AlibabaCloud\\Dara\\Tests\\": "tests" + } + }, + "config": { + "sort-packages": true, + "preferred-install": "dist", + "optimize-autoloader": true + }, + "prefer-stable": true, + "minimum-stability": "dev", + "scripts": { + "cs": "phpcs --standard=PSR2 -n ./", + "cbf": "phpcbf --standard=PSR2 -n ./", + "fixer": "php-cs-fixer fix ./", + "unit": [ + "@clearCache", + "XDEBUG_MODE=coverage phpunit --testsuite=Unit --colors=always --coverage-xml ./coverage/xml --coverage-html ./coverage/html --coverage-clover ./coverage/coverage.clover" + ], + "feature": [ + "@clearCache", + "phpunit --testsuite=Feature --colors=always" + ], + "clearCache": "rm -rf cache/*", + "coverage": "open cache/coverage/index.html" + } +} diff --git a/vendor/alibabacloud/darabonba/src/Dara.php b/vendor/alibabacloud/darabonba/src/Dara.php new file mode 100644 index 0000000..36f470d --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/Dara.php @@ -0,0 +1,372 @@ +getPsrRequest(); + } + + $config = self::resolveConfig($config); + $res = self::client()->send( + $request, + $config + ); + + return new Response($res); + } + + /** + * @return PromiseInterface + */ + public static function sendAsync(RequestInterface $request, array $config = []) + { + if (method_exists($request, 'getPsrRequest')) { + $request = $request->getPsrRequest(); + } + + $config = self::resolveConfig($config); + + return self::client()->sendAsync( + $request, + $config + ); + } + + /** + * @return Client + */ + public static function client(array $config = []) + { + if (isset(self::$config['handler'])) { + $stack = self::$config['handler']; + } else { + $stack = HandlerStack::create(); + $stack->push(Middleware::mapResponse(static function (ResponseInterface $response) { + return new Response($response); + })); + } + + self::$config['handler'] = $stack; + + if (!isset(self::$config['on_stats'])) { + self::$config['on_stats'] = function (TransferStats $stats) { + Response::$info = $stats->getHandlerStats(); + }; + } + + $new_config = Helper::merge([self::$config, $config]); + return new Client($new_config); + } + + /** + * @param string $method + * @param string|UriInterface $uri + * @param array $options + * + * @throws GuzzleException + * + * @return ResponseInterface + */ + public static function request($method, $uri, $options = []) + { + return self::client()->request($method, $uri, $options); + } + + /** + * @param string $method + * @param string $uri + * @param array $options + * + * @throws GuzzleException + * + * @return string + */ + public static function string($method, $uri, $options = []) + { + return (string) self::client()->request($method, $uri, $options) + ->getBody(); + } + + /** + * @param string $method + * @param string|UriInterface $uri + * @param array $options + * + * @return PromiseInterface + */ + public static function requestAsync($method, $uri, $options = []) + { + return self::client()->requestAsync($method, $uri, $options); + } + + /** + * @param string|UriInterface $uri + * @param array $options + * + * @throws GuzzleException + * + * @return null|mixed + */ + public static function getHeaders($uri, $options = []) + { + return self::request('HEAD', $uri, $options)->getHeaders(); + } + + /** + * @param string|UriInterface $uri + * @param string $key + * @param null|mixed $default + * + * @throws GuzzleException + * + * @return null|mixed + */ + public static function getHeader($uri, $key, $default = null) + { + $headers = self::getHeaders($uri); + + return isset($headers[$key][0]) ? $headers[$key][0] : $default; + } + + /** + * @param int $retryTimes + * @param float $now + * + * @return bool + */ + public static function allowRetry(array $runtime, $retryTimes, $now) + { + unset($now); + if (!isset($retryTimes) || null === $retryTimes || !\is_numeric($retryTimes)) { + return false; + } + if ($retryTimes > 0 && (empty($runtime) || !isset($runtime['retryable']) || !$runtime['retryable'] || !isset($runtime['maxAttempts']))) { + return false; + } + $maxAttempts = $runtime['maxAttempts']; + $retry = empty($maxAttempts) ? 0 : (int) $maxAttempts; + + return $retry >= $retryTimes; + } + + /** + * @param int $retryTimes + * + * @return int + */ + public static function getBackoffTime(array $runtime, $retryTimes) + { + $backOffTime = 0; + $policy = isset($runtime['policy']) ? $runtime['policy'] : ''; + + if (empty($policy) || 'no' == $policy) { + return $backOffTime; + } + + $period = isset($runtime['period']) ? $runtime['period'] : ''; + if (null !== $period && '' !== $period) { + $backOffTime = (int) $period; + if ($backOffTime <= 0) { + return $retryTimes; + } + } + + return $backOffTime; + } + + public static function sleep($time) + { + sleep($time); + } + + public static function isRetryable($retry, $retryTimes = 0) + { + if ($retry instanceof DaraException) { + return true; + } + if (\is_array($retry)) { + $max = isset($retry['maxAttempts']) ? (int) ($retry['maxAttempts']) : 3; + + return $retryTimes <= $max; + } + + return false; + } + + + /** + * + * @param RetryOptions $options + * @param RetryPolicyContext $optctxions + * @return bool + */ + public static function shouldRetry($options, $ctx) { + if($ctx->getRetryCount() === 0) { + return true; + } + + if (!$options || !$options->getRetryable()) { + return false; + } + + $retriesAttempted = $ctx->getRetryCount(); + $ex = $ctx->getException(); + $conditions = $options->getNoRetryCondition(); + + foreach ($conditions as $condition) { + if (in_array($ex->getName(), $condition->getException()) || in_array($ex->getErrCode(), $condition->getErrorCode())) { + return false; + } + } + + $conditions = $options->getRetryCondition(); + foreach ($conditions as $condition) { + if (!in_array($ex->getName(), $condition->getException()) && !in_array($ex->getErrCode(), $condition->getErrorCode())) { + continue; + } + if ($retriesAttempted >= $condition->getMaxAttempts()) { + return false; + } + return true; + } + return false; + } + + /** + * + * @param RetryOptions $options + * @param RetryPolicyContext $optctxions + * @return int + */ + public static function getBackoffDelay($options, $ctx) { + $ex = $ctx->getException(); + $fullClassName = get_class($ex); + $classNameParts = explode('\\', $fullClassName); + $className = end($classNameParts); + $conditions = $options->getRetryCondition(); + foreach ($conditions as $condition) { + + if (!in_array($className, $condition->getException()) && !in_array($ex->getErrCode(), $condition->getErrorCode())) { + continue; + } + + $maxDelay = $condition->getMaxDelay() ?: self::MAX_DELAY_TIME; + $retryAfter = method_exists($ex, 'getRetryAfter') ? $ex->getRetryAfter() : null; + + if ($retryAfter !== null) { + return min($retryAfter, $maxDelay); + } + + + $backoff = $condition->getBackoff(); + if (!isset($backoff) || null === $backoff) { + return self::MIN_DELAY_TIME; + } + + return min($backoff->getDelayTime($ctx), $maxDelay); + } + + return self::MIN_DELAY_TIME; + } + + /** + * @param mixed|Model[] ...$item + * + * @return mixed + */ + public static function merge(...$item) + { + $tmp = []; + $n = 0; + foreach ($item as $i) { + if (\is_object($i)) { + if ($i instanceof Model) { + $i = $i->toMap(); + } else { + $i = json_decode(json_encode($i), true); + } + } + if (null === $i) { + continue; + } + if (\is_array($i)) { + $tmp[$n++] = $i; + } + } + + if (\count($tmp)) { + return \call_user_func_array('array_merge', $tmp); + } + + return []; + } + + private static function resolveConfig(array $config = []) + { + $options = new Dot(['http_errors' => false]); + if (isset($config['httpProxy']) && !empty($config['httpProxy'])) { + $options->set('proxy.http', $config['httpProxy']); + } + if (isset($config['httpsProxy']) && !empty($config['httpsProxy'])) { + $options->set('proxy.https', $config['httpsProxy']); + } + if (isset($config['noProxy']) && !empty($config['noProxy'])) { + $options->set('proxy.no', $config['noProxy']); + } + if (isset($config['ignoreSSL']) && !empty($config['ignoreSSL'])) { + $options->set('verify',!((bool)$config['ignoreSSL'])); + } + if (isset($config['stream']) && !empty($config['stream'])) { + $options->set(RequestOptions::STREAM, (bool)$config['stream']); + } + // readTimeout&connectTimeout unit is millisecond + $read_timeout = isset($config['readTimeout']) && !empty($config['readTimeout']) ? (int) $config['readTimeout'] : 3000; + $con_timeout = isset($config['connectTimeout']) && !empty($config['connectTimeout']) ? (int) $config['connectTimeout'] : 3000; + // timeout unit is second + $options->set('timeout', ($read_timeout + $con_timeout) / 1000); + + return $options->all(); + } +} diff --git a/vendor/alibabacloud/darabonba/src/Date.php b/vendor/alibabacloud/darabonba/src/Date.php new file mode 100644 index 0000000..8201e25 --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/Date.php @@ -0,0 +1,148 @@ +date = (new DateTime())->setTimestamp($date); + } elseif (preg_match($pattern, $date, $matches)) { + $timeStr = $matches[1]; + $tzStr = isset($matches[2]) ? $matches[2] : null; + + if ($tzStr) { + $timezone = new DateTimeZone($this->convertTzOffsetToTzString($tzStr)); + $this->date = DateTime::createFromFormat('Y-m-d H:i:s.u', $timeStr, $timezone); + } else { + $this->date = new DateTime($timeStr); + } + } else { + $this->date = new DateTime($date); + } + if($this->date === false || is_null($this->date)) { + throw new DaraException([], $date . ' is not a valid time str.'); + } + } + + private function convertTzOffsetToTzString($offset) { + $sign = (intval($offset) >= 0) ? '+' : '-'; + $hours = substr($offset, 0, 2); + $minutes = substr($offset, 2, 2); + return $sign . $hours . ':' . $minutes; + } + + public function format($layout) { + $layout = strtr($layout, [ + 'yyyy' => 'Y', 'yy' => 'y', + 'MM' => 'm', 'M' => 'n', + 'DD' => 'd', 'D' => 'j', + 'HH' => 'H', 'H' => 'G', + 'hh' => 'h', 'h' => 'g', + 'mm' => 'i', 'm' => 'i', + 'ss' => 's', 's' => 's', + 'A' => 'A', 'a' => 'a', + 'E' => 'N', 'YYYY' => 'Y', + ]); + return $this->date->format($layout); + } + + public function UTC($time = null) + { + $utcDate = clone $this->date; + $utcDate->setTimezone(new DateTimeZone('UTC')); + return $utcDate->format('Y-m-d H:i:s.u O \\U\\T\\C'); + } + + public function unix() { + $date = $this->date; + return $date->getTimestamp(); + } + + public function sub($unit, $amount) { + $interval = new DateInterval('P' . strtoupper($amount) . strtoupper((string)$unit)); + $this->date->sub($interval); + return $this; + } + + public function add($unit, $amount) { + $interval = new DateInterval('P' . strtoupper($amount) . strtoupper((string)$unit)); + $this->date->add($interval); + return $this; + } + + public function diff($diffDate, $unit = null) { + $interval = $this->date->diff($diffDate->getDateObject()); + switch ($unit) { + case 'year': + return $interval->y; + case 'month': + return $interval->m; + case 'day': + return $interval->d; + case 'hour': + return $interval->h; + case 'minute': + return $interval->i; + case 'second': + return $interval->s; + default: + return ($interval->days * 24 * 60 * 60) + + ($interval->h * 60 * 60) + + ($interval->i * 60) + + $interval->s; + } + } + + public function hour() { + return (int)$this->date->format('H'); + } + + public function minute() { + return (int)$this->date->format('i'); + } + + public function second() { + return (int)$this->date->format('s'); + } + + public function month() { + return (int)$this->date->format('n'); + } + + public function year() { + return (int)$this->date->format('Y'); + } + + public function dayOfMonth() { + return (int)$this->date->format('j'); + } + + public function dayOfWeek() { + $weekday = (int)$this->date->format('w'); + return $weekday === 0 ? 7 : $weekday; + } + + public function weekOfYear() { + $week = (int)$this->date->format('W'); + $weekday = (int)$this->date->format('w'); + + if ($weekday === 0 && $this->date->format('z') === (string)($this->date->format('L') ? '365' : '364')) { + return (int)$this->date->sub(new DateInterval('P1D'))->format('W'); + } + + return $week; + } + + public function getDateObject() { + return clone $this->date; + } +} diff --git a/vendor/alibabacloud/darabonba/src/Exception/DaraException.php b/vendor/alibabacloud/darabonba/src/Exception/DaraException.php new file mode 100644 index 0000000..73f2ece --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/Exception/DaraException.php @@ -0,0 +1,67 @@ +errorInfo = $errorInfo; + $this->name = 'BaseError'; + if (!empty($errorInfo)) { + $properties = ['name', 'message', 'errCode', 'data', 'description', 'accessDeniedDetail']; + foreach ($properties as $property) { + if (isset($errorInfo[$property])) { + $this->{$property} = $errorInfo[$property]; + } + } + } + } + + /** + * @return array + */ + public function getName() + { + return $this->name; + } + + /** + * @return string + */ + public function getErrCode() + { + return $this->errCode; + } + + /** + * @return array + */ + public function getErrorInfo() + { + return $this->errorInfo; + } +} diff --git a/vendor/alibabacloud/darabonba/src/Exception/DaraRespException.php b/vendor/alibabacloud/darabonba/src/Exception/DaraRespException.php new file mode 100644 index 0000000..7da8e78 --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/Exception/DaraRespException.php @@ -0,0 +1,88 @@ +name = 'ResponseError'; + if (!empty($errorInfo)) { + $properties = ['retryAfter', 'statusCode', 'data', 'description', 'accessDeniedDetail']; + foreach ($properties as $property) { + if (isset($errorInfo[$property])) { + $this->{$property} = $errorInfo[$property]; + if ($property === 'data' && isset($errorInfo['data']['statusCode'])) { + $this->statusCode = $errorInfo['data']['statusCode']; + } + } + } + } + } + + /** + * @return array + */ + public function getErrorInfo() + { + return $this->errorInfo; + } + + /** + * @return int + */ + public function getStatusCode() + { + return $this->statusCode; + } + + /** + * @return int + */ + public function getRetryAfter() + { + return $this->retryAfter; + } + + /** + * @return array + */ + public function getAccessDeniedDetail() + { + return $this->accessDeniedDetail; + } + + /** + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * @return array + */ + public function getData() + { + return $this->data; + } +} diff --git a/vendor/alibabacloud/darabonba/src/Exception/DaraRetryException.php b/vendor/alibabacloud/darabonba/src/Exception/DaraRetryException.php new file mode 100644 index 0000000..7426737 --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/Exception/DaraRetryException.php @@ -0,0 +1,21 @@ +getException(); + $lastRequest = $lastRequest->getHttpRequest(); + } + $error_info = []; + if (null !== $lastException && $lastException instanceof DaraException) { + $error_info = $lastException->getErrorInfo(); + } + parent::__construct($error_info, $lastException->getMessage(), $lastException->getCode(), $lastException); + $this->lastRequest = $lastRequest; + $this->lastException = $lastException; + } + + public function getLastRequest() + { + return $this->lastRequest; + } + + public function getLastException() + { + return $this->lastException; + } +} diff --git a/vendor/alibabacloud/darabonba/src/File.php b/vendor/alibabacloud/darabonba/src/File.php new file mode 100644 index 0000000..118b56e --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/File.php @@ -0,0 +1,116 @@ +_path = $path; + } + + public function path() { + return $this->_path; + } + + public function createTime() { + if (!$this->_stat) { + $this->_stat = stat($this->_path); + } + return new Date($this->_stat['ctime']); + } + + public function modifyTime() { + if (!$this->_stat) { + $this->_stat = stat($this->_path); + } + return new Date($this->_stat['mtime']); + } + + public function length() { + if (!$this->_stat) { + $this->_stat = stat($this->_path); + } + return $this->_stat['size']; + } + + public function read($size) { + if (!$this->_fd) { + $this->_fd = fopen($this->_path, 'a+'); + } + $position = ftell($this->_fd); + $position = ftell($this->_fd); + fseek($this->_fd, $this->_position); + $data = fread($this->_fd, $size); + $bytesRead = strlen($data); + if (!$bytesRead) { + return null; + } + $this->_position += $bytesRead; + return $data; + } + + public function write($data) { + if (!$this->_fd) { + $this->_fd = fopen($this->_path, 'a+'); + } + + fwrite($this->_fd, $data); + fflush($this->_fd); + clearstatcache(); + $this->_stat = stat($this->_path); + } + + public function close() { + if ($this->_fd) { + fclose($this->_fd); + $this->_fd = false; + } + } + + /** + * + * @param string $path + * @return bool + */ + public static function exists($path) { + return file_exists($path); + } + + /** + * + * @param string $path + * @return Stream + */ + public static function createReadStream($path) { + try { + $stream = Utils::streamFor(fopen($path, 'r')); + return $stream; + } catch (Exception $e) { + throw new DaraException([], "Unable to open file for reading: " . $e->getMessage()); + } + } + + /** + * + * @param string $path + * @return Stream + */ + public static function createWriteStream($path) { + try { + $stream = Utils::streamFor(fopen($path, 'a+')); + return $stream; + } catch (Exception $e) { + throw new DaraException([], "Unable to open file for writing: " . $e->getMessage()); + } + } +} diff --git a/vendor/alibabacloud/darabonba/src/Helper.php b/vendor/alibabacloud/darabonba/src/Helper.php new file mode 100644 index 0000000..77e8cdc --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/Helper.php @@ -0,0 +1,112 @@ + $ord) { + if ($k !== $i) { + return false; + } + if (!\is_int($ord)) { + return false; + } + if ($ord < 0 || $ord > 255) { + return false; + } + ++$i; + } + + return true; + } + + /** + * Convert a bytes to string(utf8). + * + * @param array $bytes + * + * @return string the return string + */ + public static function toString($bytes) + { + $str = ''; + foreach ($bytes as $ch) { + $str .= \chr($ch); + } + + return $str; + } + + /** + * @return array + */ + public static function merge(array $arrays) + { + $result = []; + foreach ($arrays as $array) { + foreach ($array as $key => $value) { + if (\is_int($key)) { + $result[] = $value; + + continue; + } + + if (isset($result[$key]) && \is_array($result[$key])) { + $result[$key] = self::merge( + [$result[$key], $value] + ); + + continue; + } + + $result[$key] = $value; + } + } + + return $result; + } +} diff --git a/vendor/alibabacloud/darabonba/src/Model.php b/vendor/alibabacloud/darabonba/src/Model.php new file mode 100644 index 0000000..10d8d83 --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/Model.php @@ -0,0 +1,138 @@ + $v) { + $this->{$k} = $v; + } + } + } + + public function getName($name = null) + { + if (null === $name) { + return $this->_name; + } + + return isset($this->_name[$name]) ? $this->_name[$name] : $name; + } + + public function toMap() + { + $map = get_object_vars($this); + foreach ($map as $k => $m) { + if (0 === strpos($k, '_')) { + unset($map[$k]); + } + } + $res = []; + foreach ($map as $k => $v) { + $name = isset($this->_name[$k]) ? $this->_name[$k] : $k; + $res[$name] = $v; + } + + return $res; + } + + public function validate() + { + $vars = get_object_vars($this); + foreach ($vars as $k => $v) { + if (isset($this->_required[$k]) && $this->_required[$k] && empty($v)) { + throw new \InvalidArgumentException("{$k} is required."); + } + } + } + + public function copyWithoutStream() { + $map = $this->toArray(true); + $calledClass = get_called_class(); + + if (method_exists($calledClass, 'fromMap')) { + return $calledClass::fromMap($map); + } + return null; + } + + public static function validateRequired($fieldName, $field, $val = null) + { + if (true === $val && null === $field) { + throw new \InvalidArgumentException($fieldName . ' is required'); + } + } + + public static function validateMaxLength($fieldName, $field, $val = null) + { + if (null !== $field && \strlen($field) > (int) $val) { + throw new \InvalidArgumentException($fieldName . ' is exceed max-length: ' . $val); + } + } + + public static function validateMinLength($fieldName, $field, $val = null) + { + if (null !== $field && \strlen($field) < (int) $val) { + throw new \InvalidArgumentException($fieldName . ' is less than min-length: ' . $val); + } + } + + public static function validatePattern($fieldName, $field, $regex = '') + { + if (null !== $field && '' !== $field && !preg_match("/^{$regex}$/", $field)) { + throw new \InvalidArgumentException($fieldName . ' is not match ' . $regex); + } + } + + public static function validateMaximum($fieldName, $field, $val) + { + if (null !== $field && $field > $val) { + throw new \InvalidArgumentException($fieldName . ' cannot be greater than ' . $val); + } + } + + public static function validateMinimum($fieldName, $field, $val) + { + if (null !== $field && $field < $val) { + throw new \InvalidArgumentException($fieldName . ' cannot be less than ' . $val); + } + } + + public static function validateArray($arr) + { + if (null === $arr) { + return; + } + foreach($arr as $item) { + if($item instanceof Model) { + $item->validate(); + } else if(is_array($item)){ + self::validateArray($item); + } + } + } + + /** + * @param array $map + * @param Model $model + * + * @return mixed + */ + public static function toModel($map, $model) + { + $names = $model->getName(); + $names = array_flip($names); + foreach ($map as $key => $value) { + $name = isset($names[$key]) ? $names[$key] : $key; + $model->{$name} = $value; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/darabonba/src/Models/ExtendsParameters.php b/vendor/alibabacloud/darabonba/src/Models/ExtendsParameters.php new file mode 100644 index 0000000..f32e82c --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/Models/ExtendsParameters.php @@ -0,0 +1,39 @@ +headers) { + $res['headers'] = $this->headers; + } + + if (null !== $this->queries) { + $res['queries'] = $this->queries; + } + return $res; + } + /** + * @param array $map + * @return ExtendsParameters + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + + if(isset($map['queries'])){ + $model->queries = $map['queries']; + } + return $model; + } + +} \ No newline at end of file diff --git a/vendor/alibabacloud/darabonba/src/Models/FileField.php b/vendor/alibabacloud/darabonba/src/Models/FileField.php new file mode 100644 index 0000000..f39e185 --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/Models/FileField.php @@ -0,0 +1,22 @@ +_required = [ + 'filename' => true, + 'contentType' => true, + 'content' => true, + ]; + parent::__construct($config); + } +} \ No newline at end of file diff --git a/vendor/alibabacloud/darabonba/src/Models/RuntimeOptions.php b/vendor/alibabacloud/darabonba/src/Models/RuntimeOptions.php new file mode 100644 index 0000000..aeb029a --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/Models/RuntimeOptions.php @@ -0,0 +1,273 @@ + 'autoretry', + 'ignoreSSL' => 'ignoreSSL', + 'key' => 'key', + 'cert' => 'cert', + 'ca' => 'ca', + 'maxAttempts' => 'max_attempts', + 'backoffPolicy' => 'backoff_policy', + 'backoffPeriod' => 'backoff_period', + 'readTimeout' => 'readTimeout', + 'connectTimeout' => 'connectTimeout', + 'httpProxy' => 'httpProxy', + 'httpsProxy' => 'httpsProxy', + 'noProxy' => 'noProxy', + 'maxIdleConns' => 'maxIdleConns', + 'localAddr' => 'localAddr', + 'socks5Proxy' => 'socks5Proxy', + 'socks5NetWork' => 'socks5NetWork', + 'keepAlive' => 'keepAlive', + ]; + public function validate() {} + public function toMap() { + $res = []; + if (null !== $this->autoretry) { + $res['autoretry'] = $this->autoretry; + } + if (null !== $this->ignoreSSL) { + $res['ignoreSSL'] = $this->ignoreSSL; + } + if (null !== $this->key) { + $res['key'] = $this->key; + } + if (null !== $this->cert) { + $res['cert'] = $this->cert; + } + if (null !== $this->ca) { + $res['ca'] = $this->ca; + } + if (null !== $this->maxAttempts) { + $res['max_attempts'] = $this->maxAttempts; + } + if (null !== $this->backoffPolicy) { + $res['backoff_policy'] = $this->backoffPolicy; + } + if (null !== $this->backoffPeriod) { + $res['backoff_period'] = $this->backoffPeriod; + } + if (null !== $this->readTimeout) { + $res['readTimeout'] = $this->readTimeout; + } + if (null !== $this->connectTimeout) { + $res['connectTimeout'] = $this->connectTimeout; + } + if (null !== $this->httpProxy) { + $res['httpProxy'] = $this->httpProxy; + } + if (null !== $this->httpsProxy) { + $res['httpsProxy'] = $this->httpsProxy; + } + if (null !== $this->noProxy) { + $res['noProxy'] = $this->noProxy; + } + if (null !== $this->maxIdleConns) { + $res['maxIdleConns'] = $this->maxIdleConns; + } + if (null !== $this->localAddr) { + $res['localAddr'] = $this->localAddr; + } + if (null !== $this->socks5Proxy) { + $res['socks5Proxy'] = $this->socks5Proxy; + } + if (null !== $this->socks5NetWork) { + $res['socks5NetWork'] = $this->socks5NetWork; + } + if (null !== $this->keepAlive) { + $res['keepAlive'] = $this->keepAlive; + } + if (null !== $this->extendsParameters) { + $res['extendsParameters'] = null !== $this->extendsParameters ? $this->extendsParameters->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return RuntimeOptions + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['autoretry'])){ + $model->autoretry = $map['autoretry']; + } + if(isset($map['ignoreSSL'])){ + $model->ignoreSSL = $map['ignoreSSL']; + } + if(isset($map['key'])){ + $model->key = $map['key']; + } + if(isset($map['cert'])){ + $model->cert = $map['cert']; + } + if(isset($map['ca'])){ + $model->ca = $map['ca']; + } + if(isset($map['max_attempts'])){ + $model->maxAttempts = $map['max_attempts']; + } + if(isset($map['backoff_policy'])){ + $model->backoffPolicy = $map['backoff_policy']; + } + if(isset($map['backoff_period'])){ + $model->backoffPeriod = $map['backoff_period']; + } + if(isset($map['readTimeout'])){ + $model->readTimeout = $map['readTimeout']; + } + if(isset($map['connectTimeout'])){ + $model->connectTimeout = $map['connectTimeout']; + } + if(isset($map['httpProxy'])){ + $model->httpProxy = $map['httpProxy']; + } + if(isset($map['httpsProxy'])){ + $model->httpsProxy = $map['httpsProxy']; + } + if(isset($map['noProxy'])){ + $model->noProxy = $map['noProxy']; + } + if(isset($map['maxIdleConns'])){ + $model->maxIdleConns = $map['maxIdleConns']; + } + if(isset($map['localAddr'])){ + $model->localAddr = $map['localAddr']; + } + if(isset($map['socks5Proxy'])){ + $model->socks5Proxy = $map['socks5Proxy']; + } + if(isset($map['socks5NetWork'])){ + $model->socks5NetWork = $map['socks5NetWork']; + } + if(isset($map['keepAlive'])){ + $model->keepAlive = $map['keepAlive']; + } + if(isset($map['extendsParameters'])){ + $model->extendsParameters = ExtendsParameters::fromMap($map['extendsParameters']); + } + return $model; + } + /** + * @description whether to try again + * @var bool + */ + public $autoretry; + + /** + * @description ignore SSL validation + * @var bool + */ + public $ignoreSSL; + + /** + * @description privite key for client certificate + * @var string + */ + public $key; + + /** + * @description client certificate + * @var string + */ + public $cert; + + /** + * @description server certificate + * @var string + */ + public $ca; + + /** + * @description maximum number of retries + * @var int + */ + public $maxAttempts; + + /** + * @description backoff policy + * @var string + */ + public $backoffPolicy; + + /** + * @description backoff period + * @var int + */ + public $backoffPeriod; + + /** + * @description read timeout + * @var int + */ + public $readTimeout; + + /** + * @description connect timeout + * @var int + */ + public $connectTimeout; + + /** + * @description http proxy url + * @var string + */ + public $httpProxy; + + /** + * @description https Proxy url + * @var string + */ + public $httpsProxy; + + /** + * @description agent blacklist + * @var string + */ + public $noProxy; + + /** + * @description maximum number of connections + * @var int + */ + public $maxIdleConns; + + /** + * @description local addr + * @var string + */ + public $localAddr; + + /** + * @description SOCKS5 proxy + * @var string + */ + public $socks5Proxy; + + /** + * @description SOCKS5 netWork + * @var string + */ + public $socks5NetWork; + + /** + * @description whether to enable keep-alive + * @var bool + */ + public $keepAlive; + + /** + * @description Extends Parameters + * @var ExtendsParameters + */ + public $extendsParameters; + +} \ No newline at end of file diff --git a/vendor/alibabacloud/darabonba/src/Models/SSEEvent.php b/vendor/alibabacloud/darabonba/src/Models/SSEEvent.php new file mode 100644 index 0000000..68e25ae --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/Models/SSEEvent.php @@ -0,0 +1,76 @@ +data = isset($data['data']) ? $data['data'] : null; + $this->id = isset($data['id']) ? $data['id'] : null; + $this->event = isset($data['event']) ? $data['event'] : null; + $this->retry = isset($data['retry']) ? $data['retry'] : null; + } + + public function validate() { } + + public function toArray() + { + $res = []; + if (null !== $this->data) { + $res['data'] = $this->data; + } + + if (null !== $this->id) { + $res['id'] = $this->id; + } + + if (null !== $this->event) { + $res['event'] = $this->event; + } + + if (null !== $this->retry) { + $res['retry'] = $this->retry; + } + + return $res; + } + + public function toMap() + { + return $this->toArray(); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['data'])) { + if(!empty($map['data'])){ + $model->data = []; + foreach($map['data'] as $key => $value) { + $model->data[$key] = $value; + } + } + } + + if (isset($map['id'])) { + $model->id = $map['id']; + } + + if (isset($map['event'])) { + $model->event = $map['event']; + } + + if (isset($map['retry'])) { + $model->retry = $map['retry']; + } + + return $res; + } + +} \ No newline at end of file diff --git a/vendor/alibabacloud/darabonba/src/Parameter.php b/vendor/alibabacloud/darabonba/src/Parameter.php new file mode 100644 index 0000000..949dd30 --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/Parameter.php @@ -0,0 +1,50 @@ +toArray()); + } + + /** + * @return array + */ + public function getRealParameters() + { + $array = []; + $obj = new ReflectionObject($this); + $properties = $obj->getProperties(); + + foreach ($properties as $property) { + $docComment = $property->getDocComment(); + $key = trim(Helper::findFromString($docComment, '@real', "\n")); + $value = $property->getValue($this); + $array[$key] = $value; + } + + return $array; + } + + /** + * @return array + */ + public function toArray() + { + return $this->getRealParameters(); + } +} diff --git a/vendor/alibabacloud/darabonba/src/Request.php b/vendor/alibabacloud/darabonba/src/Request.php new file mode 100644 index 0000000..74aef42 --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/Request.php @@ -0,0 +1,123 @@ +method = $method; + } + + /** + * These fields are compatible if you define other fields. + * Mainly for compatibility situations where the code generator cannot generate set properties. + * + * @return PsrRequest + */ + public function getPsrRequest() + { + $this->assertQuery($this->query); + + $request = clone $this; + + $uri = $request->getUri(); + if ($this->query) { + $uri = $uri->withQuery(http_build_query($this->query)); + } + + if ($this->port) { + $uri = $uri->withPort($this->port); + } + + if ($this->protocol) { + $uri = $uri->withScheme($this->protocol); + } + + if ($this->pathname) { + $uri = $uri->withPath($this->pathname); + } + + if (isset($this->headers['host'])) { + $uri = $uri->withHost($this->headers['host']); + } + + $request = $request->withUri($uri); + $request = $request->withMethod($this->method); + + if ('' !== $this->body && null !== $this->body) { + if ($this->body instanceof StreamInterface) { + $request = $request->withBody($this->body); + } else { + $body = $this->body; + if (Helper::isBytes($this->body)) { + $body = Helper::toString($this->body); + } + if (\function_exists('\GuzzleHttp\Psr7\stream_for')) { + // @deprecated stream_for will be removed in guzzlehttp/psr7:2.0 + $request = $request->withBody(\GuzzleHttp\Psr7\stream_for($body)); + } else { + $request = $request->withBody(\GuzzleHttp\Psr7\Utils::streamFor($body)); + } + } + } + + if ($this->headers) { + foreach ($this->headers as $key => $value) { + $request = $request->withHeader($key, $value); + } + } + + return $request; + } + + /** + * @param array $query + */ + private function assertQuery($query) + { + if (!\is_array($query) && $query !== null) { + throw new InvalidArgumentException('Query must be array.'); + } + } +} diff --git a/vendor/alibabacloud/darabonba/src/Response.php b/vendor/alibabacloud/darabonba/src/Response.php new file mode 100644 index 0000000..d53ae08 --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/Response.php @@ -0,0 +1,379 @@ +getStatusCode(), + $response->getHeaders(), + $response->getBody(), + $response->getProtocolVersion(), + $response->getReasonPhrase() + ); + $this->headers = $response->getHeaders(); + $this->body = $response->getBody(); + $this->statusCode = $response->getStatusCode(); + if ($this->body->isSeekable()) { + $this->body->seek(0); + } + + $contentType = $this->getHeaderLine('Content-Type'); + + if(StringUtil::hasPrefix($contentType, 'text/event-stream')) { + return; + } + + if (Helper::isJson((string) $this->getBody())) { + $this->dot = new Dot($this->toArray()); + } else { + $this->dot = new Dot(); + } + } + + /** + * @return string + */ + public function __toString() + { + return (string) $this->getBody(); + } + + /** + * @param string $name + * + * @return null|mixed + */ + public function __get($name) + { + $data = $this->dot->all(); + if (!isset($data[$name])) { + return null; + } + + return json_decode(json_encode($data))->{$name}; + } + + /** + * @param string $name + * @param mixed $value + */ + public function __set($name, $value) + { + $this->dot->set($name, $value); + } + + /** + * @param string $name + * + * @return bool + */ + public function __isset($name) + { + return $this->dot->has($name); + } + + /** + * @param $offset + */ + public function __unset($offset) + { + $this->dot->delete($offset); + } + + /** + * @return array + */ + public function toArray() + { + return \GuzzleHttp\json_decode((string) $this->getBody(), true); + } + + /** + * @param array|int|string $keys + * @param mixed $value + */ + public function add($keys, $value = null) + { + return $this->dot->add($keys, $value); + } + + /** + * @return array + */ + public function all() + { + return $this->dot->all(); + } + + /** + * @param null|array|int|string $keys + */ + public function clear($keys = null) + { + return $this->dot->clear($keys); + } + + /** + * @param array|int|string $keys + */ + public function delete($keys) + { + return $this->dot->delete($keys); + } + + /** + * @param string $delimiter + * @param null|array $items + * @param string $prepend + * + * @return array + */ + public function flatten($delimiter = '.', $items = null, $prepend = '') + { + return $this->dot->flatten($delimiter, $items, $prepend); + } + + /** + * @param null|int|string $key + * @param mixed $default + * + * @return mixed + */ + public function get($key = null, $default = null) + { + return $this->dot->get($key, $default); + } + + /** + * @param array|int|string $keys + * + * @return bool + */ + public function has($keys) + { + return $this->dot->has($keys); + } + + /** + * @param null|array|int|string $keys + * + * @return bool + */ + public function isEmpty($keys = null) + { + return $this->dot->isEmpty($keys); + } + + /** + * @param array|self|string $key + * @param array|self $value + */ + public function merge($key, $value = []) + { + return $this->dot->merge($key, $value); + } + + /** + * @param array|self|string $key + * @param array|self $value + */ + public function mergeRecursive($key, $value = []) + { + return $this->dot->mergeRecursive($key, $value); + } + + /** + * @param array|self|string $key + * @param array|self $value + */ + public function mergeRecursiveDistinct($key, $value = []) + { + return $this->dot->mergeRecursiveDistinct($key, $value); + } + + /** + * @param null|int|string $key + * @param mixed $default + * + * @return mixed + */ + public function pull($key = null, $default = null) + { + return $this->dot->pull($key, $default); + } + + /** + * @param null|int|string $key + * @param mixed $value + * + * @return mixed + */ + public function push($key = null, $value = null) + { + return $this->dot->push($key, $value); + } + + /** + * Replace all values or values within the given key + * with an array or Dot object. + * + * @param array|self|string $key + * @param array|self $value + */ + public function replace($key, $value = []) + { + return $this->dot->replace($key, $value); + } + + /** + * Set a given key / value pair or pairs. + * + * @param array|int|string $keys + * @param mixed $value + */ + public function set($keys, $value = null) + { + return $this->dot->set($keys, $value); + } + + /** + * Replace all items with a given array. + * + * @param mixed $items + */ + public function setArray($items) + { + return $this->dot->setArray($items); + } + + /** + * Replace all items with a given array as a reference. + */ + public function setReference(array &$items) + { + return $this->dot->setReference($items); + } + + /** + * Return the value of a given key or all the values as JSON. + * + * @param mixed $key + * @param int $options + * + * @return string + */ + public function toJson($key = null, $options = 0) + { + return $this->dot->toJson($key, $options); + } + + /** + * Retrieve an external iterator. + */ + #[\ReturnTypeWillChange] + public function getIterator() + { + return $this->dot->getIterator(); + } + + /** + * Whether a offset exists. + * + * @param $offset + * + * @return bool + */ + #[\ReturnTypeWillChange] + public function offsetExists($offset) + { + return $this->dot->offsetExists($offset); + } + + /** + * Offset to retrieve. + * + * @param $offset + * + * @return mixed + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->dot->offsetGet($offset); + } + + /** + * Offset to set. + * + * @param $offset + * @param $value + */ + #[\ReturnTypeWillChange] + public function offsetSet($offset, $value) + { + $this->dot->offsetSet($offset, $value); + } + + /** + * Offset to unset. + * + * @param $offset + */ + #[\ReturnTypeWillChange] + public function offsetUnset($offset) + { + $this->dot->offsetUnset($offset); + } + + /** + * Count elements of an object. + * + * @param null $key + * + * @return int + */ + #[\ReturnTypeWillChange] + public function count($key = null) + { + return $this->dot->count($key); + } +} diff --git a/vendor/alibabacloud/darabonba/src/RetryPolicy/BackoffPolicy.php b/vendor/alibabacloud/darabonba/src/RetryPolicy/BackoffPolicy.php new file mode 100644 index 0000000..6d3d42e --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/RetryPolicy/BackoffPolicy.php @@ -0,0 +1,46 @@ +policy = $option['policy']; + } + + abstract public function getDelayTime($ctx); + + public static function newBackoffPolicy($option) { + switch($option['policy']) { + case 'Fixed': + return new FixedBackoffPolicy($option); + case 'Random': + return new RandomBackoffPolicy($option); + case 'Exponential': + return new ExponentialBackoffPolicy($option); + case 'EqualJitter': + case 'ExponentialWithEqualJitter': + return new EqualJitterBackoffPolicy($option); + case 'FullJitter': + case 'ExponentialWithFullJitter': + return new FullJitterBackoffPolicy($option); + default: + throw new DaraException([], "Invalid backoff policy"); + } + } +} + diff --git a/vendor/alibabacloud/darabonba/src/RetryPolicy/EqualJitterBackoffPolicy.php b/vendor/alibabacloud/darabonba/src/RetryPolicy/EqualJitterBackoffPolicy.php new file mode 100644 index 0000000..3bb76b0 --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/RetryPolicy/EqualJitterBackoffPolicy.php @@ -0,0 +1,27 @@ +period = $option['period']; + // Default: 3 days + $this->cap = isset($option['cap']) ? $option['cap'] : 3 * 24 * 60 * 60 * 1000; + } + + public function getDelayTime($ctx) { + $ceil = min(pow(2, $ctx->getRetryCount() * $this->period), $this->cap); + return $ceil / 2 + mt_rand(0, $ceil / 2); + } +} diff --git a/vendor/alibabacloud/darabonba/src/RetryPolicy/ExponentialBackoffPolicy.php b/vendor/alibabacloud/darabonba/src/RetryPolicy/ExponentialBackoffPolicy.php new file mode 100644 index 0000000..f12431a --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/RetryPolicy/ExponentialBackoffPolicy.php @@ -0,0 +1,27 @@ +period = $option['period']; + // Default: 3 days + $this->cap = isset($option['cap']) ? $option['cap'] : 3 * 24 * 60 * 60 * 1000; + } + + public function getDelayTime($ctx) { + $randomTime = pow(2, $ctx->getRetryCount() * $this->period); + return ($randomTime > $this->cap) ? $this->cap : $randomTime; + } +} diff --git a/vendor/alibabacloud/darabonba/src/RetryPolicy/FixedBackoffPolicy.php b/vendor/alibabacloud/darabonba/src/RetryPolicy/FixedBackoffPolicy.php new file mode 100644 index 0000000..6e2610c --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/RetryPolicy/FixedBackoffPolicy.php @@ -0,0 +1,24 @@ +period = $option['period']; + } + + public function getDelayTime($ctx) { + return $this->period; + } +} + diff --git a/vendor/alibabacloud/darabonba/src/RetryPolicy/FullJitterBackoffPolicy.php b/vendor/alibabacloud/darabonba/src/RetryPolicy/FullJitterBackoffPolicy.php new file mode 100644 index 0000000..87e824d --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/RetryPolicy/FullJitterBackoffPolicy.php @@ -0,0 +1,27 @@ +period = $option['period']; + // Default: 3 days + $this->cap = isset($option['cap']) ? $option['cap'] : 3 * 24 * 60 * 60 * 1000; + } + + public function getDelayTime($ctx) { + $ceil = min(pow(2, $ctx->getRetryCount() * $this->period), $this->cap); + return mt_rand(0, $ceil); + } +} diff --git a/vendor/alibabacloud/darabonba/src/RetryPolicy/RandomBackoffPolicy.php b/vendor/alibabacloud/darabonba/src/RetryPolicy/RandomBackoffPolicy.php new file mode 100644 index 0000000..41f21ad --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/RetryPolicy/RandomBackoffPolicy.php @@ -0,0 +1,26 @@ +period = $option['period']; + $this->cap = isset($option['cap']) ? $option['cap'] : 20000; + } + + public function getDelayTime($ctx) { + $randomTime = mt_rand(0, $ctx->getRetryCount() * $this->period); + return ($randomTime > $this->cap) ? $this->cap : $randomTime; + } +} diff --git a/vendor/alibabacloud/darabonba/src/RetryPolicy/RetryCondition.php b/vendor/alibabacloud/darabonba/src/RetryPolicy/RetryCondition.php new file mode 100644 index 0000000..cfff649 --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/RetryPolicy/RetryCondition.php @@ -0,0 +1,62 @@ +maxAttempts = $condition['maxAttempts']; + } + + $this->backoff = isset($condition['backoff']) ? $condition['backoff'] : null; + $this->exception = isset($condition['exception']) ? $condition['exception'] : []; + $this->errorCode = isset($condition['errorCode']) ? $condition['errorCode'] : []; + $this->maxDelay = isset($condition['maxDelay']) ? $condition['maxDelay'] : []; + } + + + /** + * @return int + */ + public function getMaxAttempts() { + return $this->maxAttempts; + } + + /** + * @return BackoffPolicy + */ + public function getBackoff() { + return $this->backoff; + } + + /** + * @return string[] + */ + public function getException() { + return $this->exception; + } + + /** + * @return string[] + */ + public function getErrorCode() { + return $this->errorCode; + } + + /** + * @return int + */ + public function getMaxDelay() { + return $this->maxDelay; + } +} \ No newline at end of file diff --git a/vendor/alibabacloud/darabonba/src/RetryPolicy/RetryOptions.php b/vendor/alibabacloud/darabonba/src/RetryPolicy/RetryOptions.php new file mode 100644 index 0000000..9b5c516 --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/RetryPolicy/RetryOptions.php @@ -0,0 +1,50 @@ +retryable = $options['retryable']; + $this->retryCondition = array_map(function ($condition) { + if($condition instanceof RetryCondition) { + return $condition; + } + return new RetryCondition($condition); + }, isset($options['retryCondition']) ? $options['retryCondition'] : []); + + $this->noRetryCondition = array_map(function ($condition) { + if($condition instanceof RetryCondition) { + return $condition; + } + return new RetryCondition($condition); + }, isset($options['noRetryCondition']) ? $options['noRetryCondition'] : []); + } + + /** + * @return bool + */ + public function getRetryable() { + return $this->retryable; + } + + /** + * @return RetryCondition[] + */ + public function getRetryCondition() { + return $this->retryCondition; + } + + /** + * @return RetryCondition[] + */ + public function getNoRetryCondition() { + return $this->noRetryCondition; + } +} \ No newline at end of file diff --git a/vendor/alibabacloud/darabonba/src/RetryPolicy/RetryPolicyContext.php b/vendor/alibabacloud/darabonba/src/RetryPolicy/RetryPolicyContext.php new file mode 100644 index 0000000..a349a7c --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/RetryPolicy/RetryPolicyContext.php @@ -0,0 +1,64 @@ +key = isset($options['key']) ? $options['key'] : ''; + $this->retriesAttempted = isset($options['retriesAttempted']) ? $options['retriesAttempted'] : 0; + $this->httpRequest = isset($options['httpRequest']) ? $options['httpRequest'] : null; + $this->httpResponse = isset($options['httpResponse']) ? $options['httpResponse'] : null; + $this->exception = isset($options['exception']) ? $options['exception'] : null; + } + + /** + * + * @return int + */ + public function getRetryCount(){ + return $this->retriesAttempted; + } + + /** + * + * @return string + */ + public function getKey() { + return $this->key; + } + + /** + * + * @return Request + */ + public function getHttpRequest() { + return $this->httpRequest; + } + + /** + * + * @return Response + */ + public function getHttpResponse() { + return $this->httpResponse; + } + + /** + * + * @return DaraException + */ + public function getException() { + return $this->exception; + } +} \ No newline at end of file diff --git a/vendor/alibabacloud/darabonba/src/Url.php b/vendor/alibabacloud/darabonba/src/Url.php new file mode 100644 index 0000000..28b569f --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/Url.php @@ -0,0 +1,152 @@ +url = $str; + } + + public function path() { + if(empty($this->path)) { + return ; + } + $pathname = $this->pathname(); + $query = $this->search(); + $this->path = $pathname . '?' . $query; + return $this->path; + } + + public function pathname() { + if(empty($this->pathname)) { + return $this->pathname; + } + $this->pathname = parse_url($ref, PHP_URL_PATH); + return $this->pathname; + } + + public function protocol() { + if(empty($this->protocol)) { + return $this->protocol; + } + $this->protocol = parse_url($ref, PHP_URL_SCHEME); + return $this->protocol; + } + + public function hostname() { + if(empty($this->hostname)) { + return $this->hostname; + } + $this->hostname = parse_url($ref, PHP_URL_HOST); + return $this->hostname; + } + + public function host() { + if(empty($this->host)) { + return ; + } + $hostname = $this->hostname(); + $port = $this->port(); + $this->host = $hostname . $port; + return $this->host; + } + + public function port() { + if(empty($this->port)) { + return $this->port; + } + $this->port = parse_url($ref, PHP_URL_PORT); + return $this->port; + } + + public function hash() { + if(empty($this->hash)) { + return $this->hash; + } + $this->hash = parse_url($ref, PHP_URL_FRAGMENT); + return $this->hash; + } + + public function search() { + if(empty($this->search)) { + return $this->search; + } + $this->search = parse_url($ref, PHP_URL_QUERY); + return $this->search; + } + + public function href() { + return $this->href; + } + + public function auth() { + if(empty($this->auth)) { + return $this->auth; + } + $username = parse_url($ref, PHP_URL_USER); + $password = parse_url($ref, PHP_URL_PASS); + $this->auth = $username . ':' . $password; + return $this->auth; + } + + public static function parse($url) { + return new self($url); + } + + public static function urlEncode($url) { + if (empty($raw)) { + throw new \InvalidArgumentException('not a valid value for parameter'); + } + $str = urlencode($raw); + $str = str_replace("%20", "+", $str); + $str = str_replace("%2A", "*", $str); + return $str; + } + + public static function percentEncode($raw) { + if($raw === null) { + return null; + } + $encoded = urlencode($raw); + $encoded = str_replace('+', '%20', $encoded); + $encoded = str_replace('*', '%2A', $encoded); + $encoded = str_replace('%7E', '~', $encoded); + return $encoded; + } + + public static function pathEncode($path) { + if (empty($raw) || $raw === '/') { + return $raw; + } + $arr = explode('/', $raw); + $ret = ''; + foreach ($arr as $i => $path) { + $str = self::percentEncode($path); + $ret .= "$str/"; + } + return substr($ret, 0, -1); + } + +} diff --git a/vendor/alibabacloud/darabonba/src/Util/ArrayToXml.php b/vendor/alibabacloud/darabonba/src/Util/ArrayToXml.php new file mode 100644 index 0000000..693e363 --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/Util/ArrayToXml.php @@ -0,0 +1,151 @@ +version = $xmlVersion; + $this->encoding = $xmlEncoding; + } + + /** + * Build an XML Data Set. + * + * @param array $data Associative Array containing values to be parsed into an XML Data Set(s) + * @param string $startElement Root Opening Tag, default data + * + * @return string XML String containing values + * @return mixed Boolean false on failure, string XML result on success + */ + public function buildXML($data, $startElement = 'data') + { + if (!\is_array($data)) { + $err = 'Invalid variable type supplied, expected array not found on line ' . __LINE__ . ' in Class: ' . __CLASS__ . ' Method: ' . __METHOD__; + trigger_error($err); + + return false; //return false error occurred + } + $xml = new XmlWriter(); + $xml->openMemory(); + $xml->startDocument($this->version, $this->encoding); + $xml->startElement($startElement); + $data = $this->writeAttr($xml, $data); + $this->writeEl($xml, $data); + $xml->endElement(); //write end element + //returns the XML results + return $xml->outputMemory(true); + } + + /** + * Write keys in $data prefixed with @ as XML attributes, if $data is an array. + * When an @ prefixed key is found, a '%' key is expected to indicate the element itself, + * and '#' prefixed key indicates CDATA content. + * + * @param XMLWriter $xml object + * @param array $data with attributes filtered out + * + * @return array $data | $nonAttributes + */ + protected function writeAttr(XMLWriter $xml, $data) + { + if (\is_array($data)) { + $nonAttributes = []; + foreach ($data as $key => $val) { + //handle an attribute with elements + if ('@' == $key[0]) { + $xml->writeAttribute(substr($key, 1), $val); + } elseif ('%' == $key[0]) { + if (\is_array($val)) { + $nonAttributes = $val; + } else { + $xml->text($val); + } + } elseif ('#' == $key[0]) { + if (\is_array($val)) { + $nonAttributes = $val; + } else { + $xml->startElement(substr($key, 1)); + $xml->writeCData($val); + $xml->endElement(); + } + } elseif ('!' == $key[0]) { + if (\is_array($val)) { + $nonAttributes = $val; + } else { + $xml->writeCData($val); + } + } //ignore normal elements + else { + $nonAttributes[$key] = $val; + } + } + + return $nonAttributes; + } + + return $data; + } + + /** + * Write XML as per Associative Array. + * + * @param XMLWriter $xml object + * @param array $data Associative Data Array + */ + protected function writeEl(XMLWriter $xml, $data) + { + foreach ($data as $key => $value) { + if (\is_array($value) && !$this->isAssoc($value)) { //numeric array + foreach ($value as $itemValue) { + if (\is_array($itemValue)) { + $xml->startElement($key); + $itemValue = $this->writeAttr($xml, $itemValue); + $this->writeEl($xml, $itemValue); + $xml->endElement(); + } else { + $itemValue = $this->writeAttr($xml, $itemValue); + $xml->writeElement($key, "{$itemValue}"); + } + } + } elseif (\is_array($value)) { //associative array + $xml->startElement($key); + $value = $this->writeAttr($xml, $value); + $this->writeEl($xml, $value); + $xml->endElement(); + } else { //scalar + $value = $this->writeAttr($xml, $value); + $xml->writeElement($key, "{$value}"); + } + } + } + + /** + * Check if array is associative with string based keys + * FROM: http://stackoverflow.com/questions/173400/php-arrays-a-good-way-to-check-if-an-array-is-associative-or-sequential/4254008#4254008. + * + * @param array $array Array to check + * + * @return bool + */ + protected function isAssoc($array) + { + return (bool) \count(array_filter(array_keys($array), 'is_string')); + } +} diff --git a/vendor/alibabacloud/darabonba/src/Util/BytesUtil.php b/vendor/alibabacloud/darabonba/src/Util/BytesUtil.php new file mode 100644 index 0000000..75ea625 --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/Util/BytesUtil.php @@ -0,0 +1,96 @@ + $ord) { + if ($k !== $i) { + return false; + } + if (!\is_int($ord)) { + return false; + } + if ($ord < 0 || $ord > 255) { + return false; + } + ++$i; + } + + return true; + } + + public static function from($input, $encoding = 'utf-8') + { + $buffer = ''; + + if (self::is_bytes($input)) { + return $input; + } elseif (is_string($input)) { + switch (strtolower($encoding)) { + case 'utf-8': + case 'utf8': + $buffer = $input; + break; + case 'base64': + $decoded = base64_decode($input); + if ($decoded === false) { + throw new DaraException([], 'Invalid base64 input.'); + } + $buffer = $decoded; + break; + case 'hex': + $decoded = hex2bin($input); + if ($decoded === false) { + throw new DaraException([], 'Invalid hex input.'); + } + $buffer = $decoded; + break; + default: + throw new DaraException([], 'Unsupported encoding type.'); + } + } else { + throw new DaraException([], 'Input must be an bytes or a string.'); + } + + $result = []; + for ($i = 0, $len = strlen($buffer); $i < $len; $i++) { + $result[] = ord($buffer[$i]); + } + + return $result; + } + /** + * + * @param int[] $bytes + * @return string + */ + public static function toString($bytes, $type = 'utf8') + { + if (\is_string($bytes)) { + return $bytes; + } + $str = ''; + foreach ($bytes as $ch) { + $str .= \chr($ch); + } + + if($type == 'hex') { + return bin2hex($str); + } + + if($type == 'base64') { + return base64_encode($str); + } + + return $str; + } +} diff --git a/vendor/alibabacloud/darabonba/src/Util/Console.php b/vendor/alibabacloud/darabonba/src/Util/Console.php new file mode 100644 index 0000000..165db25 --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/Util/Console.php @@ -0,0 +1,116 @@ += 70100) { + // PHP 7.1+ supports return type declarations and nullable types + require_once __DIR__ . '/FileFormStreamTyped.php'; + + if (!class_exists('AlibabaCloud\\Dara\\Util\\FileFormStream', false)) { + class_alias('AlibabaCloud\\Dara\\Util\\FileFormStreamTyped', 'AlibabaCloud\\Dara\\Util\\FileFormStream'); + } +} else { + // PHP 5.6-7.0 does not support void and nullable type declarations + /** + * @internal + * @coversNothing + */ + class FileFormStream implements StreamInterface + { + use FileFormStreamTrait; + + public function __toString() { return $this->__toStringImpl(); } + public function getContents() { return $this->getContentsImpl(); } + public function close() { $this->closeImpl(); } + public function detach() { return $this->detachImpl(); } + public function getSize() { return $this->getSizeImpl(); } + public function tell() { return $this->tellImpl(); } + public function eof() { return $this->eofImpl(); } + public function isSeekable() { return $this->isSeekableImpl(); } + public function seek($offset, $whence = SEEK_SET) { $this->seekImpl($offset, $whence); } + public function rewind() { $this->rewindImpl(); } + public function isWritable() { return $this->isWritableImpl(); } + public function write($string) { return $this->writeImpl($string); } + public function isReadable() { return $this->isReadableImpl(); } + public function read($length) { return $this->readImpl($length); } + public function getMetadata($key = null) { return $this->getMetadataImpl($key); } + } +} \ No newline at end of file diff --git a/vendor/alibabacloud/darabonba/src/Util/FileFormStreamTrait.php b/vendor/alibabacloud/darabonba/src/Util/FileFormStreamTrait.php new file mode 100644 index 0000000..e2f6f34 --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/Util/FileFormStreamTrait.php @@ -0,0 +1,284 @@ +stream = fopen('php://memory', 'a+'); + $this->form = $map; + $this->boundary = $boundary; + $this->keys = array_keys($map); + do { + $read = $this->readForm(1024); + } while (null !== $read); + $meta = stream_get_meta_data($this->stream); + $this->seekable = $meta['seekable']; + $this->uri = $this->getMetadata('uri'); + $this->seek(0); + $this->seek(0); + } + + /** + * Closes the stream when the destructed. + */ + public function __destruct() + { + $this->close(); + } + + /** + * @return string + */ + protected function __toStringImpl() + { + try { + $this->seek(0); + return (string) stream_get_contents($this->stream); + } catch (\Exception $e) { + return ''; + } + } + + /** + * @param int $length + * @return false|int|string + */ + public function readForm($length) + { + if ($this->streaming) { + if (null !== $this->currStream) { + $content = $this->currStream->read($length); + if (false !== $content && '' !== $content) { + fwrite($this->stream, $content); + return $content; + } + return $this->next("\r\n"); + } + return $this->next(); + } + $keysCount = \count($this->keys); + if ($this->index > $keysCount) { + return null; + } + if ($keysCount > 0) { + if ($this->index < $keysCount) { + $this->streaming = true; + $name = $this->keys[$this->index]; + $field = $this->form[$name]; + if (!empty($field) && $field instanceof FileField) { + if (!empty($field->content)) { + $this->currStream = $field->content; + $str = '--' . $this->boundary . "\r\n" . + 'Content-Disposition: form-data; name="' . $name . '"; filename="' . $field->filename . "\"\r\n" . + 'Content-Type: ' . $field->contentType . "\r\n\r\n"; + $this->write($str); + return $str; + } + return $this->next(); + } + $val = $field; + $str = '--' . $this->boundary . "\r\n" . + 'Content-Disposition: form-data; name="' . $name . "\"\r\n\r\n" . + $val . "\r\n"; + fwrite($this->stream, $str); + return $str; + } + if ($this->index == $keysCount) { + return $this->next('--' . $this->boundary . "--\r\n"); + } + return null; + } + return null; + } + + protected function getContentsImpl() + { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + $contents = stream_get_contents($this->stream); + if (false === $contents) { + throw new \RuntimeException('Unable to read stream contents'); + } + return $contents; + } + + protected function closeImpl() + { + if (isset($this->stream)) { + if (\is_resource($this->stream)) { + fclose($this->stream); + } + $this->detach(); + } + } + + protected function detachImpl() + { + if (!isset($this->stream)) { + return null; + } + $result = $this->stream; + unset($this->stream); + $this->size = $this->uri = null; + return $result; + } + + protected function getSizeImpl() + { + if (null !== $this->size) { + return $this->size; + } + if (!isset($this->stream)) { + return null; + } + if ($this->uri) { + clearstatcache(true, $this->uri); + } + $stats = fstat($this->stream); + if (isset($stats['size'])) { + $this->size = $stats['size']; + return $this->size; + } + return null; + } + + protected function isReadableImpl() + { + return $this->readable; + } + + protected function isWritableImpl() + { + return $this->writable; + } + + protected function isSeekableImpl() + { + return $this->seekable; + } + + protected function eofImpl() + { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + return feof($this->stream); + } + + protected function tellImpl() + { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + $result = ftell($this->stream); + if (false === $result) { + throw new \RuntimeException('Unable to determine stream position'); + } + return $result; + } + + protected function rewindImpl() + { + $this->seek(0); + } + + protected function seekImpl($offset, $whence = SEEK_SET) + { + $whence = (int) $whence; + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + if (!$this->seekable) { + throw new \RuntimeException('Stream is not seekable'); + } + if (-1 === fseek($this->stream, $offset, $whence)) { + throw new \RuntimeException('Unable to seek to stream position ' . $offset . ' with whence ' . var_export($whence, true)); + } + } + + protected function readImpl($length) + { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + if (!$this->readable) { + throw new \RuntimeException('Cannot read from non-readable stream'); + } + if ($length < 0) { + throw new \RuntimeException('Length parameter cannot be negative'); + } + if (0 === $length) { + return ''; + } + $string = fread($this->stream, $length); + if (false === $string) { + throw new \RuntimeException('Unable to read from stream'); + } + return $string; + } + + protected function writeImpl($string) + { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + if (!$this->writable) { + throw new \RuntimeException('Cannot write to a non-writable stream'); + } + $this->size = null; + $result = fwrite($this->stream, $string); + if (false === $result) { + throw new \RuntimeException('Unable to write to stream'); + } + return $result; + } + + protected function getMetadataImpl($key = null) + { + if (!isset($this->stream)) { + return $key ? null : []; + } + $meta = stream_get_meta_data($this->stream); + return isset($meta[$key]) ? $meta[$key] : null; + } + + private function next($endStr = '') + { + $this->streaming = false; + ++$this->index; + $this->write($endStr); + $this->currStream = null; + return $endStr; + } +} diff --git a/vendor/alibabacloud/darabonba/src/Util/FileFormStreamTyped.php b/vendor/alibabacloud/darabonba/src/Util/FileFormStreamTyped.php new file mode 100644 index 0000000..8df0fd7 --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/Util/FileFormStreamTyped.php @@ -0,0 +1,31 @@ +__toStringImpl(); } + public function getContents(): string { return $this->getContentsImpl(); } + public function close(): void { $this->closeImpl(); } + public function detach() { return $this->detachImpl(); } + public function getSize(): ?int { return $this->getSizeImpl(); } + public function tell(): int { return $this->tellImpl(); } + public function eof(): bool { return $this->eofImpl(); } + public function isSeekable(): bool { return $this->isSeekableImpl(); } + public function seek($offset, $whence = SEEK_SET): void { $this->seekImpl($offset, $whence); } + public function rewind(): void { $this->rewindImpl(); } + public function isWritable(): bool { return $this->isWritableImpl(); } + public function write($string): int { return $this->writeImpl($string); } + public function isReadable(): bool { return $this->isReadableImpl(); } + public function read($length): string { return $this->readImpl($length); } + public function getMetadata($key = null) { return $this->getMetadataImpl($key); } +} diff --git a/vendor/alibabacloud/darabonba/src/Util/FormUtil.php b/vendor/alibabacloud/darabonba/src/Util/FormUtil.php new file mode 100644 index 0000000..6fa7de2 --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/Util/FormUtil.php @@ -0,0 +1,46 @@ +toArray(); + } + + return str_replace('+', '%20', http_build_query($query)); + } + + /** + * + * @return string + */ + public static function getBoundary() + { + return (string) (mt_rand(10000000000000, 99999999999999)); + } + + /** + * + * @param array $map + * @param string $boundary + * @return string + */ + public static function toFileForm($map, $boundary) + { + return new FileFormStream($map, $boundary); + } +} diff --git a/vendor/alibabacloud/darabonba/src/Util/MathUtil.php b/vendor/alibabacloud/darabonba/src/Util/MathUtil.php new file mode 100644 index 0000000..661e08c --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/Util/MathUtil.php @@ -0,0 +1,15 @@ +isSeekable()) { + $stream->rewind(); + } + + return $stream->getContents(); + } + + private static function tryGetEvents($head, $chunk) { + $all = $head . $chunk; + if(empty($all)) { + return []; + } + $start = 0; + $events = []; + $lines = explode("\n", $all); + $event = new SSEEvent(); + for ($i = 0; $i < strlen($all) - 1; $i++) { + $c = $all[$i]; + $c2 = $all[$i + 1]; + if ($c === "\n" && $c2 === "\n") { + $part = substr($all, $start, $i - $start); + $lines = explode("\n", $part); + $event = new SSEEvent(); + + foreach ($lines as $line) { + if ('' === trim($line)) { + continue; + } elseif (0 === strpos($line, 'data:')) { + $data = substr($line, 5); + $event->data .= trim($data); + } elseif (0 === strpos($line, 'event:')) { + $eventLine = substr($line, 6); + $event->event = trim($eventLine); + } elseif (0 === strpos($line, 'id:')) { + $id = substr($line, 3); + $event->id = trim($id); + } elseif (0 === strpos($line, 'retry:')) { + $retry = substr($line, 6); + $retry = trim($retry); + if (ctype_digit($retry)) { + $event->retry = intval($retry, 10); + } + } elseif (isset($line[0]) && $line[0] === ':') { + // Lines starting with ':' are comments and ignored. + } + } + array_push($events, $event); + $start = $i + 2; + } + } + $remain = substr($all, $start); + return ['events' => $events, 'remain' => $remain]; + } + + /** + * @param Stream $stream + * + * @return string + */ + public static function readAsSSE($stream) + { + $rest = ''; + while (!$stream->eof()) { + $chunk = $stream->read(4096); + $result = self::tryGetEvents($rest, $chunk); + if(empty($result)) { + continue; + } + $events = $result['events']; + $rest = $result['remain']; + + foreach ($events as $event) { + yield $event; + } + } + + // If there is any remaining data that qualifies as an event, yield it as well + if ($rest !== '' && $rest !== false) { + $lastEvent = new SSEEvent(); + $lastEvent->data = $rest; + yield $lastEvent; + } + } + + /** + * Create and return a Guzzle Stream from various inputs. + * + * @param mixed $str string|resource|callable|\GuzzleHttp\Psr7\Stream|object + * @return Stream + * @throws \InvalidArgumentException|\RuntimeException + */ + public static function streamFor($str) + { + if (!class_exists('\GuzzleHttp\Psr7\Stream')) { + throw new \RuntimeException('guzzlehttp/psr7 is required for streamFor'); + } + + // Already a Guzzle Stream + if ($str instanceof Stream) { + return $str; + } + + // If callable, call and recurse + if (is_callable($str)) { + return self::streamFor($str()); + } + + // If resource (stream), wrap directly + if (is_resource($str)) { + if (get_resource_type($str) !== 'stream') { + throw new \InvalidArgumentException('Provided resource is not a stream'); + } + return new Stream($str); + } + + // If object with __toString, cast it + if (is_object($str) && method_exists($str, '__toString')) { + $str = (string)$str; + } + + // Must be string (or scalar convertible) + if (!is_string($str) && !is_scalar($str) && !is_null($str)) { + throw new \InvalidArgumentException('Unsupported type for streamFor: ' . gettype($str)); + } + + $content = $str === null ? '' : (string)$str; + + $resource = @fopen('php://temp', 'w+b'); + if ($resource === false) { + throw new \RuntimeException('Failed to open temporary stream'); + } + + if ($content !== '') { + fwrite($resource, $content); + rewind($resource); + } + + return new Stream($resource); + } + +} diff --git a/vendor/alibabacloud/darabonba/src/Util/StringUtil.php b/vendor/alibabacloud/darabonba/src/Util/StringUtil.php new file mode 100644 index 0000000..17eafc0 --- /dev/null +++ b/vendor/alibabacloud/darabonba/src/Util/StringUtil.php @@ -0,0 +1,61 @@ + $v) { + if (isset($prop[$k])) { + $target[$k] = $v; + } + } + return $target; + } + } + + public static function toXML($array) + { + $arrayToXml = new ArrayToXml(); + if (\is_object($array)) { + $tmp = explode('\\', \get_class($array)); + $rootName = $tmp[\count($tmp) - 1]; + $data = json_decode(json_encode($array), true); + } else { + $tmp = $array; + reset($tmp); + $rootName = key($tmp); + $data = $array[$rootName]; + } + ksort($data); + + return $arrayToXml->buildXML($data, $rootName); + } + + private static function parse($xml) + { + if (\PHP_VERSION_ID < 80000) { + libxml_disable_entity_loader(true); + } + + return json_decode( + json_encode( + simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA) + ), + true + ); + } +} \ No newline at end of file diff --git a/vendor/alibabacloud/dysmsapi-20170525/.php-cs-fixer.dist.php b/vendor/alibabacloud/dysmsapi-20170525/.php-cs-fixer.dist.php new file mode 100644 index 0000000..7e23a2a --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/.php-cs-fixer.dist.php @@ -0,0 +1,66 @@ +setRiskyAllowed(true) + ->setIndent(' ') + ->setRules([ + '@PSR2' => true, + '@PhpCsFixer' => true, + '@Symfony:risky' => true, + 'concat_space' => ['spacing' => 'one'], + 'array_syntax' => ['syntax' => 'short'], + 'array_indentation' => true, + 'combine_consecutive_unsets' => true, + 'phpdoc_separation' => true, + 'single_quote' => true, + 'declare_equal_normalize' => true, + 'function_typehint_space' => true, + 'include' => true, + 'lowercase_cast' => true, + 'no_leading_import_slash' => true, + 'no_multiline_whitespace_around_double_arrow' => true, + 'no_spaces_around_offset' => true, + 'no_unneeded_control_parentheses' => true, + 'no_unused_imports' => true, + 'no_whitespace_before_comma_in_array' => true, + 'no_whitespace_in_blank_line' => true, + 'object_operator_without_whitespace' => true, + 'blank_lines_before_namespace' => true, + 'single_class_element_per_statement' => true, + 'space_after_semicolon' => true, + 'standardize_not_equals' => true, + 'ternary_operator_spaces' => true, + 'trailing_comma_in_multiline' => true, + 'trim_array_spaces' => true, + 'unary_operator_spaces' => true, + 'whitespace_after_comma_in_array' => true, + 'no_extra_blank_lines' => [ + 'tokens' => [ + 'curly_brace_block', + 'extra', + 'parenthesis_brace_block', + 'square_brace_block', + 'throw', + 'use', + ] + ], + 'braces' => [ + 'allow_single_line_closure' => true, + ], + ]) + ->setFinder( + (new Finder()) + ->exclude('vendor') + ->exclude('tests') + ->in(__DIR__) + ) +; diff --git a/vendor/alibabacloud/dysmsapi-20170525/ChangeLog.md b/vendor/alibabacloud/dysmsapi-20170525/ChangeLog.md index c83e97f..525ba01 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/ChangeLog.md +++ b/vendor/alibabacloud/dysmsapi-20170525/ChangeLog.md @@ -1,3 +1,162 @@ +2026-04-07 Version: 4.5.1 +- Update API GetSmsTemplate: add response parameters Body.SignList. +- Update API GetSmsTemplateList: add response parameters Body.Data.List.$.TemplateContent. + + +2026-02-10 Version: 4.5.0 +- Support API CreateDigitalSignOrder. +- Support API CreateDigitalSmsTemplate. +- Support API QueryDigitalSignByName. + + +2026-01-05 Version: 4.4.0 +- Support API CreateSmsAppIcpRecord. +- Support API CreateSmsTrademark. +- Support API GetSmsTemplateList. +- Support API QuerySmsAppIcpRecord. +- Support API QuerySmsTrademark. + + +2025-12-11 Version: 4.3.1 +- Update API CreateSmsSign: add request parameters AppIcpRecordId. +- Update API CreateSmsSign: add request parameters TrademarkId. +- Update API GetSmsSign: add response parameters Body.AppIcpRecordId. +- Update API GetSmsSign: add response parameters Body.TrademarkId. +- Update API QuerySmsSignList: add response parameters Body.SmsSignList.$.AppIcpRecordId. +- Update API QuerySmsSignList: add response parameters Body.SmsSignList.$.TrademarkId. +- Update API UpdateSmsSign: add request parameters AppIcpRecordId. +- Update API UpdateSmsSign: add request parameters TrademarkId. + + +2025-11-27 Version: 4.3.0 +- Support API GetSmsOcrOssInfo. +- Update API QuerySmsTemplateList: add response parameters Body.SmsTemplateList.$.TrafficDriving. + + +2025-09-17 Version: 4.2.0 +- Support API SendLogisticsSms. +- Support API VerifyLogisticsSmsMailNo. + + +2025-09-11 Version: 4.1.3 +- Update API CreateSmsTemplate: add request parameters TrafficDriving. +- Update API QuerySmsTemplateList: add response parameters Body.SmsTemplateList.$.SignatureName. +- Update API UpdateSmsTemplate: add request parameters TrafficDriving. + + +2025-09-11 Version: 4.1.3 +- Update API CreateSmsTemplate: add request parameters TrafficDriving. +- Update API QuerySmsTemplateList: add response parameters Body.SmsTemplateList.$.SignatureName. +- Update API UpdateSmsTemplate: add request parameters TrafficDriving. + + +2025-06-30 Version: 4.1.2 +- Update API GetSmsSign: add response parameters Body.SignIspRegisterDetailList. + + +2025-05-27 Version: 4.1.1 +- Update API QueryMobilesCardSupport: add request parameters EncryptType. + + +2025-04-23 Version: 4.1.0 +- Support API DeleteSmsQualification. +- Support API QuerySingleSmsQualification. +- Support API QuerySmsQualificationRecord. +- Support API RequiredPhoneCode. +- Support API SubmitSmsQualification. +- Support API UpdateSmsQualification. +- Support API ValidPhoneCode. + + +2025-04-22 Version: 4.0.0 +- Support API ChangeSignatureQualification. +- Support API CreateSmsAuthorizationLetter. +- Support API GetQualificationOssInfo. +- Support API QuerySmsAuthorizationLetter. +- Update API CreateSmsSign: update request parameters AuthorizationLetterId' type has changed. +- Update API CreateSmsSign: update request parameters AuthorizationLetterId' format has changed. +- Update API GetSmsSign: update response parameters Body.AuthorizationLetterId' type has changed. +- Update API GetSmsSign: update response parameters Body.AuthorizationLetterId' format has changed. +- Update API QuerySmsSignList: update response parameters Body.SmsSignList.$.AuthorizationLetterId' type has changed. +- Update API QuerySmsSignList: update response parameters Body.SmsSignList.$.AuthorizationLetterId' format has changed. +- Update API UpdateSmsSign: update request parameters AuthorizationLetterId' type has changed. +- Update API UpdateSmsSign: update request parameters AuthorizationLetterId' format has changed. + + +2025-04-16 Version: 3.1.3 +- Update API CreateSmsSign: add request parameters AuthorizationLetterId. +- Update API GetSmsSign: add response parameters Body.AuthorizationLetterAuditPass. +- Update API GetSmsSign: add response parameters Body.AuthorizationLetterId. +- Update API QuerySmsSignList: add response parameters Body.SmsSignList.$.AuthorizationLetterId. +- Update API QuerySmsSignList: add response parameters Body.SmsSignList.$.authorizationLetterAuditPass. +- Update API UpdateSmsSign: add request parameters AuthorizationLetterId. + + +2025-03-26 Version: 3.1.2 +- Update API GetSmsTemplate: add response parameters Body.VendorAuditStatus. + + +2025-01-03 Version: 3.1.1 +- Update API GetSmsSign: update response param. +- Update API QueryExtCodeSign: update param ExtCode. +- Update API QueryExtCodeSign: update param SignName. + + +2024-10-24 Version: 3.1.0 +- Support API AddExtCodeSign. +- Support API DeleteExtCodeSign. +- Support API GetCardSmsDetails. +- Support API QueryExtCodeSign. +- Support API UpdateExtCodeSign. + + +2024-06-25 Version: 3.0.0 +- Support API CreateSmsSign. +- Support API CreateSmsTemplate. +- Support API GetOSSInfoForUploadFile. +- Support API GetSmsSign. +- Support API GetSmsTemplate. +- Support API UpdateSmsSign. +- Support API UpdateSmsTemplate. +- Update API CreateSmartShortUrl: add param OutId. +- Update API CreateSmartShortUrl: delete param Expiration. +- Update API CreateSmartShortUrl: delete param SourceName. +- Update API CreateSmartShortUrl: update param PhoneNumbers. +- Update API CreateSmartShortUrl: update param SourceUrl. +- Update API QueryPageSmartShortUrlLog: delete param ClickState. +- Update API QueryPageSmartShortUrlLog: delete param EndId. +- Update API QueryPageSmartShortUrlLog: delete param ShortName. +- Update API QueryPageSmartShortUrlLog: delete param StartId. +- Update API QueryPageSmartShortUrlLog: update param CreateDateEnd. +- Update API QueryPageSmartShortUrlLog: update param CreateDateStart. +- Update API QueryPageSmartShortUrlLog: update param PageNo. +- Update API QueryPageSmartShortUrlLog: update param PageSize. + + +2023-07-04 Version: 2.0.24 +- Add CreateSmartShortUrl api. + +2022-11-29 Version: 2.0.23 +- Add custom content for QueryCardSmsTemplateReport. + +2022-10-11 Version: 2.0.22 +- Add custom content for QueryCardSmsTemplateReport. + +2022-09-30 Version: 2.0.21 +- Add custom content for SendBatchSms. + +2022-09-29 Version: 2.0.20 +- Add outId for SendBatchSms. + +2022-09-28 Version: 2.0.19 +- Upgrade formdata for CheckMobilesCardTemplateSupport. + +2022-08-11 Version: 2.0.18 +- Upgrade formdata for SendBatchSms. + +2022-08-03 Version: 2.0.17 +- Upgrade Service for SmsStatistics. + 2022-07-14 Version: 2.0.16 - Upgrade Service for SmsTemplate. diff --git a/vendor/alibabacloud/dysmsapi-20170525/autoload.php b/vendor/alibabacloud/dysmsapi-20170525/autoload.php index 9d19f07..6013a91 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/autoload.php +++ b/vendor/alibabacloud/dysmsapi-20170525/autoload.php @@ -5,7 +5,7 @@ if (file_exists(__DIR__ . \DIRECTORY_SEPARATOR . 'vendor' . \DIRECTORY_SEPARATOR } spl_autoload_register(function ($class) { - $name = str_replace('AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\', '', $class); + $name = str_replace('AlibabaCloud\SDK\Dysmsapi\V20170525\\', '', $class); $file = __DIR__ . \DIRECTORY_SEPARATOR . 'src' . \DIRECTORY_SEPARATOR . str_replace('\\', \DIRECTORY_SEPARATOR, $name) . '.php'; if (file_exists($file)) { require_once $file; diff --git a/vendor/alibabacloud/dysmsapi-20170525/bootstrap.php b/vendor/alibabacloud/dysmsapi-20170525/bootstrap.php new file mode 100644 index 0000000..149b676 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/bootstrap.php @@ -0,0 +1,3 @@ +5.5", - "alibabacloud/tea-utils": "^0.2.16", - "alibabacloud/darabonba-openapi": "^0.2.5", - "alibabacloud/openapi-util": "^0.1.10", - "alibabacloud/endpoint-util": "^0.1.0" - }, + "license": "Apache-2.0", "autoload": { "psr-4": { "AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\": "src" @@ -29,5 +24,10 @@ "preferred-install": "dist", "optimize-autoloader": true }, + "require": { + "php": ">5.5", + "alibabacloud/darabonba": "^1.0.0", + "alibabacloud/openapi-core": "^1.0.0" + }, "prefer-stable": true } \ No newline at end of file diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Dysmsapi.php b/vendor/alibabacloud/dysmsapi-20170525/src/Dysmsapi.php index 7a78f8a..7415d21 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Dysmsapi.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Dysmsapi.php @@ -4,30 +4,74 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525; -use AlibabaCloud\Endpoint\Endpoint; -use AlibabaCloud\OpenApiUtil\OpenApiUtilClient; +use AlibabaCloud\Dara\Models\RuntimeOptions; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\AddExtCodeSignRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\AddExtCodeSignResponse; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\AddShortUrlRequest; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\AddShortUrlResponse; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\AddSmsSignRequest; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\AddSmsSignResponse; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\AddSmsTemplateRequest; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\AddSmsTemplateResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\ChangeSignatureQualificationRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\ChangeSignatureQualificationResponse; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CheckMobilesCardSupportRequest; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CheckMobilesCardSupportResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\ConversionDataIntlRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\ConversionDataIntlResponse; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateCardSmsTemplateRequest; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateCardSmsTemplateResponse; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateCardSmsTemplateShrinkRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateDigitalSignOrderRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateDigitalSignOrderResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateDigitalSignOrderShrinkRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateDigitalSmsTemplateRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateDigitalSmsTemplateResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateSmartShortUrlRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateSmartShortUrlResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateSmsAppIcpRecordRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateSmsAppIcpRecordResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateSmsAuthorizationLetterRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateSmsAuthorizationLetterResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateSmsAuthorizationLetterShrinkRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateSmsSignRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateSmsSignResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateSmsSignShrinkRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateSmsTemplateRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateSmsTemplateResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateSmsTemplateShrinkRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateSmsTrademarkRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateSmsTrademarkResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\DeleteExtCodeSignRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\DeleteExtCodeSignResponse; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\DeleteShortUrlRequest; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\DeleteShortUrlResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\DeleteSmsQualificationRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\DeleteSmsQualificationResponse; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\DeleteSmsSignRequest; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\DeleteSmsSignResponse; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\DeleteSmsTemplateRequest; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\DeleteSmsTemplateResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetCardSmsDetailsRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetCardSmsDetailsResponse; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetCardSmsLinkRequest; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetCardSmsLinkResponse; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetMediaResourceIdRequest; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetMediaResourceIdResponse; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetOSSInfoForCardTemplateResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetOSSInfoForUploadFileRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetOSSInfoForUploadFileResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetQualificationOssInfoRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetQualificationOssInfoResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetSmsOcrOssInfoRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetSmsOcrOssInfoResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetSmsSignRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetSmsSignResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetSmsTemplateListRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetSmsTemplateListResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetSmsTemplateListShrinkRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetSmsTemplateRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetSmsTemplateResponse; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\ListTagResourcesRequest; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\ListTagResourcesResponse; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\ModifySmsSignRequest; @@ -38,12 +82,31 @@ use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryCardSmsTemplateReportRequest use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryCardSmsTemplateReportResponse; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryCardSmsTemplateRequest; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryCardSmsTemplateResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryDigitalSignByNameRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryDigitalSignByNameResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryExtCodeSignRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryExtCodeSignResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryMobilesCardSupportRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryMobilesCardSupportResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryMobilesCardSupportShrinkRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryPageSmartShortUrlLogRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryPageSmartShortUrlLogResponse; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySendDetailsRequest; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySendDetailsResponse; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySendStatisticsRequest; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySendStatisticsResponse; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryShortUrlRequest; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryShortUrlResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySingleSmsQualificationRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySingleSmsQualificationResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsAppIcpRecordRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsAppIcpRecordResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsAppIcpRecordShrinkRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsAuthorizationLetterRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsAuthorizationLetterResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsAuthorizationLetterShrinkRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsQualificationRecordRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsQualificationRecordResponse; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsSignListRequest; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsSignListResponse; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsSignRequest; @@ -52,23 +115,49 @@ use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsTemplateListRequest; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsTemplateListResponse; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsTemplateRequest; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsTemplateResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsTrademarkRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsTrademarkResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsTrademarkShrinkRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\RequiredPhoneCodeRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\RequiredPhoneCodeResponse; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SendBatchCardSmsRequest; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SendBatchCardSmsResponse; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SendBatchSmsRequest; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SendBatchSmsResponse; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SendCardSmsRequest; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SendCardSmsResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SendLogisticsSmsRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SendLogisticsSmsResponse; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SendSmsRequest; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SendSmsResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SmsConversionIntlRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SmsConversionIntlResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SubmitSmsQualificationRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SubmitSmsQualificationResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SubmitSmsQualificationShrinkRequest; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\TagResourcesRequest; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\TagResourcesResponse; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\UntagResourcesRequest; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\UntagResourcesResponse; -use AlibabaCloud\Tea\Utils\Utils; -use AlibabaCloud\Tea\Utils\Utils\RuntimeOptions; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\UpdateExtCodeSignRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\UpdateExtCodeSignResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\UpdateSmsQualificationRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\UpdateSmsQualificationResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\UpdateSmsQualificationShrinkRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\UpdateSmsSignRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\UpdateSmsSignResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\UpdateSmsSignShrinkRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\UpdateSmsTemplateRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\UpdateSmsTemplateResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\UpdateSmsTemplateShrinkRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\ValidPhoneCodeRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\ValidPhoneCodeResponse; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\VerifyLogisticsSmsMailNoRequest; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\VerifyLogisticsSmsMailNoResponse; use Darabonba\OpenApi\Models\OpenApiRequest; use Darabonba\OpenApi\Models\Params; use Darabonba\OpenApi\OpenApiClient; +use Darabonba\OpenApi\Utils; class Dysmsapi extends OpenApiClient { @@ -76,11 +165,13 @@ class Dysmsapi extends OpenApiClient { parent::__construct($config); $this->_endpointRule = 'central'; - $this->_endpointMap = [ + $this->_endpointMap = [ 'ap-southeast-1' => 'dysmsapi.ap-southeast-1.aliyuncs.com', - 'ap-southeast-5' => 'dysmsapi-xman.ap-southeast-5.aliyuncs.com', - 'cn-beijing' => 'dysmsapi-proxy.cn-beijing.aliyuncs.com', - 'cn-hongkong' => 'dysmsapi-xman.cn-hongkong.aliyuncs.com', + 'ap-southeast-5' => 'dysmsapi.ap-southeast-5.aliyuncs.com', + 'cn-beijing' => 'dysmsapi-proxy.cn-beijing.aliyuncs.com', + 'cn-hongkong' => 'dysmsapi-xman.cn-hongkong.aliyuncs.com', + 'eu-central-1' => 'dysmsapi.eu-central-1.aliyuncs.com', + 'us-east-1' => 'dysmsapi.us-east-1.aliyuncs.com', ]; $this->checkConfig($config); $this->_endpoint = $this->getEndpoint('dysmsapi', $this->_regionId, $this->_endpointRule, $this->_network, $this->_suffix, $this->_endpointMap, $this->_endpoint); @@ -99,17 +190,103 @@ class Dysmsapi extends OpenApiClient */ public function getEndpoint($productId, $regionId, $endpointRule, $network, $suffix, $endpointMap, $endpoint) { - if (!Utils::empty_($endpoint)) { + if (null !== $endpoint) { return $endpoint; } - if (!Utils::isUnset($endpointMap) && !Utils::empty_(@$endpointMap[$regionId])) { + + if (null !== $endpointMap && null !== @$endpointMap[$regionId]) { return @$endpointMap[$regionId]; } - return Endpoint::getEndpointRules($productId, $regionId, $endpointRule, $network, $suffix); + return Utils::getEndpointRules($productId, $regionId, $endpointRule, $network, $suffix); } /** + * 添加验证码签名信息. + * + * @param request - AddExtCodeSignRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns AddExtCodeSignResponse + * + * @param AddExtCodeSignRequest $request + * @param RuntimeOptions $runtime + * + * @return AddExtCodeSignResponse + */ + public function addExtCodeSignWithOptions($request, $runtime) + { + $request->validate(); + $query = []; + if (null !== $request->extCode) { + @$query['ExtCode'] = $request->extCode; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + if (null !== $request->signName) { + @$query['SignName'] = $request->signName; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'AddExtCodeSign', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return AddExtCodeSignResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * 添加验证码签名信息. + * + * @param request - AddExtCodeSignRequest + * + * @returns AddExtCodeSignResponse + * + * @param AddExtCodeSignRequest $request + * + * @return AddExtCodeSignResponse + */ + public function addExtCodeSign($request) + { + $runtime = new RuntimeOptions([]); + + return $this->addExtCodeSignWithOptions($request, $runtime); + } + + /** + * Creates a short URL. + * + * @remarks + * Before you call this operation, you must register the primary domain name of the source URL in the Short Message Service (SMS) console. After the domain name is registered, you can call this operation to create a short URL. For more information, see [Domain name registration](https://help.aliyun.com/document_detail/302325.html#title-mau-zdh-hd0). + * * You can create up to 3,000 short URLs within a natural day. + * * After a short URL is generated, a security review is required. Generally, the review takes 10 minutes to 2 hours to complete. Before the security review is passed, the short URL cannot be directly accessed. + * + * @param request - AddShortUrlRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns AddShortUrlResponse + * * @param AddShortUrlRequest $request * @param RuntimeOptions $runtime * @@ -117,47 +294,64 @@ class Dysmsapi extends OpenApiClient */ public function addShortUrlWithOptions($request, $runtime) { - Utils::validateModel($request); + $request->validate(); $query = []; - if (!Utils::isUnset($request->ownerId)) { - $query['OwnerId'] = $request->ownerId; + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; } - if (!Utils::isUnset($request->resourceOwnerAccount)) { - $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } - if (!Utils::isUnset($request->resourceOwnerId)) { - $query['ResourceOwnerId'] = $request->resourceOwnerId; + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; } + $body = []; - if (!Utils::isUnset($request->effectiveDays)) { - $body['EffectiveDays'] = $request->effectiveDays; + if (null !== $request->effectiveDays) { + @$body['EffectiveDays'] = $request->effectiveDays; } - if (!Utils::isUnset($request->shortUrlName)) { - $body['ShortUrlName'] = $request->shortUrlName; + + if (null !== $request->shortUrlName) { + @$body['ShortUrlName'] = $request->shortUrlName; } - if (!Utils::isUnset($request->sourceUrl)) { - $body['SourceUrl'] = $request->sourceUrl; + + if (null !== $request->sourceUrl) { + @$body['SourceUrl'] = $request->sourceUrl; } + $req = new OpenApiRequest([ - 'query' => OpenApiUtilClient::query($query), - 'body' => OpenApiUtilClient::parseToMap($body), + 'query' => Utils::query($query), + 'body' => Utils::parseToMap($body), ]); $params = new Params([ - 'action' => 'AddShortUrl', - 'version' => '2017-05-25', - 'protocol' => 'HTTPS', - 'pathname' => '/', - 'method' => 'POST', - 'authType' => 'AK', - 'style' => 'RPC', + 'action' => 'AddShortUrl', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', 'reqBodyType' => 'formData', - 'bodyType' => 'json', + 'bodyType' => 'json', ]); return AddShortUrlResponse::fromMap($this->callApi($params, $req, $runtime)); } /** + * Creates a short URL. + * + * @remarks + * Before you call this operation, you must register the primary domain name of the source URL in the Short Message Service (SMS) console. After the domain name is registered, you can call this operation to create a short URL. For more information, see [Domain name registration](https://help.aliyun.com/document_detail/302325.html#title-mau-zdh-hd0). + * * You can create up to 3,000 short URLs within a natural day. + * * After a short URL is generated, a security review is required. Generally, the review takes 10 minutes to 2 hours to complete. Before the security review is passed, the short URL cannot be directly accessed. + * + * @param request - AddShortUrlRequest + * + * @returns AddShortUrlResponse + * * @param AddShortUrlRequest $request * * @return AddShortUrlResponse @@ -170,6 +364,25 @@ class Dysmsapi extends OpenApiClient } /** + * Creates a signature. + * + * @remarks + * You can call the AddSmsSign operation or use the [Short Message Service (SMS) console](https://dysms.console.aliyun.com/dysms.htm#/overview) to create an SMS signature. The signature must comply with the [SMS signature specifications](https://help.aliyun.com/document_detail/108076.html). You can call the QuerySmsSign operation or use the SMS console to query the review status of the signature. + * For more information, see [Usage notes](https://help.aliyun.com/document_detail/55324.html). + * ### QPS limit + * You can call this operation only once per second. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * > + * * You cannot cancel the review of a signature. + * * Individual users can create only one verification code signature, and can create only one general-purpose signature within a natural day. If you need to apply for multiple signatures, we recommend that you upgrade your account to an enterprise user. + * * If you need to use the same signature for messages sent to recipients both in and outside the Chinese mainland, the signature must be a general-purpose signature. + * * If you apply for a signature or message template, you must specify the signature scenario or template type. You must also provide the information of your services, such as a website URL, a domain name with an ICP filing, an application download URL, or the name of your WeChat official account or mini program. For sign-in scenarios, you must also provide an account and password for tests. A detailed description can improve the review efficiency of signatures and templates. + * * An SMS signature must undergo a thorough review process before it can be approved for use. + * + * @param request - AddSmsSignRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns AddSmsSignResponse + * * @param AddSmsSignRequest $request * @param RuntimeOptions $runtime * @@ -177,53 +390,79 @@ class Dysmsapi extends OpenApiClient */ public function addSmsSignWithOptions($request, $runtime) { - Utils::validateModel($request); + $request->validate(); $query = []; - if (!Utils::isUnset($request->ownerId)) { - $query['OwnerId'] = $request->ownerId; + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; } - if (!Utils::isUnset($request->remark)) { - $query['Remark'] = $request->remark; + + if (null !== $request->remark) { + @$query['Remark'] = $request->remark; } - if (!Utils::isUnset($request->resourceOwnerAccount)) { - $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } - if (!Utils::isUnset($request->resourceOwnerId)) { - $query['ResourceOwnerId'] = $request->resourceOwnerId; + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; } - if (!Utils::isUnset($request->signName)) { - $query['SignName'] = $request->signName; + + if (null !== $request->signName) { + @$query['SignName'] = $request->signName; } - if (!Utils::isUnset($request->signSource)) { - $query['SignSource'] = $request->signSource; + + if (null !== $request->signSource) { + @$query['SignSource'] = $request->signSource; } - if (!Utils::isUnset($request->signType)) { - $query['SignType'] = $request->signType; + + if (null !== $request->signType) { + @$query['SignType'] = $request->signType; } + $body = []; - if (!Utils::isUnset($request->signFileList)) { - $body['SignFileList'] = $request->signFileList; + if (null !== $request->signFileList) { + @$body['SignFileList'] = $request->signFileList; } + $req = new OpenApiRequest([ - 'query' => OpenApiUtilClient::query($query), - 'body' => OpenApiUtilClient::parseToMap($body), + 'query' => Utils::query($query), + 'body' => Utils::parseToMap($body), ]); $params = new Params([ - 'action' => 'AddSmsSign', - 'version' => '2017-05-25', - 'protocol' => 'HTTPS', - 'pathname' => '/', - 'method' => 'POST', - 'authType' => 'AK', - 'style' => 'RPC', + 'action' => 'AddSmsSign', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', 'reqBodyType' => 'formData', - 'bodyType' => 'json', + 'bodyType' => 'json', ]); return AddSmsSignResponse::fromMap($this->callApi($params, $req, $runtime)); } /** + * Creates a signature. + * + * @remarks + * You can call the AddSmsSign operation or use the [Short Message Service (SMS) console](https://dysms.console.aliyun.com/dysms.htm#/overview) to create an SMS signature. The signature must comply with the [SMS signature specifications](https://help.aliyun.com/document_detail/108076.html). You can call the QuerySmsSign operation or use the SMS console to query the review status of the signature. + * For more information, see [Usage notes](https://help.aliyun.com/document_detail/55324.html). + * ### QPS limit + * You can call this operation only once per second. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * > + * * You cannot cancel the review of a signature. + * * Individual users can create only one verification code signature, and can create only one general-purpose signature within a natural day. If you need to apply for multiple signatures, we recommend that you upgrade your account to an enterprise user. + * * If you need to use the same signature for messages sent to recipients both in and outside the Chinese mainland, the signature must be a general-purpose signature. + * * If you apply for a signature or message template, you must specify the signature scenario or template type. You must also provide the information of your services, such as a website URL, a domain name with an ICP filing, an application download URL, or the name of your WeChat official account or mini program. For sign-in scenarios, you must also provide an account and password for tests. A detailed description can improve the review efficiency of signatures and templates. + * * An SMS signature must undergo a thorough review process before it can be approved for use. + * + * @param request - AddSmsSignRequest + * + * @returns AddSmsSignResponse + * * @param AddSmsSignRequest $request * * @return AddSmsSignResponse @@ -236,6 +475,27 @@ class Dysmsapi extends OpenApiClient } /** + * Creates a message template. + * + * @remarks + * You can call the operation or use the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview) to apply for a message template. The template must comply with the [message template specifications](https://help.aliyun.com/document_detail/108253.html). You can call the [QuerySmsTemplate](https://help.aliyun.com/document_detail/419289.html) operation or use the Alibaba Cloud SMS console to check whether the message template is approved. + * > + * * Message templates pending approval can be withdrawn. You can withdraw a message template pending approval on the Message Templates tab in the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview). + * * Message templates that have been approved can be deleted, and cannot be modified. You can delete a message template pending approval on the Message Templates tab in the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview). + * * If you call the AddSmsTemplate operation, you can apply for a maximum of 100 message templates in a calendar day. After you apply for a message template, we recommend that you wait for at least 30 seconds before you apply for another one. If you use the Alibaba Cloud SMS console, you can apply for an unlimited number of message templates. + * * Messages sent to the Chinese mainland and messages sent to countries or regions outside the Chinese mainland use separate message templates. Create message templates based on your needs. + * * If you apply for a signature or message template, you must specify the signature scenario or template type. You must also provide the information of your services, such as a website URL, a domain name with an ICP filing, an application download URL, or the name of your WeChat official account or mini program. For sign-in scenarios, you must also provide an account and password for tests. A detailed description can improve the review efficiency of signatures and templates. + * * A signature must undergo a thorough review process before it can be approved for use. For more information, see [Usage notes](https://help.aliyun.com/document_detail/55324.html). + * ### QPS limits + * You can call this operation up to 1,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @deprecated openAPI AddSmsTemplate is deprecated, please use Dysmsapi::2017-05-25::CreateSmsTemplate instead + * + * @param request - AddSmsTemplateRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns AddSmsTemplateResponse + * * @param AddSmsTemplateRequest $request * @param RuntimeOptions $runtime * @@ -243,48 +503,76 @@ class Dysmsapi extends OpenApiClient */ public function addSmsTemplateWithOptions($request, $runtime) { - Utils::validateModel($request); + $request->validate(); $query = []; - if (!Utils::isUnset($request->ownerId)) { - $query['OwnerId'] = $request->ownerId; + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; } - if (!Utils::isUnset($request->remark)) { - $query['Remark'] = $request->remark; + + if (null !== $request->remark) { + @$query['Remark'] = $request->remark; } - if (!Utils::isUnset($request->resourceOwnerAccount)) { - $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } - if (!Utils::isUnset($request->resourceOwnerId)) { - $query['ResourceOwnerId'] = $request->resourceOwnerId; + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; } - if (!Utils::isUnset($request->templateContent)) { - $query['TemplateContent'] = $request->templateContent; + + if (null !== $request->templateContent) { + @$query['TemplateContent'] = $request->templateContent; } - if (!Utils::isUnset($request->templateName)) { - $query['TemplateName'] = $request->templateName; + + if (null !== $request->templateName) { + @$query['TemplateName'] = $request->templateName; } - if (!Utils::isUnset($request->templateType)) { - $query['TemplateType'] = $request->templateType; + + if (null !== $request->templateType) { + @$query['TemplateType'] = $request->templateType; } + $req = new OpenApiRequest([ - 'query' => OpenApiUtilClient::query($query), + 'query' => Utils::query($query), ]); $params = new Params([ - 'action' => 'AddSmsTemplate', - 'version' => '2017-05-25', - 'protocol' => 'HTTPS', - 'pathname' => '/', - 'method' => 'POST', - 'authType' => 'AK', - 'style' => 'RPC', + 'action' => 'AddSmsTemplate', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', 'reqBodyType' => 'formData', - 'bodyType' => 'json', + 'bodyType' => 'json', ]); return AddSmsTemplateResponse::fromMap($this->callApi($params, $req, $runtime)); } + // Deprecated /** + * Creates a message template. + * + * @remarks + * You can call the operation or use the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview) to apply for a message template. The template must comply with the [message template specifications](https://help.aliyun.com/document_detail/108253.html). You can call the [QuerySmsTemplate](https://help.aliyun.com/document_detail/419289.html) operation or use the Alibaba Cloud SMS console to check whether the message template is approved. + * > + * * Message templates pending approval can be withdrawn. You can withdraw a message template pending approval on the Message Templates tab in the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview). + * * Message templates that have been approved can be deleted, and cannot be modified. You can delete a message template pending approval on the Message Templates tab in the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview). + * * If you call the AddSmsTemplate operation, you can apply for a maximum of 100 message templates in a calendar day. After you apply for a message template, we recommend that you wait for at least 30 seconds before you apply for another one. If you use the Alibaba Cloud SMS console, you can apply for an unlimited number of message templates. + * * Messages sent to the Chinese mainland and messages sent to countries or regions outside the Chinese mainland use separate message templates. Create message templates based on your needs. + * * If you apply for a signature or message template, you must specify the signature scenario or template type. You must also provide the information of your services, such as a website URL, a domain name with an ICP filing, an application download URL, or the name of your WeChat official account or mini program. For sign-in scenarios, you must also provide an account and password for tests. A detailed description can improve the review efficiency of signatures and templates. + * * A signature must undergo a thorough review process before it can be approved for use. For more information, see [Usage notes](https://help.aliyun.com/document_detail/55324.html). + * ### QPS limits + * You can call this operation up to 1,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @deprecated openAPI AddSmsTemplate is deprecated, please use Dysmsapi::2017-05-25::CreateSmsTemplate instead + * + * @param request - AddSmsTemplateRequest + * + * @returns AddSmsTemplateResponse + * * @param AddSmsTemplateRequest $request * * @return AddSmsTemplateResponse @@ -297,6 +585,94 @@ class Dysmsapi extends OpenApiClient } /** + * 更换签名的资质和授权书. + * + * @param request - ChangeSignatureQualificationRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns ChangeSignatureQualificationResponse + * + * @param ChangeSignatureQualificationRequest $request + * @param RuntimeOptions $runtime + * + * @return ChangeSignatureQualificationResponse + */ + public function changeSignatureQualificationWithOptions($request, $runtime) + { + $request->validate(); + $query = []; + if (null !== $request->authorizationLetterId) { + @$query['AuthorizationLetterId'] = $request->authorizationLetterId; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->qualificationId) { + @$query['QualificationId'] = $request->qualificationId; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + if (null !== $request->signatureName) { + @$query['SignatureName'] = $request->signatureName; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'ChangeSignatureQualification', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return ChangeSignatureQualificationResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * 更换签名的资质和授权书. + * + * @param request - ChangeSignatureQualificationRequest + * + * @returns ChangeSignatureQualificationResponse + * + * @param ChangeSignatureQualificationRequest $request + * + * @return ChangeSignatureQualificationResponse + */ + public function changeSignatureQualification($request) + { + $runtime = new RuntimeOptions([]); + + return $this->changeSignatureQualificationWithOptions($request, $runtime); + } + + /** + * Queries whether some mobile phone numbers support card messages. + * + * @remarks + * ### QPS limit + * You can call this operation up to 2,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - CheckMobilesCardSupportRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns CheckMobilesCardSupportResponse + * * @param CheckMobilesCardSupportRequest $request * @param RuntimeOptions $runtime * @@ -304,33 +680,45 @@ class Dysmsapi extends OpenApiClient */ public function checkMobilesCardSupportWithOptions($request, $runtime) { - Utils::validateModel($request); + $request->validate(); $query = []; - if (!Utils::isUnset($request->mobiles)) { - $query['Mobiles'] = $request->mobiles; + if (null !== $request->mobiles) { + @$query['Mobiles'] = $request->mobiles; } - if (!Utils::isUnset($request->templateCode)) { - $query['TemplateCode'] = $request->templateCode; + + if (null !== $request->templateCode) { + @$query['TemplateCode'] = $request->templateCode; } + $req = new OpenApiRequest([ - 'query' => OpenApiUtilClient::query($query), + 'query' => Utils::query($query), ]); $params = new Params([ - 'action' => 'CheckMobilesCardSupport', - 'version' => '2017-05-25', - 'protocol' => 'HTTPS', - 'pathname' => '/', - 'method' => 'POST', - 'authType' => 'AK', - 'style' => 'RPC', + 'action' => 'CheckMobilesCardSupport', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', 'reqBodyType' => 'formData', - 'bodyType' => 'json', + 'bodyType' => 'json', ]); return CheckMobilesCardSupportResponse::fromMap($this->callApi($params, $req, $runtime)); } /** + * Queries whether some mobile phone numbers support card messages. + * + * @remarks + * ### QPS limit + * You can call this operation up to 2,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - CheckMobilesCardSupportRequest + * + * @returns CheckMobilesCardSupportResponse + * * @param CheckMobilesCardSupportRequest $request * * @return CheckMobilesCardSupportResponse @@ -343,6 +731,93 @@ class Dysmsapi extends OpenApiClient } /** + * Sends conversion rate information to Alibaba Cloud SMS. + * + * @param request - ConversionDataIntlRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns ConversionDataIntlResponse + * + * @param ConversionDataIntlRequest $request + * @param RuntimeOptions $runtime + * + * @return ConversionDataIntlResponse + */ + public function conversionDataIntlWithOptions($request, $runtime) + { + $request->validate(); + $query = []; + if (null !== $request->conversionRate) { + @$query['ConversionRate'] = $request->conversionRate; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->reportTime) { + @$query['ReportTime'] = $request->reportTime; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'ConversionDataIntl', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return ConversionDataIntlResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * Sends conversion rate information to Alibaba Cloud SMS. + * + * @param request - ConversionDataIntlRequest + * + * @returns ConversionDataIntlResponse + * + * @param ConversionDataIntlRequest $request + * + * @return ConversionDataIntlResponse + */ + public function conversionDataIntl($request) + { + $runtime = new RuntimeOptions([]); + + return $this->conversionDataIntlWithOptions($request, $runtime); + } + + /** + * Creates a card message template. + * + * @remarks + * The CreateCardSmsTemplate operation saves the card message template information, submits it to the mobile phone manufacturer for approval, and returns the message template ID. + * * If the type of the message template is not supported or events that are not supported by the mobile phone manufacturer are specified, the template is not submitted. For more information, see [Supported message templates](https://help.aliyun.com/document_detail/434611.html). + * * For information about sample card message templates, see [Sample card message templates](https://help.aliyun.com/document_detail/435361.html). + * ### QPS limit + * You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param tmpReq - CreateCardSmsTemplateRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns CreateCardSmsTemplateResponse + * * @param CreateCardSmsTemplateRequest $tmpReq * @param RuntimeOptions $runtime * @@ -350,44 +825,62 @@ class Dysmsapi extends OpenApiClient */ public function createCardSmsTemplateWithOptions($tmpReq, $runtime) { - Utils::validateModel($tmpReq); + $tmpReq->validate(); $request = new CreateCardSmsTemplateShrinkRequest([]); - OpenApiUtilClient::convert($tmpReq, $request); - if (!Utils::isUnset($tmpReq->template)) { - $request->templateShrink = OpenApiUtilClient::arrayToStringWithSpecifiedStyle($tmpReq->template, 'Template', 'json'); + Utils::convert($tmpReq, $request); + if (null !== $tmpReq->template) { + $request->templateShrink = Utils::arrayToStringWithSpecifiedStyle($tmpReq->template, 'Template', 'json'); } + $query = []; - if (!Utils::isUnset($request->factorys)) { - $query['Factorys'] = $request->factorys; + if (null !== $request->factorys) { + @$query['Factorys'] = $request->factorys; } - if (!Utils::isUnset($request->memo)) { - $query['Memo'] = $request->memo; + + if (null !== $request->memo) { + @$query['Memo'] = $request->memo; } - if (!Utils::isUnset($request->templateShrink)) { - $query['Template'] = $request->templateShrink; + + if (null !== $request->templateShrink) { + @$query['Template'] = $request->templateShrink; } - if (!Utils::isUnset($request->templateName)) { - $query['TemplateName'] = $request->templateName; + + if (null !== $request->templateName) { + @$query['TemplateName'] = $request->templateName; } + $req = new OpenApiRequest([ - 'query' => OpenApiUtilClient::query($query), + 'query' => Utils::query($query), ]); $params = new Params([ - 'action' => 'CreateCardSmsTemplate', - 'version' => '2017-05-25', - 'protocol' => 'HTTPS', - 'pathname' => '/', - 'method' => 'POST', - 'authType' => 'AK', - 'style' => 'RPC', + 'action' => 'CreateCardSmsTemplate', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', 'reqBodyType' => 'formData', - 'bodyType' => 'json', + 'bodyType' => 'json', ]); return CreateCardSmsTemplateResponse::fromMap($this->callApi($params, $req, $runtime)); } /** + * Creates a card message template. + * + * @remarks + * The CreateCardSmsTemplate operation saves the card message template information, submits it to the mobile phone manufacturer for approval, and returns the message template ID. + * * If the type of the message template is not supported or events that are not supported by the mobile phone manufacturer are specified, the template is not submitted. For more information, see [Supported message templates](https://help.aliyun.com/document_detail/434611.html). + * * For information about sample card message templates, see [Sample card message templates](https://help.aliyun.com/document_detail/435361.html). + * ### QPS limit + * You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - CreateCardSmsTemplateRequest + * + * @returns CreateCardSmsTemplateResponse + * * @param CreateCardSmsTemplateRequest $request * * @return CreateCardSmsTemplateResponse @@ -400,6 +893,886 @@ class Dysmsapi extends OpenApiClient } /** + * 数字短信签名操作订单. + * + * @param tmpReq - CreateDigitalSignOrderRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns CreateDigitalSignOrderResponse + * + * @param CreateDigitalSignOrderRequest $tmpReq + * @param RuntimeOptions $runtime + * + * @return CreateDigitalSignOrderResponse + */ + public function createDigitalSignOrderWithOptions($tmpReq, $runtime) + { + $tmpReq->validate(); + $request = new CreateDigitalSignOrderShrinkRequest([]); + Utils::convert($tmpReq, $request); + if (null !== $tmpReq->orderContext) { + $request->orderContextShrink = Utils::arrayToStringWithSpecifiedStyle($tmpReq->orderContext, 'OrderContext', 'json'); + } + + $query = []; + if (null !== $request->extendMessage) { + @$query['ExtendMessage'] = $request->extendMessage; + } + + if (null !== $request->orderContextShrink) { + @$query['OrderContext'] = $request->orderContextShrink; + } + + if (null !== $request->orderType) { + @$query['OrderType'] = $request->orderType; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->qualificationId) { + @$query['QualificationId'] = $request->qualificationId; + } + + if (null !== $request->qualificationVersion) { + @$query['QualificationVersion'] = $request->qualificationVersion; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + if (null !== $request->signId) { + @$query['SignId'] = $request->signId; + } + + if (null !== $request->signIndustry) { + @$query['SignIndustry'] = $request->signIndustry; + } + + if (null !== $request->signName) { + @$query['SignName'] = $request->signName; + } + + if (null !== $request->signSource) { + @$query['SignSource'] = $request->signSource; + } + + if (null !== $request->submitter) { + @$query['Submitter'] = $request->submitter; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'CreateDigitalSignOrder', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return CreateDigitalSignOrderResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * 数字短信签名操作订单. + * + * @param request - CreateDigitalSignOrderRequest + * + * @returns CreateDigitalSignOrderResponse + * + * @param CreateDigitalSignOrderRequest $request + * + * @return CreateDigitalSignOrderResponse + */ + public function createDigitalSignOrder($request) + { + $runtime = new RuntimeOptions([]); + + return $this->createDigitalSignOrderWithOptions($request, $runtime); + } + + /** + * 创建数字短信模板 + * + * @param request - CreateDigitalSmsTemplateRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns CreateDigitalSmsTemplateResponse + * + * @param CreateDigitalSmsTemplateRequest $request + * @param RuntimeOptions $runtime + * + * @return CreateDigitalSmsTemplateResponse + */ + public function createDigitalSmsTemplateWithOptions($request, $runtime) + { + $request->validate(); + $query = []; + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->remark) { + @$query['Remark'] = $request->remark; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + if (null !== $request->signName) { + @$query['SignName'] = $request->signName; + } + + if (null !== $request->templateContents) { + @$query['TemplateContents'] = $request->templateContents; + } + + if (null !== $request->templateName) { + @$query['TemplateName'] = $request->templateName; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'CreateDigitalSmsTemplate', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return CreateDigitalSmsTemplateResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * 创建数字短信模板 + * + * @param request - CreateDigitalSmsTemplateRequest + * + * @returns CreateDigitalSmsTemplateResponse + * + * @param CreateDigitalSmsTemplateRequest $request + * + * @return CreateDigitalSmsTemplateResponse + */ + public function createDigitalSmsTemplate($request) + { + $runtime = new RuntimeOptions([]); + + return $this->createDigitalSmsTemplateWithOptions($request, $runtime); + } + + /** + * Creates personalized short URLs. You can specify multiple mobile numbers and source URLs in the request. The operation returns the short URLs corresponding to the specified mobile numbers. You can obtain the click information of end users based on different short URLs. The click information helps you realize secondary marketing. QPS limit You can call this operation up to 500 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - CreateSmartShortUrlRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns CreateSmartShortUrlResponse + * + * @param CreateSmartShortUrlRequest $request + * @param RuntimeOptions $runtime + * + * @return CreateSmartShortUrlResponse + */ + public function createSmartShortUrlWithOptions($request, $runtime) + { + $request->validate(); + $query = []; + if (null !== $request->outId) { + @$query['OutId'] = $request->outId; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->phoneNumbers) { + @$query['PhoneNumbers'] = $request->phoneNumbers; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + if (null !== $request->sourceUrl) { + @$query['SourceUrl'] = $request->sourceUrl; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'CreateSmartShortUrl', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return CreateSmartShortUrlResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * Creates personalized short URLs. You can specify multiple mobile numbers and source URLs in the request. The operation returns the short URLs corresponding to the specified mobile numbers. You can obtain the click information of end users based on different short URLs. The click information helps you realize secondary marketing. QPS limit You can call this operation up to 500 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - CreateSmartShortUrlRequest + * + * @returns CreateSmartShortUrlResponse + * + * @param CreateSmartShortUrlRequest $request + * + * @return CreateSmartShortUrlResponse + */ + public function createSmartShortUrl($request) + { + $runtime = new RuntimeOptions([]); + + return $this->createSmartShortUrlWithOptions($request, $runtime); + } + + /** + * 创建APP-ICP备案对客openAPI. + * + * @param request - CreateSmsAppIcpRecordRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns CreateSmsAppIcpRecordResponse + * + * @param CreateSmsAppIcpRecordRequest $request + * @param RuntimeOptions $runtime + * + * @return CreateSmsAppIcpRecordResponse + */ + public function createSmsAppIcpRecordWithOptions($request, $runtime) + { + $request->validate(); + $query = []; + if (null !== $request->appApprovalDate) { + @$query['AppApprovalDate'] = $request->appApprovalDate; + } + + if (null !== $request->appIcpLicenseNumber) { + @$query['AppIcpLicenseNumber'] = $request->appIcpLicenseNumber; + } + + if (null !== $request->appIcpRecordPic) { + @$query['AppIcpRecordPic'] = $request->appIcpRecordPic; + } + + if (null !== $request->appPrincipalUnitName) { + @$query['AppPrincipalUnitName'] = $request->appPrincipalUnitName; + } + + if (null !== $request->appServiceName) { + @$query['AppServiceName'] = $request->appServiceName; + } + + if (null !== $request->domain) { + @$query['Domain'] = $request->domain; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'CreateSmsAppIcpRecord', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return CreateSmsAppIcpRecordResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * 创建APP-ICP备案对客openAPI. + * + * @param request - CreateSmsAppIcpRecordRequest + * + * @returns CreateSmsAppIcpRecordResponse + * + * @param CreateSmsAppIcpRecordRequest $request + * + * @return CreateSmsAppIcpRecordResponse + */ + public function createSmsAppIcpRecord($request) + { + $runtime = new RuntimeOptions([]); + + return $this->createSmsAppIcpRecordWithOptions($request, $runtime); + } + + /** + * 创建委托授权书. + * + * @param tmpReq - CreateSmsAuthorizationLetterRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns CreateSmsAuthorizationLetterResponse + * + * @param CreateSmsAuthorizationLetterRequest $tmpReq + * @param RuntimeOptions $runtime + * + * @return CreateSmsAuthorizationLetterResponse + */ + public function createSmsAuthorizationLetterWithOptions($tmpReq, $runtime) + { + $tmpReq->validate(); + $request = new CreateSmsAuthorizationLetterShrinkRequest([]); + Utils::convert($tmpReq, $request); + if (null !== $tmpReq->signList) { + $request->signListShrink = Utils::arrayToStringWithSpecifiedStyle($tmpReq->signList, 'SignList', 'json'); + } + + $query = []; + if (null !== $request->authorization) { + @$query['Authorization'] = $request->authorization; + } + + if (null !== $request->authorizationLetterExpDate) { + @$query['AuthorizationLetterExpDate'] = $request->authorizationLetterExpDate; + } + + if (null !== $request->authorizationLetterName) { + @$query['AuthorizationLetterName'] = $request->authorizationLetterName; + } + + if (null !== $request->authorizationLetterPic) { + @$query['AuthorizationLetterPic'] = $request->authorizationLetterPic; + } + + if (null !== $request->organizationCode) { + @$query['OrganizationCode'] = $request->organizationCode; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->proxyAuthorization) { + @$query['ProxyAuthorization'] = $request->proxyAuthorization; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + if (null !== $request->signListShrink) { + @$query['SignList'] = $request->signListShrink; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'CreateSmsAuthorizationLetter', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return CreateSmsAuthorizationLetterResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * 创建委托授权书. + * + * @param request - CreateSmsAuthorizationLetterRequest + * + * @returns CreateSmsAuthorizationLetterResponse + * + * @param CreateSmsAuthorizationLetterRequest $request + * + * @return CreateSmsAuthorizationLetterResponse + */ + public function createSmsAuthorizationLetter($request) + { + $runtime = new RuntimeOptions([]); + + return $this->createSmsAuthorizationLetterWithOptions($request, $runtime); + } + + /** + * Create SMS Signature. + * + * @remarks + * - For details about the announcement of changes to the new and original interfaces, see [Announcement on Updates to SMS Service Signature & Template Interfaces](https://help.aliyun.com/zh/sms/product-overview/announcement-on-sms-service-update-signature-template-interface). + * - Individual authenticated users can apply for one formal signature per natural day under the same Alibaba Cloud account, while enterprise authenticated users have no current restrictions. For details on the differences in rights between individual and enterprise users, please refer to [User Guide](https://help.aliyun.com/zh/sms/user-guide/usage-notes?spm). + * - Signature information applied through the interface will be synchronized in the SMS service console. For operations related to signatures in the console, see [SMS Signatures](https://help.aliyun.com/zh/sms/user-guide/create-signatures?spm). + * - After submitting the signature application, you can query the signature review status and details via the [GetSmsSign](https://help.aliyun.com/zh/sms/developer-reference/api-dysmsapi-2017-05-25-getsmssign?spm) interface. You can also [Configure Receipt Messages](https://help.aliyun.com/zh/sms/developer-reference/configure-delivery-receipts-1?spm) and obtain signature review status messages through SignSmsReport. + * + * @param tmpReq - CreateSmsSignRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns CreateSmsSignResponse + * + * @param CreateSmsSignRequest $tmpReq + * @param RuntimeOptions $runtime + * + * @return CreateSmsSignResponse + */ + public function createSmsSignWithOptions($tmpReq, $runtime) + { + $tmpReq->validate(); + $request = new CreateSmsSignShrinkRequest([]); + Utils::convert($tmpReq, $request); + if (null !== $tmpReq->moreData) { + $request->moreDataShrink = Utils::arrayToStringWithSpecifiedStyle($tmpReq->moreData, 'MoreData', 'json'); + } + + $query = []; + if (null !== $request->appIcpRecordId) { + @$query['AppIcpRecordId'] = $request->appIcpRecordId; + } + + if (null !== $request->applySceneContent) { + @$query['ApplySceneContent'] = $request->applySceneContent; + } + + if (null !== $request->authorizationLetterId) { + @$query['AuthorizationLetterId'] = $request->authorizationLetterId; + } + + if (null !== $request->moreDataShrink) { + @$query['MoreData'] = $request->moreDataShrink; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->qualificationId) { + @$query['QualificationId'] = $request->qualificationId; + } + + if (null !== $request->remark) { + @$query['Remark'] = $request->remark; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + if (null !== $request->signName) { + @$query['SignName'] = $request->signName; + } + + if (null !== $request->signSource) { + @$query['SignSource'] = $request->signSource; + } + + if (null !== $request->signType) { + @$query['SignType'] = $request->signType; + } + + if (null !== $request->thirdParty) { + @$query['ThirdParty'] = $request->thirdParty; + } + + if (null !== $request->trademarkId) { + @$query['TrademarkId'] = $request->trademarkId; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'CreateSmsSign', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return CreateSmsSignResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * Create SMS Signature. + * + * @remarks + * - For details about the announcement of changes to the new and original interfaces, see [Announcement on Updates to SMS Service Signature & Template Interfaces](https://help.aliyun.com/zh/sms/product-overview/announcement-on-sms-service-update-signature-template-interface). + * - Individual authenticated users can apply for one formal signature per natural day under the same Alibaba Cloud account, while enterprise authenticated users have no current restrictions. For details on the differences in rights between individual and enterprise users, please refer to [User Guide](https://help.aliyun.com/zh/sms/user-guide/usage-notes?spm). + * - Signature information applied through the interface will be synchronized in the SMS service console. For operations related to signatures in the console, see [SMS Signatures](https://help.aliyun.com/zh/sms/user-guide/create-signatures?spm). + * - After submitting the signature application, you can query the signature review status and details via the [GetSmsSign](https://help.aliyun.com/zh/sms/developer-reference/api-dysmsapi-2017-05-25-getsmssign?spm) interface. You can also [Configure Receipt Messages](https://help.aliyun.com/zh/sms/developer-reference/configure-delivery-receipts-1?spm) and obtain signature review status messages through SignSmsReport. + * + * @param request - CreateSmsSignRequest + * + * @returns CreateSmsSignResponse + * + * @param CreateSmsSignRequest $request + * + * @return CreateSmsSignResponse + */ + public function createSmsSign($request) + { + $runtime = new RuntimeOptions([]); + + return $this->createSmsSignWithOptions($request, $runtime); + } + + /** + * Create SMS Template. + * + * @remarks + * - For details about the changes of this new interface compared to the original one, please refer to [Announcement on the Update of SMS Service Signature & Template Interfaces](https://help.aliyun.com/zh/sms/product-overview/announcement-on-sms-service-update-signature-template-interface). + * - It is recommended to apply for SMS templates via the API with at least a 30-second interval between each request. + * - The template information applied through the API will be synchronized in the SMS service console. For operations related to templates in the console, please refer to SMS Templates. + * - After submitting the template application, you can query the audit status and details using the GetSmsTemplate interface. You can also configure delivery receipts to obtain the audit status messages via TemplateSmsReport. + * - Domestic SMS templates are not interchangeable with international/Hong Kong, Macao, and Taiwan SMS templates. Please apply for templates based on your business scenario. + * - Only enterprise-verified users can apply for promotional messages and international/Hong Kong, Macao, and Taiwan messages. For differences in rights between personal and enterprise users, please refer to Usage Instructions. + * + * @param tmpReq - CreateSmsTemplateRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns CreateSmsTemplateResponse + * + * @param CreateSmsTemplateRequest $tmpReq + * @param RuntimeOptions $runtime + * + * @return CreateSmsTemplateResponse + */ + public function createSmsTemplateWithOptions($tmpReq, $runtime) + { + $tmpReq->validate(); + $request = new CreateSmsTemplateShrinkRequest([]); + Utils::convert($tmpReq, $request); + if (null !== $tmpReq->moreData) { + $request->moreDataShrink = Utils::arrayToStringWithSpecifiedStyle($tmpReq->moreData, 'MoreData', 'json'); + } + + $query = []; + if (null !== $request->applySceneContent) { + @$query['ApplySceneContent'] = $request->applySceneContent; + } + + if (null !== $request->intlType) { + @$query['IntlType'] = $request->intlType; + } + + if (null !== $request->moreDataShrink) { + @$query['MoreData'] = $request->moreDataShrink; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->relatedSignName) { + @$query['RelatedSignName'] = $request->relatedSignName; + } + + if (null !== $request->remark) { + @$query['Remark'] = $request->remark; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + if (null !== $request->templateContent) { + @$query['TemplateContent'] = $request->templateContent; + } + + if (null !== $request->templateName) { + @$query['TemplateName'] = $request->templateName; + } + + if (null !== $request->templateRule) { + @$query['TemplateRule'] = $request->templateRule; + } + + if (null !== $request->templateType) { + @$query['TemplateType'] = $request->templateType; + } + + if (null !== $request->trafficDriving) { + @$query['TrafficDriving'] = $request->trafficDriving; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'CreateSmsTemplate', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return CreateSmsTemplateResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * Create SMS Template. + * + * @remarks + * - For details about the changes of this new interface compared to the original one, please refer to [Announcement on the Update of SMS Service Signature & Template Interfaces](https://help.aliyun.com/zh/sms/product-overview/announcement-on-sms-service-update-signature-template-interface). + * - It is recommended to apply for SMS templates via the API with at least a 30-second interval between each request. + * - The template information applied through the API will be synchronized in the SMS service console. For operations related to templates in the console, please refer to SMS Templates. + * - After submitting the template application, you can query the audit status and details using the GetSmsTemplate interface. You can also configure delivery receipts to obtain the audit status messages via TemplateSmsReport. + * - Domestic SMS templates are not interchangeable with international/Hong Kong, Macao, and Taiwan SMS templates. Please apply for templates based on your business scenario. + * - Only enterprise-verified users can apply for promotional messages and international/Hong Kong, Macao, and Taiwan messages. For differences in rights between personal and enterprise users, please refer to Usage Instructions. + * + * @param request - CreateSmsTemplateRequest + * + * @returns CreateSmsTemplateResponse + * + * @param CreateSmsTemplateRequest $request + * + * @return CreateSmsTemplateResponse + */ + public function createSmsTemplate($request) + { + $runtime = new RuntimeOptions([]); + + return $this->createSmsTemplateWithOptions($request, $runtime); + } + + /** + * 创建商标对客openAPI. + * + * @param request - CreateSmsTrademarkRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns CreateSmsTrademarkResponse + * + * @param CreateSmsTrademarkRequest $request + * @param RuntimeOptions $runtime + * + * @return CreateSmsTrademarkResponse + */ + public function createSmsTrademarkWithOptions($request, $runtime) + { + $request->validate(); + $query = []; + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + if (null !== $request->trademarkApplicantName) { + @$query['TrademarkApplicantName'] = $request->trademarkApplicantName; + } + + if (null !== $request->trademarkEffExpDate) { + @$query['TrademarkEffExpDate'] = $request->trademarkEffExpDate; + } + + if (null !== $request->trademarkName) { + @$query['TrademarkName'] = $request->trademarkName; + } + + if (null !== $request->trademarkPic) { + @$query['TrademarkPic'] = $request->trademarkPic; + } + + if (null !== $request->trademarkRegistrationNumber) { + @$query['TrademarkRegistrationNumber'] = $request->trademarkRegistrationNumber; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'CreateSmsTrademark', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return CreateSmsTrademarkResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * 创建商标对客openAPI. + * + * @param request - CreateSmsTrademarkRequest + * + * @returns CreateSmsTrademarkResponse + * + * @param CreateSmsTrademarkRequest $request + * + * @return CreateSmsTrademarkResponse + */ + public function createSmsTrademark($request) + { + $runtime = new RuntimeOptions([]); + + return $this->createSmsTrademarkWithOptions($request, $runtime); + } + + /** + * 删除验证码签名. + * + * @param request - DeleteExtCodeSignRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns DeleteExtCodeSignResponse + * + * @param DeleteExtCodeSignRequest $request + * @param RuntimeOptions $runtime + * + * @return DeleteExtCodeSignResponse + */ + public function deleteExtCodeSignWithOptions($request, $runtime) + { + $request->validate(); + $query = []; + if (null !== $request->extCode) { + @$query['ExtCode'] = $request->extCode; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + if (null !== $request->signName) { + @$query['SignName'] = $request->signName; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'DeleteExtCodeSign', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return DeleteExtCodeSignResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * 删除验证码签名. + * + * @param request - DeleteExtCodeSignRequest + * + * @returns DeleteExtCodeSignResponse + * + * @param DeleteExtCodeSignRequest $request + * + * @return DeleteExtCodeSignResponse + */ + public function deleteExtCodeSign($request) + { + $runtime = new RuntimeOptions([]); + + return $this->deleteExtCodeSignWithOptions($request, $runtime); + } + + /** + * Deletes a short URL. After you delete a short URL, it cannot be changed to its original state. + * + * @remarks + * ### QPS limits + * You can call this operation up to 100 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - DeleteShortUrlRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns DeleteShortUrlResponse + * * @param DeleteShortUrlRequest $request * @param RuntimeOptions $runtime * @@ -407,41 +1780,55 @@ class Dysmsapi extends OpenApiClient */ public function deleteShortUrlWithOptions($request, $runtime) { - Utils::validateModel($request); + $request->validate(); $query = []; - if (!Utils::isUnset($request->ownerId)) { - $query['OwnerId'] = $request->ownerId; + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; } - if (!Utils::isUnset($request->resourceOwnerAccount)) { - $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } - if (!Utils::isUnset($request->resourceOwnerId)) { - $query['ResourceOwnerId'] = $request->resourceOwnerId; + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; } + $body = []; - if (!Utils::isUnset($request->sourceUrl)) { - $body['SourceUrl'] = $request->sourceUrl; + if (null !== $request->sourceUrl) { + @$body['SourceUrl'] = $request->sourceUrl; } + $req = new OpenApiRequest([ - 'query' => OpenApiUtilClient::query($query), - 'body' => OpenApiUtilClient::parseToMap($body), + 'query' => Utils::query($query), + 'body' => Utils::parseToMap($body), ]); $params = new Params([ - 'action' => 'DeleteShortUrl', - 'version' => '2017-05-25', - 'protocol' => 'HTTPS', - 'pathname' => '/', - 'method' => 'POST', - 'authType' => 'AK', - 'style' => 'RPC', + 'action' => 'DeleteShortUrl', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', 'reqBodyType' => 'formData', - 'bodyType' => 'json', + 'bodyType' => 'json', ]); return DeleteShortUrlResponse::fromMap($this->callApi($params, $req, $runtime)); } /** + * Deletes a short URL. After you delete a short URL, it cannot be changed to its original state. + * + * @remarks + * ### QPS limits + * You can call this operation up to 100 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - DeleteShortUrlRequest + * + * @returns DeleteShortUrlResponse + * * @param DeleteShortUrlRequest $request * * @return DeleteShortUrlResponse @@ -454,6 +1841,92 @@ class Dysmsapi extends OpenApiClient } /** + * 删除资质对客openAPI. + * + * @param request - DeleteSmsQualificationRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns DeleteSmsQualificationResponse + * + * @param DeleteSmsQualificationRequest $request + * @param RuntimeOptions $runtime + * + * @return DeleteSmsQualificationResponse + */ + public function deleteSmsQualificationWithOptions($request, $runtime) + { + $request->validate(); + $query = []; + if (null !== $request->orderId) { + @$query['OrderId'] = $request->orderId; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->qualificationGroupId) { + @$query['QualificationGroupId'] = $request->qualificationGroupId; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'DeleteSmsQualification', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return DeleteSmsQualificationResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * 删除资质对客openAPI. + * + * @param request - DeleteSmsQualificationRequest + * + * @returns DeleteSmsQualificationResponse + * + * @param DeleteSmsQualificationRequest $request + * + * @return DeleteSmsQualificationResponse + */ + public function deleteSmsQualification($request) + { + $runtime = new RuntimeOptions([]); + + return $this->deleteSmsQualificationWithOptions($request, $runtime); + } + + /** + * Deletes a signature. + * + * @remarks + * You cannot delete a signature that has not been approved. + * * After you delete a signature, you cannot recover it. Proceed with caution. + * ### QPS limits + * You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - DeleteSmsSignRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns DeleteSmsSignResponse + * * @param DeleteSmsSignRequest $request * @param RuntimeOptions $runtime * @@ -461,39 +1934,55 @@ class Dysmsapi extends OpenApiClient */ public function deleteSmsSignWithOptions($request, $runtime) { - Utils::validateModel($request); + $request->validate(); $query = []; - if (!Utils::isUnset($request->ownerId)) { - $query['OwnerId'] = $request->ownerId; + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; } - if (!Utils::isUnset($request->resourceOwnerAccount)) { - $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } - if (!Utils::isUnset($request->resourceOwnerId)) { - $query['ResourceOwnerId'] = $request->resourceOwnerId; + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; } - if (!Utils::isUnset($request->signName)) { - $query['SignName'] = $request->signName; + + if (null !== $request->signName) { + @$query['SignName'] = $request->signName; } + $req = new OpenApiRequest([ - 'query' => OpenApiUtilClient::query($query), + 'query' => Utils::query($query), ]); $params = new Params([ - 'action' => 'DeleteSmsSign', - 'version' => '2017-05-25', - 'protocol' => 'HTTPS', - 'pathname' => '/', - 'method' => 'POST', - 'authType' => 'AK', - 'style' => 'RPC', + 'action' => 'DeleteSmsSign', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', 'reqBodyType' => 'formData', - 'bodyType' => 'json', + 'bodyType' => 'json', ]); return DeleteSmsSignResponse::fromMap($this->callApi($params, $req, $runtime)); } /** + * Deletes a signature. + * + * @remarks + * You cannot delete a signature that has not been approved. + * * After you delete a signature, you cannot recover it. Proceed with caution. + * ### QPS limits + * You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - DeleteSmsSignRequest + * + * @returns DeleteSmsSignResponse + * * @param DeleteSmsSignRequest $request * * @return DeleteSmsSignResponse @@ -506,6 +1995,20 @@ class Dysmsapi extends OpenApiClient } /** + * Deletes a message template. + * + * @remarks + * Message templates pending approval can be withdrawn. You can delete a message template pending approval on the Message Templates tab in the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview). + * * Message templates that have been approved can be deleted, and cannot be modified. You can delete a message template pending approval on the Message Templates tab in the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview). + * * You cannot recover deleted message templates. Proceed with caution. + * ### QPS limits + * You can call this operation up to 1,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - DeleteSmsTemplateRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns DeleteSmsTemplateResponse + * * @param DeleteSmsTemplateRequest $request * @param RuntimeOptions $runtime * @@ -513,39 +2016,56 @@ class Dysmsapi extends OpenApiClient */ public function deleteSmsTemplateWithOptions($request, $runtime) { - Utils::validateModel($request); + $request->validate(); $query = []; - if (!Utils::isUnset($request->ownerId)) { - $query['OwnerId'] = $request->ownerId; + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; } - if (!Utils::isUnset($request->resourceOwnerAccount)) { - $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } - if (!Utils::isUnset($request->resourceOwnerId)) { - $query['ResourceOwnerId'] = $request->resourceOwnerId; + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; } - if (!Utils::isUnset($request->templateCode)) { - $query['TemplateCode'] = $request->templateCode; + + if (null !== $request->templateCode) { + @$query['TemplateCode'] = $request->templateCode; } + $req = new OpenApiRequest([ - 'query' => OpenApiUtilClient::query($query), + 'query' => Utils::query($query), ]); $params = new Params([ - 'action' => 'DeleteSmsTemplate', - 'version' => '2017-05-25', - 'protocol' => 'HTTPS', - 'pathname' => '/', - 'method' => 'POST', - 'authType' => 'AK', - 'style' => 'RPC', + 'action' => 'DeleteSmsTemplate', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', 'reqBodyType' => 'formData', - 'bodyType' => 'json', + 'bodyType' => 'json', ]); return DeleteSmsTemplateResponse::fromMap($this->callApi($params, $req, $runtime)); } /** + * Deletes a message template. + * + * @remarks + * Message templates pending approval can be withdrawn. You can delete a message template pending approval on the Message Templates tab in the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview). + * * Message templates that have been approved can be deleted, and cannot be modified. You can delete a message template pending approval on the Message Templates tab in the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview). + * * You cannot recover deleted message templates. Proceed with caution. + * ### QPS limits + * You can call this operation up to 1,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - DeleteSmsTemplateRequest + * + * @returns DeleteSmsTemplateResponse + * * @param DeleteSmsTemplateRequest $request * * @return DeleteSmsTemplateResponse @@ -558,6 +2078,110 @@ class Dysmsapi extends OpenApiClient } /** + * Query card sending details. + * + * @param request - GetCardSmsDetailsRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns GetCardSmsDetailsResponse + * + * @param GetCardSmsDetailsRequest $request + * @param RuntimeOptions $runtime + * + * @return GetCardSmsDetailsResponse + */ + public function getCardSmsDetailsWithOptions($request, $runtime) + { + $request->validate(); + $query = []; + if (null !== $request->bizCardId) { + @$query['BizCardId'] = $request->bizCardId; + } + + if (null !== $request->bizDigitId) { + @$query['BizDigitId'] = $request->bizDigitId; + } + + if (null !== $request->bizSmsId) { + @$query['BizSmsId'] = $request->bizSmsId; + } + + if (null !== $request->currentPage) { + @$query['CurrentPage'] = $request->currentPage; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->pageSize) { + @$query['PageSize'] = $request->pageSize; + } + + if (null !== $request->phoneNumber) { + @$query['PhoneNumber'] = $request->phoneNumber; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + if (null !== $request->sendDate) { + @$query['SendDate'] = $request->sendDate; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'GetCardSmsDetails', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return GetCardSmsDetailsResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * Query card sending details. + * + * @param request - GetCardSmsDetailsRequest + * + * @returns GetCardSmsDetailsResponse + * + * @param GetCardSmsDetailsRequest $request + * + * @return GetCardSmsDetailsResponse + */ + public function getCardSmsDetails($request) + { + $runtime = new RuntimeOptions([]); + + return $this->getCardSmsDetailsWithOptions($request, $runtime); + } + + /** + * Queries the short URLs of a card messages template. + * + * @remarks + * ### QPS limit + * You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - GetCardSmsLinkRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns GetCardSmsLinkResponse + * * @param GetCardSmsLinkRequest $request * @param RuntimeOptions $runtime * @@ -565,54 +2189,73 @@ class Dysmsapi extends OpenApiClient */ public function getCardSmsLinkWithOptions($request, $runtime) { - Utils::validateModel($request); + $request->validate(); $query = []; - if (!Utils::isUnset($request->cardCodeType)) { - $query['CardCodeType'] = $request->cardCodeType; + if (null !== $request->cardCodeType) { + @$query['CardCodeType'] = $request->cardCodeType; } - if (!Utils::isUnset($request->cardLinkType)) { - $query['CardLinkType'] = $request->cardLinkType; + + if (null !== $request->cardLinkType) { + @$query['CardLinkType'] = $request->cardLinkType; } - if (!Utils::isUnset($request->cardTemplateCode)) { - $query['CardTemplateCode'] = $request->cardTemplateCode; + + if (null !== $request->cardTemplateCode) { + @$query['CardTemplateCode'] = $request->cardTemplateCode; } - if (!Utils::isUnset($request->cardTemplateParamJson)) { - $query['CardTemplateParamJson'] = $request->cardTemplateParamJson; + + if (null !== $request->cardTemplateParamJson) { + @$query['CardTemplateParamJson'] = $request->cardTemplateParamJson; } - if (!Utils::isUnset($request->customShortCodeJson)) { - $query['CustomShortCodeJson'] = $request->customShortCodeJson; + + if (null !== $request->customShortCodeJson) { + @$query['CustomShortCodeJson'] = $request->customShortCodeJson; } - if (!Utils::isUnset($request->domain)) { - $query['Domain'] = $request->domain; + + if (null !== $request->domain) { + @$query['Domain'] = $request->domain; } - if (!Utils::isUnset($request->outId)) { - $query['OutId'] = $request->outId; + + if (null !== $request->outId) { + @$query['OutId'] = $request->outId; } - if (!Utils::isUnset($request->phoneNumberJson)) { - $query['PhoneNumberJson'] = $request->phoneNumberJson; + + if (null !== $request->phoneNumberJson) { + @$query['PhoneNumberJson'] = $request->phoneNumberJson; } - if (!Utils::isUnset($request->signNameJson)) { - $query['SignNameJson'] = $request->signNameJson; + + if (null !== $request->signNameJson) { + @$query['SignNameJson'] = $request->signNameJson; } + $req = new OpenApiRequest([ - 'query' => OpenApiUtilClient::query($query), + 'query' => Utils::query($query), ]); $params = new Params([ - 'action' => 'GetCardSmsLink', - 'version' => '2017-05-25', - 'protocol' => 'HTTPS', - 'pathname' => '/', - 'method' => 'POST', - 'authType' => 'AK', - 'style' => 'RPC', + 'action' => 'GetCardSmsLink', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', 'reqBodyType' => 'formData', - 'bodyType' => 'json', + 'bodyType' => 'json', ]); return GetCardSmsLinkResponse::fromMap($this->callApi($params, $req, $runtime)); } /** + * Queries the short URLs of a card messages template. + * + * @remarks + * ### QPS limit + * You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - GetCardSmsLinkRequest + * + * @returns GetCardSmsLinkResponse + * * @param GetCardSmsLinkRequest $request * * @return GetCardSmsLinkResponse @@ -625,6 +2268,17 @@ class Dysmsapi extends OpenApiClient } /** + * Converts a resource uploaded to the specified Object Storage Service (OSS) bucket for unified management. Then, a resource ID is returned. You can manage the resource based on the ID. + * + * @remarks + * ### QPS limit + * You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - GetMediaResourceIdRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns GetMediaResourceIdResponse + * * @param GetMediaResourceIdRequest $request * @param RuntimeOptions $runtime * @@ -632,42 +2286,57 @@ class Dysmsapi extends OpenApiClient */ public function getMediaResourceIdWithOptions($request, $runtime) { - Utils::validateModel($request); + $request->validate(); $query = []; - if (!Utils::isUnset($request->extendInfo)) { - $query['ExtendInfo'] = $request->extendInfo; + if (null !== $request->extendInfo) { + @$query['ExtendInfo'] = $request->extendInfo; } - if (!Utils::isUnset($request->fileSize)) { - $query['FileSize'] = $request->fileSize; + + if (null !== $request->fileSize) { + @$query['FileSize'] = $request->fileSize; } - if (!Utils::isUnset($request->memo)) { - $query['Memo'] = $request->memo; + + if (null !== $request->memo) { + @$query['Memo'] = $request->memo; } - if (!Utils::isUnset($request->ossKey)) { - $query['OssKey'] = $request->ossKey; + + if (null !== $request->ossKey) { + @$query['OssKey'] = $request->ossKey; } - if (!Utils::isUnset($request->resourceType)) { - $query['ResourceType'] = $request->resourceType; + + if (null !== $request->resourceType) { + @$query['ResourceType'] = $request->resourceType; } + $req = new OpenApiRequest([ - 'query' => OpenApiUtilClient::query($query), + 'query' => Utils::query($query), ]); $params = new Params([ - 'action' => 'GetMediaResourceId', - 'version' => '2017-05-25', - 'protocol' => 'HTTPS', - 'pathname' => '/', - 'method' => 'POST', - 'authType' => 'AK', - 'style' => 'RPC', + 'action' => 'GetMediaResourceId', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', 'reqBodyType' => 'formData', - 'bodyType' => 'json', + 'bodyType' => 'json', ]); return GetMediaResourceIdResponse::fromMap($this->callApi($params, $req, $runtime)); } /** + * Converts a resource uploaded to the specified Object Storage Service (OSS) bucket for unified management. Then, a resource ID is returned. You can manage the resource based on the ID. + * + * @remarks + * ### QPS limit + * You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - GetMediaResourceIdRequest + * + * @returns GetMediaResourceIdResponse + * * @param GetMediaResourceIdRequest $request * * @return GetMediaResourceIdResponse @@ -680,29 +2349,50 @@ class Dysmsapi extends OpenApiClient } /** + * Queries the OSS configuration information about card messages. + * + * @remarks + * Resources such as images and videos used for card message templates can be uploaded to Object Storage Service (OSS) buckets for storage. For more information, see [Upload files to OSS](https://help.aliyun.com/document_detail/437303.html). + * ### QPS limit + * You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - GetOSSInfoForCardTemplateRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns GetOSSInfoForCardTemplateResponse + * * @param RuntimeOptions $runtime * * @return GetOSSInfoForCardTemplateResponse */ public function getOSSInfoForCardTemplateWithOptions($runtime) { - $req = new OpenApiRequest([]); + $req = new OpenApiRequest([]); $params = new Params([ - 'action' => 'GetOSSInfoForCardTemplate', - 'version' => '2017-05-25', - 'protocol' => 'HTTPS', - 'pathname' => '/', - 'method' => 'POST', - 'authType' => 'AK', - 'style' => 'RPC', + 'action' => 'GetOSSInfoForCardTemplate', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', 'reqBodyType' => 'formData', - 'bodyType' => 'json', + 'bodyType' => 'json', ]); return GetOSSInfoForCardTemplateResponse::fromMap($this->callApi($params, $req, $runtime)); } /** + * Queries the OSS configuration information about card messages. + * + * @remarks + * Resources such as images and videos used for card message templates can be uploaded to Object Storage Service (OSS) buckets for storage. For more information, see [Upload files to OSS](https://help.aliyun.com/document_detail/437303.html). + * ### QPS limit + * You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @returns GetOSSInfoForCardTemplateResponse + * * @return GetOSSInfoForCardTemplateResponse */ public function getOSSInfoForCardTemplate() @@ -713,6 +2403,499 @@ class Dysmsapi extends OpenApiClient } /** + * SMS File Upload, Get Authorization Info. + * + * @remarks + * - When creating signatures or templates, you can upload materials such as login pages with links, backend page screenshots, software copyrights, supplementary agreements, etc. This helps the review personnel understand your business details. If there are multiple materials, they can be combined into one file, supporting png, jpg, jpeg, doc, docx, pdf formats. + * - For additional materials needed when creating signatures or templates, you can upload them to the OSS file system for storage. For file upload operations, refer to [OSS File Upload](https://help.aliyun.com/zh/sms/upload-files-through-oss). + * + * @param request - GetOSSInfoForUploadFileRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns GetOSSInfoForUploadFileResponse + * + * @param GetOSSInfoForUploadFileRequest $request + * @param RuntimeOptions $runtime + * + * @return GetOSSInfoForUploadFileResponse + */ + public function getOSSInfoForUploadFileWithOptions($request, $runtime) + { + $request->validate(); + $query = []; + if (null !== $request->bizType) { + @$query['BizType'] = $request->bizType; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'GetOSSInfoForUploadFile', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return GetOSSInfoForUploadFileResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * SMS File Upload, Get Authorization Info. + * + * @remarks + * - When creating signatures or templates, you can upload materials such as login pages with links, backend page screenshots, software copyrights, supplementary agreements, etc. This helps the review personnel understand your business details. If there are multiple materials, they can be combined into one file, supporting png, jpg, jpeg, doc, docx, pdf formats. + * - For additional materials needed when creating signatures or templates, you can upload them to the OSS file system for storage. For file upload operations, refer to [OSS File Upload](https://help.aliyun.com/zh/sms/upload-files-through-oss). + * + * @param request - GetOSSInfoForUploadFileRequest + * + * @returns GetOSSInfoForUploadFileResponse + * + * @param GetOSSInfoForUploadFileRequest $request + * + * @return GetOSSInfoForUploadFileResponse + */ + public function getOSSInfoForUploadFile($request) + { + $runtime = new RuntimeOptions([]); + + return $this->getOSSInfoForUploadFileWithOptions($request, $runtime); + } + + /** + * 上传文件获取oss配置. + * + * @param request - GetQualificationOssInfoRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns GetQualificationOssInfoResponse + * + * @param GetQualificationOssInfoRequest $request + * @param RuntimeOptions $runtime + * + * @return GetQualificationOssInfoResponse + */ + public function getQualificationOssInfoWithOptions($request, $runtime) + { + $request->validate(); + $query = []; + if (null !== $request->bizType) { + @$query['BizType'] = $request->bizType; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'GetQualificationOssInfo', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return GetQualificationOssInfoResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * 上传文件获取oss配置. + * + * @param request - GetQualificationOssInfoRequest + * + * @returns GetQualificationOssInfoResponse + * + * @param GetQualificationOssInfoRequest $request + * + * @return GetQualificationOssInfoResponse + */ + public function getQualificationOssInfo($request) + { + $runtime = new RuntimeOptions([]); + + return $this->getQualificationOssInfoWithOptions($request, $runtime); + } + + /** + * 获取OCR的OSS信息. + * + * @param request - GetSmsOcrOssInfoRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns GetSmsOcrOssInfoResponse + * + * @param GetSmsOcrOssInfoRequest $request + * @param RuntimeOptions $runtime + * + * @return GetSmsOcrOssInfoResponse + */ + public function getSmsOcrOssInfoWithOptions($request, $runtime) + { + $request->validate(); + $query = []; + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + if (null !== $request->taskType) { + @$query['TaskType'] = $request->taskType; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'GetSmsOcrOssInfo', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return GetSmsOcrOssInfoResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * 获取OCR的OSS信息. + * + * @param request - GetSmsOcrOssInfoRequest + * + * @returns GetSmsOcrOssInfoResponse + * + * @param GetSmsOcrOssInfoRequest $request + * + * @return GetSmsOcrOssInfoResponse + */ + public function getSmsOcrOssInfo($request) + { + $runtime = new RuntimeOptions([]); + + return $this->getSmsOcrOssInfoWithOptions($request, $runtime); + } + + /** + * Query SMS Signature Details. + * + * @remarks + * - For details about the changes of this new interface and the original one, please refer to [Announcement on the Update of SMS Signature & Template Interfaces](https://help.aliyun.com/zh/sms/product-overview/announcement-on-sms-service-update-signature-template-interface). + * - Review Time: Generally, after submitting the signature, Alibaba Cloud expects to complete the review within 2 hours (Review Business Hours: Monday to Sunday 9:00~21:00, with legal holidays postponed). It is recommended to submit your application before 18:00. + * - If the signature fails the review, the reason for the failure will be returned. Please refer to [Handling Suggestions for Failed SMS Reviews](https://help.aliyun.com/zh/sms/user-guide/causes-of-application-failures-and-suggestions?spm), invoke the [UpdateSmsSign](https://help.aliyun.com/zh/sms/developer-reference/api-dysmsapi-2017-05-25-updatesmssign?spm) API, or modify the unapproved SMS signature on the [Signature Management](https://dysms.console.aliyun.com/domestic/text/sign) page. + * + * @param request - GetSmsSignRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns GetSmsSignResponse + * + * @param GetSmsSignRequest $request + * @param RuntimeOptions $runtime + * + * @return GetSmsSignResponse + */ + public function getSmsSignWithOptions($request, $runtime) + { + $request->validate(); + $query = []; + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + if (null !== $request->signName) { + @$query['SignName'] = $request->signName; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'GetSmsSign', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return GetSmsSignResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * Query SMS Signature Details. + * + * @remarks + * - For details about the changes of this new interface and the original one, please refer to [Announcement on the Update of SMS Signature & Template Interfaces](https://help.aliyun.com/zh/sms/product-overview/announcement-on-sms-service-update-signature-template-interface). + * - Review Time: Generally, after submitting the signature, Alibaba Cloud expects to complete the review within 2 hours (Review Business Hours: Monday to Sunday 9:00~21:00, with legal holidays postponed). It is recommended to submit your application before 18:00. + * - If the signature fails the review, the reason for the failure will be returned. Please refer to [Handling Suggestions for Failed SMS Reviews](https://help.aliyun.com/zh/sms/user-guide/causes-of-application-failures-and-suggestions?spm), invoke the [UpdateSmsSign](https://help.aliyun.com/zh/sms/developer-reference/api-dysmsapi-2017-05-25-updatesmssign?spm) API, or modify the unapproved SMS signature on the [Signature Management](https://dysms.console.aliyun.com/domestic/text/sign) page. + * + * @param request - GetSmsSignRequest + * + * @returns GetSmsSignResponse + * + * @param GetSmsSignRequest $request + * + * @return GetSmsSignResponse + */ + public function getSmsSign($request) + { + $runtime = new RuntimeOptions([]); + + return $this->getSmsSignWithOptions($request, $runtime); + } + + /** + * Query Text SMS Template Details. + * + * @remarks + * - For details about the announcement of changes to the new and original interfaces, see [Announcement on Updates to SMS Service Signature & Template Interfaces](https://help.aliyun.com/zh/sms/product-overview/announcement-on-sms-service-update-signature-template-interface). + * - Review Time: Under normal circumstances, Alibaba Cloud expects to complete the review within 2 hours after template submission (review working hours: Monday to Sunday 9:00~21:00, with statutory holidays postponed). It is recommended to submit your application before 18:00. + * - If the template fails the review, the reason for the failure will be returned. Please refer to [Handling Suggestions for Failed SMS Reviews](https://help.aliyun.com/zh/sms/user-guide/causes-of-application-failures-and-suggestions?spm=a2c4g.11186623.0.0.41fd339f3bPSCQ), invoke the [ModifySmsTemplate](https://help.aliyun.com/zh/sms/developer-reference/api-dysmsapi-2017-05-25-modifysmstemplate?spm=a2c4g.11186623.0.0.5b1f6e8bQloFit) API or modify the SMS template on the [Template Management](https://dysms.console.aliyun.com/domestic/text/template) page. + * - The current QuerySmsTemplate interface queries the audit details of a single template by template code. The [QuerySmsTemplateList](https://help.aliyun.com/zh/sms/developer-reference/api-dysmsapi-2017-05-25-querysmstemplatelist?spm=a2c4g.11186623.0.0.24086e8bO8cFn4) interface can query the template details of all templates under your current account. + * + * @param request - GetSmsTemplateRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns GetSmsTemplateResponse + * + * @param GetSmsTemplateRequest $request + * @param RuntimeOptions $runtime + * + * @return GetSmsTemplateResponse + */ + public function getSmsTemplateWithOptions($request, $runtime) + { + $request->validate(); + $query = []; + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + if (null !== $request->templateCode) { + @$query['TemplateCode'] = $request->templateCode; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'GetSmsTemplate', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return GetSmsTemplateResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * Query Text SMS Template Details. + * + * @remarks + * - For details about the announcement of changes to the new and original interfaces, see [Announcement on Updates to SMS Service Signature & Template Interfaces](https://help.aliyun.com/zh/sms/product-overview/announcement-on-sms-service-update-signature-template-interface). + * - Review Time: Under normal circumstances, Alibaba Cloud expects to complete the review within 2 hours after template submission (review working hours: Monday to Sunday 9:00~21:00, with statutory holidays postponed). It is recommended to submit your application before 18:00. + * - If the template fails the review, the reason for the failure will be returned. Please refer to [Handling Suggestions for Failed SMS Reviews](https://help.aliyun.com/zh/sms/user-guide/causes-of-application-failures-and-suggestions?spm=a2c4g.11186623.0.0.41fd339f3bPSCQ), invoke the [ModifySmsTemplate](https://help.aliyun.com/zh/sms/developer-reference/api-dysmsapi-2017-05-25-modifysmstemplate?spm=a2c4g.11186623.0.0.5b1f6e8bQloFit) API or modify the SMS template on the [Template Management](https://dysms.console.aliyun.com/domestic/text/template) page. + * - The current QuerySmsTemplate interface queries the audit details of a single template by template code. The [QuerySmsTemplateList](https://help.aliyun.com/zh/sms/developer-reference/api-dysmsapi-2017-05-25-querysmstemplatelist?spm=a2c4g.11186623.0.0.24086e8bO8cFn4) interface can query the template details of all templates under your current account. + * + * @param request - GetSmsTemplateRequest + * + * @returns GetSmsTemplateResponse + * + * @param GetSmsTemplateRequest $request + * + * @return GetSmsTemplateResponse + */ + public function getSmsTemplate($request) + { + $runtime = new RuntimeOptions([]); + + return $this->getSmsTemplateWithOptions($request, $runtime); + } + + /** + * 查询模板列表详情(新接口). + * + * @param tmpReq - GetSmsTemplateListRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns GetSmsTemplateListResponse + * + * @param GetSmsTemplateListRequest $tmpReq + * @param RuntimeOptions $runtime + * + * @return GetSmsTemplateListResponse + */ + public function getSmsTemplateListWithOptions($tmpReq, $runtime) + { + $tmpReq->validate(); + $request = new GetSmsTemplateListShrinkRequest([]); + Utils::convert($tmpReq, $request); + if (null !== $tmpReq->usableStateList) { + $request->usableStateListShrink = Utils::arrayToStringWithSpecifiedStyle($tmpReq->usableStateList, 'UsableStateList', 'json'); + } + + $query = []; + if (null !== $request->auditStatus) { + @$query['AuditStatus'] = $request->auditStatus; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->pageIndex) { + @$query['PageIndex'] = $request->pageIndex; + } + + if (null !== $request->pageSize) { + @$query['PageSize'] = $request->pageSize; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + if (null !== $request->signName) { + @$query['SignName'] = $request->signName; + } + + if (null !== $request->templateCode) { + @$query['TemplateCode'] = $request->templateCode; + } + + if (null !== $request->templateName) { + @$query['TemplateName'] = $request->templateName; + } + + if (null !== $request->templateTag) { + @$query['TemplateTag'] = $request->templateTag; + } + + if (null !== $request->templateType) { + @$query['TemplateType'] = $request->templateType; + } + + if (null !== $request->usableStateListShrink) { + @$query['UsableStateList'] = $request->usableStateListShrink; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'GetSmsTemplateList', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return GetSmsTemplateListResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * 查询模板列表详情(新接口). + * + * @param request - GetSmsTemplateListRequest + * + * @returns GetSmsTemplateListResponse + * + * @param GetSmsTemplateListRequest $request + * + * @return GetSmsTemplateListResponse + */ + public function getSmsTemplateList($request) + { + $runtime = new RuntimeOptions([]); + + return $this->getSmsTemplateListWithOptions($request, $runtime); + } + + /** + * Queries the tags of a message template. + * + * @remarks + * ### QPS limit + * You can call this operation up to 50 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - ListTagResourcesRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns ListTagResourcesResponse + * * @param ListTagResourcesRequest $request * @param RuntimeOptions $runtime * @@ -720,57 +2903,77 @@ class Dysmsapi extends OpenApiClient */ public function listTagResourcesWithOptions($request, $runtime) { - Utils::validateModel($request); + $request->validate(); $query = []; - if (!Utils::isUnset($request->nextToken)) { - $query['NextToken'] = $request->nextToken; + if (null !== $request->nextToken) { + @$query['NextToken'] = $request->nextToken; } - if (!Utils::isUnset($request->ownerId)) { - $query['OwnerId'] = $request->ownerId; + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; } - if (!Utils::isUnset($request->pageSize)) { - $query['PageSize'] = $request->pageSize; + + if (null !== $request->pageSize) { + @$query['PageSize'] = $request->pageSize; } - if (!Utils::isUnset($request->prodCode)) { - $query['ProdCode'] = $request->prodCode; + + if (null !== $request->prodCode) { + @$query['ProdCode'] = $request->prodCode; } - if (!Utils::isUnset($request->regionId)) { - $query['RegionId'] = $request->regionId; + + if (null !== $request->regionId) { + @$query['RegionId'] = $request->regionId; } - if (!Utils::isUnset($request->resourceId)) { - $query['ResourceId'] = $request->resourceId; + + if (null !== $request->resourceId) { + @$query['ResourceId'] = $request->resourceId; } - if (!Utils::isUnset($request->resourceOwnerAccount)) { - $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } - if (!Utils::isUnset($request->resourceOwnerId)) { - $query['ResourceOwnerId'] = $request->resourceOwnerId; + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; } - if (!Utils::isUnset($request->resourceType)) { - $query['ResourceType'] = $request->resourceType; + + if (null !== $request->resourceType) { + @$query['ResourceType'] = $request->resourceType; } - if (!Utils::isUnset($request->tag)) { - $query['Tag'] = $request->tag; + + if (null !== $request->tag) { + @$query['Tag'] = $request->tag; } + $req = new OpenApiRequest([ - 'query' => OpenApiUtilClient::query($query), + 'query' => Utils::query($query), ]); $params = new Params([ - 'action' => 'ListTagResources', - 'version' => '2017-05-25', - 'protocol' => 'HTTPS', - 'pathname' => '/', - 'method' => 'POST', - 'authType' => 'AK', - 'style' => 'RPC', + 'action' => 'ListTagResources', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', 'reqBodyType' => 'formData', - 'bodyType' => 'json', + 'bodyType' => 'json', ]); return ListTagResourcesResponse::fromMap($this->callApi($params, $req, $runtime)); } /** + * Queries the tags of a message template. + * + * @remarks + * ### QPS limit + * You can call this operation up to 50 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - ListTagResourcesRequest + * + * @returns ListTagResourcesResponse + * * @param ListTagResourcesRequest $request * * @return ListTagResourcesResponse @@ -783,6 +2986,23 @@ class Dysmsapi extends OpenApiClient } /** + * Modifies a rejected signature and submit it for approval. Signatures that are pending approval or have been approved cannot be modified. + * + * @remarks + * You can call the operation or use the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview) to modify an existing signature and submit the signature for approval. The signature must comply with the [signature specifications](https://help.aliyun.com/document_detail/108076.html). + * For more information, see [Usage notes](https://help.aliyun.com/document_detail/55324.html). + * ### QPS limits + * You can call this operation up to 1,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * > + * * Signatures pending approval cannot be modified. + * * You cannot modify a signature after it is approved. If you no longer need the signature, you can delete it. + * * If you are an individual user, you cannot apply for a new signature on the same day that your signature is rejected or deleted. We recommend that you modify the rejected signature and submit it again. + * + * @param request - ModifySmsSignRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns ModifySmsSignResponse + * * @param ModifySmsSignRequest $request * @param RuntimeOptions $runtime * @@ -790,53 +3010,77 @@ class Dysmsapi extends OpenApiClient */ public function modifySmsSignWithOptions($request, $runtime) { - Utils::validateModel($request); + $request->validate(); $query = []; - if (!Utils::isUnset($request->ownerId)) { - $query['OwnerId'] = $request->ownerId; + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; } - if (!Utils::isUnset($request->remark)) { - $query['Remark'] = $request->remark; + + if (null !== $request->remark) { + @$query['Remark'] = $request->remark; } - if (!Utils::isUnset($request->resourceOwnerAccount)) { - $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } - if (!Utils::isUnset($request->resourceOwnerId)) { - $query['ResourceOwnerId'] = $request->resourceOwnerId; + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; } - if (!Utils::isUnset($request->signName)) { - $query['SignName'] = $request->signName; + + if (null !== $request->signName) { + @$query['SignName'] = $request->signName; } - if (!Utils::isUnset($request->signSource)) { - $query['SignSource'] = $request->signSource; + + if (null !== $request->signSource) { + @$query['SignSource'] = $request->signSource; } - if (!Utils::isUnset($request->signType)) { - $query['SignType'] = $request->signType; + + if (null !== $request->signType) { + @$query['SignType'] = $request->signType; } + $body = []; - if (!Utils::isUnset($request->signFileList)) { - $body['SignFileList'] = $request->signFileList; + if (null !== $request->signFileList) { + @$body['SignFileList'] = $request->signFileList; } + $req = new OpenApiRequest([ - 'query' => OpenApiUtilClient::query($query), - 'body' => OpenApiUtilClient::parseToMap($body), + 'query' => Utils::query($query), + 'body' => Utils::parseToMap($body), ]); $params = new Params([ - 'action' => 'ModifySmsSign', - 'version' => '2017-05-25', - 'protocol' => 'HTTPS', - 'pathname' => '/', - 'method' => 'POST', - 'authType' => 'AK', - 'style' => 'RPC', + 'action' => 'ModifySmsSign', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', 'reqBodyType' => 'formData', - 'bodyType' => 'json', + 'bodyType' => 'json', ]); return ModifySmsSignResponse::fromMap($this->callApi($params, $req, $runtime)); } /** + * Modifies a rejected signature and submit it for approval. Signatures that are pending approval or have been approved cannot be modified. + * + * @remarks + * You can call the operation or use the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm#/overview) to modify an existing signature and submit the signature for approval. The signature must comply with the [signature specifications](https://help.aliyun.com/document_detail/108076.html). + * For more information, see [Usage notes](https://help.aliyun.com/document_detail/55324.html). + * ### QPS limits + * You can call this operation up to 1,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * > + * * Signatures pending approval cannot be modified. + * * You cannot modify a signature after it is approved. If you no longer need the signature, you can delete it. + * * If you are an individual user, you cannot apply for a new signature on the same day that your signature is rejected or deleted. We recommend that you modify the rejected signature and submit it again. + * + * @param request - ModifySmsSignRequest + * + * @returns ModifySmsSignResponse + * * @param ModifySmsSignRequest $request * * @return ModifySmsSignResponse @@ -849,6 +3093,22 @@ class Dysmsapi extends OpenApiClient } /** + * Modifies the information of an unapproved message template and submits it for review again. + * + * @remarks + * After you apply for a message template, if the template fails to pass the review, you can call this operation to modify the template and submit the template again. You can call this operation to modify only a template for a specific message type. + * The template content must comply with the [SMS template specifications](https://help.aliyun.com/document_detail/108253.html). + * For more information, see [Usage notes](https://help.aliyun.com/document_detail/55324.html). + * ### QPS limit + * You can call this operation up to 1,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @deprecated openAPI ModifySmsTemplate is deprecated, please use Dysmsapi::2017-05-25::UpdateSmsTemplate instead + * + * @param request - ModifySmsTemplateRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns ModifySmsTemplateResponse + * * @param ModifySmsTemplateRequest $request * @param RuntimeOptions $runtime * @@ -856,51 +3116,75 @@ class Dysmsapi extends OpenApiClient */ public function modifySmsTemplateWithOptions($request, $runtime) { - Utils::validateModel($request); + $request->validate(); $query = []; - if (!Utils::isUnset($request->ownerId)) { - $query['OwnerId'] = $request->ownerId; + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; } - if (!Utils::isUnset($request->remark)) { - $query['Remark'] = $request->remark; + + if (null !== $request->remark) { + @$query['Remark'] = $request->remark; } - if (!Utils::isUnset($request->resourceOwnerAccount)) { - $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } - if (!Utils::isUnset($request->resourceOwnerId)) { - $query['ResourceOwnerId'] = $request->resourceOwnerId; + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; } - if (!Utils::isUnset($request->templateCode)) { - $query['TemplateCode'] = $request->templateCode; + + if (null !== $request->templateCode) { + @$query['TemplateCode'] = $request->templateCode; } - if (!Utils::isUnset($request->templateContent)) { - $query['TemplateContent'] = $request->templateContent; + + if (null !== $request->templateContent) { + @$query['TemplateContent'] = $request->templateContent; } - if (!Utils::isUnset($request->templateName)) { - $query['TemplateName'] = $request->templateName; + + if (null !== $request->templateName) { + @$query['TemplateName'] = $request->templateName; } - if (!Utils::isUnset($request->templateType)) { - $query['TemplateType'] = $request->templateType; + + if (null !== $request->templateType) { + @$query['TemplateType'] = $request->templateType; } + $req = new OpenApiRequest([ - 'query' => OpenApiUtilClient::query($query), + 'query' => Utils::query($query), ]); $params = new Params([ - 'action' => 'ModifySmsTemplate', - 'version' => '2017-05-25', - 'protocol' => 'HTTPS', - 'pathname' => '/', - 'method' => 'POST', - 'authType' => 'AK', - 'style' => 'RPC', + 'action' => 'ModifySmsTemplate', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', 'reqBodyType' => 'formData', - 'bodyType' => 'json', + 'bodyType' => 'json', ]); return ModifySmsTemplateResponse::fromMap($this->callApi($params, $req, $runtime)); } + // Deprecated /** + * Modifies the information of an unapproved message template and submits it for review again. + * + * @remarks + * After you apply for a message template, if the template fails to pass the review, you can call this operation to modify the template and submit the template again. You can call this operation to modify only a template for a specific message type. + * The template content must comply with the [SMS template specifications](https://help.aliyun.com/document_detail/108253.html). + * For more information, see [Usage notes](https://help.aliyun.com/document_detail/55324.html). + * ### QPS limit + * You can call this operation up to 1,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @deprecated openAPI ModifySmsTemplate is deprecated, please use Dysmsapi::2017-05-25::UpdateSmsTemplate instead + * + * @param request - ModifySmsTemplateRequest + * + * @returns ModifySmsTemplateResponse + * * @param ModifySmsTemplateRequest $request * * @return ModifySmsTemplateResponse @@ -913,6 +3197,17 @@ class Dysmsapi extends OpenApiClient } /** + * Queries the review status of a message template. + * + * @remarks + * ### QPS limit + * You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - QueryCardSmsTemplateRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns QueryCardSmsTemplateResponse + * * @param QueryCardSmsTemplateRequest $request * @param RuntimeOptions $runtime * @@ -920,30 +3215,41 @@ class Dysmsapi extends OpenApiClient */ public function queryCardSmsTemplateWithOptions($request, $runtime) { - Utils::validateModel($request); + $request->validate(); $query = []; - if (!Utils::isUnset($request->templateCode)) { - $query['TemplateCode'] = $request->templateCode; + if (null !== $request->templateCode) { + @$query['TemplateCode'] = $request->templateCode; } + $req = new OpenApiRequest([ - 'query' => OpenApiUtilClient::query($query), + 'query' => Utils::query($query), ]); $params = new Params([ - 'action' => 'QueryCardSmsTemplate', - 'version' => '2017-05-25', - 'protocol' => 'HTTPS', - 'pathname' => '/', - 'method' => 'POST', - 'authType' => 'AK', - 'style' => 'RPC', + 'action' => 'QueryCardSmsTemplate', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', 'reqBodyType' => 'formData', - 'bodyType' => 'json', + 'bodyType' => 'json', ]); return QueryCardSmsTemplateResponse::fromMap($this->callApi($params, $req, $runtime)); } /** + * Queries the review status of a message template. + * + * @remarks + * ### QPS limit + * You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - QueryCardSmsTemplateRequest + * + * @returns QueryCardSmsTemplateResponse + * * @param QueryCardSmsTemplateRequest $request * * @return QueryCardSmsTemplateResponse @@ -956,6 +3262,17 @@ class Dysmsapi extends OpenApiClient } /** + * Queries sent card messages. + * + * @remarks + * ### QPS limit + * You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - QueryCardSmsTemplateReportRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns QueryCardSmsTemplateReportResponse + * * @param QueryCardSmsTemplateReportRequest $request * @param RuntimeOptions $runtime * @@ -963,36 +3280,49 @@ class Dysmsapi extends OpenApiClient */ public function queryCardSmsTemplateReportWithOptions($request, $runtime) { - Utils::validateModel($request); + $request->validate(); $query = []; - if (!Utils::isUnset($request->endDate)) { - $query['EndDate'] = $request->endDate; + if (null !== $request->endDate) { + @$query['EndDate'] = $request->endDate; } - if (!Utils::isUnset($request->startDate)) { - $query['StartDate'] = $request->startDate; + + if (null !== $request->startDate) { + @$query['StartDate'] = $request->startDate; } - if (!Utils::isUnset($request->templateCodes)) { - $query['TemplateCodes'] = $request->templateCodes; + + if (null !== $request->templateCodes) { + @$query['TemplateCodes'] = $request->templateCodes; } + $req = new OpenApiRequest([ - 'query' => OpenApiUtilClient::query($query), + 'query' => Utils::query($query), ]); $params = new Params([ - 'action' => 'QueryCardSmsTemplateReport', - 'version' => '2017-05-25', - 'protocol' => 'HTTPS', - 'pathname' => '/', - 'method' => 'POST', - 'authType' => 'AK', - 'style' => 'RPC', + 'action' => 'QueryCardSmsTemplateReport', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', 'reqBodyType' => 'formData', - 'bodyType' => 'json', + 'bodyType' => 'json', ]); return QueryCardSmsTemplateReportResponse::fromMap($this->callApi($params, $req, $runtime)); } /** + * Queries sent card messages. + * + * @remarks + * ### QPS limit + * You can call this operation up to 300 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - QueryCardSmsTemplateReportRequest + * + * @returns QueryCardSmsTemplateReportResponse + * * @param QueryCardSmsTemplateReportRequest $request * * @return QueryCardSmsTemplateReportResponse @@ -1005,6 +3335,323 @@ class Dysmsapi extends OpenApiClient } /** + * 获取数字短信签名通过签名name. + * + * @param request - QueryDigitalSignByNameRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns QueryDigitalSignByNameResponse + * + * @param QueryDigitalSignByNameRequest $request + * @param RuntimeOptions $runtime + * + * @return QueryDigitalSignByNameResponse + */ + public function queryDigitalSignByNameWithOptions($request, $runtime) + { + $request->validate(); + $query = []; + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + if (null !== $request->signName) { + @$query['SignName'] = $request->signName; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'QueryDigitalSignByName', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return QueryDigitalSignByNameResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * 获取数字短信签名通过签名name. + * + * @param request - QueryDigitalSignByNameRequest + * + * @returns QueryDigitalSignByNameResponse + * + * @param QueryDigitalSignByNameRequest $request + * + * @return QueryDigitalSignByNameResponse + */ + public function queryDigitalSignByName($request) + { + $runtime = new RuntimeOptions([]); + + return $this->queryDigitalSignByNameWithOptions($request, $runtime); + } + + /** + * 查询验证码签名. + * + * @param request - QueryExtCodeSignRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns QueryExtCodeSignResponse + * + * @param QueryExtCodeSignRequest $request + * @param RuntimeOptions $runtime + * + * @return QueryExtCodeSignResponse + */ + public function queryExtCodeSignWithOptions($request, $runtime) + { + $request->validate(); + $query = []; + if (null !== $request->extCode) { + @$query['ExtCode'] = $request->extCode; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->pageNo) { + @$query['PageNo'] = $request->pageNo; + } + + if (null !== $request->pageSize) { + @$query['PageSize'] = $request->pageSize; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + if (null !== $request->signName) { + @$query['SignName'] = $request->signName; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'QueryExtCodeSign', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return QueryExtCodeSignResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * 查询验证码签名. + * + * @param request - QueryExtCodeSignRequest + * + * @returns QueryExtCodeSignResponse + * + * @param QueryExtCodeSignRequest $request + * + * @return QueryExtCodeSignResponse + */ + public function queryExtCodeSign($request) + { + $runtime = new RuntimeOptions([]); + + return $this->queryExtCodeSignWithOptions($request, $runtime); + } + + /** + * Queries whether some mobile phone numbers support card messages. + * + * @param tmpReq - QueryMobilesCardSupportRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns QueryMobilesCardSupportResponse + * + * @param QueryMobilesCardSupportRequest $tmpReq + * @param RuntimeOptions $runtime + * + * @return QueryMobilesCardSupportResponse + */ + public function queryMobilesCardSupportWithOptions($tmpReq, $runtime) + { + $tmpReq->validate(); + $request = new QueryMobilesCardSupportShrinkRequest([]); + Utils::convert($tmpReq, $request); + if (null !== $tmpReq->mobiles) { + $request->mobilesShrink = Utils::arrayToStringWithSpecifiedStyle($tmpReq->mobiles, 'Mobiles', 'json'); + } + + $query = []; + if (null !== $request->encryptType) { + @$query['EncryptType'] = $request->encryptType; + } + + if (null !== $request->mobilesShrink) { + @$query['Mobiles'] = $request->mobilesShrink; + } + + if (null !== $request->templateCode) { + @$query['TemplateCode'] = $request->templateCode; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'QueryMobilesCardSupport', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return QueryMobilesCardSupportResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * Queries whether some mobile phone numbers support card messages. + * + * @param request - QueryMobilesCardSupportRequest + * + * @returns QueryMobilesCardSupportResponse + * + * @param QueryMobilesCardSupportRequest $request + * + * @return QueryMobilesCardSupportResponse + */ + public function queryMobilesCardSupport($request) + { + $runtime = new RuntimeOptions([]); + + return $this->queryMobilesCardSupportWithOptions($request, $runtime); + } + + /** + * Queries the information about clicks within a specific time range or related to a mobile number. QPS limit You can call this operation up to 100 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - QueryPageSmartShortUrlLogRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns QueryPageSmartShortUrlLogResponse + * + * @param QueryPageSmartShortUrlLogRequest $request + * @param RuntimeOptions $runtime + * + * @return QueryPageSmartShortUrlLogResponse + */ + public function queryPageSmartShortUrlLogWithOptions($request, $runtime) + { + $request->validate(); + $query = []; + if (null !== $request->createDateEnd) { + @$query['CreateDateEnd'] = $request->createDateEnd; + } + + if (null !== $request->createDateStart) { + @$query['CreateDateStart'] = $request->createDateStart; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->pageNo) { + @$query['PageNo'] = $request->pageNo; + } + + if (null !== $request->pageSize) { + @$query['PageSize'] = $request->pageSize; + } + + if (null !== $request->phoneNumber) { + @$query['PhoneNumber'] = $request->phoneNumber; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + if (null !== $request->shortUrl) { + @$query['ShortUrl'] = $request->shortUrl; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'QueryPageSmartShortUrlLog', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return QueryPageSmartShortUrlLogResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * Queries the information about clicks within a specific time range or related to a mobile number. QPS limit You can call this operation up to 100 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - QueryPageSmartShortUrlLogRequest + * + * @returns QueryPageSmartShortUrlLogResponse + * + * @param QueryPageSmartShortUrlLogRequest $request + * + * @return QueryPageSmartShortUrlLogResponse + */ + public function queryPageSmartShortUrlLog($request) + { + $runtime = new RuntimeOptions([]); + + return $this->queryPageSmartShortUrlLogWithOptions($request, $runtime); + } + + /** + * Queries the information about a message. + * + * @param request - QuerySendDetailsRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns QuerySendDetailsResponse + * * @param QuerySendDetailsRequest $request * @param RuntimeOptions $runtime * @@ -1012,51 +3659,65 @@ class Dysmsapi extends OpenApiClient */ public function querySendDetailsWithOptions($request, $runtime) { - Utils::validateModel($request); + $request->validate(); $query = []; - if (!Utils::isUnset($request->bizId)) { - $query['BizId'] = $request->bizId; + if (null !== $request->bizId) { + @$query['BizId'] = $request->bizId; } - if (!Utils::isUnset($request->currentPage)) { - $query['CurrentPage'] = $request->currentPage; + + if (null !== $request->currentPage) { + @$query['CurrentPage'] = $request->currentPage; } - if (!Utils::isUnset($request->ownerId)) { - $query['OwnerId'] = $request->ownerId; + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; } - if (!Utils::isUnset($request->pageSize)) { - $query['PageSize'] = $request->pageSize; + + if (null !== $request->pageSize) { + @$query['PageSize'] = $request->pageSize; } - if (!Utils::isUnset($request->phoneNumber)) { - $query['PhoneNumber'] = $request->phoneNumber; + + if (null !== $request->phoneNumber) { + @$query['PhoneNumber'] = $request->phoneNumber; } - if (!Utils::isUnset($request->resourceOwnerAccount)) { - $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } - if (!Utils::isUnset($request->resourceOwnerId)) { - $query['ResourceOwnerId'] = $request->resourceOwnerId; + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; } - if (!Utils::isUnset($request->sendDate)) { - $query['SendDate'] = $request->sendDate; + + if (null !== $request->sendDate) { + @$query['SendDate'] = $request->sendDate; } + $req = new OpenApiRequest([ - 'query' => OpenApiUtilClient::query($query), + 'query' => Utils::query($query), ]); $params = new Params([ - 'action' => 'QuerySendDetails', - 'version' => '2017-05-25', - 'protocol' => 'HTTPS', - 'pathname' => '/', - 'method' => 'POST', - 'authType' => 'AK', - 'style' => 'RPC', + 'action' => 'QuerySendDetails', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', 'reqBodyType' => 'formData', - 'bodyType' => 'json', + 'bodyType' => 'json', ]); return QuerySendDetailsResponse::fromMap($this->callApi($params, $req, $runtime)); } /** + * Queries the information about a message. + * + * @param request - QuerySendDetailsRequest + * + * @returns QuerySendDetailsResponse + * * @param QuerySendDetailsRequest $request * * @return QuerySendDetailsResponse @@ -1069,6 +3730,18 @@ class Dysmsapi extends OpenApiClient } /** + * Queries message delivery details. + * + * @remarks + * You can call the operation to query message delivery details, including the number of delivered messages, the number of messages with delivery receipts, and the time that a message is sent. If a large number of messages are sent on the specified date, you can specify the number of items displayed on each page and the number of pages to view the details by page. + * ### QPS limits + * You can call this operation up to 20 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - QuerySendStatisticsRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns QuerySendStatisticsResponse + * * @param QuerySendStatisticsRequest $request * @param RuntimeOptions $runtime * @@ -1076,51 +3749,78 @@ class Dysmsapi extends OpenApiClient */ public function querySendStatisticsWithOptions($request, $runtime) { - Utils::validateModel($request); + $request->validate(); $query = []; - if (!Utils::isUnset($request->endDate)) { - $query['EndDate'] = $request->endDate; + if (null !== $request->endDate) { + @$query['EndDate'] = $request->endDate; } - if (!Utils::isUnset($request->isGlobe)) { - $query['IsGlobe'] = $request->isGlobe; + + if (null !== $request->isGlobe) { + @$query['IsGlobe'] = $request->isGlobe; } - if (!Utils::isUnset($request->ownerId)) { - $query['OwnerId'] = $request->ownerId; + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; } - if (!Utils::isUnset($request->pageIndex)) { - $query['PageIndex'] = $request->pageIndex; + + if (null !== $request->pageIndex) { + @$query['PageIndex'] = $request->pageIndex; } - if (!Utils::isUnset($request->pageSize)) { - $query['PageSize'] = $request->pageSize; + + if (null !== $request->pageSize) { + @$query['PageSize'] = $request->pageSize; } - if (!Utils::isUnset($request->resourceOwnerAccount)) { - $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } - if (!Utils::isUnset($request->resourceOwnerId)) { - $query['ResourceOwnerId'] = $request->resourceOwnerId; + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; } - if (!Utils::isUnset($request->startDate)) { - $query['StartDate'] = $request->startDate; + + if (null !== $request->signName) { + @$query['SignName'] = $request->signName; } + + if (null !== $request->startDate) { + @$query['StartDate'] = $request->startDate; + } + + if (null !== $request->templateType) { + @$query['TemplateType'] = $request->templateType; + } + $req = new OpenApiRequest([ - 'query' => OpenApiUtilClient::query($query), + 'query' => Utils::query($query), ]); $params = new Params([ - 'action' => 'QuerySendStatistics', - 'version' => '2017-05-25', - 'protocol' => 'HTTPS', - 'pathname' => '/', - 'method' => 'POST', - 'authType' => 'AK', - 'style' => 'RPC', + 'action' => 'QuerySendStatistics', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', 'reqBodyType' => 'formData', - 'bodyType' => 'json', + 'bodyType' => 'json', ]); return QuerySendStatisticsResponse::fromMap($this->callApi($params, $req, $runtime)); } /** + * Queries message delivery details. + * + * @remarks + * You can call the operation to query message delivery details, including the number of delivered messages, the number of messages with delivery receipts, and the time that a message is sent. If a large number of messages are sent on the specified date, you can specify the number of items displayed on each page and the number of pages to view the details by page. + * ### QPS limits + * You can call this operation up to 20 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - QuerySendStatisticsRequest + * + * @returns QuerySendStatisticsResponse + * * @param QuerySendStatisticsRequest $request * * @return QuerySendStatisticsResponse @@ -1133,6 +3833,17 @@ class Dysmsapi extends OpenApiClient } /** + * Queries the status of a short URL. + * + * @remarks + * ### QPS limits + * You can call this operation up to 20 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - QueryShortUrlRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns QueryShortUrlResponse + * * @param QueryShortUrlRequest $request * @param RuntimeOptions $runtime * @@ -1140,41 +3851,55 @@ class Dysmsapi extends OpenApiClient */ public function queryShortUrlWithOptions($request, $runtime) { - Utils::validateModel($request); + $request->validate(); $query = []; - if (!Utils::isUnset($request->ownerId)) { - $query['OwnerId'] = $request->ownerId; + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; } - if (!Utils::isUnset($request->resourceOwnerAccount)) { - $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } - if (!Utils::isUnset($request->resourceOwnerId)) { - $query['ResourceOwnerId'] = $request->resourceOwnerId; + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; } + $body = []; - if (!Utils::isUnset($request->shortUrl)) { - $body['ShortUrl'] = $request->shortUrl; + if (null !== $request->shortUrl) { + @$body['ShortUrl'] = $request->shortUrl; } + $req = new OpenApiRequest([ - 'query' => OpenApiUtilClient::query($query), - 'body' => OpenApiUtilClient::parseToMap($body), + 'query' => Utils::query($query), + 'body' => Utils::parseToMap($body), ]); $params = new Params([ - 'action' => 'QueryShortUrl', - 'version' => '2017-05-25', - 'protocol' => 'HTTPS', - 'pathname' => '/', - 'method' => 'POST', - 'authType' => 'AK', - 'style' => 'RPC', + 'action' => 'QueryShortUrl', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', 'reqBodyType' => 'formData', - 'bodyType' => 'json', + 'bodyType' => 'json', ]); return QueryShortUrlResponse::fromMap($this->callApi($params, $req, $runtime)); } /** + * Queries the status of a short URL. + * + * @remarks + * ### QPS limits + * You can call this operation up to 20 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - QueryShortUrlRequest + * + * @returns QueryShortUrlResponse + * * @param QueryShortUrlRequest $request * * @return QueryShortUrlResponse @@ -1187,6 +3912,354 @@ class Dysmsapi extends OpenApiClient } /** + * 查询单个资质详情. + * + * @param request - QuerySingleSmsQualificationRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns QuerySingleSmsQualificationResponse + * + * @param QuerySingleSmsQualificationRequest $request + * @param RuntimeOptions $runtime + * + * @return QuerySingleSmsQualificationResponse + */ + public function querySingleSmsQualificationWithOptions($request, $runtime) + { + $request->validate(); + $query = []; + if (null !== $request->orderId) { + @$query['OrderId'] = $request->orderId; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->qualificationGroupId) { + @$query['QualificationGroupId'] = $request->qualificationGroupId; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'QuerySingleSmsQualification', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return QuerySingleSmsQualificationResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * 查询单个资质详情. + * + * @param request - QuerySingleSmsQualificationRequest + * + * @returns QuerySingleSmsQualificationResponse + * + * @param QuerySingleSmsQualificationRequest $request + * + * @return QuerySingleSmsQualificationResponse + */ + public function querySingleSmsQualification($request) + { + $runtime = new RuntimeOptions([]); + + return $this->querySingleSmsQualificationWithOptions($request, $runtime); + } + + /** + * 查询APP-ICP备案对客openAPI. + * + * @param tmpReq - QuerySmsAppIcpRecordRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns QuerySmsAppIcpRecordResponse + * + * @param QuerySmsAppIcpRecordRequest $tmpReq + * @param RuntimeOptions $runtime + * + * @return QuerySmsAppIcpRecordResponse + */ + public function querySmsAppIcpRecordWithOptions($tmpReq, $runtime) + { + $tmpReq->validate(); + $request = new QuerySmsAppIcpRecordShrinkRequest([]); + Utils::convert($tmpReq, $request); + if (null !== $tmpReq->appIcpRecordIdList) { + $request->appIcpRecordIdListShrink = Utils::arrayToStringWithSpecifiedStyle($tmpReq->appIcpRecordIdList, 'AppIcpRecordIdList', 'json'); + } + + $query = []; + if (null !== $request->appIcpRecordIdListShrink) { + @$query['AppIcpRecordIdList'] = $request->appIcpRecordIdListShrink; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'QuerySmsAppIcpRecord', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return QuerySmsAppIcpRecordResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * 查询APP-ICP备案对客openAPI. + * + * @param request - QuerySmsAppIcpRecordRequest + * + * @returns QuerySmsAppIcpRecordResponse + * + * @param QuerySmsAppIcpRecordRequest $request + * + * @return QuerySmsAppIcpRecordResponse + */ + public function querySmsAppIcpRecord($request) + { + $runtime = new RuntimeOptions([]); + + return $this->querySmsAppIcpRecordWithOptions($request, $runtime); + } + + /** + * 查询委托授权书. + * + * @param tmpReq - QuerySmsAuthorizationLetterRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns QuerySmsAuthorizationLetterResponse + * + * @param QuerySmsAuthorizationLetterRequest $tmpReq + * @param RuntimeOptions $runtime + * + * @return QuerySmsAuthorizationLetterResponse + */ + public function querySmsAuthorizationLetterWithOptions($tmpReq, $runtime) + { + $tmpReq->validate(); + $request = new QuerySmsAuthorizationLetterShrinkRequest([]); + Utils::convert($tmpReq, $request); + if (null !== $tmpReq->authorizationLetterIdList) { + $request->authorizationLetterIdListShrink = Utils::arrayToStringWithSpecifiedStyle($tmpReq->authorizationLetterIdList, 'AuthorizationLetterIdList', 'json'); + } + + $query = []; + if (null !== $request->authorizationLetterIdListShrink) { + @$query['AuthorizationLetterIdList'] = $request->authorizationLetterIdListShrink; + } + + if (null !== $request->organizationCode) { + @$query['OrganizationCode'] = $request->organizationCode; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + if (null !== $request->signName) { + @$query['SignName'] = $request->signName; + } + + if (null !== $request->state) { + @$query['State'] = $request->state; + } + + if (null !== $request->status) { + @$query['Status'] = $request->status; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'QuerySmsAuthorizationLetter', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return QuerySmsAuthorizationLetterResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * 查询委托授权书. + * + * @param request - QuerySmsAuthorizationLetterRequest + * + * @returns QuerySmsAuthorizationLetterResponse + * + * @param QuerySmsAuthorizationLetterRequest $request + * + * @return QuerySmsAuthorizationLetterResponse + */ + public function querySmsAuthorizationLetter($request) + { + $runtime = new RuntimeOptions([]); + + return $this->querySmsAuthorizationLetterWithOptions($request, $runtime); + } + + /** + * 查询资质审核列表页. + * + * @param request - QuerySmsQualificationRecordRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns QuerySmsQualificationRecordResponse + * + * @param QuerySmsQualificationRecordRequest $request + * @param RuntimeOptions $runtime + * + * @return QuerySmsQualificationRecordResponse + */ + public function querySmsQualificationRecordWithOptions($request, $runtime) + { + $request->validate(); + $query = []; + if (null !== $request->companyName) { + @$query['CompanyName'] = $request->companyName; + } + + if (null !== $request->legalPersonName) { + @$query['LegalPersonName'] = $request->legalPersonName; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->pageNo) { + @$query['PageNo'] = $request->pageNo; + } + + if (null !== $request->pageSize) { + @$query['PageSize'] = $request->pageSize; + } + + if (null !== $request->qualificationGroupName) { + @$query['QualificationGroupName'] = $request->qualificationGroupName; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + if (null !== $request->state) { + @$query['State'] = $request->state; + } + + if (null !== $request->useBySelf) { + @$query['UseBySelf'] = $request->useBySelf; + } + + if (null !== $request->workOrderId) { + @$query['WorkOrderId'] = $request->workOrderId; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'QuerySmsQualificationRecord', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return QuerySmsQualificationRecordResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * 查询资质审核列表页. + * + * @param request - QuerySmsQualificationRecordRequest + * + * @returns QuerySmsQualificationRecordResponse + * + * @param QuerySmsQualificationRecordRequest $request + * + * @return QuerySmsQualificationRecordResponse + */ + public function querySmsQualificationRecord($request) + { + $runtime = new RuntimeOptions([]); + + return $this->querySmsQualificationRecordWithOptions($request, $runtime); + } + + /** + * Queries the status of a signature. + * + * @remarks + * After you apply for an SMS signature, you can query its status by using the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm) or calling the operation. If the signature is rejected, you can modify the signature based on the reason why it is rejected. + * ### QPS limits + * You can call this API operation up to 500 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - QuerySmsSignRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns QuerySmsSignResponse + * * @param QuerySmsSignRequest $request * @param RuntimeOptions $runtime * @@ -1194,39 +4267,54 @@ class Dysmsapi extends OpenApiClient */ public function querySmsSignWithOptions($request, $runtime) { - Utils::validateModel($request); + $request->validate(); $query = []; - if (!Utils::isUnset($request->ownerId)) { - $query['OwnerId'] = $request->ownerId; + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; } - if (!Utils::isUnset($request->resourceOwnerAccount)) { - $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } - if (!Utils::isUnset($request->resourceOwnerId)) { - $query['ResourceOwnerId'] = $request->resourceOwnerId; + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; } - if (!Utils::isUnset($request->signName)) { - $query['SignName'] = $request->signName; + + if (null !== $request->signName) { + @$query['SignName'] = $request->signName; } + $req = new OpenApiRequest([ - 'query' => OpenApiUtilClient::query($query), + 'query' => Utils::query($query), ]); $params = new Params([ - 'action' => 'QuerySmsSign', - 'version' => '2017-05-25', - 'protocol' => 'HTTPS', - 'pathname' => '/', - 'method' => 'POST', - 'authType' => 'AK', - 'style' => 'RPC', + 'action' => 'QuerySmsSign', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', 'reqBodyType' => 'formData', - 'bodyType' => 'json', + 'bodyType' => 'json', ]); return QuerySmsSignResponse::fromMap($this->callApi($params, $req, $runtime)); } /** + * Queries the status of a signature. + * + * @remarks + * After you apply for an SMS signature, you can query its status by using the [Alibaba Cloud SMS console](https://dysms.console.aliyun.com/dysms.htm) or calling the operation. If the signature is rejected, you can modify the signature based on the reason why it is rejected. + * ### QPS limits + * You can call this API operation up to 500 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - QuerySmsSignRequest + * + * @returns QuerySmsSignResponse + * * @param QuerySmsSignRequest $request * * @return QuerySmsSignResponse @@ -1239,6 +4327,18 @@ class Dysmsapi extends OpenApiClient } /** + * Queries message signatures by page. + * + * @remarks + * You can call this operation to query the details of message signatures, including the name, creation time, and approval status of each signature. If a message template is rejected, the reason is returned. Modify the message signature based on the reason. + * ### QPS limit + * You can call this operation up to 10 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - QuerySmsSignListRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns QuerySmsSignListResponse + * * @param QuerySmsSignListRequest $request * @param RuntimeOptions $runtime * @@ -1246,42 +4346,58 @@ class Dysmsapi extends OpenApiClient */ public function querySmsSignListWithOptions($request, $runtime) { - Utils::validateModel($request); + $request->validate(); $query = []; - if (!Utils::isUnset($request->ownerId)) { - $query['OwnerId'] = $request->ownerId; + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; } - if (!Utils::isUnset($request->pageIndex)) { - $query['PageIndex'] = $request->pageIndex; + + if (null !== $request->pageIndex) { + @$query['PageIndex'] = $request->pageIndex; } - if (!Utils::isUnset($request->pageSize)) { - $query['PageSize'] = $request->pageSize; + + if (null !== $request->pageSize) { + @$query['PageSize'] = $request->pageSize; } - if (!Utils::isUnset($request->resourceOwnerAccount)) { - $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } - if (!Utils::isUnset($request->resourceOwnerId)) { - $query['ResourceOwnerId'] = $request->resourceOwnerId; + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; } + $req = new OpenApiRequest([ - 'query' => OpenApiUtilClient::query($query), + 'query' => Utils::query($query), ]); $params = new Params([ - 'action' => 'QuerySmsSignList', - 'version' => '2017-05-25', - 'protocol' => 'HTTPS', - 'pathname' => '/', - 'method' => 'POST', - 'authType' => 'AK', - 'style' => 'RPC', + 'action' => 'QuerySmsSignList', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', 'reqBodyType' => 'formData', - 'bodyType' => 'json', + 'bodyType' => 'json', ]); return QuerySmsSignListResponse::fromMap($this->callApi($params, $req, $runtime)); } /** + * Queries message signatures by page. + * + * @remarks + * You can call this operation to query the details of message signatures, including the name, creation time, and approval status of each signature. If a message template is rejected, the reason is returned. Modify the message signature based on the reason. + * ### QPS limit + * You can call this operation up to 10 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - QuerySmsSignListRequest + * + * @returns QuerySmsSignListResponse + * * @param QuerySmsSignListRequest $request * * @return QuerySmsSignListResponse @@ -1294,6 +4410,20 @@ class Dysmsapi extends OpenApiClient } /** + * Queries the approval status of a message template. + * + * @remarks + * After you create a message template, you can call this operation to query the approval status of the template. If a message template is rejected, the reason is returned. Modify the message template based on the reason. + * ### QPS limit + * You can call this operation up to 5,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @deprecated openAPI QuerySmsTemplate is deprecated, please use Dysmsapi::2017-05-25::GetSmsTemplate instead + * + * @param request - QuerySmsTemplateRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns QuerySmsTemplateResponse + * * @param QuerySmsTemplateRequest $request * @param RuntimeOptions $runtime * @@ -1301,39 +4431,57 @@ class Dysmsapi extends OpenApiClient */ public function querySmsTemplateWithOptions($request, $runtime) { - Utils::validateModel($request); + $request->validate(); $query = []; - if (!Utils::isUnset($request->ownerId)) { - $query['OwnerId'] = $request->ownerId; + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; } - if (!Utils::isUnset($request->resourceOwnerAccount)) { - $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } - if (!Utils::isUnset($request->resourceOwnerId)) { - $query['ResourceOwnerId'] = $request->resourceOwnerId; + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; } - if (!Utils::isUnset($request->templateCode)) { - $query['TemplateCode'] = $request->templateCode; + + if (null !== $request->templateCode) { + @$query['TemplateCode'] = $request->templateCode; } + $req = new OpenApiRequest([ - 'query' => OpenApiUtilClient::query($query), + 'query' => Utils::query($query), ]); $params = new Params([ - 'action' => 'QuerySmsTemplate', - 'version' => '2017-05-25', - 'protocol' => 'HTTPS', - 'pathname' => '/', - 'method' => 'POST', - 'authType' => 'AK', - 'style' => 'RPC', + 'action' => 'QuerySmsTemplate', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', 'reqBodyType' => 'formData', - 'bodyType' => 'json', + 'bodyType' => 'json', ]); return QuerySmsTemplateResponse::fromMap($this->callApi($params, $req, $runtime)); } + // Deprecated /** + * Queries the approval status of a message template. + * + * @remarks + * After you create a message template, you can call this operation to query the approval status of the template. If a message template is rejected, the reason is returned. Modify the message template based on the reason. + * ### QPS limit + * You can call this operation up to 5,000 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @deprecated openAPI QuerySmsTemplate is deprecated, please use Dysmsapi::2017-05-25::GetSmsTemplate instead + * + * @param request - QuerySmsTemplateRequest + * + * @returns QuerySmsTemplateResponse + * * @param QuerySmsTemplateRequest $request * * @return QuerySmsTemplateResponse @@ -1346,6 +4494,18 @@ class Dysmsapi extends OpenApiClient } /** + * Queries message templates. + * + * @remarks + * You can call this operation to query the details of message templates, including the name, creation time, and approval status of each template. If a message template is rejected, the reason is returned. Modify the message template based on the reason. + * ### QPS limit + * You can call this operation up to 10 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - QuerySmsTemplateListRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns QuerySmsTemplateListResponse + * * @param QuerySmsTemplateListRequest $request * @param RuntimeOptions $runtime * @@ -1353,42 +4513,58 @@ class Dysmsapi extends OpenApiClient */ public function querySmsTemplateListWithOptions($request, $runtime) { - Utils::validateModel($request); + $request->validate(); $query = []; - if (!Utils::isUnset($request->ownerId)) { - $query['OwnerId'] = $request->ownerId; + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; } - if (!Utils::isUnset($request->pageIndex)) { - $query['PageIndex'] = $request->pageIndex; + + if (null !== $request->pageIndex) { + @$query['PageIndex'] = $request->pageIndex; } - if (!Utils::isUnset($request->pageSize)) { - $query['PageSize'] = $request->pageSize; + + if (null !== $request->pageSize) { + @$query['PageSize'] = $request->pageSize; } - if (!Utils::isUnset($request->resourceOwnerAccount)) { - $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } - if (!Utils::isUnset($request->resourceOwnerId)) { - $query['ResourceOwnerId'] = $request->resourceOwnerId; + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; } + $req = new OpenApiRequest([ - 'query' => OpenApiUtilClient::query($query), + 'query' => Utils::query($query), ]); $params = new Params([ - 'action' => 'QuerySmsTemplateList', - 'version' => '2017-05-25', - 'protocol' => 'HTTPS', - 'pathname' => '/', - 'method' => 'POST', - 'authType' => 'AK', - 'style' => 'RPC', + 'action' => 'QuerySmsTemplateList', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', 'reqBodyType' => 'formData', - 'bodyType' => 'json', + 'bodyType' => 'json', ]); return QuerySmsTemplateListResponse::fromMap($this->callApi($params, $req, $runtime)); } /** + * Queries message templates. + * + * @remarks + * You can call this operation to query the details of message templates, including the name, creation time, and approval status of each template. If a message template is rejected, the reason is returned. Modify the message template based on the reason. + * ### QPS limit + * You can call this operation up to 10 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - QuerySmsTemplateListRequest + * + * @returns QuerySmsTemplateListResponse + * * @param QuerySmsTemplateListRequest $request * * @return QuerySmsTemplateListResponse @@ -1401,6 +4577,162 @@ class Dysmsapi extends OpenApiClient } /** + * 查询商标对客openAPI. + * + * @param tmpReq - QuerySmsTrademarkRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns QuerySmsTrademarkResponse + * + * @param QuerySmsTrademarkRequest $tmpReq + * @param RuntimeOptions $runtime + * + * @return QuerySmsTrademarkResponse + */ + public function querySmsTrademarkWithOptions($tmpReq, $runtime) + { + $tmpReq->validate(); + $request = new QuerySmsTrademarkShrinkRequest([]); + Utils::convert($tmpReq, $request); + if (null !== $tmpReq->trademarkIdList) { + $request->trademarkIdListShrink = Utils::arrayToStringWithSpecifiedStyle($tmpReq->trademarkIdList, 'TrademarkIdList', 'json'); + } + + $query = []; + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + if (null !== $request->trademarkIdListShrink) { + @$query['TrademarkIdList'] = $request->trademarkIdListShrink; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'QuerySmsTrademark', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return QuerySmsTrademarkResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * 查询商标对客openAPI. + * + * @param request - QuerySmsTrademarkRequest + * + * @returns QuerySmsTrademarkResponse + * + * @param QuerySmsTrademarkRequest $request + * + * @return QuerySmsTrademarkResponse + */ + public function querySmsTrademark($request) + { + $runtime = new RuntimeOptions([]); + + return $this->querySmsTrademarkWithOptions($request, $runtime); + } + + /** + * 验证手机验证码 + * + * @param request - RequiredPhoneCodeRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns RequiredPhoneCodeResponse + * + * @param RequiredPhoneCodeRequest $request + * @param RuntimeOptions $runtime + * + * @return RequiredPhoneCodeResponse + */ + public function requiredPhoneCodeWithOptions($request, $runtime) + { + $request->validate(); + $query = []; + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->phoneNo) { + @$query['PhoneNo'] = $request->phoneNo; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'RequiredPhoneCode', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return RequiredPhoneCodeResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * 验证手机验证码 + * + * @param request - RequiredPhoneCodeRequest + * + * @returns RequiredPhoneCodeResponse + * + * @param RequiredPhoneCodeRequest $request + * + * @return RequiredPhoneCodeResponse + */ + public function requiredPhoneCode($request) + { + $runtime = new RuntimeOptions([]); + + return $this->requiredPhoneCodeWithOptions($request, $runtime); + } + + /** + * Sends multiple card messages at a time. + * + * @remarks + * You can call the operation to send multiple card messages to a maximum of mobile phone numbers at a time. Different signatures and rollback settings can be specified for the mobile phone numbers. + * ### QPS limit + * You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - SendBatchCardSmsRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns SendBatchCardSmsResponse + * * @param SendBatchCardSmsRequest $request * @param RuntimeOptions $runtime * @@ -1408,60 +4740,90 @@ class Dysmsapi extends OpenApiClient */ public function sendBatchCardSmsWithOptions($request, $runtime) { - Utils::validateModel($request); + $request->validate(); $query = []; - if (!Utils::isUnset($request->cardTemplateCode)) { - $query['CardTemplateCode'] = $request->cardTemplateCode; + if (null !== $request->cardTemplateCode) { + @$query['CardTemplateCode'] = $request->cardTemplateCode; } - if (!Utils::isUnset($request->cardTemplateParamJson)) { - $query['CardTemplateParamJson'] = $request->cardTemplateParamJson; + + if (null !== $request->cardTemplateParamJson) { + @$query['CardTemplateParamJson'] = $request->cardTemplateParamJson; } - if (!Utils::isUnset($request->digitalTemplateCode)) { - $query['DigitalTemplateCode'] = $request->digitalTemplateCode; + + if (null !== $request->digitalTemplateCode) { + @$query['DigitalTemplateCode'] = $request->digitalTemplateCode; } - if (!Utils::isUnset($request->digitalTemplateParamJson)) { - $query['DigitalTemplateParamJson'] = $request->digitalTemplateParamJson; + + if (null !== $request->digitalTemplateParamJson) { + @$query['DigitalTemplateParamJson'] = $request->digitalTemplateParamJson; } - if (!Utils::isUnset($request->fallbackType)) { - $query['FallbackType'] = $request->fallbackType; + + if (null !== $request->fallbackType) { + @$query['FallbackType'] = $request->fallbackType; } - if (!Utils::isUnset($request->outId)) { - $query['OutId'] = $request->outId; + + if (null !== $request->outId) { + @$query['OutId'] = $request->outId; } - if (!Utils::isUnset($request->phoneNumberJson)) { - $query['PhoneNumberJson'] = $request->phoneNumberJson; + + if (null !== $request->phoneNumberJson) { + @$query['PhoneNumberJson'] = $request->phoneNumberJson; } - if (!Utils::isUnset($request->signNameJson)) { - $query['SignNameJson'] = $request->signNameJson; + + if (null !== $request->signNameJson) { + @$query['SignNameJson'] = $request->signNameJson; } - if (!Utils::isUnset($request->smsTemplateCode)) { - $query['SmsTemplateCode'] = $request->smsTemplateCode; + + if (null !== $request->smsTemplateCode) { + @$query['SmsTemplateCode'] = $request->smsTemplateCode; } - if (!Utils::isUnset($request->smsTemplateParamJson)) { - $query['SmsTemplateParamJson'] = $request->smsTemplateParamJson; + + if (null !== $request->smsTemplateParamJson) { + @$query['SmsTemplateParamJson'] = $request->smsTemplateParamJson; } - if (!Utils::isUnset($request->smsUpExtendCodeJson)) { - $query['SmsUpExtendCodeJson'] = $request->smsUpExtendCodeJson; + + if (null !== $request->smsUpExtendCodeJson) { + @$query['SmsUpExtendCodeJson'] = $request->smsUpExtendCodeJson; } + + if (null !== $request->templateCode) { + @$query['TemplateCode'] = $request->templateCode; + } + + if (null !== $request->templateParamJson) { + @$query['TemplateParamJson'] = $request->templateParamJson; + } + $req = new OpenApiRequest([ - 'query' => OpenApiUtilClient::query($query), + 'query' => Utils::query($query), ]); $params = new Params([ - 'action' => 'SendBatchCardSms', - 'version' => '2017-05-25', - 'protocol' => 'HTTPS', - 'pathname' => '/', - 'method' => 'POST', - 'authType' => 'AK', - 'style' => 'RPC', + 'action' => 'SendBatchCardSms', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', 'reqBodyType' => 'formData', - 'bodyType' => 'json', + 'bodyType' => 'json', ]); return SendBatchCardSmsResponse::fromMap($this->callApi($params, $req, $runtime)); } /** + * Sends multiple card messages at a time. + * + * @remarks + * You can call the operation to send multiple card messages to a maximum of mobile phone numbers at a time. Different signatures and rollback settings can be specified for the mobile phone numbers. + * ### QPS limit + * You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - SendBatchCardSmsRequest + * + * @returns SendBatchCardSmsResponse + * * @param SendBatchCardSmsRequest $request * * @return SendBatchCardSmsResponse @@ -1474,6 +4836,16 @@ class Dysmsapi extends OpenApiClient } /** + * Uses a single message template and multiple signatures to send messages to multiple recipients. + * + * @remarks + * You can call the operation to send messages to a maximum of 100 recipients at a time. + * + * @param request - SendBatchSmsRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns SendBatchSmsResponse + * * @param SendBatchSmsRequest $request * @param RuntimeOptions $runtime * @@ -1481,51 +4853,74 @@ class Dysmsapi extends OpenApiClient */ public function sendBatchSmsWithOptions($request, $runtime) { - Utils::validateModel($request); + $request->validate(); $query = []; - if (!Utils::isUnset($request->ownerId)) { - $query['OwnerId'] = $request->ownerId; + if (null !== $request->outId) { + @$query['OutId'] = $request->outId; } - if (!Utils::isUnset($request->phoneNumberJson)) { - $query['PhoneNumberJson'] = $request->phoneNumberJson; + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; } - if (!Utils::isUnset($request->resourceOwnerAccount)) { - $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } - if (!Utils::isUnset($request->resourceOwnerId)) { - $query['ResourceOwnerId'] = $request->resourceOwnerId; + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; } - if (!Utils::isUnset($request->signNameJson)) { - $query['SignNameJson'] = $request->signNameJson; + + if (null !== $request->templateCode) { + @$query['TemplateCode'] = $request->templateCode; } - if (!Utils::isUnset($request->smsUpExtendCodeJson)) { - $query['SmsUpExtendCodeJson'] = $request->smsUpExtendCodeJson; + + $body = []; + if (null !== $request->phoneNumberJson) { + @$body['PhoneNumberJson'] = $request->phoneNumberJson; } - if (!Utils::isUnset($request->templateCode)) { - $query['TemplateCode'] = $request->templateCode; + + if (null !== $request->signNameJson) { + @$body['SignNameJson'] = $request->signNameJson; } - if (!Utils::isUnset($request->templateParamJson)) { - $query['TemplateParamJson'] = $request->templateParamJson; + + if (null !== $request->smsUpExtendCodeJson) { + @$body['SmsUpExtendCodeJson'] = $request->smsUpExtendCodeJson; } + + if (null !== $request->templateParamJson) { + @$body['TemplateParamJson'] = $request->templateParamJson; + } + $req = new OpenApiRequest([ - 'query' => OpenApiUtilClient::query($query), + 'query' => Utils::query($query), + 'body' => Utils::parseToMap($body), ]); $params = new Params([ - 'action' => 'SendBatchSms', - 'version' => '2017-05-25', - 'protocol' => 'HTTPS', - 'pathname' => '/', - 'method' => 'POST', - 'authType' => 'AK', - 'style' => 'RPC', + 'action' => 'SendBatchSms', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', 'reqBodyType' => 'formData', - 'bodyType' => 'json', + 'bodyType' => 'json', ]); return SendBatchSmsResponse::fromMap($this->callApi($params, $req, $runtime)); } /** + * Uses a single message template and multiple signatures to send messages to multiple recipients. + * + * @remarks + * You can call the operation to send messages to a maximum of 100 recipients at a time. + * + * @param request - SendBatchSmsRequest + * + * @returns SendBatchSmsResponse + * * @param SendBatchSmsRequest $request * * @return SendBatchSmsResponse @@ -1538,6 +4933,19 @@ class Dysmsapi extends OpenApiClient } /** + * Sends a card message. + * + * @remarks + * Make sure that the message template that you want to use has been approved. If the mobile phone number of a recipient does not support card messages, the SendCardSms operation allows the rollback feature to ensure successful delivery. + * * When you call the SendCardSms operation to send card messages, the operation checks whether the mobile phone numbers of the recipients support card messages. If the mobile phone numbers do not support card messages, you can specify whether to enable rollback. Otherwise, the card message cannot be delivered. + * ### QPS limit + * You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - SendCardSmsRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns SendCardSmsResponse + * * @param SendCardSmsRequest $request * @param RuntimeOptions $runtime * @@ -1545,57 +4953,87 @@ class Dysmsapi extends OpenApiClient */ public function sendCardSmsWithOptions($request, $runtime) { - Utils::validateModel($request); + $request->validate(); $query = []; - if (!Utils::isUnset($request->cardObjects)) { - $query['CardObjects'] = $request->cardObjects; + if (null !== $request->cardObjects) { + @$query['CardObjects'] = $request->cardObjects; } - if (!Utils::isUnset($request->cardTemplateCode)) { - $query['CardTemplateCode'] = $request->cardTemplateCode; + + if (null !== $request->cardTemplateCode) { + @$query['CardTemplateCode'] = $request->cardTemplateCode; } - if (!Utils::isUnset($request->digitalTemplateCode)) { - $query['DigitalTemplateCode'] = $request->digitalTemplateCode; + + if (null !== $request->digitalTemplateCode) { + @$query['DigitalTemplateCode'] = $request->digitalTemplateCode; } - if (!Utils::isUnset($request->digitalTemplateParam)) { - $query['DigitalTemplateParam'] = $request->digitalTemplateParam; + + if (null !== $request->digitalTemplateParam) { + @$query['DigitalTemplateParam'] = $request->digitalTemplateParam; } - if (!Utils::isUnset($request->fallbackType)) { - $query['FallbackType'] = $request->fallbackType; + + if (null !== $request->fallbackType) { + @$query['FallbackType'] = $request->fallbackType; } - if (!Utils::isUnset($request->outId)) { - $query['OutId'] = $request->outId; + + if (null !== $request->outId) { + @$query['OutId'] = $request->outId; } - if (!Utils::isUnset($request->signName)) { - $query['SignName'] = $request->signName; + + if (null !== $request->signName) { + @$query['SignName'] = $request->signName; } - if (!Utils::isUnset($request->smsTemplateCode)) { - $query['SmsTemplateCode'] = $request->smsTemplateCode; + + if (null !== $request->smsTemplateCode) { + @$query['SmsTemplateCode'] = $request->smsTemplateCode; } - if (!Utils::isUnset($request->smsTemplateParam)) { - $query['SmsTemplateParam'] = $request->smsTemplateParam; + + if (null !== $request->smsTemplateParam) { + @$query['SmsTemplateParam'] = $request->smsTemplateParam; } - if (!Utils::isUnset($request->smsUpExtendCode)) { - $query['SmsUpExtendCode'] = $request->smsUpExtendCode; + + if (null !== $request->smsUpExtendCode) { + @$query['SmsUpExtendCode'] = $request->smsUpExtendCode; } + + if (null !== $request->templateCode) { + @$query['TemplateCode'] = $request->templateCode; + } + + if (null !== $request->templateParam) { + @$query['TemplateParam'] = $request->templateParam; + } + $req = new OpenApiRequest([ - 'query' => OpenApiUtilClient::query($query), + 'query' => Utils::query($query), ]); $params = new Params([ - 'action' => 'SendCardSms', - 'version' => '2017-05-25', - 'protocol' => 'HTTPS', - 'pathname' => '/', - 'method' => 'POST', - 'authType' => 'AK', - 'style' => 'RPC', + 'action' => 'SendCardSms', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', 'reqBodyType' => 'formData', - 'bodyType' => 'json', + 'bodyType' => 'json', ]); return SendCardSmsResponse::fromMap($this->callApi($params, $req, $runtime)); } /** + * Sends a card message. + * + * @remarks + * Make sure that the message template that you want to use has been approved. If the mobile phone number of a recipient does not support card messages, the SendCardSms operation allows the rollback feature to ensure successful delivery. + * * When you call the SendCardSms operation to send card messages, the operation checks whether the mobile phone numbers of the recipients support card messages. If the mobile phone numbers do not support card messages, you can specify whether to enable rollback. Otherwise, the card message cannot be delivered. + * ### QPS limit + * You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - SendCardSmsRequest + * + * @returns SendCardSmsResponse + * * @param SendCardSmsRequest $request * * @return SendCardSmsResponse @@ -1608,6 +5046,112 @@ class Dysmsapi extends OpenApiClient } /** + * 发送物流短信 + * + * @param request - SendLogisticsSmsRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns SendLogisticsSmsResponse + * + * @param SendLogisticsSmsRequest $request + * @param RuntimeOptions $runtime + * + * @return SendLogisticsSmsResponse + */ + public function sendLogisticsSmsWithOptions($request, $runtime) + { + $request->validate(); + $query = []; + if (null !== $request->expressCompanyCode) { + @$query['ExpressCompanyCode'] = $request->expressCompanyCode; + } + + if (null !== $request->mailNo) { + @$query['MailNo'] = $request->mailNo; + } + + if (null !== $request->outId) { + @$query['OutId'] = $request->outId; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->platformCompanyCode) { + @$query['PlatformCompanyCode'] = $request->platformCompanyCode; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + if (null !== $request->signName) { + @$query['SignName'] = $request->signName; + } + + if (null !== $request->templateCode) { + @$query['TemplateCode'] = $request->templateCode; + } + + if (null !== $request->templateParam) { + @$query['TemplateParam'] = $request->templateParam; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'SendLogisticsSms', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return SendLogisticsSmsResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * 发送物流短信 + * + * @param request - SendLogisticsSmsRequest + * + * @returns SendLogisticsSmsResponse + * + * @param SendLogisticsSmsRequest $request + * + * @return SendLogisticsSmsResponse + */ + public function sendLogisticsSms($request) + { + $runtime = new RuntimeOptions([]); + + return $this->sendLogisticsSmsWithOptions($request, $runtime); + } + + /** + * Sends a message. Before you call this operation, submit a message signature and message template, and make sure that the signature and template are approved. + * + * @remarks + * This operation is mainly used to send a single message. In special scenarios, you can send multiple messages with the same content to a maximum of 1,000 mobile numbers. Note that group sending may be delayed. + * * To send messages with different signatures and template content to multiple mobile numbers in a single request, call the [SendBatchSms](https://help.aliyun.com/document_detail/102364.html) operation. + * * You are charged for using Alibaba Cloud Short Message Service (SMS) based on the amount of messages sent. For more information, see [Pricing](https://www.aliyun.com/price/product#/sms/detail). + * * If your verification code signature and general-purpose signature have the same name, the system uses the general-purpose signature to send messages by default. + * + * @param request - SendSmsRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns SendSmsResponse + * * @param SendSmsRequest $request * @param RuntimeOptions $runtime * @@ -1615,54 +5159,75 @@ class Dysmsapi extends OpenApiClient */ public function sendSmsWithOptions($request, $runtime) { - Utils::validateModel($request); + $request->validate(); $query = []; - if (!Utils::isUnset($request->outId)) { - $query['OutId'] = $request->outId; + if (null !== $request->outId) { + @$query['OutId'] = $request->outId; } - if (!Utils::isUnset($request->ownerId)) { - $query['OwnerId'] = $request->ownerId; + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; } - if (!Utils::isUnset($request->phoneNumbers)) { - $query['PhoneNumbers'] = $request->phoneNumbers; + + if (null !== $request->phoneNumbers) { + @$query['PhoneNumbers'] = $request->phoneNumbers; } - if (!Utils::isUnset($request->resourceOwnerAccount)) { - $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } - if (!Utils::isUnset($request->resourceOwnerId)) { - $query['ResourceOwnerId'] = $request->resourceOwnerId; + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; } - if (!Utils::isUnset($request->signName)) { - $query['SignName'] = $request->signName; + + if (null !== $request->signName) { + @$query['SignName'] = $request->signName; } - if (!Utils::isUnset($request->smsUpExtendCode)) { - $query['SmsUpExtendCode'] = $request->smsUpExtendCode; + + if (null !== $request->smsUpExtendCode) { + @$query['SmsUpExtendCode'] = $request->smsUpExtendCode; } - if (!Utils::isUnset($request->templateCode)) { - $query['TemplateCode'] = $request->templateCode; + + if (null !== $request->templateCode) { + @$query['TemplateCode'] = $request->templateCode; } - if (!Utils::isUnset($request->templateParam)) { - $query['TemplateParam'] = $request->templateParam; + + if (null !== $request->templateParam) { + @$query['TemplateParam'] = $request->templateParam; } + $req = new OpenApiRequest([ - 'query' => OpenApiUtilClient::query($query), + 'query' => Utils::query($query), ]); $params = new Params([ - 'action' => 'SendSms', - 'version' => '2017-05-25', - 'protocol' => 'HTTPS', - 'pathname' => '/', - 'method' => 'POST', - 'authType' => 'AK', - 'style' => 'RPC', + 'action' => 'SendSms', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', 'reqBodyType' => 'formData', - 'bodyType' => 'json', + 'bodyType' => 'json', ]); return SendSmsResponse::fromMap($this->callApi($params, $req, $runtime)); } /** + * Sends a message. Before you call this operation, submit a message signature and message template, and make sure that the signature and template are approved. + * + * @remarks + * This operation is mainly used to send a single message. In special scenarios, you can send multiple messages with the same content to a maximum of 1,000 mobile numbers. Note that group sending may be delayed. + * * To send messages with different signatures and template content to multiple mobile numbers in a single request, call the [SendBatchSms](https://help.aliyun.com/document_detail/102364.html) operation. + * * You are charged for using Alibaba Cloud Short Message Service (SMS) based on the amount of messages sent. For more information, see [Pricing](https://www.aliyun.com/price/product#/sms/detail). + * * If your verification code signature and general-purpose signature have the same name, the system uses the general-purpose signature to send messages by default. + * + * @param request - SendSmsRequest + * + * @returns SendSmsResponse + * * @param SendSmsRequest $request * * @return SendSmsResponse @@ -1675,6 +5240,279 @@ class Dysmsapi extends OpenApiClient } /** + * Reports the status of an OTP message to Alibaba Cloud SMS. + * + * @remarks + * Metrics: + * * Requested OTP messages + * * Verified OTP messages + * An OTP conversion rate is calculated based on the following formula: OTP conversion rate = Number of verified OTP messages/Number of requested OTP messages. + * > If you call the SmsConversion operation to query OTP conversion rates, your business may be affected. We recommend that you perform the following operations: 1. Call the SmsConversion operation in an asynchronous manner by configuring queues or events. 2. Manually degrade your services or use a circuit breaker to automatically degrade services. + * + * @param request - SmsConversionIntlRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns SmsConversionIntlResponse + * + * @param SmsConversionIntlRequest $request + * @param RuntimeOptions $runtime + * + * @return SmsConversionIntlResponse + */ + public function smsConversionIntlWithOptions($request, $runtime) + { + $request->validate(); + $query = []; + if (null !== $request->conversionTime) { + @$query['ConversionTime'] = $request->conversionTime; + } + + if (null !== $request->delivered) { + @$query['Delivered'] = $request->delivered; + } + + if (null !== $request->messageId) { + @$query['MessageId'] = $request->messageId; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'SmsConversionIntl', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return SmsConversionIntlResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * Reports the status of an OTP message to Alibaba Cloud SMS. + * + * @remarks + * Metrics: + * * Requested OTP messages + * * Verified OTP messages + * An OTP conversion rate is calculated based on the following formula: OTP conversion rate = Number of verified OTP messages/Number of requested OTP messages. + * > If you call the SmsConversion operation to query OTP conversion rates, your business may be affected. We recommend that you perform the following operations: 1. Call the SmsConversion operation in an asynchronous manner by configuring queues or events. 2. Manually degrade your services or use a circuit breaker to automatically degrade services. + * + * @param request - SmsConversionIntlRequest + * + * @returns SmsConversionIntlResponse + * + * @param SmsConversionIntlRequest $request + * + * @return SmsConversionIntlResponse + */ + public function smsConversionIntl($request) + { + $runtime = new RuntimeOptions([]); + + return $this->smsConversionIntlWithOptions($request, $runtime); + } + + /** + * 创建资质对客openAPI. + * + * @param tmpReq - SubmitSmsQualificationRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns SubmitSmsQualificationResponse + * + * @param SubmitSmsQualificationRequest $tmpReq + * @param RuntimeOptions $runtime + * + * @return SubmitSmsQualificationResponse + */ + public function submitSmsQualificationWithOptions($tmpReq, $runtime) + { + $tmpReq->validate(); + $request = new SubmitSmsQualificationShrinkRequest([]); + Utils::convert($tmpReq, $request); + if (null !== $tmpReq->businessLicensePics) { + $request->businessLicensePicsShrink = Utils::arrayToStringWithSpecifiedStyle($tmpReq->businessLicensePics, 'BusinessLicensePics', 'json'); + } + + if (null !== $tmpReq->otherFiles) { + $request->otherFilesShrink = Utils::arrayToStringWithSpecifiedStyle($tmpReq->otherFiles, 'OtherFiles', 'json'); + } + + $query = []; + if (null !== $request->adminIDCardExpDate) { + @$query['AdminIDCardExpDate'] = $request->adminIDCardExpDate; + } + + if (null !== $request->adminIDCardFrontFace) { + @$query['AdminIDCardFrontFace'] = $request->adminIDCardFrontFace; + } + + if (null !== $request->adminIDCardNo) { + @$query['AdminIDCardNo'] = $request->adminIDCardNo; + } + + if (null !== $request->adminIDCardPic) { + @$query['AdminIDCardPic'] = $request->adminIDCardPic; + } + + if (null !== $request->adminIDCardType) { + @$query['AdminIDCardType'] = $request->adminIDCardType; + } + + if (null !== $request->adminName) { + @$query['AdminName'] = $request->adminName; + } + + if (null !== $request->adminPhoneNo) { + @$query['AdminPhoneNo'] = $request->adminPhoneNo; + } + + if (null !== $request->businessLicensePicsShrink) { + @$query['BusinessLicensePics'] = $request->businessLicensePicsShrink; + } + + if (null !== $request->bussinessLicenseExpDate) { + @$query['BussinessLicenseExpDate'] = $request->bussinessLicenseExpDate; + } + + if (null !== $request->certifyCode) { + @$query['CertifyCode'] = $request->certifyCode; + } + + if (null !== $request->companyName) { + @$query['CompanyName'] = $request->companyName; + } + + if (null !== $request->companyType) { + @$query['CompanyType'] = $request->companyType; + } + + if (null !== $request->legalPersonIDCardNo) { + @$query['LegalPersonIDCardNo'] = $request->legalPersonIDCardNo; + } + + if (null !== $request->legalPersonIDCardType) { + @$query['LegalPersonIDCardType'] = $request->legalPersonIDCardType; + } + + if (null !== $request->legalPersonIdCardBackSide) { + @$query['LegalPersonIdCardBackSide'] = $request->legalPersonIdCardBackSide; + } + + if (null !== $request->legalPersonIdCardEffTime) { + @$query['LegalPersonIdCardEffTime'] = $request->legalPersonIdCardEffTime; + } + + if (null !== $request->legalPersonIdCardFrontSide) { + @$query['LegalPersonIdCardFrontSide'] = $request->legalPersonIdCardFrontSide; + } + + if (null !== $request->legalPersonName) { + @$query['LegalPersonName'] = $request->legalPersonName; + } + + if (null !== $request->organizationCode) { + @$query['OrganizationCode'] = $request->organizationCode; + } + + if (null !== $request->otherFilesShrink) { + @$query['OtherFiles'] = $request->otherFilesShrink; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->qualificationName) { + @$query['QualificationName'] = $request->qualificationName; + } + + if (null !== $request->remark) { + @$query['Remark'] = $request->remark; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + if (null !== $request->useBySelf) { + @$query['UseBySelf'] = $request->useBySelf; + } + + if (null !== $request->whetherShare) { + @$query['WhetherShare'] = $request->whetherShare; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'SubmitSmsQualification', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return SubmitSmsQualificationResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * 创建资质对客openAPI. + * + * @param request - SubmitSmsQualificationRequest + * + * @returns SubmitSmsQualificationResponse + * + * @param SubmitSmsQualificationRequest $request + * + * @return SubmitSmsQualificationResponse + */ + public function submitSmsQualification($request) + { + $runtime = new RuntimeOptions([]); + + return $this->submitSmsQualificationWithOptions($request, $runtime); + } + + /** + * Attaches tags to a message template. + * + * @remarks + * ### QPS limit + * You can call this operation up to 50 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - TagResourcesRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns TagResourcesResponse + * * @param TagResourcesRequest $request * @param RuntimeOptions $runtime * @@ -1682,51 +5520,69 @@ class Dysmsapi extends OpenApiClient */ public function tagResourcesWithOptions($request, $runtime) { - Utils::validateModel($request); + $request->validate(); $query = []; - if (!Utils::isUnset($request->ownerId)) { - $query['OwnerId'] = $request->ownerId; + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; } - if (!Utils::isUnset($request->prodCode)) { - $query['ProdCode'] = $request->prodCode; + + if (null !== $request->prodCode) { + @$query['ProdCode'] = $request->prodCode; } - if (!Utils::isUnset($request->regionId)) { - $query['RegionId'] = $request->regionId; + + if (null !== $request->regionId) { + @$query['RegionId'] = $request->regionId; } - if (!Utils::isUnset($request->resourceId)) { - $query['ResourceId'] = $request->resourceId; + + if (null !== $request->resourceId) { + @$query['ResourceId'] = $request->resourceId; } - if (!Utils::isUnset($request->resourceOwnerAccount)) { - $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } - if (!Utils::isUnset($request->resourceOwnerId)) { - $query['ResourceOwnerId'] = $request->resourceOwnerId; + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; } - if (!Utils::isUnset($request->resourceType)) { - $query['ResourceType'] = $request->resourceType; + + if (null !== $request->resourceType) { + @$query['ResourceType'] = $request->resourceType; } - if (!Utils::isUnset($request->tag)) { - $query['Tag'] = $request->tag; + + if (null !== $request->tag) { + @$query['Tag'] = $request->tag; } + $req = new OpenApiRequest([ - 'query' => OpenApiUtilClient::query($query), + 'query' => Utils::query($query), ]); $params = new Params([ - 'action' => 'TagResources', - 'version' => '2017-05-25', - 'protocol' => 'HTTPS', - 'pathname' => '/', - 'method' => 'POST', - 'authType' => 'AK', - 'style' => 'RPC', + 'action' => 'TagResources', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', 'reqBodyType' => 'formData', - 'bodyType' => 'json', + 'bodyType' => 'json', ]); return TagResourcesResponse::fromMap($this->callApi($params, $req, $runtime)); } /** + * Attaches tags to a message template. + * + * @remarks + * ### QPS limit + * You can call this operation up to 50 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - TagResourcesRequest + * + * @returns TagResourcesResponse + * * @param TagResourcesRequest $request * * @return TagResourcesResponse @@ -1739,6 +5595,17 @@ class Dysmsapi extends OpenApiClient } /** + * Deletes tags from a message template. + * + * @remarks + * ### QPS limit + * You can call this operation up to 50 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - UntagResourcesRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns UntagResourcesResponse + * * @param UntagResourcesRequest $request * @param RuntimeOptions $runtime * @@ -1746,54 +5613,73 @@ class Dysmsapi extends OpenApiClient */ public function untagResourcesWithOptions($request, $runtime) { - Utils::validateModel($request); + $request->validate(); $query = []; - if (!Utils::isUnset($request->all)) { - $query['All'] = $request->all; + if (null !== $request->all) { + @$query['All'] = $request->all; } - if (!Utils::isUnset($request->ownerId)) { - $query['OwnerId'] = $request->ownerId; + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; } - if (!Utils::isUnset($request->prodCode)) { - $query['ProdCode'] = $request->prodCode; + + if (null !== $request->prodCode) { + @$query['ProdCode'] = $request->prodCode; } - if (!Utils::isUnset($request->regionId)) { - $query['RegionId'] = $request->regionId; + + if (null !== $request->regionId) { + @$query['RegionId'] = $request->regionId; } - if (!Utils::isUnset($request->resourceId)) { - $query['ResourceId'] = $request->resourceId; + + if (null !== $request->resourceId) { + @$query['ResourceId'] = $request->resourceId; } - if (!Utils::isUnset($request->resourceOwnerAccount)) { - $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; } - if (!Utils::isUnset($request->resourceOwnerId)) { - $query['ResourceOwnerId'] = $request->resourceOwnerId; + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; } - if (!Utils::isUnset($request->resourceType)) { - $query['ResourceType'] = $request->resourceType; + + if (null !== $request->resourceType) { + @$query['ResourceType'] = $request->resourceType; } - if (!Utils::isUnset($request->tagKey)) { - $query['TagKey'] = $request->tagKey; + + if (null !== $request->tagKey) { + @$query['TagKey'] = $request->tagKey; } + $req = new OpenApiRequest([ - 'query' => OpenApiUtilClient::query($query), + 'query' => Utils::query($query), ]); $params = new Params([ - 'action' => 'UntagResources', - 'version' => '2017-05-25', - 'protocol' => 'HTTPS', - 'pathname' => '/', - 'method' => 'POST', - 'authType' => 'AK', - 'style' => 'RPC', + 'action' => 'UntagResources', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', 'reqBodyType' => 'formData', - 'bodyType' => 'json', + 'bodyType' => 'json', ]); return UntagResourcesResponse::fromMap($this->callApi($params, $req, $runtime)); } /** + * Deletes tags from a message template. + * + * @remarks + * ### QPS limit + * You can call this operation up to 50 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. + * + * @param request - UntagResourcesRequest + * + * @returns UntagResourcesResponse + * * @param UntagResourcesRequest $request * * @return UntagResourcesResponse @@ -1804,4 +5690,640 @@ class Dysmsapi extends OpenApiClient return $this->untagResourcesWithOptions($request, $runtime); } + + /** + * 修改验证码签名. + * + * @param request - UpdateExtCodeSignRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns UpdateExtCodeSignResponse + * + * @param UpdateExtCodeSignRequest $request + * @param RuntimeOptions $runtime + * + * @return UpdateExtCodeSignResponse + */ + public function updateExtCodeSignWithOptions($request, $runtime) + { + $request->validate(); + $query = []; + if (null !== $request->existExtCode) { + @$query['ExistExtCode'] = $request->existExtCode; + } + + if (null !== $request->newExtCode) { + @$query['NewExtCode'] = $request->newExtCode; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + if (null !== $request->signName) { + @$query['SignName'] = $request->signName; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'UpdateExtCodeSign', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return UpdateExtCodeSignResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * 修改验证码签名. + * + * @param request - UpdateExtCodeSignRequest + * + * @returns UpdateExtCodeSignResponse + * + * @param UpdateExtCodeSignRequest $request + * + * @return UpdateExtCodeSignResponse + */ + public function updateExtCodeSign($request) + { + $runtime = new RuntimeOptions([]); + + return $this->updateExtCodeSignWithOptions($request, $runtime); + } + + /** + * 修改资质对客openAPI. + * + * @param tmpReq - UpdateSmsQualificationRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns UpdateSmsQualificationResponse + * + * @param UpdateSmsQualificationRequest $tmpReq + * @param RuntimeOptions $runtime + * + * @return UpdateSmsQualificationResponse + */ + public function updateSmsQualificationWithOptions($tmpReq, $runtime) + { + $tmpReq->validate(); + $request = new UpdateSmsQualificationShrinkRequest([]); + Utils::convert($tmpReq, $request); + if (null !== $tmpReq->businessLicensePics) { + $request->businessLicensePicsShrink = Utils::arrayToStringWithSpecifiedStyle($tmpReq->businessLicensePics, 'BusinessLicensePics', 'json'); + } + + if (null !== $tmpReq->otherFiles) { + $request->otherFilesShrink = Utils::arrayToStringWithSpecifiedStyle($tmpReq->otherFiles, 'OtherFiles', 'json'); + } + + $query = []; + if (null !== $request->adminIDCardExpDate) { + @$query['AdminIDCardExpDate'] = $request->adminIDCardExpDate; + } + + if (null !== $request->adminIDCardFrontFace) { + @$query['AdminIDCardFrontFace'] = $request->adminIDCardFrontFace; + } + + if (null !== $request->adminIDCardNo) { + @$query['AdminIDCardNo'] = $request->adminIDCardNo; + } + + if (null !== $request->adminIDCardPic) { + @$query['AdminIDCardPic'] = $request->adminIDCardPic; + } + + if (null !== $request->adminIDCardType) { + @$query['AdminIDCardType'] = $request->adminIDCardType; + } + + if (null !== $request->adminName) { + @$query['AdminName'] = $request->adminName; + } + + if (null !== $request->adminPhoneNo) { + @$query['AdminPhoneNo'] = $request->adminPhoneNo; + } + + if (null !== $request->businessLicensePicsShrink) { + @$query['BusinessLicensePics'] = $request->businessLicensePicsShrink; + } + + if (null !== $request->bussinessLicenseExpDate) { + @$query['BussinessLicenseExpDate'] = $request->bussinessLicenseExpDate; + } + + if (null !== $request->certifyCode) { + @$query['CertifyCode'] = $request->certifyCode; + } + + if (null !== $request->companyName) { + @$query['CompanyName'] = $request->companyName; + } + + if (null !== $request->legalPersonIDCardNo) { + @$query['LegalPersonIDCardNo'] = $request->legalPersonIDCardNo; + } + + if (null !== $request->legalPersonIDCardType) { + @$query['LegalPersonIDCardType'] = $request->legalPersonIDCardType; + } + + if (null !== $request->legalPersonIdCardBackSide) { + @$query['LegalPersonIdCardBackSide'] = $request->legalPersonIdCardBackSide; + } + + if (null !== $request->legalPersonIdCardEffTime) { + @$query['LegalPersonIdCardEffTime'] = $request->legalPersonIdCardEffTime; + } + + if (null !== $request->legalPersonIdCardFrontSide) { + @$query['LegalPersonIdCardFrontSide'] = $request->legalPersonIdCardFrontSide; + } + + if (null !== $request->legalPersonName) { + @$query['LegalPersonName'] = $request->legalPersonName; + } + + if (null !== $request->orderId) { + @$query['OrderId'] = $request->orderId; + } + + if (null !== $request->otherFilesShrink) { + @$query['OtherFiles'] = $request->otherFilesShrink; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->qualificationGroupId) { + @$query['QualificationGroupId'] = $request->qualificationGroupId; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'UpdateSmsQualification', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return UpdateSmsQualificationResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * 修改资质对客openAPI. + * + * @param request - UpdateSmsQualificationRequest + * + * @returns UpdateSmsQualificationResponse + * + * @param UpdateSmsQualificationRequest $request + * + * @return UpdateSmsQualificationResponse + */ + public function updateSmsQualification($request) + { + $runtime = new RuntimeOptions([]); + + return $this->updateSmsQualificationWithOptions($request, $runtime); + } + + /** + * Update Text SMS Signature. + * + * @remarks + * - For details about the changes of this new interface and the original one, please refer to [Announcement on the Update of SMS Signature & Template Interfaces](https://help.aliyun.com/zh/sms/product-overview/announcement-on-sms-service-update-signature-template-interface). + * - Only signatures that have not passed the review can be modified. Please refer to [Handling Suggestions for Failed SMS Reviews](https://help.aliyun.com/zh/sms/user-guide/causes-of-application-failures-and-suggestions?spm) and call this interface to modify and resubmit for review after modification. + * - Signature information applied through the interface will be synchronized in the SMS service console. For operations related to signatures in the console, please see [SMS Signatures](https://help.aliyun.com/zh/sms/user-guide/create-signatures?spm). + * + * @param tmpReq - UpdateSmsSignRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns UpdateSmsSignResponse + * + * @param UpdateSmsSignRequest $tmpReq + * @param RuntimeOptions $runtime + * + * @return UpdateSmsSignResponse + */ + public function updateSmsSignWithOptions($tmpReq, $runtime) + { + $tmpReq->validate(); + $request = new UpdateSmsSignShrinkRequest([]); + Utils::convert($tmpReq, $request); + if (null !== $tmpReq->moreData) { + $request->moreDataShrink = Utils::arrayToStringWithSpecifiedStyle($tmpReq->moreData, 'MoreData', 'json'); + } + + $query = []; + if (null !== $request->appIcpRecordId) { + @$query['AppIcpRecordId'] = $request->appIcpRecordId; + } + + if (null !== $request->applySceneContent) { + @$query['ApplySceneContent'] = $request->applySceneContent; + } + + if (null !== $request->authorizationLetterId) { + @$query['AuthorizationLetterId'] = $request->authorizationLetterId; + } + + if (null !== $request->moreDataShrink) { + @$query['MoreData'] = $request->moreDataShrink; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->qualificationId) { + @$query['QualificationId'] = $request->qualificationId; + } + + if (null !== $request->remark) { + @$query['Remark'] = $request->remark; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + if (null !== $request->signName) { + @$query['SignName'] = $request->signName; + } + + if (null !== $request->signSource) { + @$query['SignSource'] = $request->signSource; + } + + if (null !== $request->signType) { + @$query['SignType'] = $request->signType; + } + + if (null !== $request->thirdParty) { + @$query['ThirdParty'] = $request->thirdParty; + } + + if (null !== $request->trademarkId) { + @$query['TrademarkId'] = $request->trademarkId; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'UpdateSmsSign', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return UpdateSmsSignResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * Update Text SMS Signature. + * + * @remarks + * - For details about the changes of this new interface and the original one, please refer to [Announcement on the Update of SMS Signature & Template Interfaces](https://help.aliyun.com/zh/sms/product-overview/announcement-on-sms-service-update-signature-template-interface). + * - Only signatures that have not passed the review can be modified. Please refer to [Handling Suggestions for Failed SMS Reviews](https://help.aliyun.com/zh/sms/user-guide/causes-of-application-failures-and-suggestions?spm) and call this interface to modify and resubmit for review after modification. + * - Signature information applied through the interface will be synchronized in the SMS service console. For operations related to signatures in the console, please see [SMS Signatures](https://help.aliyun.com/zh/sms/user-guide/create-signatures?spm). + * + * @param request - UpdateSmsSignRequest + * + * @returns UpdateSmsSignResponse + * + * @param UpdateSmsSignRequest $request + * + * @return UpdateSmsSignResponse + */ + public function updateSmsSign($request) + { + $runtime = new RuntimeOptions([]); + + return $this->updateSmsSignWithOptions($request, $runtime); + } + + /** + * Update Text SMS Template. + * + * @remarks + * - For details about the changes of this new interface compared to the original one, please refer to [Announcement on SMS Service Update: Signature & Template Interfaces](https://help.aliyun.com/zh/sms/product-overview/announcement-on-sms-service-update-signature-template-interface). + * - Only templates that have not passed the review can be modified. Please refer to [Handling Suggestions for Failed SMS Template Reviews](https://help.aliyun.com/zh/sms/user-guide/causes-of-application-failures-and-suggestions?spm=a2c4g.11186623.0.0.4bf5561ajcFtMQ) and call this interface to modify and resubmit for review. + * - Modifications made through the interface will be synchronized in the SMS service console. For related operations on templates in the console, see [SMS Templates](https://help.aliyun.com/zh/sms/user-guide/message-templates/?spm=a2c4g.11186623.0.0.35a947464Itaxp). + * ### QPS Limit + * The single-user QPS limit for this interface is 1000 times/second. Exceeding this limit will result in API throttling, which may impact your business. Please make calls reasonably. + * + * @param tmpReq - UpdateSmsTemplateRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns UpdateSmsTemplateResponse + * + * @param UpdateSmsTemplateRequest $tmpReq + * @param RuntimeOptions $runtime + * + * @return UpdateSmsTemplateResponse + */ + public function updateSmsTemplateWithOptions($tmpReq, $runtime) + { + $tmpReq->validate(); + $request = new UpdateSmsTemplateShrinkRequest([]); + Utils::convert($tmpReq, $request); + if (null !== $tmpReq->moreData) { + $request->moreDataShrink = Utils::arrayToStringWithSpecifiedStyle($tmpReq->moreData, 'MoreData', 'json'); + } + + $query = []; + if (null !== $request->applySceneContent) { + @$query['ApplySceneContent'] = $request->applySceneContent; + } + + if (null !== $request->intlType) { + @$query['IntlType'] = $request->intlType; + } + + if (null !== $request->moreDataShrink) { + @$query['MoreData'] = $request->moreDataShrink; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->relatedSignName) { + @$query['RelatedSignName'] = $request->relatedSignName; + } + + if (null !== $request->remark) { + @$query['Remark'] = $request->remark; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + if (null !== $request->templateCode) { + @$query['TemplateCode'] = $request->templateCode; + } + + if (null !== $request->templateContent) { + @$query['TemplateContent'] = $request->templateContent; + } + + if (null !== $request->templateName) { + @$query['TemplateName'] = $request->templateName; + } + + if (null !== $request->templateRule) { + @$query['TemplateRule'] = $request->templateRule; + } + + if (null !== $request->templateType) { + @$query['TemplateType'] = $request->templateType; + } + + if (null !== $request->trafficDriving) { + @$query['TrafficDriving'] = $request->trafficDriving; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'UpdateSmsTemplate', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return UpdateSmsTemplateResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * Update Text SMS Template. + * + * @remarks + * - For details about the changes of this new interface compared to the original one, please refer to [Announcement on SMS Service Update: Signature & Template Interfaces](https://help.aliyun.com/zh/sms/product-overview/announcement-on-sms-service-update-signature-template-interface). + * - Only templates that have not passed the review can be modified. Please refer to [Handling Suggestions for Failed SMS Template Reviews](https://help.aliyun.com/zh/sms/user-guide/causes-of-application-failures-and-suggestions?spm=a2c4g.11186623.0.0.4bf5561ajcFtMQ) and call this interface to modify and resubmit for review. + * - Modifications made through the interface will be synchronized in the SMS service console. For related operations on templates in the console, see [SMS Templates](https://help.aliyun.com/zh/sms/user-guide/message-templates/?spm=a2c4g.11186623.0.0.35a947464Itaxp). + * ### QPS Limit + * The single-user QPS limit for this interface is 1000 times/second. Exceeding this limit will result in API throttling, which may impact your business. Please make calls reasonably. + * + * @param request - UpdateSmsTemplateRequest + * + * @returns UpdateSmsTemplateResponse + * + * @param UpdateSmsTemplateRequest $request + * + * @return UpdateSmsTemplateResponse + */ + public function updateSmsTemplate($request) + { + $runtime = new RuntimeOptions([]); + + return $this->updateSmsTemplateWithOptions($request, $runtime); + } + + /** + * 发送手机验证码 + * + * @param request - ValidPhoneCodeRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns ValidPhoneCodeResponse + * + * @param ValidPhoneCodeRequest $request + * @param RuntimeOptions $runtime + * + * @return ValidPhoneCodeResponse + */ + public function validPhoneCodeWithOptions($request, $runtime) + { + $request->validate(); + $query = []; + if (null !== $request->certifyCode) { + @$query['CertifyCode'] = $request->certifyCode; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->phoneNo) { + @$query['PhoneNo'] = $request->phoneNo; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'ValidPhoneCode', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return ValidPhoneCodeResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * 发送手机验证码 + * + * @param request - ValidPhoneCodeRequest + * + * @returns ValidPhoneCodeResponse + * + * @param ValidPhoneCodeRequest $request + * + * @return ValidPhoneCodeResponse + */ + public function validPhoneCode($request) + { + $runtime = new RuntimeOptions([]); + + return $this->validPhoneCodeWithOptions($request, $runtime); + } + + /** + * 物流短信运单号校验. + * + * @param request - VerifyLogisticsSmsMailNoRequest + * @param runtime - runtime options for this request RuntimeOptions + * + * @returns VerifyLogisticsSmsMailNoResponse + * + * @param VerifyLogisticsSmsMailNoRequest $request + * @param RuntimeOptions $runtime + * + * @return VerifyLogisticsSmsMailNoResponse + */ + public function verifyLogisticsSmsMailNoWithOptions($request, $runtime) + { + $request->validate(); + $query = []; + if (null !== $request->expressCompanyCode) { + @$query['ExpressCompanyCode'] = $request->expressCompanyCode; + } + + if (null !== $request->mailNo) { + @$query['MailNo'] = $request->mailNo; + } + + if (null !== $request->ownerId) { + @$query['OwnerId'] = $request->ownerId; + } + + if (null !== $request->platformCompanyCode) { + @$query['PlatformCompanyCode'] = $request->platformCompanyCode; + } + + if (null !== $request->resourceOwnerAccount) { + @$query['ResourceOwnerAccount'] = $request->resourceOwnerAccount; + } + + if (null !== $request->resourceOwnerId) { + @$query['ResourceOwnerId'] = $request->resourceOwnerId; + } + + $req = new OpenApiRequest([ + 'query' => Utils::query($query), + ]); + $params = new Params([ + 'action' => 'VerifyLogisticsSmsMailNo', + 'version' => '2017-05-25', + 'protocol' => 'HTTPS', + 'pathname' => '/', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'RPC', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return VerifyLogisticsSmsMailNoResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * 物流短信运单号校验. + * + * @param request - VerifyLogisticsSmsMailNoRequest + * + * @returns VerifyLogisticsSmsMailNoResponse + * + * @param VerifyLogisticsSmsMailNoRequest $request + * + * @return VerifyLogisticsSmsMailNoResponse + */ + public function verifyLogisticsSmsMailNo($request) + { + $runtime = new RuntimeOptions([]); + + return $this->verifyLogisticsSmsMailNoWithOptions($request, $runtime); + } } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddExtCodeSignRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddExtCodeSignRequest.php new file mode 100644 index 0000000..63f5040 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddExtCodeSignRequest.php @@ -0,0 +1,104 @@ + 'ExtCode', + 'ownerId' => 'OwnerId', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'signName' => 'SignName', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->extCode) { + $res['ExtCode'] = $this->extCode; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->signName) { + $res['SignName'] = $this->signName; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['ExtCode'])) { + $model->extCode = $map['ExtCode']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['SignName'])) { + $model->signName = $map['SignName']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddExtCodeSignResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddExtCodeSignResponse.php new file mode 100644 index 0000000..ded5166 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddExtCodeSignResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = AddExtCodeSignResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddExtCodeSignResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddExtCodeSignResponseBody.php new file mode 100644 index 0000000..9e64ea3 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddExtCodeSignResponseBody.php @@ -0,0 +1,118 @@ + 'AccessDeniedDetail', + 'code' => 'Code', + 'data' => 'Data', + 'message' => 'Message', + 'requestId' => 'RequestId', + 'success' => 'Success', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessDeniedDetail) { + $res['AccessDeniedDetail'] = $this->accessDeniedDetail; + } + + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->data) { + $res['Data'] = $this->data; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AccessDeniedDetail'])) { + $model->accessDeniedDetail = $map['AccessDeniedDetail']; + } + + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Data'])) { + $model->data = $map['Data']; + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddShortUrlRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddShortUrlRequest.php index 5a6cdf2..4c65167 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddShortUrlRequest.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddShortUrlRequest.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class AddShortUrlRequest extends Model { @@ -38,36 +38,42 @@ class AddShortUrlRequest extends Model */ public $sourceUrl; protected $_name = [ - 'effectiveDays' => 'EffectiveDays', - 'ownerId' => 'OwnerId', + 'effectiveDays' => 'EffectiveDays', + 'ownerId' => 'OwnerId', 'resourceOwnerAccount' => 'ResourceOwnerAccount', - 'resourceOwnerId' => 'ResourceOwnerId', - 'shortUrlName' => 'ShortUrlName', - 'sourceUrl' => 'SourceUrl', + 'resourceOwnerId' => 'ResourceOwnerId', + 'shortUrlName' => 'ShortUrlName', + 'sourceUrl' => 'SourceUrl', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->effectiveDays) { $res['EffectiveDays'] = $this->effectiveDays; } + if (null !== $this->ownerId) { $res['OwnerId'] = $this->ownerId; } + if (null !== $this->resourceOwnerAccount) { $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; } + if (null !== $this->resourceOwnerId) { $res['ResourceOwnerId'] = $this->resourceOwnerId; } + if (null !== $this->shortUrlName) { $res['ShortUrlName'] = $this->shortUrlName; } + if (null !== $this->sourceUrl) { $res['SourceUrl'] = $this->sourceUrl; } @@ -75,29 +81,34 @@ class AddShortUrlRequest extends Model return $res; } - /** - * @param array $map - * - * @return AddShortUrlRequest - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['EffectiveDays'])) { $model->effectiveDays = $map['EffectiveDays']; } + if (isset($map['OwnerId'])) { $model->ownerId = $map['OwnerId']; } + if (isset($map['ResourceOwnerAccount'])) { $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; } + if (isset($map['ResourceOwnerId'])) { $model->resourceOwnerId = $map['ResourceOwnerId']; } + if (isset($map['ShortUrlName'])) { $model->shortUrlName = $map['ShortUrlName']; } + if (isset($map['SourceUrl'])) { $model->sourceUrl = $map['SourceUrl']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddShortUrlResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddShortUrlResponse.php index 56c9bae..cb1dabe 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddShortUrlResponse.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddShortUrlResponse.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class AddShortUrlResponse extends Model { @@ -23,48 +23,66 @@ class AddShortUrlResponse extends Model */ public $body; protected $_name = [ - 'headers' => 'headers', + 'headers' => 'headers', 'statusCode' => 'statusCode', - 'body' => 'body', + 'body' => 'body', ]; public function validate() { - Model::validateRequired('headers', $this->headers, true); - Model::validateRequired('statusCode', $this->statusCode, true); - Model::validateRequired('body', $this->body, true); + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->headers) { - $res['headers'] = $this->headers; + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } } + if (null !== $this->statusCode) { $res['statusCode'] = $this->statusCode; } + if (null !== $this->body) { - $res['body'] = null !== $this->body ? $this->body->toMap() : null; + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; } return $res; } - /** - * @param array $map - * - * @return AddShortUrlResponse - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['headers'])) { - $model->headers = $map['headers']; + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } } + if (isset($map['statusCode'])) { $model->statusCode = $map['statusCode']; } + if (isset($map['body'])) { $model->body = AddShortUrlResponseBody::fromMap($map['body']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddShortUrlResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddShortUrlResponseBody.php index 4a9eae8..0055130 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddShortUrlResponseBody.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddShortUrlResponseBody.php @@ -4,8 +4,8 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; +use AlibabaCloud\Dara\Model; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\AddShortUrlResponseBody\data; -use AlibabaCloud\Tea\Model; class AddShortUrlResponseBody extends Model { @@ -29,28 +29,35 @@ class AddShortUrlResponseBody extends Model */ public $requestId; protected $_name = [ - 'code' => 'Code', - 'data' => 'Data', - 'message' => 'Message', + 'code' => 'Code', + 'data' => 'Data', + 'message' => 'Message', 'requestId' => 'RequestId', ]; public function validate() { + if (null !== $this->data) { + $this->data->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->code) { $res['Code'] = $this->code; } + if (null !== $this->data) { - $res['Data'] = null !== $this->data ? $this->data->toMap() : null; + $res['Data'] = null !== $this->data ? $this->data->toArray($noStream) : $this->data; } + if (null !== $this->message) { $res['Message'] = $this->message; } + if (null !== $this->requestId) { $res['RequestId'] = $this->requestId; } @@ -58,23 +65,26 @@ class AddShortUrlResponseBody extends Model return $res; } - /** - * @param array $map - * - * @return AddShortUrlResponseBody - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Code'])) { $model->code = $map['Code']; } + if (isset($map['Data'])) { $model->data = data::fromMap($map['Data']); } + if (isset($map['Message'])) { $model->message = $map['Message']; } + if (isset($map['RequestId'])) { $model->requestId = $map['RequestId']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddShortUrlResponseBody/data.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddShortUrlResponseBody/data.php index 7a993da..168c46c 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddShortUrlResponseBody/data.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddShortUrlResponseBody/data.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models\AddShortUrlResponseBody; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class data extends Model { @@ -24,23 +24,26 @@ class data extends Model public $sourceUrl; protected $_name = [ 'expireDate' => 'ExpireDate', - 'shortUrl' => 'ShortUrl', - 'sourceUrl' => 'SourceUrl', + 'shortUrl' => 'ShortUrl', + 'sourceUrl' => 'SourceUrl', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->expireDate) { $res['ExpireDate'] = $this->expireDate; } + if (null !== $this->shortUrl) { $res['ShortUrl'] = $this->shortUrl; } + if (null !== $this->sourceUrl) { $res['SourceUrl'] = $this->sourceUrl; } @@ -48,20 +51,22 @@ class data extends Model return $res; } - /** - * @param array $map - * - * @return data - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['ExpireDate'])) { $model->expireDate = $map['ExpireDate']; } + if (isset($map['ShortUrl'])) { $model->shortUrl = $map['ShortUrl']; } + if (isset($map['SourceUrl'])) { $model->sourceUrl = $map['SourceUrl']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddSmsSignRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddSmsSignRequest.php index 37257cd..4cd93aa 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddSmsSignRequest.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddSmsSignRequest.php @@ -4,8 +4,8 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; +use AlibabaCloud\Dara\Model; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\AddSmsSignRequest\signFileList; -use AlibabaCloud\Tea\Model; class AddSmsSignRequest extends Model { @@ -49,50 +49,62 @@ class AddSmsSignRequest extends Model */ public $signType; protected $_name = [ - 'ownerId' => 'OwnerId', - 'remark' => 'Remark', + 'ownerId' => 'OwnerId', + 'remark' => 'Remark', 'resourceOwnerAccount' => 'ResourceOwnerAccount', - 'resourceOwnerId' => 'ResourceOwnerId', - 'signFileList' => 'SignFileList', - 'signName' => 'SignName', - 'signSource' => 'SignSource', - 'signType' => 'SignType', + 'resourceOwnerId' => 'ResourceOwnerId', + 'signFileList' => 'SignFileList', + 'signName' => 'SignName', + 'signSource' => 'SignSource', + 'signType' => 'SignType', ]; public function validate() { + if (\is_array($this->signFileList)) { + Model::validateArray($this->signFileList); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->ownerId) { $res['OwnerId'] = $this->ownerId; } + if (null !== $this->remark) { $res['Remark'] = $this->remark; } + if (null !== $this->resourceOwnerAccount) { $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; } + if (null !== $this->resourceOwnerId) { $res['ResourceOwnerId'] = $this->resourceOwnerId; } + if (null !== $this->signFileList) { - $res['SignFileList'] = []; - if (null !== $this->signFileList && \is_array($this->signFileList)) { - $n = 0; - foreach ($this->signFileList as $item) { - $res['SignFileList'][$n++] = null !== $item ? $item->toMap() : $item; + if (\is_array($this->signFileList)) { + $res['SignFileList'] = []; + $n1 = 0; + foreach ($this->signFileList as $item1) { + $res['SignFileList'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; } } } + if (null !== $this->signName) { $res['SignName'] = $this->signName; } + if (null !== $this->signSource) { $res['SignSource'] = $this->signSource; } + if (null !== $this->signType) { $res['SignType'] = $this->signType; } @@ -100,41 +112,49 @@ class AddSmsSignRequest extends Model return $res; } - /** - * @param array $map - * - * @return AddSmsSignRequest - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['OwnerId'])) { $model->ownerId = $map['OwnerId']; } + if (isset($map['Remark'])) { $model->remark = $map['Remark']; } + if (isset($map['ResourceOwnerAccount'])) { $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; } + if (isset($map['ResourceOwnerId'])) { $model->resourceOwnerId = $map['ResourceOwnerId']; } + if (isset($map['SignFileList'])) { if (!empty($map['SignFileList'])) { $model->signFileList = []; - $n = 0; - foreach ($map['SignFileList'] as $item) { - $model->signFileList[$n++] = null !== $item ? signFileList::fromMap($item) : $item; + $n1 = 0; + foreach ($map['SignFileList'] as $item1) { + $model->signFileList[$n1] = signFileList::fromMap($item1); + ++$n1; } } } + if (isset($map['SignName'])) { $model->signName = $map['SignName']; } + if (isset($map['SignSource'])) { $model->signSource = $map['SignSource']; } + if (isset($map['SignType'])) { $model->signType = $map['SignType']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddSmsSignRequest/signFileList.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddSmsSignRequest/signFileList.php index cb10bc6..cf7ad20 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddSmsSignRequest/signFileList.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddSmsSignRequest/signFileList.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models\AddSmsSignRequest; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class signFileList extends Model { @@ -19,19 +19,21 @@ class signFileList extends Model public $fileSuffix; protected $_name = [ 'fileContents' => 'FileContents', - 'fileSuffix' => 'FileSuffix', + 'fileSuffix' => 'FileSuffix', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->fileContents) { $res['FileContents'] = $this->fileContents; } + if (null !== $this->fileSuffix) { $res['FileSuffix'] = $this->fileSuffix; } @@ -39,17 +41,18 @@ class signFileList extends Model return $res; } - /** - * @param array $map - * - * @return signFileList - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['FileContents'])) { $model->fileContents = $map['FileContents']; } + if (isset($map['FileSuffix'])) { $model->fileSuffix = $map['FileSuffix']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddSmsSignResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddSmsSignResponse.php index 53ad962..8746057 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddSmsSignResponse.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddSmsSignResponse.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class AddSmsSignResponse extends Model { @@ -23,48 +23,66 @@ class AddSmsSignResponse extends Model */ public $body; protected $_name = [ - 'headers' => 'headers', + 'headers' => 'headers', 'statusCode' => 'statusCode', - 'body' => 'body', + 'body' => 'body', ]; public function validate() { - Model::validateRequired('headers', $this->headers, true); - Model::validateRequired('statusCode', $this->statusCode, true); - Model::validateRequired('body', $this->body, true); + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->headers) { - $res['headers'] = $this->headers; + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } } + if (null !== $this->statusCode) { $res['statusCode'] = $this->statusCode; } + if (null !== $this->body) { - $res['body'] = null !== $this->body ? $this->body->toMap() : null; + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; } return $res; } - /** - * @param array $map - * - * @return AddSmsSignResponse - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['headers'])) { - $model->headers = $map['headers']; + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } } + if (isset($map['statusCode'])) { $model->statusCode = $map['statusCode']; } + if (isset($map['body'])) { $model->body = AddSmsSignResponseBody::fromMap($map['body']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddSmsSignResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddSmsSignResponseBody.php index 816ddc1..db7da41 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddSmsSignResponseBody.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddSmsSignResponseBody.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class AddSmsSignResponseBody extends Model { @@ -28,28 +28,32 @@ class AddSmsSignResponseBody extends Model */ public $signName; protected $_name = [ - 'code' => 'Code', - 'message' => 'Message', + 'code' => 'Code', + 'message' => 'Message', 'requestId' => 'RequestId', - 'signName' => 'SignName', + 'signName' => 'SignName', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->code) { $res['Code'] = $this->code; } + if (null !== $this->message) { $res['Message'] = $this->message; } + if (null !== $this->requestId) { $res['RequestId'] = $this->requestId; } + if (null !== $this->signName) { $res['SignName'] = $this->signName; } @@ -57,23 +61,26 @@ class AddSmsSignResponseBody extends Model return $res; } - /** - * @param array $map - * - * @return AddSmsSignResponseBody - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Code'])) { $model->code = $map['Code']; } + if (isset($map['Message'])) { $model->message = $map['Message']; } + if (isset($map['RequestId'])) { $model->requestId = $map['RequestId']; } + if (isset($map['SignName'])) { $model->signName = $map['SignName']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddSmsTemplateRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddSmsTemplateRequest.php index 5aa955c..2ff5b59 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddSmsTemplateRequest.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddSmsTemplateRequest.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class AddSmsTemplateRequest extends Model { @@ -43,40 +43,47 @@ class AddSmsTemplateRequest extends Model */ public $templateType; protected $_name = [ - 'ownerId' => 'OwnerId', - 'remark' => 'Remark', + 'ownerId' => 'OwnerId', + 'remark' => 'Remark', 'resourceOwnerAccount' => 'ResourceOwnerAccount', - 'resourceOwnerId' => 'ResourceOwnerId', - 'templateContent' => 'TemplateContent', - 'templateName' => 'TemplateName', - 'templateType' => 'TemplateType', + 'resourceOwnerId' => 'ResourceOwnerId', + 'templateContent' => 'TemplateContent', + 'templateName' => 'TemplateName', + 'templateType' => 'TemplateType', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->ownerId) { $res['OwnerId'] = $this->ownerId; } + if (null !== $this->remark) { $res['Remark'] = $this->remark; } + if (null !== $this->resourceOwnerAccount) { $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; } + if (null !== $this->resourceOwnerId) { $res['ResourceOwnerId'] = $this->resourceOwnerId; } + if (null !== $this->templateContent) { $res['TemplateContent'] = $this->templateContent; } + if (null !== $this->templateName) { $res['TemplateName'] = $this->templateName; } + if (null !== $this->templateType) { $res['TemplateType'] = $this->templateType; } @@ -84,32 +91,38 @@ class AddSmsTemplateRequest extends Model return $res; } - /** - * @param array $map - * - * @return AddSmsTemplateRequest - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['OwnerId'])) { $model->ownerId = $map['OwnerId']; } + if (isset($map['Remark'])) { $model->remark = $map['Remark']; } + if (isset($map['ResourceOwnerAccount'])) { $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; } + if (isset($map['ResourceOwnerId'])) { $model->resourceOwnerId = $map['ResourceOwnerId']; } + if (isset($map['TemplateContent'])) { $model->templateContent = $map['TemplateContent']; } + if (isset($map['TemplateName'])) { $model->templateName = $map['TemplateName']; } + if (isset($map['TemplateType'])) { $model->templateType = $map['TemplateType']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddSmsTemplateResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddSmsTemplateResponse.php index b997095..27b4272 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddSmsTemplateResponse.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddSmsTemplateResponse.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class AddSmsTemplateResponse extends Model { @@ -23,48 +23,66 @@ class AddSmsTemplateResponse extends Model */ public $body; protected $_name = [ - 'headers' => 'headers', + 'headers' => 'headers', 'statusCode' => 'statusCode', - 'body' => 'body', + 'body' => 'body', ]; public function validate() { - Model::validateRequired('headers', $this->headers, true); - Model::validateRequired('statusCode', $this->statusCode, true); - Model::validateRequired('body', $this->body, true); + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->headers) { - $res['headers'] = $this->headers; + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } } + if (null !== $this->statusCode) { $res['statusCode'] = $this->statusCode; } + if (null !== $this->body) { - $res['body'] = null !== $this->body ? $this->body->toMap() : null; + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; } return $res; } - /** - * @param array $map - * - * @return AddSmsTemplateResponse - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['headers'])) { - $model->headers = $map['headers']; + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } } + if (isset($map['statusCode'])) { $model->statusCode = $map['statusCode']; } + if (isset($map['body'])) { $model->body = AddSmsTemplateResponseBody::fromMap($map['body']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddSmsTemplateResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddSmsTemplateResponseBody.php index ad8e131..a88e518 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddSmsTemplateResponseBody.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/AddSmsTemplateResponseBody.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class AddSmsTemplateResponseBody extends Model { @@ -28,28 +28,32 @@ class AddSmsTemplateResponseBody extends Model */ public $templateCode; protected $_name = [ - 'code' => 'Code', - 'message' => 'Message', - 'requestId' => 'RequestId', + 'code' => 'Code', + 'message' => 'Message', + 'requestId' => 'RequestId', 'templateCode' => 'TemplateCode', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->code) { $res['Code'] = $this->code; } + if (null !== $this->message) { $res['Message'] = $this->message; } + if (null !== $this->requestId) { $res['RequestId'] = $this->requestId; } + if (null !== $this->templateCode) { $res['TemplateCode'] = $this->templateCode; } @@ -57,23 +61,26 @@ class AddSmsTemplateResponseBody extends Model return $res; } - /** - * @param array $map - * - * @return AddSmsTemplateResponseBody - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Code'])) { $model->code = $map['Code']; } + if (isset($map['Message'])) { $model->message = $map['Message']; } + if (isset($map['RequestId'])) { $model->requestId = $map['RequestId']; } + if (isset($map['TemplateCode'])) { $model->templateCode = $map['TemplateCode']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ChangeSignatureQualificationRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ChangeSignatureQualificationRequest.php new file mode 100644 index 0000000..28e133f --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ChangeSignatureQualificationRequest.php @@ -0,0 +1,118 @@ + 'AuthorizationLetterId', + 'ownerId' => 'OwnerId', + 'qualificationId' => 'QualificationId', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'signatureName' => 'SignatureName', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->authorizationLetterId) { + $res['AuthorizationLetterId'] = $this->authorizationLetterId; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->qualificationId) { + $res['QualificationId'] = $this->qualificationId; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->signatureName) { + $res['SignatureName'] = $this->signatureName; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AuthorizationLetterId'])) { + $model->authorizationLetterId = $map['AuthorizationLetterId']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['QualificationId'])) { + $model->qualificationId = $map['QualificationId']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['SignatureName'])) { + $model->signatureName = $map['SignatureName']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ChangeSignatureQualificationResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ChangeSignatureQualificationResponse.php new file mode 100644 index 0000000..3dbc334 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ChangeSignatureQualificationResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = ChangeSignatureQualificationResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ChangeSignatureQualificationResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ChangeSignatureQualificationResponseBody.php new file mode 100644 index 0000000..e914043 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ChangeSignatureQualificationResponseBody.php @@ -0,0 +1,122 @@ + 'AccessDeniedDetail', + 'code' => 'Code', + 'data' => 'Data', + 'message' => 'Message', + 'requestId' => 'RequestId', + 'success' => 'Success', + ]; + + public function validate() + { + if (null !== $this->data) { + $this->data->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessDeniedDetail) { + $res['AccessDeniedDetail'] = $this->accessDeniedDetail; + } + + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->data) { + $res['Data'] = null !== $this->data ? $this->data->toArray($noStream) : $this->data; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AccessDeniedDetail'])) { + $model->accessDeniedDetail = $map['AccessDeniedDetail']; + } + + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Data'])) { + $model->data = data::fromMap($map['Data']); + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ChangeSignatureQualificationResponseBody/data.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ChangeSignatureQualificationResponseBody/data.php new file mode 100644 index 0000000..d29c13d --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ChangeSignatureQualificationResponseBody/data.php @@ -0,0 +1,103 @@ + 'Data', + 'errCode' => 'ErrCode', + 'errMessage' => 'ErrMessage', + 'success' => 'Success', + ]; + + public function validate() + { + if (\is_array($this->data)) { + Model::validateArray($this->data); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->data) { + if (\is_array($this->data)) { + $res['Data'] = []; + foreach ($this->data as $key1 => $value1) { + $res['Data'][$key1] = $value1; + } + } + } + + if (null !== $this->errCode) { + $res['ErrCode'] = $this->errCode; + } + + if (null !== $this->errMessage) { + $res['ErrMessage'] = $this->errMessage; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['Data'])) { + if (!empty($map['Data'])) { + $model->data = []; + foreach ($map['Data'] as $key1 => $value1) { + $model->data[$key1] = $value1; + } + } + } + + if (isset($map['ErrCode'])) { + $model->errCode = $map['ErrCode']; + } + + if (isset($map['ErrMessage'])) { + $model->errMessage = $map['ErrMessage']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportRequest.php index 3e6375f..e1479b2 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportRequest.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportRequest.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class CheckMobilesCardSupportRequest extends Model { @@ -18,20 +18,37 @@ class CheckMobilesCardSupportRequest extends Model */ public $templateCode; protected $_name = [ - 'mobiles' => 'Mobiles', + 'mobiles' => 'Mobiles', 'templateCode' => 'TemplateCode', ]; public function validate() { + if (\is_array($this->mobiles)) { + Model::validateArray($this->mobiles); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->mobiles) { - $res['Mobiles'] = $this->mobiles; + if (\is_array($this->mobiles)) { + $res['Mobiles'] = []; + $n1 = 0; + foreach ($this->mobiles as $item1) { + if (\is_array($item1)) { + $res['Mobiles'][$n1] = []; + foreach ($item1 as $key2 => $value2) { + $res['Mobiles'][$n1][$key2] = $value2; + } + } + ++$n1; + } + } } + if (null !== $this->templateCode) { $res['TemplateCode'] = $this->templateCode; } @@ -39,19 +56,30 @@ class CheckMobilesCardSupportRequest extends Model return $res; } - /** - * @param array $map - * - * @return CheckMobilesCardSupportRequest - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Mobiles'])) { if (!empty($map['Mobiles'])) { - $model->mobiles = $map['Mobiles']; + $model->mobiles = []; + $n1 = 0; + foreach ($map['Mobiles'] as $item1) { + if (!empty($item1)) { + $model->mobiles[$n1] = []; + foreach ($item1 as $key2 => $value2) { + $model->mobiles[$n1][$key2] = $value2; + } + } + ++$n1; + } } } + if (isset($map['TemplateCode'])) { $model->templateCode = $map['TemplateCode']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportResponse.php index e8ad208..1253baa 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportResponse.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportResponse.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class CheckMobilesCardSupportResponse extends Model { @@ -23,48 +23,66 @@ class CheckMobilesCardSupportResponse extends Model */ public $body; protected $_name = [ - 'headers' => 'headers', + 'headers' => 'headers', 'statusCode' => 'statusCode', - 'body' => 'body', + 'body' => 'body', ]; public function validate() { - Model::validateRequired('headers', $this->headers, true); - Model::validateRequired('statusCode', $this->statusCode, true); - Model::validateRequired('body', $this->body, true); + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->headers) { - $res['headers'] = $this->headers; + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } } + if (null !== $this->statusCode) { $res['statusCode'] = $this->statusCode; } + if (null !== $this->body) { - $res['body'] = null !== $this->body ? $this->body->toMap() : null; + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; } return $res; } - /** - * @param array $map - * - * @return CheckMobilesCardSupportResponse - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['headers'])) { - $model->headers = $map['headers']; + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } } + if (isset($map['statusCode'])) { $model->statusCode = $map['statusCode']; } + if (isset($map['body'])) { $model->body = CheckMobilesCardSupportResponseBody::fromMap($map['body']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportResponseBody.php index 128c06d..2fa8a14 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportResponseBody.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportResponseBody.php @@ -4,7 +4,8 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CheckMobilesCardSupportResponseBody\data; class CheckMobilesCardSupportResponseBody extends Model { @@ -14,7 +15,7 @@ class CheckMobilesCardSupportResponseBody extends Model public $code; /** - * @var mixed[][] + * @var data */ public $data; @@ -28,28 +29,35 @@ class CheckMobilesCardSupportResponseBody extends Model */ public $success; protected $_name = [ - 'code' => 'Code', - 'data' => 'Data', + 'code' => 'Code', + 'data' => 'Data', 'requestId' => 'RequestId', - 'success' => 'Success', + 'success' => 'Success', ]; public function validate() { + if (null !== $this->data) { + $this->data->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->code) { $res['Code'] = $this->code; } + if (null !== $this->data) { - $res['Data'] = $this->data; + $res['Data'] = null !== $this->data ? $this->data->toArray($noStream) : $this->data; } + if (null !== $this->requestId) { $res['RequestId'] = $this->requestId; } + if (null !== $this->success) { $res['Success'] = $this->success; } @@ -57,25 +65,26 @@ class CheckMobilesCardSupportResponseBody extends Model return $res; } - /** - * @param array $map - * - * @return CheckMobilesCardSupportResponseBody - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Code'])) { $model->code = $map['Code']; } + if (isset($map['Data'])) { - if (!empty($map['Data'])) { - $model->data = $map['Data']; - } + $model->data = data::fromMap($map['Data']); } + if (isset($map['RequestId'])) { $model->requestId = $map['RequestId']; } + if (isset($map['Success'])) { $model->success = $map['Success']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportResponseBody/data.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportResponseBody/data.php new file mode 100644 index 0000000..6bf5196 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportResponseBody/data.php @@ -0,0 +1,66 @@ + 'queryResult', + ]; + + public function validate() + { + if (\is_array($this->queryResult)) { + Model::validateArray($this->queryResult); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->queryResult) { + if (\is_array($this->queryResult)) { + $res['queryResult'] = []; + $n1 = 0; + foreach ($this->queryResult as $item1) { + $res['queryResult'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; + } + } + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['queryResult'])) { + if (!empty($map['queryResult'])) { + $model->queryResult = []; + $n1 = 0; + foreach ($map['queryResult'] as $item1) { + $model->queryResult[$n1] = queryResult::fromMap($item1); + ++$n1; + } + } + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportResponseBody/data/queryResult.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportResponseBody/data/queryResult.php new file mode 100644 index 0000000..7b5fe4c --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportResponseBody/data/queryResult.php @@ -0,0 +1,62 @@ + 'mobile', + 'support' => 'support', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->mobile) { + $res['mobile'] = $this->mobile; + } + + if (null !== $this->support) { + $res['support'] = $this->support; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['mobile'])) { + $model->mobile = $map['mobile']; + } + + if (isset($map['support'])) { + $model->support = $map['support']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ConversionDataIntlRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ConversionDataIntlRequest.php new file mode 100644 index 0000000..bce461f --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ConversionDataIntlRequest.php @@ -0,0 +1,104 @@ + 'ConversionRate', + 'ownerId' => 'OwnerId', + 'reportTime' => 'ReportTime', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->conversionRate) { + $res['ConversionRate'] = $this->conversionRate; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->reportTime) { + $res['ReportTime'] = $this->reportTime; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['ConversionRate'])) { + $model->conversionRate = $map['ConversionRate']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['ReportTime'])) { + $model->reportTime = $map['ReportTime']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ConversionDataIntlResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ConversionDataIntlResponse.php new file mode 100644 index 0000000..c6080c2 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ConversionDataIntlResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = ConversionDataIntlResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ConversionDataIntlResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ConversionDataIntlResponseBody.php new file mode 100644 index 0000000..24f90f6 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ConversionDataIntlResponseBody.php @@ -0,0 +1,76 @@ + 'Code', + 'message' => 'Message', + 'requestId' => 'RequestId', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateRequest.php index 41a4469..5f03c99 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateRequest.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateRequest.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class CreateCardSmsTemplateRequest extends Model { @@ -28,28 +28,40 @@ class CreateCardSmsTemplateRequest extends Model */ public $templateName; protected $_name = [ - 'factorys' => 'Factorys', - 'memo' => 'Memo', - 'template' => 'Template', + 'factorys' => 'Factorys', + 'memo' => 'Memo', + 'template' => 'Template', 'templateName' => 'TemplateName', ]; public function validate() { + if (\is_array($this->template)) { + Model::validateArray($this->template); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->factorys) { $res['Factorys'] = $this->factorys; } + if (null !== $this->memo) { $res['Memo'] = $this->memo; } + if (null !== $this->template) { - $res['Template'] = $this->template; + if (\is_array($this->template)) { + $res['Template'] = []; + foreach ($this->template as $key1 => $value1) { + $res['Template'][$key1] = $value1; + } + } } + if (null !== $this->templateName) { $res['TemplateName'] = $this->templateName; } @@ -57,23 +69,31 @@ class CreateCardSmsTemplateRequest extends Model return $res; } - /** - * @param array $map - * - * @return CreateCardSmsTemplateRequest - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Factorys'])) { $model->factorys = $map['Factorys']; } + if (isset($map['Memo'])) { $model->memo = $map['Memo']; } + if (isset($map['Template'])) { - $model->template = $map['Template']; + if (!empty($map['Template'])) { + $model->template = []; + foreach ($map['Template'] as $key1 => $value1) { + $model->template[$key1] = $value1; + } + } } + if (isset($map['TemplateName'])) { $model->templateName = $map['TemplateName']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateResponse.php index 970881d..7a6469b 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateResponse.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateResponse.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class CreateCardSmsTemplateResponse extends Model { @@ -23,48 +23,66 @@ class CreateCardSmsTemplateResponse extends Model */ public $body; protected $_name = [ - 'headers' => 'headers', + 'headers' => 'headers', 'statusCode' => 'statusCode', - 'body' => 'body', + 'body' => 'body', ]; public function validate() { - Model::validateRequired('headers', $this->headers, true); - Model::validateRequired('statusCode', $this->statusCode, true); - Model::validateRequired('body', $this->body, true); + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->headers) { - $res['headers'] = $this->headers; + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } } + if (null !== $this->statusCode) { $res['statusCode'] = $this->statusCode; } + if (null !== $this->body) { - $res['body'] = null !== $this->body ? $this->body->toMap() : null; + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; } return $res; } - /** - * @param array $map - * - * @return CreateCardSmsTemplateResponse - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['headers'])) { - $model->headers = $map['headers']; + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } } + if (isset($map['statusCode'])) { $model->statusCode = $map['statusCode']; } + if (isset($map['body'])) { $model->body = CreateCardSmsTemplateResponseBody::fromMap($map['body']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateResponseBody.php index 8642c75..6528a80 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateResponseBody.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateResponseBody.php @@ -4,8 +4,8 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; +use AlibabaCloud\Dara\Model; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateCardSmsTemplateResponseBody\data; -use AlibabaCloud\Tea\Model; class CreateCardSmsTemplateResponseBody extends Model { @@ -29,28 +29,35 @@ class CreateCardSmsTemplateResponseBody extends Model */ public $success; protected $_name = [ - 'code' => 'Code', - 'data' => 'Data', + 'code' => 'Code', + 'data' => 'Data', 'requestId' => 'RequestId', - 'success' => 'Success', + 'success' => 'Success', ]; public function validate() { + if (null !== $this->data) { + $this->data->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->code) { $res['Code'] = $this->code; } + if (null !== $this->data) { - $res['Data'] = null !== $this->data ? $this->data->toMap() : null; + $res['Data'] = null !== $this->data ? $this->data->toArray($noStream) : $this->data; } + if (null !== $this->requestId) { $res['RequestId'] = $this->requestId; } + if (null !== $this->success) { $res['Success'] = $this->success; } @@ -58,23 +65,26 @@ class CreateCardSmsTemplateResponseBody extends Model return $res; } - /** - * @param array $map - * - * @return CreateCardSmsTemplateResponseBody - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Code'])) { $model->code = $map['Code']; } + if (isset($map['Data'])) { $model->data = data::fromMap($map['Data']); } + if (isset($map['RequestId'])) { $model->requestId = $map['RequestId']; } + if (isset($map['Success'])) { $model->success = $map['Success']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateResponseBody/data.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateResponseBody/data.php index 2134716..6fd00b1 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateResponseBody/data.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateResponseBody/data.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models\CreateCardSmsTemplateResponseBody; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class data extends Model { @@ -18,9 +18,10 @@ class data extends Model public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->templateCode) { @@ -30,11 +31,11 @@ class data extends Model return $res; } - /** - * @param array $map - * - * @return data - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateShrinkRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateShrinkRequest.php index 329e440..7372399 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateShrinkRequest.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateShrinkRequest.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class CreateCardSmsTemplateShrinkRequest extends Model { @@ -28,28 +28,32 @@ class CreateCardSmsTemplateShrinkRequest extends Model */ public $templateName; protected $_name = [ - 'factorys' => 'Factorys', - 'memo' => 'Memo', + 'factorys' => 'Factorys', + 'memo' => 'Memo', 'templateShrink' => 'Template', - 'templateName' => 'TemplateName', + 'templateName' => 'TemplateName', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->factorys) { $res['Factorys'] = $this->factorys; } + if (null !== $this->memo) { $res['Memo'] = $this->memo; } + if (null !== $this->templateShrink) { $res['Template'] = $this->templateShrink; } + if (null !== $this->templateName) { $res['TemplateName'] = $this->templateName; } @@ -57,23 +61,26 @@ class CreateCardSmsTemplateShrinkRequest extends Model return $res; } - /** - * @param array $map - * - * @return CreateCardSmsTemplateShrinkRequest - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Factorys'])) { $model->factorys = $map['Factorys']; } + if (isset($map['Memo'])) { $model->memo = $map['Memo']; } + if (isset($map['Template'])) { $model->templateShrink = $map['Template']; } + if (isset($map['TemplateName'])) { $model->templateName = $map['TemplateName']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSignOrderRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSignOrderRequest.php new file mode 100644 index 0000000..5583dd8 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSignOrderRequest.php @@ -0,0 +1,229 @@ + 'ExtendMessage', + 'orderContext' => 'OrderContext', + 'orderType' => 'OrderType', + 'ownerId' => 'OwnerId', + 'qualificationId' => 'QualificationId', + 'qualificationVersion' => 'QualificationVersion', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'signId' => 'SignId', + 'signIndustry' => 'SignIndustry', + 'signName' => 'SignName', + 'signSource' => 'SignSource', + 'submitter' => 'Submitter', + ]; + + public function validate() + { + if (\is_array($this->orderContext)) { + Model::validateArray($this->orderContext); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->extendMessage) { + $res['ExtendMessage'] = $this->extendMessage; + } + + if (null !== $this->orderContext) { + if (\is_array($this->orderContext)) { + $res['OrderContext'] = []; + foreach ($this->orderContext as $key1 => $value1) { + $res['OrderContext'][$key1] = $value1; + } + } + } + + if (null !== $this->orderType) { + $res['OrderType'] = $this->orderType; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->qualificationId) { + $res['QualificationId'] = $this->qualificationId; + } + + if (null !== $this->qualificationVersion) { + $res['QualificationVersion'] = $this->qualificationVersion; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->signId) { + $res['SignId'] = $this->signId; + } + + if (null !== $this->signIndustry) { + $res['SignIndustry'] = $this->signIndustry; + } + + if (null !== $this->signName) { + $res['SignName'] = $this->signName; + } + + if (null !== $this->signSource) { + $res['SignSource'] = $this->signSource; + } + + if (null !== $this->submitter) { + $res['Submitter'] = $this->submitter; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['ExtendMessage'])) { + $model->extendMessage = $map['ExtendMessage']; + } + + if (isset($map['OrderContext'])) { + if (!empty($map['OrderContext'])) { + $model->orderContext = []; + foreach ($map['OrderContext'] as $key1 => $value1) { + $model->orderContext[$key1] = $value1; + } + } + } + + if (isset($map['OrderType'])) { + $model->orderType = $map['OrderType']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['QualificationId'])) { + $model->qualificationId = $map['QualificationId']; + } + + if (isset($map['QualificationVersion'])) { + $model->qualificationVersion = $map['QualificationVersion']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['SignId'])) { + $model->signId = $map['SignId']; + } + + if (isset($map['SignIndustry'])) { + $model->signIndustry = $map['SignIndustry']; + } + + if (isset($map['SignName'])) { + $model->signName = $map['SignName']; + } + + if (isset($map['SignSource'])) { + $model->signSource = $map['SignSource']; + } + + if (isset($map['Submitter'])) { + $model->submitter = $map['Submitter']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSignOrderResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSignOrderResponse.php new file mode 100644 index 0000000..ea6a7fe --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSignOrderResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = CreateDigitalSignOrderResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSignOrderResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSignOrderResponseBody.php new file mode 100644 index 0000000..4c63bd0 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSignOrderResponseBody.php @@ -0,0 +1,131 @@ + 'AccessDeniedDetail', + 'code' => 'Code', + 'data' => 'Data', + 'message' => 'Message', + 'requestId' => 'RequestId', + 'success' => 'Success', + ]; + + public function validate() + { + if (\is_array($this->data)) { + Model::validateArray($this->data); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessDeniedDetail) { + $res['AccessDeniedDetail'] = $this->accessDeniedDetail; + } + + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->data) { + if (\is_array($this->data)) { + $res['Data'] = []; + foreach ($this->data as $key1 => $value1) { + $res['Data'][$key1] = $value1; + } + } + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AccessDeniedDetail'])) { + $model->accessDeniedDetail = $map['AccessDeniedDetail']; + } + + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Data'])) { + if (!empty($map['Data'])) { + $model->data = []; + foreach ($map['Data'] as $key1 => $value1) { + $model->data[$key1] = $value1; + } + } + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSignOrderShrinkRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSignOrderShrinkRequest.php new file mode 100644 index 0000000..70b8f56 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSignOrderShrinkRequest.php @@ -0,0 +1,216 @@ + 'ExtendMessage', + 'orderContextShrink' => 'OrderContext', + 'orderType' => 'OrderType', + 'ownerId' => 'OwnerId', + 'qualificationId' => 'QualificationId', + 'qualificationVersion' => 'QualificationVersion', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'signId' => 'SignId', + 'signIndustry' => 'SignIndustry', + 'signName' => 'SignName', + 'signSource' => 'SignSource', + 'submitter' => 'Submitter', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->extendMessage) { + $res['ExtendMessage'] = $this->extendMessage; + } + + if (null !== $this->orderContextShrink) { + $res['OrderContext'] = $this->orderContextShrink; + } + + if (null !== $this->orderType) { + $res['OrderType'] = $this->orderType; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->qualificationId) { + $res['QualificationId'] = $this->qualificationId; + } + + if (null !== $this->qualificationVersion) { + $res['QualificationVersion'] = $this->qualificationVersion; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->signId) { + $res['SignId'] = $this->signId; + } + + if (null !== $this->signIndustry) { + $res['SignIndustry'] = $this->signIndustry; + } + + if (null !== $this->signName) { + $res['SignName'] = $this->signName; + } + + if (null !== $this->signSource) { + $res['SignSource'] = $this->signSource; + } + + if (null !== $this->submitter) { + $res['Submitter'] = $this->submitter; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['ExtendMessage'])) { + $model->extendMessage = $map['ExtendMessage']; + } + + if (isset($map['OrderContext'])) { + $model->orderContextShrink = $map['OrderContext']; + } + + if (isset($map['OrderType'])) { + $model->orderType = $map['OrderType']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['QualificationId'])) { + $model->qualificationId = $map['QualificationId']; + } + + if (isset($map['QualificationVersion'])) { + $model->qualificationVersion = $map['QualificationVersion']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['SignId'])) { + $model->signId = $map['SignId']; + } + + if (isset($map['SignIndustry'])) { + $model->signIndustry = $map['SignIndustry']; + } + + if (isset($map['SignName'])) { + $model->signName = $map['SignName']; + } + + if (isset($map['SignSource'])) { + $model->signSource = $map['SignSource']; + } + + if (isset($map['Submitter'])) { + $model->submitter = $map['Submitter']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSmsTemplateRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSmsTemplateRequest.php new file mode 100644 index 0000000..31893fd --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSmsTemplateRequest.php @@ -0,0 +1,150 @@ + 'OwnerId', + 'remark' => 'Remark', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'signName' => 'SignName', + 'templateContents' => 'TemplateContents', + 'templateName' => 'TemplateName', + ]; + + public function validate() + { + if (\is_array($this->templateContents)) { + Model::validateArray($this->templateContents); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->remark) { + $res['Remark'] = $this->remark; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->signName) { + $res['SignName'] = $this->signName; + } + + if (null !== $this->templateContents) { + if (\is_array($this->templateContents)) { + $res['TemplateContents'] = []; + $n1 = 0; + foreach ($this->templateContents as $item1) { + $res['TemplateContents'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; + } + } + } + + if (null !== $this->templateName) { + $res['TemplateName'] = $this->templateName; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['Remark'])) { + $model->remark = $map['Remark']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['SignName'])) { + $model->signName = $map['SignName']; + } + + if (isset($map['TemplateContents'])) { + if (!empty($map['TemplateContents'])) { + $model->templateContents = []; + $n1 = 0; + foreach ($map['TemplateContents'] as $item1) { + $model->templateContents[$n1] = templateContents::fromMap($item1); + ++$n1; + } + } + } + + if (isset($map['TemplateName'])) { + $model->templateName = $map['TemplateName']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSmsTemplateRequest/templateContents.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSmsTemplateRequest/templateContents.php new file mode 100644 index 0000000..2af12dc --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSmsTemplateRequest/templateContents.php @@ -0,0 +1,90 @@ + 'FileContents', + 'fileName' => 'FileName', + 'fileSize' => 'FileSize', + 'fileSuffix' => 'FileSuffix', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->fileContents) { + $res['FileContents'] = $this->fileContents; + } + + if (null !== $this->fileName) { + $res['FileName'] = $this->fileName; + } + + if (null !== $this->fileSize) { + $res['FileSize'] = $this->fileSize; + } + + if (null !== $this->fileSuffix) { + $res['FileSuffix'] = $this->fileSuffix; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['FileContents'])) { + $model->fileContents = $map['FileContents']; + } + + if (isset($map['FileName'])) { + $model->fileName = $map['FileName']; + } + + if (isset($map['FileSize'])) { + $model->fileSize = $map['FileSize']; + } + + if (isset($map['FileSuffix'])) { + $model->fileSuffix = $map['FileSuffix']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSmsTemplateResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSmsTemplateResponse.php new file mode 100644 index 0000000..e803d13 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSmsTemplateResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = CreateDigitalSmsTemplateResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSmsTemplateResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSmsTemplateResponseBody.php new file mode 100644 index 0000000..e760947 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSmsTemplateResponseBody.php @@ -0,0 +1,90 @@ + 'Code', + 'message' => 'Message', + 'requestId' => 'RequestId', + 'templateCode' => 'TemplateCode', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->templateCode) { + $res['TemplateCode'] = $this->templateCode; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['TemplateCode'])) { + $model->templateCode = $map['TemplateCode']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmartShortUrlRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmartShortUrlRequest.php new file mode 100644 index 0000000..c4dbadc --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmartShortUrlRequest.php @@ -0,0 +1,118 @@ + 'OutId', + 'ownerId' => 'OwnerId', + 'phoneNumbers' => 'PhoneNumbers', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'sourceUrl' => 'SourceUrl', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->outId) { + $res['OutId'] = $this->outId; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->phoneNumbers) { + $res['PhoneNumbers'] = $this->phoneNumbers; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->sourceUrl) { + $res['SourceUrl'] = $this->sourceUrl; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['OutId'])) { + $model->outId = $map['OutId']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['PhoneNumbers'])) { + $model->phoneNumbers = $map['PhoneNumbers']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['SourceUrl'])) { + $model->sourceUrl = $map['SourceUrl']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmartShortUrlResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmartShortUrlResponse.php new file mode 100644 index 0000000..82f9b2b --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmartShortUrlResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = CreateSmartShortUrlResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmartShortUrlResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmartShortUrlResponseBody.php new file mode 100644 index 0000000..cfabb69 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmartShortUrlResponseBody.php @@ -0,0 +1,108 @@ + 'Code', + 'message' => 'Message', + 'model' => 'Model', + 'requestId' => 'RequestId', + ]; + + public function validate() + { + if (\is_array($this->model)) { + Model::validateArray($this->model); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->model) { + if (\is_array($this->model)) { + $res['Model'] = []; + $n1 = 0; + foreach ($this->model as $item1) { + $res['Model'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; + } + } + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['Model'])) { + if (!empty($map['Model'])) { + $model->model = []; + $n1 = 0; + foreach ($map['Model'] as $item1) { + $model->model[$n1] = model_::fromMap($item1); + ++$n1; + } + } + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmartShortUrlResponseBody/model_.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmartShortUrlResponseBody/model_.php new file mode 100644 index 0000000..849a020 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmartShortUrlResponseBody/model_.php @@ -0,0 +1,104 @@ + 'Domain', + 'expiration' => 'Expiration', + 'phoneNumber' => 'PhoneNumber', + 'shortName' => 'ShortName', + 'shortUrl' => 'ShortUrl', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->domain) { + $res['Domain'] = $this->domain; + } + + if (null !== $this->expiration) { + $res['Expiration'] = $this->expiration; + } + + if (null !== $this->phoneNumber) { + $res['PhoneNumber'] = $this->phoneNumber; + } + + if (null !== $this->shortName) { + $res['ShortName'] = $this->shortName; + } + + if (null !== $this->shortUrl) { + $res['ShortUrl'] = $this->shortUrl; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['Domain'])) { + $model->domain = $map['Domain']; + } + + if (isset($map['Expiration'])) { + $model->expiration = $map['Expiration']; + } + + if (isset($map['PhoneNumber'])) { + $model->phoneNumber = $map['PhoneNumber']; + } + + if (isset($map['ShortName'])) { + $model->shortName = $map['ShortName']; + } + + if (isset($map['ShortUrl'])) { + $model->shortUrl = $map['ShortUrl']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAppIcpRecordRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAppIcpRecordRequest.php new file mode 100644 index 0000000..4baf0b5 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAppIcpRecordRequest.php @@ -0,0 +1,160 @@ + 'AppApprovalDate', + 'appIcpLicenseNumber' => 'AppIcpLicenseNumber', + 'appIcpRecordPic' => 'AppIcpRecordPic', + 'appPrincipalUnitName' => 'AppPrincipalUnitName', + 'appServiceName' => 'AppServiceName', + 'domain' => 'Domain', + 'ownerId' => 'OwnerId', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->appApprovalDate) { + $res['AppApprovalDate'] = $this->appApprovalDate; + } + + if (null !== $this->appIcpLicenseNumber) { + $res['AppIcpLicenseNumber'] = $this->appIcpLicenseNumber; + } + + if (null !== $this->appIcpRecordPic) { + $res['AppIcpRecordPic'] = $this->appIcpRecordPic; + } + + if (null !== $this->appPrincipalUnitName) { + $res['AppPrincipalUnitName'] = $this->appPrincipalUnitName; + } + + if (null !== $this->appServiceName) { + $res['AppServiceName'] = $this->appServiceName; + } + + if (null !== $this->domain) { + $res['Domain'] = $this->domain; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AppApprovalDate'])) { + $model->appApprovalDate = $map['AppApprovalDate']; + } + + if (isset($map['AppIcpLicenseNumber'])) { + $model->appIcpLicenseNumber = $map['AppIcpLicenseNumber']; + } + + if (isset($map['AppIcpRecordPic'])) { + $model->appIcpRecordPic = $map['AppIcpRecordPic']; + } + + if (isset($map['AppPrincipalUnitName'])) { + $model->appPrincipalUnitName = $map['AppPrincipalUnitName']; + } + + if (isset($map['AppServiceName'])) { + $model->appServiceName = $map['AppServiceName']; + } + + if (isset($map['Domain'])) { + $model->domain = $map['Domain']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAppIcpRecordResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAppIcpRecordResponse.php new file mode 100644 index 0000000..5a57ca4 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAppIcpRecordResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = CreateSmsAppIcpRecordResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAppIcpRecordResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAppIcpRecordResponseBody.php new file mode 100644 index 0000000..1246867 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAppIcpRecordResponseBody.php @@ -0,0 +1,118 @@ + 'AccessDeniedDetail', + 'code' => 'Code', + 'data' => 'Data', + 'message' => 'Message', + 'requestId' => 'RequestId', + 'success' => 'Success', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessDeniedDetail) { + $res['AccessDeniedDetail'] = $this->accessDeniedDetail; + } + + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->data) { + $res['Data'] = $this->data; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AccessDeniedDetail'])) { + $model->accessDeniedDetail = $map['AccessDeniedDetail']; + } + + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Data'])) { + $model->data = $map['Data']; + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAuthorizationLetterRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAuthorizationLetterRequest.php new file mode 100644 index 0000000..58ce3e8 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAuthorizationLetterRequest.php @@ -0,0 +1,191 @@ + 'Authorization', + 'authorizationLetterExpDate' => 'AuthorizationLetterExpDate', + 'authorizationLetterName' => 'AuthorizationLetterName', + 'authorizationLetterPic' => 'AuthorizationLetterPic', + 'organizationCode' => 'OrganizationCode', + 'ownerId' => 'OwnerId', + 'proxyAuthorization' => 'ProxyAuthorization', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'signList' => 'SignList', + ]; + + public function validate() + { + if (\is_array($this->signList)) { + Model::validateArray($this->signList); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->authorization) { + $res['Authorization'] = $this->authorization; + } + + if (null !== $this->authorizationLetterExpDate) { + $res['AuthorizationLetterExpDate'] = $this->authorizationLetterExpDate; + } + + if (null !== $this->authorizationLetterName) { + $res['AuthorizationLetterName'] = $this->authorizationLetterName; + } + + if (null !== $this->authorizationLetterPic) { + $res['AuthorizationLetterPic'] = $this->authorizationLetterPic; + } + + if (null !== $this->organizationCode) { + $res['OrganizationCode'] = $this->organizationCode; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->proxyAuthorization) { + $res['ProxyAuthorization'] = $this->proxyAuthorization; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->signList) { + if (\is_array($this->signList)) { + $res['SignList'] = []; + $n1 = 0; + foreach ($this->signList as $item1) { + $res['SignList'][$n1] = $item1; + ++$n1; + } + } + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['Authorization'])) { + $model->authorization = $map['Authorization']; + } + + if (isset($map['AuthorizationLetterExpDate'])) { + $model->authorizationLetterExpDate = $map['AuthorizationLetterExpDate']; + } + + if (isset($map['AuthorizationLetterName'])) { + $model->authorizationLetterName = $map['AuthorizationLetterName']; + } + + if (isset($map['AuthorizationLetterPic'])) { + $model->authorizationLetterPic = $map['AuthorizationLetterPic']; + } + + if (isset($map['OrganizationCode'])) { + $model->organizationCode = $map['OrganizationCode']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['ProxyAuthorization'])) { + $model->proxyAuthorization = $map['ProxyAuthorization']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['SignList'])) { + if (!empty($map['SignList'])) { + $model->signList = []; + $n1 = 0; + foreach ($map['SignList'] as $item1) { + $model->signList[$n1] = $item1; + ++$n1; + } + } + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAuthorizationLetterResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAuthorizationLetterResponse.php new file mode 100644 index 0000000..b3f261e --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAuthorizationLetterResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = CreateSmsAuthorizationLetterResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAuthorizationLetterResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAuthorizationLetterResponseBody.php new file mode 100644 index 0000000..4e1102f --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAuthorizationLetterResponseBody.php @@ -0,0 +1,118 @@ + 'AccessDeniedDetail', + 'code' => 'Code', + 'data' => 'Data', + 'message' => 'Message', + 'requestId' => 'RequestId', + 'success' => 'Success', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessDeniedDetail) { + $res['AccessDeniedDetail'] = $this->accessDeniedDetail; + } + + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->data) { + $res['Data'] = $this->data; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AccessDeniedDetail'])) { + $model->accessDeniedDetail = $map['AccessDeniedDetail']; + } + + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Data'])) { + $model->data = $map['Data']; + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAuthorizationLetterShrinkRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAuthorizationLetterShrinkRequest.php new file mode 100644 index 0000000..ba0c1fe --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAuthorizationLetterShrinkRequest.php @@ -0,0 +1,174 @@ + 'Authorization', + 'authorizationLetterExpDate' => 'AuthorizationLetterExpDate', + 'authorizationLetterName' => 'AuthorizationLetterName', + 'authorizationLetterPic' => 'AuthorizationLetterPic', + 'organizationCode' => 'OrganizationCode', + 'ownerId' => 'OwnerId', + 'proxyAuthorization' => 'ProxyAuthorization', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'signListShrink' => 'SignList', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->authorization) { + $res['Authorization'] = $this->authorization; + } + + if (null !== $this->authorizationLetterExpDate) { + $res['AuthorizationLetterExpDate'] = $this->authorizationLetterExpDate; + } + + if (null !== $this->authorizationLetterName) { + $res['AuthorizationLetterName'] = $this->authorizationLetterName; + } + + if (null !== $this->authorizationLetterPic) { + $res['AuthorizationLetterPic'] = $this->authorizationLetterPic; + } + + if (null !== $this->organizationCode) { + $res['OrganizationCode'] = $this->organizationCode; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->proxyAuthorization) { + $res['ProxyAuthorization'] = $this->proxyAuthorization; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->signListShrink) { + $res['SignList'] = $this->signListShrink; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['Authorization'])) { + $model->authorization = $map['Authorization']; + } + + if (isset($map['AuthorizationLetterExpDate'])) { + $model->authorizationLetterExpDate = $map['AuthorizationLetterExpDate']; + } + + if (isset($map['AuthorizationLetterName'])) { + $model->authorizationLetterName = $map['AuthorizationLetterName']; + } + + if (isset($map['AuthorizationLetterPic'])) { + $model->authorizationLetterPic = $map['AuthorizationLetterPic']; + } + + if (isset($map['OrganizationCode'])) { + $model->organizationCode = $map['OrganizationCode']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['ProxyAuthorization'])) { + $model->proxyAuthorization = $map['ProxyAuthorization']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['SignList'])) { + $model->signListShrink = $map['SignList']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsSignRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsSignRequest.php new file mode 100644 index 0000000..c60d003 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsSignRequest.php @@ -0,0 +1,247 @@ + 'AppIcpRecordId', + 'applySceneContent' => 'ApplySceneContent', + 'authorizationLetterId' => 'AuthorizationLetterId', + 'moreData' => 'MoreData', + 'ownerId' => 'OwnerId', + 'qualificationId' => 'QualificationId', + 'remark' => 'Remark', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'signName' => 'SignName', + 'signSource' => 'SignSource', + 'signType' => 'SignType', + 'thirdParty' => 'ThirdParty', + 'trademarkId' => 'TrademarkId', + ]; + + public function validate() + { + if (\is_array($this->moreData)) { + Model::validateArray($this->moreData); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->appIcpRecordId) { + $res['AppIcpRecordId'] = $this->appIcpRecordId; + } + + if (null !== $this->applySceneContent) { + $res['ApplySceneContent'] = $this->applySceneContent; + } + + if (null !== $this->authorizationLetterId) { + $res['AuthorizationLetterId'] = $this->authorizationLetterId; + } + + if (null !== $this->moreData) { + if (\is_array($this->moreData)) { + $res['MoreData'] = []; + $n1 = 0; + foreach ($this->moreData as $item1) { + $res['MoreData'][$n1] = $item1; + ++$n1; + } + } + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->qualificationId) { + $res['QualificationId'] = $this->qualificationId; + } + + if (null !== $this->remark) { + $res['Remark'] = $this->remark; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->signName) { + $res['SignName'] = $this->signName; + } + + if (null !== $this->signSource) { + $res['SignSource'] = $this->signSource; + } + + if (null !== $this->signType) { + $res['SignType'] = $this->signType; + } + + 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['ApplySceneContent'])) { + $model->applySceneContent = $map['ApplySceneContent']; + } + + if (isset($map['AuthorizationLetterId'])) { + $model->authorizationLetterId = $map['AuthorizationLetterId']; + } + + if (isset($map['MoreData'])) { + if (!empty($map['MoreData'])) { + $model->moreData = []; + $n1 = 0; + foreach ($map['MoreData'] as $item1) { + $model->moreData[$n1] = $item1; + ++$n1; + } + } + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['QualificationId'])) { + $model->qualificationId = $map['QualificationId']; + } + + if (isset($map['Remark'])) { + $model->remark = $map['Remark']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['SignName'])) { + $model->signName = $map['SignName']; + } + + if (isset($map['SignSource'])) { + $model->signSource = $map['SignSource']; + } + + if (isset($map['SignType'])) { + $model->signType = $map['SignType']; + } + + if (isset($map['ThirdParty'])) { + $model->thirdParty = $map['ThirdParty']; + } + + if (isset($map['TrademarkId'])) { + $model->trademarkId = $map['TrademarkId']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsSignResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsSignResponse.php new file mode 100644 index 0000000..deb11f3 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsSignResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = CreateSmsSignResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsSignResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsSignResponseBody.php new file mode 100644 index 0000000..d0f18e1 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsSignResponseBody.php @@ -0,0 +1,104 @@ + 'Code', + 'message' => 'Message', + 'orderId' => 'OrderId', + 'requestId' => 'RequestId', + 'signName' => 'SignName', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->orderId) { + $res['OrderId'] = $this->orderId; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->signName) { + $res['SignName'] = $this->signName; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['OrderId'])) { + $model->orderId = $map['OrderId']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['SignName'])) { + $model->signName = $map['SignName']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsSignShrinkRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsSignShrinkRequest.php new file mode 100644 index 0000000..457d3de --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsSignShrinkRequest.php @@ -0,0 +1,230 @@ + 'AppIcpRecordId', + 'applySceneContent' => 'ApplySceneContent', + 'authorizationLetterId' => 'AuthorizationLetterId', + 'moreDataShrink' => 'MoreData', + 'ownerId' => 'OwnerId', + 'qualificationId' => 'QualificationId', + 'remark' => 'Remark', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'signName' => 'SignName', + 'signSource' => 'SignSource', + 'signType' => 'SignType', + 'thirdParty' => 'ThirdParty', + 'trademarkId' => 'TrademarkId', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->appIcpRecordId) { + $res['AppIcpRecordId'] = $this->appIcpRecordId; + } + + if (null !== $this->applySceneContent) { + $res['ApplySceneContent'] = $this->applySceneContent; + } + + if (null !== $this->authorizationLetterId) { + $res['AuthorizationLetterId'] = $this->authorizationLetterId; + } + + if (null !== $this->moreDataShrink) { + $res['MoreData'] = $this->moreDataShrink; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->qualificationId) { + $res['QualificationId'] = $this->qualificationId; + } + + if (null !== $this->remark) { + $res['Remark'] = $this->remark; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->signName) { + $res['SignName'] = $this->signName; + } + + if (null !== $this->signSource) { + $res['SignSource'] = $this->signSource; + } + + if (null !== $this->signType) { + $res['SignType'] = $this->signType; + } + + 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['ApplySceneContent'])) { + $model->applySceneContent = $map['ApplySceneContent']; + } + + if (isset($map['AuthorizationLetterId'])) { + $model->authorizationLetterId = $map['AuthorizationLetterId']; + } + + if (isset($map['MoreData'])) { + $model->moreDataShrink = $map['MoreData']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['QualificationId'])) { + $model->qualificationId = $map['QualificationId']; + } + + if (isset($map['Remark'])) { + $model->remark = $map['Remark']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['SignName'])) { + $model->signName = $map['SignName']; + } + + if (isset($map['SignSource'])) { + $model->signSource = $map['SignSource']; + } + + if (isset($map['SignType'])) { + $model->signType = $map['SignType']; + } + + if (isset($map['ThirdParty'])) { + $model->thirdParty = $map['ThirdParty']; + } + + if (isset($map['TrademarkId'])) { + $model->trademarkId = $map['TrademarkId']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTemplateRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTemplateRequest.php new file mode 100644 index 0000000..b47e86d --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTemplateRequest.php @@ -0,0 +1,233 @@ + 'ApplySceneContent', + 'intlType' => 'IntlType', + 'moreData' => 'MoreData', + 'ownerId' => 'OwnerId', + 'relatedSignName' => 'RelatedSignName', + 'remark' => 'Remark', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'templateContent' => 'TemplateContent', + 'templateName' => 'TemplateName', + 'templateRule' => 'TemplateRule', + 'templateType' => 'TemplateType', + 'trafficDriving' => 'TrafficDriving', + ]; + + public function validate() + { + if (\is_array($this->moreData)) { + Model::validateArray($this->moreData); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->applySceneContent) { + $res['ApplySceneContent'] = $this->applySceneContent; + } + + if (null !== $this->intlType) { + $res['IntlType'] = $this->intlType; + } + + if (null !== $this->moreData) { + if (\is_array($this->moreData)) { + $res['MoreData'] = []; + $n1 = 0; + foreach ($this->moreData as $item1) { + $res['MoreData'][$n1] = $item1; + ++$n1; + } + } + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->relatedSignName) { + $res['RelatedSignName'] = $this->relatedSignName; + } + + if (null !== $this->remark) { + $res['Remark'] = $this->remark; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->templateContent) { + $res['TemplateContent'] = $this->templateContent; + } + + if (null !== $this->templateName) { + $res['TemplateName'] = $this->templateName; + } + + if (null !== $this->templateRule) { + $res['TemplateRule'] = $this->templateRule; + } + + if (null !== $this->templateType) { + $res['TemplateType'] = $this->templateType; + } + + if (null !== $this->trafficDriving) { + $res['TrafficDriving'] = $this->trafficDriving; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['ApplySceneContent'])) { + $model->applySceneContent = $map['ApplySceneContent']; + } + + if (isset($map['IntlType'])) { + $model->intlType = $map['IntlType']; + } + + if (isset($map['MoreData'])) { + if (!empty($map['MoreData'])) { + $model->moreData = []; + $n1 = 0; + foreach ($map['MoreData'] as $item1) { + $model->moreData[$n1] = $item1; + ++$n1; + } + } + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['RelatedSignName'])) { + $model->relatedSignName = $map['RelatedSignName']; + } + + if (isset($map['Remark'])) { + $model->remark = $map['Remark']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['TemplateContent'])) { + $model->templateContent = $map['TemplateContent']; + } + + if (isset($map['TemplateName'])) { + $model->templateName = $map['TemplateName']; + } + + if (isset($map['TemplateRule'])) { + $model->templateRule = $map['TemplateRule']; + } + + if (isset($map['TemplateType'])) { + $model->templateType = $map['TemplateType']; + } + + if (isset($map['TrafficDriving'])) { + $model->trafficDriving = $map['TrafficDriving']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTemplateResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTemplateResponse.php new file mode 100644 index 0000000..8ee1ac2 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTemplateResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = CreateSmsTemplateResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTemplateResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTemplateResponseBody.php new file mode 100644 index 0000000..689ab4a --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTemplateResponseBody.php @@ -0,0 +1,118 @@ + 'Code', + 'message' => 'Message', + 'orderId' => 'OrderId', + 'requestId' => 'RequestId', + 'templateCode' => 'TemplateCode', + 'templateName' => 'TemplateName', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->orderId) { + $res['OrderId'] = $this->orderId; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->templateCode) { + $res['TemplateCode'] = $this->templateCode; + } + + if (null !== $this->templateName) { + $res['TemplateName'] = $this->templateName; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['OrderId'])) { + $model->orderId = $map['OrderId']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['TemplateCode'])) { + $model->templateCode = $map['TemplateCode']; + } + + if (isset($map['TemplateName'])) { + $model->templateName = $map['TemplateName']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTemplateShrinkRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTemplateShrinkRequest.php new file mode 100644 index 0000000..c7e5fe9 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTemplateShrinkRequest.php @@ -0,0 +1,216 @@ + 'ApplySceneContent', + 'intlType' => 'IntlType', + 'moreDataShrink' => 'MoreData', + 'ownerId' => 'OwnerId', + 'relatedSignName' => 'RelatedSignName', + 'remark' => 'Remark', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'templateContent' => 'TemplateContent', + 'templateName' => 'TemplateName', + 'templateRule' => 'TemplateRule', + 'templateType' => 'TemplateType', + 'trafficDriving' => 'TrafficDriving', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->applySceneContent) { + $res['ApplySceneContent'] = $this->applySceneContent; + } + + if (null !== $this->intlType) { + $res['IntlType'] = $this->intlType; + } + + if (null !== $this->moreDataShrink) { + $res['MoreData'] = $this->moreDataShrink; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->relatedSignName) { + $res['RelatedSignName'] = $this->relatedSignName; + } + + if (null !== $this->remark) { + $res['Remark'] = $this->remark; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->templateContent) { + $res['TemplateContent'] = $this->templateContent; + } + + if (null !== $this->templateName) { + $res['TemplateName'] = $this->templateName; + } + + if (null !== $this->templateRule) { + $res['TemplateRule'] = $this->templateRule; + } + + if (null !== $this->templateType) { + $res['TemplateType'] = $this->templateType; + } + + if (null !== $this->trafficDriving) { + $res['TrafficDriving'] = $this->trafficDriving; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['ApplySceneContent'])) { + $model->applySceneContent = $map['ApplySceneContent']; + } + + if (isset($map['IntlType'])) { + $model->intlType = $map['IntlType']; + } + + if (isset($map['MoreData'])) { + $model->moreDataShrink = $map['MoreData']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['RelatedSignName'])) { + $model->relatedSignName = $map['RelatedSignName']; + } + + if (isset($map['Remark'])) { + $model->remark = $map['Remark']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['TemplateContent'])) { + $model->templateContent = $map['TemplateContent']; + } + + if (isset($map['TemplateName'])) { + $model->templateName = $map['TemplateName']; + } + + if (isset($map['TemplateRule'])) { + $model->templateRule = $map['TemplateRule']; + } + + if (isset($map['TemplateType'])) { + $model->templateType = $map['TemplateType']; + } + + if (isset($map['TrafficDriving'])) { + $model->trafficDriving = $map['TrafficDriving']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTrademarkRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTrademarkRequest.php new file mode 100644 index 0000000..3ef9574 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTrademarkRequest.php @@ -0,0 +1,146 @@ + 'OwnerId', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'trademarkApplicantName' => 'TrademarkApplicantName', + 'trademarkEffExpDate' => 'TrademarkEffExpDate', + 'trademarkName' => 'TrademarkName', + 'trademarkPic' => 'TrademarkPic', + 'trademarkRegistrationNumber' => 'TrademarkRegistrationNumber', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->trademarkApplicantName) { + $res['TrademarkApplicantName'] = $this->trademarkApplicantName; + } + + if (null !== $this->trademarkEffExpDate) { + $res['TrademarkEffExpDate'] = $this->trademarkEffExpDate; + } + + if (null !== $this->trademarkName) { + $res['TrademarkName'] = $this->trademarkName; + } + + if (null !== $this->trademarkPic) { + $res['TrademarkPic'] = $this->trademarkPic; + } + + if (null !== $this->trademarkRegistrationNumber) { + $res['TrademarkRegistrationNumber'] = $this->trademarkRegistrationNumber; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['TrademarkApplicantName'])) { + $model->trademarkApplicantName = $map['TrademarkApplicantName']; + } + + if (isset($map['TrademarkEffExpDate'])) { + $model->trademarkEffExpDate = $map['TrademarkEffExpDate']; + } + + if (isset($map['TrademarkName'])) { + $model->trademarkName = $map['TrademarkName']; + } + + if (isset($map['TrademarkPic'])) { + $model->trademarkPic = $map['TrademarkPic']; + } + + if (isset($map['TrademarkRegistrationNumber'])) { + $model->trademarkRegistrationNumber = $map['TrademarkRegistrationNumber']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTrademarkResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTrademarkResponse.php new file mode 100644 index 0000000..c60e490 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTrademarkResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = CreateSmsTrademarkResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTrademarkResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTrademarkResponseBody.php new file mode 100644 index 0000000..e8dc603 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTrademarkResponseBody.php @@ -0,0 +1,118 @@ + 'AccessDeniedDetail', + 'code' => 'Code', + 'data' => 'Data', + 'message' => 'Message', + 'requestId' => 'RequestId', + 'success' => 'Success', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessDeniedDetail) { + $res['AccessDeniedDetail'] = $this->accessDeniedDetail; + } + + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->data) { + $res['Data'] = $this->data; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AccessDeniedDetail'])) { + $model->accessDeniedDetail = $map['AccessDeniedDetail']; + } + + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Data'])) { + $model->data = $map['Data']; + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteExtCodeSignRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteExtCodeSignRequest.php new file mode 100644 index 0000000..95c99f4 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteExtCodeSignRequest.php @@ -0,0 +1,104 @@ + 'ExtCode', + 'ownerId' => 'OwnerId', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'signName' => 'SignName', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->extCode) { + $res['ExtCode'] = $this->extCode; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->signName) { + $res['SignName'] = $this->signName; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['ExtCode'])) { + $model->extCode = $map['ExtCode']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['SignName'])) { + $model->signName = $map['SignName']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteExtCodeSignResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteExtCodeSignResponse.php new file mode 100644 index 0000000..c26c5af --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteExtCodeSignResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = DeleteExtCodeSignResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteExtCodeSignResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteExtCodeSignResponseBody.php new file mode 100644 index 0000000..7c63c47 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteExtCodeSignResponseBody.php @@ -0,0 +1,118 @@ + 'AccessDeniedDetail', + 'code' => 'Code', + 'data' => 'Data', + 'message' => 'Message', + 'requestId' => 'RequestId', + 'success' => 'Success', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessDeniedDetail) { + $res['AccessDeniedDetail'] = $this->accessDeniedDetail; + } + + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->data) { + $res['Data'] = $this->data; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AccessDeniedDetail'])) { + $model->accessDeniedDetail = $map['AccessDeniedDetail']; + } + + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Data'])) { + $model->data = $map['Data']; + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteShortUrlRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteShortUrlRequest.php index e177a51..56845a9 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteShortUrlRequest.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteShortUrlRequest.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class DeleteShortUrlRequest extends Model { @@ -28,28 +28,32 @@ class DeleteShortUrlRequest extends Model */ public $sourceUrl; protected $_name = [ - 'ownerId' => 'OwnerId', + 'ownerId' => 'OwnerId', 'resourceOwnerAccount' => 'ResourceOwnerAccount', - 'resourceOwnerId' => 'ResourceOwnerId', - 'sourceUrl' => 'SourceUrl', + 'resourceOwnerId' => 'ResourceOwnerId', + 'sourceUrl' => 'SourceUrl', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->ownerId) { $res['OwnerId'] = $this->ownerId; } + if (null !== $this->resourceOwnerAccount) { $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; } + if (null !== $this->resourceOwnerId) { $res['ResourceOwnerId'] = $this->resourceOwnerId; } + if (null !== $this->sourceUrl) { $res['SourceUrl'] = $this->sourceUrl; } @@ -57,23 +61,26 @@ class DeleteShortUrlRequest extends Model return $res; } - /** - * @param array $map - * - * @return DeleteShortUrlRequest - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['OwnerId'])) { $model->ownerId = $map['OwnerId']; } + if (isset($map['ResourceOwnerAccount'])) { $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; } + if (isset($map['ResourceOwnerId'])) { $model->resourceOwnerId = $map['ResourceOwnerId']; } + if (isset($map['SourceUrl'])) { $model->sourceUrl = $map['SourceUrl']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteShortUrlResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteShortUrlResponse.php index 5686e7e..f4a5706 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteShortUrlResponse.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteShortUrlResponse.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class DeleteShortUrlResponse extends Model { @@ -23,48 +23,66 @@ class DeleteShortUrlResponse extends Model */ public $body; protected $_name = [ - 'headers' => 'headers', + 'headers' => 'headers', 'statusCode' => 'statusCode', - 'body' => 'body', + 'body' => 'body', ]; public function validate() { - Model::validateRequired('headers', $this->headers, true); - Model::validateRequired('statusCode', $this->statusCode, true); - Model::validateRequired('body', $this->body, true); + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->headers) { - $res['headers'] = $this->headers; + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } } + if (null !== $this->statusCode) { $res['statusCode'] = $this->statusCode; } + if (null !== $this->body) { - $res['body'] = null !== $this->body ? $this->body->toMap() : null; + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; } return $res; } - /** - * @param array $map - * - * @return DeleteShortUrlResponse - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['headers'])) { - $model->headers = $map['headers']; + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } } + if (isset($map['statusCode'])) { $model->statusCode = $map['statusCode']; } + if (isset($map['body'])) { $model->body = DeleteShortUrlResponseBody::fromMap($map['body']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteShortUrlResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteShortUrlResponseBody.php index adcc487..287f9af 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteShortUrlResponseBody.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteShortUrlResponseBody.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class DeleteShortUrlResponseBody extends Model { @@ -23,24 +23,27 @@ class DeleteShortUrlResponseBody extends Model */ public $requestId; protected $_name = [ - 'code' => 'Code', - 'message' => 'Message', + 'code' => 'Code', + 'message' => 'Message', 'requestId' => 'RequestId', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->code) { $res['Code'] = $this->code; } + if (null !== $this->message) { $res['Message'] = $this->message; } + if (null !== $this->requestId) { $res['RequestId'] = $this->requestId; } @@ -48,20 +51,22 @@ class DeleteShortUrlResponseBody extends Model return $res; } - /** - * @param array $map - * - * @return DeleteShortUrlResponseBody - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Code'])) { $model->code = $map['Code']; } + if (isset($map['Message'])) { $model->message = $map['Message']; } + if (isset($map['RequestId'])) { $model->requestId = $map['RequestId']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsQualificationRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsQualificationRequest.php new file mode 100644 index 0000000..a241bd1 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsQualificationRequest.php @@ -0,0 +1,104 @@ + 'OrderId', + 'ownerId' => 'OwnerId', + 'qualificationGroupId' => 'QualificationGroupId', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->orderId) { + $res['OrderId'] = $this->orderId; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->qualificationGroupId) { + $res['QualificationGroupId'] = $this->qualificationGroupId; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['OrderId'])) { + $model->orderId = $map['OrderId']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['QualificationGroupId'])) { + $model->qualificationGroupId = $map['QualificationGroupId']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsQualificationResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsQualificationResponse.php new file mode 100644 index 0000000..23530df --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsQualificationResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = DeleteSmsQualificationResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsQualificationResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsQualificationResponseBody.php new file mode 100644 index 0000000..50781a9 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsQualificationResponseBody.php @@ -0,0 +1,118 @@ + 'AccessDeniedDetail', + 'code' => 'Code', + 'data' => 'Data', + 'message' => 'Message', + 'requestId' => 'RequestId', + 'success' => 'Success', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessDeniedDetail) { + $res['AccessDeniedDetail'] = $this->accessDeniedDetail; + } + + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->data) { + $res['Data'] = $this->data; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AccessDeniedDetail'])) { + $model->accessDeniedDetail = $map['AccessDeniedDetail']; + } + + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Data'])) { + $model->data = $map['Data']; + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsSignRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsSignRequest.php index 46070f2..1b3f2e5 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsSignRequest.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsSignRequest.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class DeleteSmsSignRequest extends Model { @@ -28,28 +28,32 @@ class DeleteSmsSignRequest extends Model */ public $signName; protected $_name = [ - 'ownerId' => 'OwnerId', + 'ownerId' => 'OwnerId', 'resourceOwnerAccount' => 'ResourceOwnerAccount', - 'resourceOwnerId' => 'ResourceOwnerId', - 'signName' => 'SignName', + 'resourceOwnerId' => 'ResourceOwnerId', + 'signName' => 'SignName', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->ownerId) { $res['OwnerId'] = $this->ownerId; } + if (null !== $this->resourceOwnerAccount) { $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; } + if (null !== $this->resourceOwnerId) { $res['ResourceOwnerId'] = $this->resourceOwnerId; } + if (null !== $this->signName) { $res['SignName'] = $this->signName; } @@ -57,23 +61,26 @@ class DeleteSmsSignRequest extends Model return $res; } - /** - * @param array $map - * - * @return DeleteSmsSignRequest - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['OwnerId'])) { $model->ownerId = $map['OwnerId']; } + if (isset($map['ResourceOwnerAccount'])) { $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; } + if (isset($map['ResourceOwnerId'])) { $model->resourceOwnerId = $map['ResourceOwnerId']; } + if (isset($map['SignName'])) { $model->signName = $map['SignName']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsSignResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsSignResponse.php index 2795454..5059f0f 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsSignResponse.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsSignResponse.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class DeleteSmsSignResponse extends Model { @@ -23,48 +23,66 @@ class DeleteSmsSignResponse extends Model */ public $body; protected $_name = [ - 'headers' => 'headers', + 'headers' => 'headers', 'statusCode' => 'statusCode', - 'body' => 'body', + 'body' => 'body', ]; public function validate() { - Model::validateRequired('headers', $this->headers, true); - Model::validateRequired('statusCode', $this->statusCode, true); - Model::validateRequired('body', $this->body, true); + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->headers) { - $res['headers'] = $this->headers; + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } } + if (null !== $this->statusCode) { $res['statusCode'] = $this->statusCode; } + if (null !== $this->body) { - $res['body'] = null !== $this->body ? $this->body->toMap() : null; + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; } return $res; } - /** - * @param array $map - * - * @return DeleteSmsSignResponse - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['headers'])) { - $model->headers = $map['headers']; + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } } + if (isset($map['statusCode'])) { $model->statusCode = $map['statusCode']; } + if (isset($map['body'])) { $model->body = DeleteSmsSignResponseBody::fromMap($map['body']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsSignResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsSignResponseBody.php index 42bb661..ba61323 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsSignResponseBody.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsSignResponseBody.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class DeleteSmsSignResponseBody extends Model { @@ -28,28 +28,32 @@ class DeleteSmsSignResponseBody extends Model */ public $signName; protected $_name = [ - 'code' => 'Code', - 'message' => 'Message', + 'code' => 'Code', + 'message' => 'Message', 'requestId' => 'RequestId', - 'signName' => 'SignName', + 'signName' => 'SignName', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->code) { $res['Code'] = $this->code; } + if (null !== $this->message) { $res['Message'] = $this->message; } + if (null !== $this->requestId) { $res['RequestId'] = $this->requestId; } + if (null !== $this->signName) { $res['SignName'] = $this->signName; } @@ -57,23 +61,26 @@ class DeleteSmsSignResponseBody extends Model return $res; } - /** - * @param array $map - * - * @return DeleteSmsSignResponseBody - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Code'])) { $model->code = $map['Code']; } + if (isset($map['Message'])) { $model->message = $map['Message']; } + if (isset($map['RequestId'])) { $model->requestId = $map['RequestId']; } + if (isset($map['SignName'])) { $model->signName = $map['SignName']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsTemplateRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsTemplateRequest.php index 79cb422..6262f7b 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsTemplateRequest.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsTemplateRequest.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class DeleteSmsTemplateRequest extends Model { @@ -28,28 +28,32 @@ class DeleteSmsTemplateRequest extends Model */ public $templateCode; protected $_name = [ - 'ownerId' => 'OwnerId', + 'ownerId' => 'OwnerId', 'resourceOwnerAccount' => 'ResourceOwnerAccount', - 'resourceOwnerId' => 'ResourceOwnerId', - 'templateCode' => 'TemplateCode', + 'resourceOwnerId' => 'ResourceOwnerId', + 'templateCode' => 'TemplateCode', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->ownerId) { $res['OwnerId'] = $this->ownerId; } + if (null !== $this->resourceOwnerAccount) { $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; } + if (null !== $this->resourceOwnerId) { $res['ResourceOwnerId'] = $this->resourceOwnerId; } + if (null !== $this->templateCode) { $res['TemplateCode'] = $this->templateCode; } @@ -57,23 +61,26 @@ class DeleteSmsTemplateRequest extends Model return $res; } - /** - * @param array $map - * - * @return DeleteSmsTemplateRequest - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['OwnerId'])) { $model->ownerId = $map['OwnerId']; } + if (isset($map['ResourceOwnerAccount'])) { $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; } + if (isset($map['ResourceOwnerId'])) { $model->resourceOwnerId = $map['ResourceOwnerId']; } + if (isset($map['TemplateCode'])) { $model->templateCode = $map['TemplateCode']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsTemplateResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsTemplateResponse.php index 9443908..53f8211 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsTemplateResponse.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsTemplateResponse.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class DeleteSmsTemplateResponse extends Model { @@ -23,48 +23,66 @@ class DeleteSmsTemplateResponse extends Model */ public $body; protected $_name = [ - 'headers' => 'headers', + 'headers' => 'headers', 'statusCode' => 'statusCode', - 'body' => 'body', + 'body' => 'body', ]; public function validate() { - Model::validateRequired('headers', $this->headers, true); - Model::validateRequired('statusCode', $this->statusCode, true); - Model::validateRequired('body', $this->body, true); + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->headers) { - $res['headers'] = $this->headers; + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } } + if (null !== $this->statusCode) { $res['statusCode'] = $this->statusCode; } + if (null !== $this->body) { - $res['body'] = null !== $this->body ? $this->body->toMap() : null; + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; } return $res; } - /** - * @param array $map - * - * @return DeleteSmsTemplateResponse - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['headers'])) { - $model->headers = $map['headers']; + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } } + if (isset($map['statusCode'])) { $model->statusCode = $map['statusCode']; } + if (isset($map['body'])) { $model->body = DeleteSmsTemplateResponseBody::fromMap($map['body']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsTemplateResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsTemplateResponseBody.php index 532244d..81a1cb2 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsTemplateResponseBody.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsTemplateResponseBody.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class DeleteSmsTemplateResponseBody extends Model { @@ -28,28 +28,32 @@ class DeleteSmsTemplateResponseBody extends Model */ public $templateCode; protected $_name = [ - 'code' => 'Code', - 'message' => 'Message', - 'requestId' => 'RequestId', + 'code' => 'Code', + 'message' => 'Message', + 'requestId' => 'RequestId', 'templateCode' => 'TemplateCode', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->code) { $res['Code'] = $this->code; } + if (null !== $this->message) { $res['Message'] = $this->message; } + if (null !== $this->requestId) { $res['RequestId'] = $this->requestId; } + if (null !== $this->templateCode) { $res['TemplateCode'] = $this->templateCode; } @@ -57,23 +61,26 @@ class DeleteSmsTemplateResponseBody extends Model return $res; } - /** - * @param array $map - * - * @return DeleteSmsTemplateResponseBody - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Code'])) { $model->code = $map['Code']; } + if (isset($map['Message'])) { $model->message = $map['Message']; } + if (isset($map['RequestId'])) { $model->requestId = $map['RequestId']; } + if (isset($map['TemplateCode'])) { $model->templateCode = $map['TemplateCode']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsRequest.php new file mode 100644 index 0000000..a574ccf --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsRequest.php @@ -0,0 +1,174 @@ + 'BizCardId', + 'bizDigitId' => 'BizDigitId', + 'bizSmsId' => 'BizSmsId', + 'currentPage' => 'CurrentPage', + 'ownerId' => 'OwnerId', + 'pageSize' => 'PageSize', + 'phoneNumber' => 'PhoneNumber', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'sendDate' => 'SendDate', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->bizCardId) { + $res['BizCardId'] = $this->bizCardId; + } + + if (null !== $this->bizDigitId) { + $res['BizDigitId'] = $this->bizDigitId; + } + + if (null !== $this->bizSmsId) { + $res['BizSmsId'] = $this->bizSmsId; + } + + if (null !== $this->currentPage) { + $res['CurrentPage'] = $this->currentPage; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->pageSize) { + $res['PageSize'] = $this->pageSize; + } + + if (null !== $this->phoneNumber) { + $res['PhoneNumber'] = $this->phoneNumber; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->sendDate) { + $res['SendDate'] = $this->sendDate; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['BizCardId'])) { + $model->bizCardId = $map['BizCardId']; + } + + if (isset($map['BizDigitId'])) { + $model->bizDigitId = $map['BizDigitId']; + } + + if (isset($map['BizSmsId'])) { + $model->bizSmsId = $map['BizSmsId']; + } + + if (isset($map['CurrentPage'])) { + $model->currentPage = $map['CurrentPage']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['PageSize'])) { + $model->pageSize = $map['PageSize']; + } + + if (isset($map['PhoneNumber'])) { + $model->phoneNumber = $map['PhoneNumber']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['SendDate'])) { + $model->sendDate = $map['SendDate']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsResponse.php new file mode 100644 index 0000000..88622db --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = GetCardSmsDetailsResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsResponseBody.php new file mode 100644 index 0000000..ea15bdc --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsResponseBody.php @@ -0,0 +1,108 @@ + 'AccessDeniedDetail', + 'cardSendDetailDTO' => 'CardSendDetailDTO', + 'code' => 'Code', + 'message' => 'Message', + 'success' => 'Success', + ]; + + public function validate() + { + if (null !== $this->cardSendDetailDTO) { + $this->cardSendDetailDTO->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessDeniedDetail) { + $res['AccessDeniedDetail'] = $this->accessDeniedDetail; + } + + if (null !== $this->cardSendDetailDTO) { + $res['CardSendDetailDTO'] = null !== $this->cardSendDetailDTO ? $this->cardSendDetailDTO->toArray($noStream) : $this->cardSendDetailDTO; + } + + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AccessDeniedDetail'])) { + $model->accessDeniedDetail = $map['AccessDeniedDetail']; + } + + if (isset($map['CardSendDetailDTO'])) { + $model->cardSendDetailDTO = cardSendDetailDTO::fromMap($map['CardSendDetailDTO']); + } + + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsResponseBody/cardSendDetailDTO.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsResponseBody/cardSendDetailDTO.php new file mode 100644 index 0000000..53ad91b --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsResponseBody/cardSendDetailDTO.php @@ -0,0 +1,108 @@ + 'CurrentPage', + 'pageSize' => 'PageSize', + 'records' => 'Records', + 'totalCount' => 'TotalCount', + ]; + + public function validate() + { + if (\is_array($this->records)) { + Model::validateArray($this->records); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->currentPage) { + $res['CurrentPage'] = $this->currentPage; + } + + if (null !== $this->pageSize) { + $res['PageSize'] = $this->pageSize; + } + + if (null !== $this->records) { + if (\is_array($this->records)) { + $res['Records'] = []; + $n1 = 0; + foreach ($this->records as $item1) { + $res['Records'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; + } + } + } + + if (null !== $this->totalCount) { + $res['TotalCount'] = $this->totalCount; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['CurrentPage'])) { + $model->currentPage = $map['CurrentPage']; + } + + if (isset($map['PageSize'])) { + $model->pageSize = $map['PageSize']; + } + + if (isset($map['Records'])) { + if (!empty($map['Records'])) { + $model->records = []; + $n1 = 0; + foreach ($map['Records'] as $item1) { + $model->records[$n1] = records::fromMap($item1); + ++$n1; + } + } + } + + if (isset($map['TotalCount'])) { + $model->totalCount = $map['TotalCount']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsResponseBody/cardSendDetailDTO/records.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsResponseBody/cardSendDetailDTO/records.php new file mode 100644 index 0000000..25f40ca --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsResponseBody/cardSendDetailDTO/records.php @@ -0,0 +1,188 @@ + 'ErrCode', + 'outId' => 'OutId', + 'phoneNumber' => 'PhoneNumber', + 'receiveDate' => 'ReceiveDate', + 'receiveType' => 'ReceiveType', + 'renderDate' => 'RenderDate', + 'renderStatus' => 'RenderStatus', + 'sendDate' => 'SendDate', + 'sendStatus' => 'SendStatus', + 'smsContent' => 'SmsContent', + 'templateCode' => 'TemplateCode', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->errCode) { + $res['ErrCode'] = $this->errCode; + } + + if (null !== $this->outId) { + $res['OutId'] = $this->outId; + } + + if (null !== $this->phoneNumber) { + $res['PhoneNumber'] = $this->phoneNumber; + } + + if (null !== $this->receiveDate) { + $res['ReceiveDate'] = $this->receiveDate; + } + + if (null !== $this->receiveType) { + $res['ReceiveType'] = $this->receiveType; + } + + if (null !== $this->renderDate) { + $res['RenderDate'] = $this->renderDate; + } + + if (null !== $this->renderStatus) { + $res['RenderStatus'] = $this->renderStatus; + } + + if (null !== $this->sendDate) { + $res['SendDate'] = $this->sendDate; + } + + if (null !== $this->sendStatus) { + $res['SendStatus'] = $this->sendStatus; + } + + if (null !== $this->smsContent) { + $res['SmsContent'] = $this->smsContent; + } + + if (null !== $this->templateCode) { + $res['TemplateCode'] = $this->templateCode; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['ErrCode'])) { + $model->errCode = $map['ErrCode']; + } + + if (isset($map['OutId'])) { + $model->outId = $map['OutId']; + } + + if (isset($map['PhoneNumber'])) { + $model->phoneNumber = $map['PhoneNumber']; + } + + if (isset($map['ReceiveDate'])) { + $model->receiveDate = $map['ReceiveDate']; + } + + if (isset($map['ReceiveType'])) { + $model->receiveType = $map['ReceiveType']; + } + + if (isset($map['RenderDate'])) { + $model->renderDate = $map['RenderDate']; + } + + if (isset($map['RenderStatus'])) { + $model->renderStatus = $map['RenderStatus']; + } + + if (isset($map['SendDate'])) { + $model->sendDate = $map['SendDate']; + } + + if (isset($map['SendStatus'])) { + $model->sendStatus = $map['SendStatus']; + } + + if (isset($map['SmsContent'])) { + $model->smsContent = $map['SmsContent']; + } + + if (isset($map['TemplateCode'])) { + $model->templateCode = $map['TemplateCode']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsLinkRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsLinkRequest.php index 2cf53ba..f7c36dc 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsLinkRequest.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsLinkRequest.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class GetCardSmsLinkRequest extends Model { @@ -53,48 +53,57 @@ class GetCardSmsLinkRequest extends Model */ public $signNameJson; protected $_name = [ - 'cardCodeType' => 'CardCodeType', - 'cardLinkType' => 'CardLinkType', - 'cardTemplateCode' => 'CardTemplateCode', + 'cardCodeType' => 'CardCodeType', + 'cardLinkType' => 'CardLinkType', + 'cardTemplateCode' => 'CardTemplateCode', 'cardTemplateParamJson' => 'CardTemplateParamJson', - 'customShortCodeJson' => 'CustomShortCodeJson', - 'domain' => 'Domain', - 'outId' => 'OutId', - 'phoneNumberJson' => 'PhoneNumberJson', - 'signNameJson' => 'SignNameJson', + 'customShortCodeJson' => 'CustomShortCodeJson', + 'domain' => 'Domain', + 'outId' => 'OutId', + 'phoneNumberJson' => 'PhoneNumberJson', + 'signNameJson' => 'SignNameJson', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->cardCodeType) { $res['CardCodeType'] = $this->cardCodeType; } + if (null !== $this->cardLinkType) { $res['CardLinkType'] = $this->cardLinkType; } + if (null !== $this->cardTemplateCode) { $res['CardTemplateCode'] = $this->cardTemplateCode; } + if (null !== $this->cardTemplateParamJson) { $res['CardTemplateParamJson'] = $this->cardTemplateParamJson; } + if (null !== $this->customShortCodeJson) { $res['CustomShortCodeJson'] = $this->customShortCodeJson; } + if (null !== $this->domain) { $res['Domain'] = $this->domain; } + if (null !== $this->outId) { $res['OutId'] = $this->outId; } + if (null !== $this->phoneNumberJson) { $res['PhoneNumberJson'] = $this->phoneNumberJson; } + if (null !== $this->signNameJson) { $res['SignNameJson'] = $this->signNameJson; } @@ -102,38 +111,46 @@ class GetCardSmsLinkRequest extends Model return $res; } - /** - * @param array $map - * - * @return GetCardSmsLinkRequest - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['CardCodeType'])) { $model->cardCodeType = $map['CardCodeType']; } + if (isset($map['CardLinkType'])) { $model->cardLinkType = $map['CardLinkType']; } + if (isset($map['CardTemplateCode'])) { $model->cardTemplateCode = $map['CardTemplateCode']; } + if (isset($map['CardTemplateParamJson'])) { $model->cardTemplateParamJson = $map['CardTemplateParamJson']; } + if (isset($map['CustomShortCodeJson'])) { $model->customShortCodeJson = $map['CustomShortCodeJson']; } + if (isset($map['Domain'])) { $model->domain = $map['Domain']; } + if (isset($map['OutId'])) { $model->outId = $map['OutId']; } + if (isset($map['PhoneNumberJson'])) { $model->phoneNumberJson = $map['PhoneNumberJson']; } + if (isset($map['SignNameJson'])) { $model->signNameJson = $map['SignNameJson']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsLinkResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsLinkResponse.php index 2cc97c9..2b7e1ac 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsLinkResponse.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsLinkResponse.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class GetCardSmsLinkResponse extends Model { @@ -23,48 +23,66 @@ class GetCardSmsLinkResponse extends Model */ public $body; protected $_name = [ - 'headers' => 'headers', + 'headers' => 'headers', 'statusCode' => 'statusCode', - 'body' => 'body', + 'body' => 'body', ]; public function validate() { - Model::validateRequired('headers', $this->headers, true); - Model::validateRequired('statusCode', $this->statusCode, true); - Model::validateRequired('body', $this->body, true); + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->headers) { - $res['headers'] = $this->headers; + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } } + if (null !== $this->statusCode) { $res['statusCode'] = $this->statusCode; } + if (null !== $this->body) { - $res['body'] = null !== $this->body ? $this->body->toMap() : null; + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; } return $res; } - /** - * @param array $map - * - * @return GetCardSmsLinkResponse - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['headers'])) { - $model->headers = $map['headers']; + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } } + if (isset($map['statusCode'])) { $model->statusCode = $map['statusCode']; } + if (isset($map['body'])) { $model->body = GetCardSmsLinkResponseBody::fromMap($map['body']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsLinkResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsLinkResponseBody.php index 9a1e2dc..4740868 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsLinkResponseBody.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsLinkResponseBody.php @@ -4,8 +4,8 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; +use AlibabaCloud\Dara\Model; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetCardSmsLinkResponseBody\data; -use AlibabaCloud\Tea\Model; class GetCardSmsLinkResponseBody extends Model { @@ -29,28 +29,35 @@ class GetCardSmsLinkResponseBody extends Model */ public $success; protected $_name = [ - 'code' => 'Code', - 'data' => 'Data', + 'code' => 'Code', + 'data' => 'Data', 'requestId' => 'RequestId', - 'success' => 'Success', + 'success' => 'Success', ]; public function validate() { + if (null !== $this->data) { + $this->data->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->code) { $res['Code'] = $this->code; } + if (null !== $this->data) { - $res['Data'] = null !== $this->data ? $this->data->toMap() : null; + $res['Data'] = null !== $this->data ? $this->data->toArray($noStream) : $this->data; } + if (null !== $this->requestId) { $res['RequestId'] = $this->requestId; } + if (null !== $this->success) { $res['Success'] = $this->success; } @@ -58,23 +65,26 @@ class GetCardSmsLinkResponseBody extends Model return $res; } - /** - * @param array $map - * - * @return GetCardSmsLinkResponseBody - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Code'])) { $model->code = $map['Code']; } + if (isset($map['Data'])) { $model->data = data::fromMap($map['Data']); } + if (isset($map['RequestId'])) { $model->requestId = $map['RequestId']; } + if (isset($map['Success'])) { $model->success = $map['Success']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsLinkResponseBody/data.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsLinkResponseBody/data.php index c28f4f1..583a87c 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsLinkResponseBody/data.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsLinkResponseBody/data.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetCardSmsLinkResponseBody; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class data extends Model { @@ -34,31 +34,36 @@ class data extends Model public $notMediaMobiles; protected $_name = [ 'cardPhoneNumbers' => 'CardPhoneNumbers', - 'cardSignNames' => 'CardSignNames', - 'cardSmsLinks' => 'CardSmsLinks', - 'cardTmpState' => 'CardTmpState', - 'notMediaMobiles' => 'NotMediaMobiles', + 'cardSignNames' => 'CardSignNames', + 'cardSmsLinks' => 'CardSmsLinks', + 'cardTmpState' => 'CardTmpState', + 'notMediaMobiles' => 'NotMediaMobiles', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->cardPhoneNumbers) { $res['CardPhoneNumbers'] = $this->cardPhoneNumbers; } + if (null !== $this->cardSignNames) { $res['CardSignNames'] = $this->cardSignNames; } + if (null !== $this->cardSmsLinks) { $res['CardSmsLinks'] = $this->cardSmsLinks; } + if (null !== $this->cardTmpState) { $res['CardTmpState'] = $this->cardTmpState; } + if (null !== $this->notMediaMobiles) { $res['NotMediaMobiles'] = $this->notMediaMobiles; } @@ -66,26 +71,30 @@ class data extends Model return $res; } - /** - * @param array $map - * - * @return data - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['CardPhoneNumbers'])) { $model->cardPhoneNumbers = $map['CardPhoneNumbers']; } + if (isset($map['CardSignNames'])) { $model->cardSignNames = $map['CardSignNames']; } + if (isset($map['CardSmsLinks'])) { $model->cardSmsLinks = $map['CardSmsLinks']; } + if (isset($map['CardTmpState'])) { $model->cardTmpState = $map['CardTmpState']; } + if (isset($map['NotMediaMobiles'])) { $model->notMediaMobiles = $map['NotMediaMobiles']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetMediaResourceIdRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetMediaResourceIdRequest.php index b036976..9fdb599 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetMediaResourceIdRequest.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetMediaResourceIdRequest.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class GetMediaResourceIdRequest extends Model { @@ -33,32 +33,37 @@ class GetMediaResourceIdRequest extends Model */ public $resourceType; protected $_name = [ - 'extendInfo' => 'ExtendInfo', - 'fileSize' => 'FileSize', - 'memo' => 'Memo', - 'ossKey' => 'OssKey', + 'extendInfo' => 'ExtendInfo', + 'fileSize' => 'FileSize', + 'memo' => 'Memo', + 'ossKey' => 'OssKey', 'resourceType' => 'ResourceType', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->extendInfo) { $res['ExtendInfo'] = $this->extendInfo; } + if (null !== $this->fileSize) { $res['FileSize'] = $this->fileSize; } + if (null !== $this->memo) { $res['Memo'] = $this->memo; } + if (null !== $this->ossKey) { $res['OssKey'] = $this->ossKey; } + if (null !== $this->resourceType) { $res['ResourceType'] = $this->resourceType; } @@ -66,26 +71,30 @@ class GetMediaResourceIdRequest extends Model return $res; } - /** - * @param array $map - * - * @return GetMediaResourceIdRequest - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['ExtendInfo'])) { $model->extendInfo = $map['ExtendInfo']; } + if (isset($map['FileSize'])) { $model->fileSize = $map['FileSize']; } + if (isset($map['Memo'])) { $model->memo = $map['Memo']; } + if (isset($map['OssKey'])) { $model->ossKey = $map['OssKey']; } + if (isset($map['ResourceType'])) { $model->resourceType = $map['ResourceType']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetMediaResourceIdResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetMediaResourceIdResponse.php index a2cc781..e6ba1ca 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetMediaResourceIdResponse.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetMediaResourceIdResponse.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class GetMediaResourceIdResponse extends Model { @@ -23,48 +23,66 @@ class GetMediaResourceIdResponse extends Model */ public $body; protected $_name = [ - 'headers' => 'headers', + 'headers' => 'headers', 'statusCode' => 'statusCode', - 'body' => 'body', + 'body' => 'body', ]; public function validate() { - Model::validateRequired('headers', $this->headers, true); - Model::validateRequired('statusCode', $this->statusCode, true); - Model::validateRequired('body', $this->body, true); + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->headers) { - $res['headers'] = $this->headers; + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } } + if (null !== $this->statusCode) { $res['statusCode'] = $this->statusCode; } + if (null !== $this->body) { - $res['body'] = null !== $this->body ? $this->body->toMap() : null; + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; } return $res; } - /** - * @param array $map - * - * @return GetMediaResourceIdResponse - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['headers'])) { - $model->headers = $map['headers']; + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } } + if (isset($map['statusCode'])) { $model->statusCode = $map['statusCode']; } + if (isset($map['body'])) { $model->body = GetMediaResourceIdResponseBody::fromMap($map['body']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetMediaResourceIdResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetMediaResourceIdResponseBody.php index a0b9b5c..4e7bfc9 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetMediaResourceIdResponseBody.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetMediaResourceIdResponseBody.php @@ -4,8 +4,8 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; +use AlibabaCloud\Dara\Model; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetMediaResourceIdResponseBody\data; -use AlibabaCloud\Tea\Model; class GetMediaResourceIdResponseBody extends Model { @@ -29,28 +29,35 @@ class GetMediaResourceIdResponseBody extends Model */ public $success; protected $_name = [ - 'code' => 'Code', - 'data' => 'Data', + 'code' => 'Code', + 'data' => 'Data', 'requestId' => 'RequestId', - 'success' => 'Success', + 'success' => 'Success', ]; public function validate() { + if (null !== $this->data) { + $this->data->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->code) { $res['Code'] = $this->code; } + if (null !== $this->data) { - $res['Data'] = null !== $this->data ? $this->data->toMap() : null; + $res['Data'] = null !== $this->data ? $this->data->toArray($noStream) : $this->data; } + if (null !== $this->requestId) { $res['RequestId'] = $this->requestId; } + if (null !== $this->success) { $res['Success'] = $this->success; } @@ -58,23 +65,26 @@ class GetMediaResourceIdResponseBody extends Model return $res; } - /** - * @param array $map - * - * @return GetMediaResourceIdResponseBody - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Code'])) { $model->code = $map['Code']; } + if (isset($map['Data'])) { $model->data = data::fromMap($map['Data']); } + if (isset($map['RequestId'])) { $model->requestId = $map['RequestId']; } + if (isset($map['Success'])) { $model->success = $map['Success']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetMediaResourceIdResponseBody/data.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetMediaResourceIdResponseBody/data.php index 13eebd0..d2cf122 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetMediaResourceIdResponseBody/data.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetMediaResourceIdResponseBody/data.php @@ -4,25 +4,36 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetMediaResourceIdResponseBody; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class data extends Model { + /** + * @var string + */ + public $resUrlDownload; + /** * @var int */ public $resourceId; protected $_name = [ + 'resUrlDownload' => 'ResUrlDownload', 'resourceId' => 'ResourceId', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; + if (null !== $this->resUrlDownload) { + $res['ResUrlDownload'] = $this->resUrlDownload; + } + if (null !== $this->resourceId) { $res['ResourceId'] = $this->resourceId; } @@ -30,14 +41,18 @@ class data extends Model return $res; } - /** - * @param array $map - * - * @return data - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); + if (isset($map['ResUrlDownload'])) { + $model->resUrlDownload = $map['ResUrlDownload']; + } + if (isset($map['ResourceId'])) { $model->resourceId = $map['ResourceId']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForCardTemplateResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForCardTemplateResponse.php index ab72121..51f128e 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForCardTemplateResponse.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForCardTemplateResponse.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class GetOSSInfoForCardTemplateResponse extends Model { @@ -23,48 +23,66 @@ class GetOSSInfoForCardTemplateResponse extends Model */ public $body; protected $_name = [ - 'headers' => 'headers', + 'headers' => 'headers', 'statusCode' => 'statusCode', - 'body' => 'body', + 'body' => 'body', ]; public function validate() { - Model::validateRequired('headers', $this->headers, true); - Model::validateRequired('statusCode', $this->statusCode, true); - Model::validateRequired('body', $this->body, true); + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->headers) { - $res['headers'] = $this->headers; + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } } + if (null !== $this->statusCode) { $res['statusCode'] = $this->statusCode; } + if (null !== $this->body) { - $res['body'] = null !== $this->body ? $this->body->toMap() : null; + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; } return $res; } - /** - * @param array $map - * - * @return GetOSSInfoForCardTemplateResponse - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['headers'])) { - $model->headers = $map['headers']; + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } } + if (isset($map['statusCode'])) { $model->statusCode = $map['statusCode']; } + if (isset($map['body'])) { $model->body = GetOSSInfoForCardTemplateResponseBody::fromMap($map['body']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForCardTemplateResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForCardTemplateResponseBody.php index c37b527..729a70f 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForCardTemplateResponseBody.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForCardTemplateResponseBody.php @@ -4,8 +4,8 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; +use AlibabaCloud\Dara\Model; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetOSSInfoForCardTemplateResponseBody\data; -use AlibabaCloud\Tea\Model; class GetOSSInfoForCardTemplateResponseBody extends Model { @@ -29,28 +29,35 @@ class GetOSSInfoForCardTemplateResponseBody extends Model */ public $success; protected $_name = [ - 'code' => 'Code', - 'data' => 'Data', + 'code' => 'Code', + 'data' => 'Data', 'requestId' => 'RequestId', - 'success' => 'Success', + 'success' => 'Success', ]; public function validate() { + if (null !== $this->data) { + $this->data->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->code) { $res['Code'] = $this->code; } + if (null !== $this->data) { - $res['Data'] = null !== $this->data ? $this->data->toMap() : null; + $res['Data'] = null !== $this->data ? $this->data->toArray($noStream) : $this->data; } + if (null !== $this->requestId) { $res['RequestId'] = $this->requestId; } + if (null !== $this->success) { $res['Success'] = $this->success; } @@ -58,23 +65,26 @@ class GetOSSInfoForCardTemplateResponseBody extends Model return $res; } - /** - * @param array $map - * - * @return GetOSSInfoForCardTemplateResponseBody - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Code'])) { $model->code = $map['Code']; } + if (isset($map['Data'])) { $model->data = data::fromMap($map['Data']); } + if (isset($map['RequestId'])) { $model->requestId = $map['RequestId']; } + if (isset($map['Success'])) { $model->success = $map['Success']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForCardTemplateResponseBody/data.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForCardTemplateResponseBody/data.php index faa0eee..0b8caf7 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForCardTemplateResponseBody/data.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForCardTemplateResponseBody/data.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models\GetOSSInfoForCardTemplateResponseBody; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class data extends Model { @@ -49,43 +49,51 @@ class data extends Model public $startPath; protected $_name = [ 'accessKeyId' => 'AccessKeyId', - 'aliUid' => 'AliUid', - 'bucket' => 'Bucket', - 'expireTime' => 'ExpireTime', - 'host' => 'Host', - 'policy' => 'Policy', - 'signature' => 'Signature', - 'startPath' => 'StartPath', + 'aliUid' => 'AliUid', + 'bucket' => 'Bucket', + 'expireTime' => 'ExpireTime', + 'host' => 'Host', + 'policy' => 'Policy', + 'signature' => 'Signature', + 'startPath' => 'StartPath', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->accessKeyId) { $res['AccessKeyId'] = $this->accessKeyId; } + if (null !== $this->aliUid) { $res['AliUid'] = $this->aliUid; } + if (null !== $this->bucket) { $res['Bucket'] = $this->bucket; } + if (null !== $this->expireTime) { $res['ExpireTime'] = $this->expireTime; } + if (null !== $this->host) { $res['Host'] = $this->host; } + if (null !== $this->policy) { $res['Policy'] = $this->policy; } + if (null !== $this->signature) { $res['Signature'] = $this->signature; } + if (null !== $this->startPath) { $res['StartPath'] = $this->startPath; } @@ -93,35 +101,42 @@ class data extends Model return $res; } - /** - * @param array $map - * - * @return data - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['AccessKeyId'])) { $model->accessKeyId = $map['AccessKeyId']; } + if (isset($map['AliUid'])) { $model->aliUid = $map['AliUid']; } + if (isset($map['Bucket'])) { $model->bucket = $map['Bucket']; } + if (isset($map['ExpireTime'])) { $model->expireTime = $map['ExpireTime']; } + if (isset($map['Host'])) { $model->host = $map['Host']; } + if (isset($map['Policy'])) { $model->policy = $map['Policy']; } + if (isset($map['Signature'])) { $model->signature = $map['Signature']; } + if (isset($map['StartPath'])) { $model->startPath = $map['StartPath']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForUploadFileRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForUploadFileRequest.php new file mode 100644 index 0000000..e316fe6 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForUploadFileRequest.php @@ -0,0 +1,90 @@ + 'BizType', + 'ownerId' => 'OwnerId', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->bizType) { + $res['BizType'] = $this->bizType; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['BizType'])) { + $model->bizType = $map['BizType']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForUploadFileResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForUploadFileResponse.php new file mode 100644 index 0000000..3a3bc5b --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForUploadFileResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = GetOSSInfoForUploadFileResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForUploadFileResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForUploadFileResponseBody.php new file mode 100644 index 0000000..7c9fba8 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForUploadFileResponseBody.php @@ -0,0 +1,108 @@ + 'Code', + 'message' => 'Message', + 'model' => 'Model', + 'requestId' => 'RequestId', + 'success' => 'Success', + ]; + + public function validate() + { + if (null !== $this->model) { + $this->model->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->model) { + $res['Model'] = null !== $this->model ? $this->model->toArray($noStream) : $this->model; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['Model'])) { + $model->model = model_::fromMap($map['Model']); + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForUploadFileResponseBody/model_.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForUploadFileResponseBody/model_.php new file mode 100644 index 0000000..399a031 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForUploadFileResponseBody/model_.php @@ -0,0 +1,118 @@ + 'AccessKeyId', + 'expireTime' => 'ExpireTime', + 'host' => 'Host', + 'policy' => 'Policy', + 'signature' => 'Signature', + 'startPath' => 'StartPath', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessKeyId) { + $res['AccessKeyId'] = $this->accessKeyId; + } + + if (null !== $this->expireTime) { + $res['ExpireTime'] = $this->expireTime; + } + + if (null !== $this->host) { + $res['Host'] = $this->host; + } + + if (null !== $this->policy) { + $res['Policy'] = $this->policy; + } + + if (null !== $this->signature) { + $res['Signature'] = $this->signature; + } + + if (null !== $this->startPath) { + $res['StartPath'] = $this->startPath; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AccessKeyId'])) { + $model->accessKeyId = $map['AccessKeyId']; + } + + if (isset($map['ExpireTime'])) { + $model->expireTime = $map['ExpireTime']; + } + + if (isset($map['Host'])) { + $model->host = $map['Host']; + } + + if (isset($map['Policy'])) { + $model->policy = $map['Policy']; + } + + if (isset($map['Signature'])) { + $model->signature = $map['Signature']; + } + + if (isset($map['StartPath'])) { + $model->startPath = $map['StartPath']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetQualificationOssInfoRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetQualificationOssInfoRequest.php new file mode 100644 index 0000000..bbf01f9 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetQualificationOssInfoRequest.php @@ -0,0 +1,90 @@ + 'BizType', + 'ownerId' => 'OwnerId', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->bizType) { + $res['BizType'] = $this->bizType; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['BizType'])) { + $model->bizType = $map['BizType']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetQualificationOssInfoResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetQualificationOssInfoResponse.php new file mode 100644 index 0000000..d7680d5 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetQualificationOssInfoResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = GetQualificationOssInfoResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetQualificationOssInfoResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetQualificationOssInfoResponseBody.php new file mode 100644 index 0000000..33033c2 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetQualificationOssInfoResponseBody.php @@ -0,0 +1,122 @@ + 'AccessDeniedDetail', + 'code' => 'Code', + 'data' => 'Data', + 'message' => 'Message', + 'requestId' => 'RequestId', + 'success' => 'Success', + ]; + + public function validate() + { + if (null !== $this->data) { + $this->data->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessDeniedDetail) { + $res['AccessDeniedDetail'] = $this->accessDeniedDetail; + } + + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->data) { + $res['Data'] = null !== $this->data ? $this->data->toArray($noStream) : $this->data; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AccessDeniedDetail'])) { + $model->accessDeniedDetail = $map['AccessDeniedDetail']; + } + + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Data'])) { + $model->data = data::fromMap($map['Data']); + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetQualificationOssInfoResponseBody/data.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetQualificationOssInfoResponseBody/data.php new file mode 100644 index 0000000..a33a400 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetQualificationOssInfoResponseBody/data.php @@ -0,0 +1,118 @@ + 'AccessKeyId', + 'expire' => 'Expire', + 'host' => 'Host', + 'policy' => 'Policy', + 'signature' => 'Signature', + 'startPath' => 'StartPath', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessKeyId) { + $res['AccessKeyId'] = $this->accessKeyId; + } + + if (null !== $this->expire) { + $res['Expire'] = $this->expire; + } + + if (null !== $this->host) { + $res['Host'] = $this->host; + } + + if (null !== $this->policy) { + $res['Policy'] = $this->policy; + } + + if (null !== $this->signature) { + $res['Signature'] = $this->signature; + } + + if (null !== $this->startPath) { + $res['StartPath'] = $this->startPath; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AccessKeyId'])) { + $model->accessKeyId = $map['AccessKeyId']; + } + + if (isset($map['Expire'])) { + $model->expire = $map['Expire']; + } + + if (isset($map['Host'])) { + $model->host = $map['Host']; + } + + if (isset($map['Policy'])) { + $model->policy = $map['Policy']; + } + + if (isset($map['Signature'])) { + $model->signature = $map['Signature']; + } + + if (isset($map['StartPath'])) { + $model->startPath = $map['StartPath']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsOcrOssInfoRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsOcrOssInfoRequest.php new file mode 100644 index 0000000..5d572ef --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsOcrOssInfoRequest.php @@ -0,0 +1,90 @@ + 'OwnerId', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'taskType' => 'TaskType', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->taskType) { + $res['TaskType'] = $this->taskType; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['TaskType'])) { + $model->taskType = $map['TaskType']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsOcrOssInfoResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsOcrOssInfoResponse.php new file mode 100644 index 0000000..7a229ba --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsOcrOssInfoResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = GetSmsOcrOssInfoResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsOcrOssInfoResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsOcrOssInfoResponseBody.php new file mode 100644 index 0000000..1ea1388 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsOcrOssInfoResponseBody.php @@ -0,0 +1,122 @@ + 'AccessDeniedDetail', + 'code' => 'Code', + 'message' => 'Message', + 'model' => 'Model', + 'requestId' => 'RequestId', + 'success' => 'Success', + ]; + + public function validate() + { + if (null !== $this->model) { + $this->model->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessDeniedDetail) { + $res['AccessDeniedDetail'] = $this->accessDeniedDetail; + } + + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->model) { + $res['Model'] = null !== $this->model ? $this->model->toArray($noStream) : $this->model; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AccessDeniedDetail'])) { + $model->accessDeniedDetail = $map['AccessDeniedDetail']; + } + + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['Model'])) { + $model->model = model_::fromMap($map['Model']); + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsOcrOssInfoResponseBody/model_.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsOcrOssInfoResponseBody/model_.php new file mode 100644 index 0000000..35cdd7d --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsOcrOssInfoResponseBody/model_.php @@ -0,0 +1,132 @@ + 'AccessKeyId', + 'bucket' => 'Bucket', + 'expireTime' => 'ExpireTime', + 'host' => 'Host', + 'policy' => 'Policy', + 'signature' => 'Signature', + 'startPath' => 'StartPath', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessKeyId) { + $res['AccessKeyId'] = $this->accessKeyId; + } + + if (null !== $this->bucket) { + $res['Bucket'] = $this->bucket; + } + + if (null !== $this->expireTime) { + $res['ExpireTime'] = $this->expireTime; + } + + if (null !== $this->host) { + $res['Host'] = $this->host; + } + + if (null !== $this->policy) { + $res['Policy'] = $this->policy; + } + + if (null !== $this->signature) { + $res['Signature'] = $this->signature; + } + + if (null !== $this->startPath) { + $res['StartPath'] = $this->startPath; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AccessKeyId'])) { + $model->accessKeyId = $map['AccessKeyId']; + } + + if (isset($map['Bucket'])) { + $model->bucket = $map['Bucket']; + } + + if (isset($map['ExpireTime'])) { + $model->expireTime = $map['ExpireTime']; + } + + if (isset($map['Host'])) { + $model->host = $map['Host']; + } + + if (isset($map['Policy'])) { + $model->policy = $map['Policy']; + } + + if (isset($map['Signature'])) { + $model->signature = $map['Signature']; + } + + if (isset($map['StartPath'])) { + $model->startPath = $map['StartPath']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignRequest.php new file mode 100644 index 0000000..a20117b --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignRequest.php @@ -0,0 +1,90 @@ + 'OwnerId', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'signName' => 'SignName', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->signName) { + $res['SignName'] = $this->signName; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['SignName'])) { + $model->signName = $map['SignName']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponse.php new file mode 100644 index 0000000..7eb191d --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = GetSmsSignResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponseBody.php new file mode 100644 index 0000000..a722831 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponseBody.php @@ -0,0 +1,381 @@ + '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; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponseBody/auditInfo.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponseBody/auditInfo.php new file mode 100644 index 0000000..daa962b --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponseBody/auditInfo.php @@ -0,0 +1,62 @@ + 'AuditDate', + 'rejectInfo' => 'RejectInfo', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->auditDate) { + $res['AuditDate'] = $this->auditDate; + } + + if (null !== $this->rejectInfo) { + $res['RejectInfo'] = $this->rejectInfo; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AuditDate'])) { + $model->auditDate = $map['AuditDate']; + } + + if (isset($map['RejectInfo'])) { + $model->rejectInfo = $map['RejectInfo']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponseBody/signIspRegisterDetailList.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponseBody/signIspRegisterDetailList.php new file mode 100644 index 0000000..266e0bd --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponseBody/signIspRegisterDetailList.php @@ -0,0 +1,108 @@ + 'OperatorCode', + 'operatorCompleteTime' => 'OperatorCompleteTime', + 'registerStatus' => 'RegisterStatus', + 'registerStatusReasons' => 'RegisterStatusReasons', + ]; + + public function validate() + { + if (\is_array($this->registerStatusReasons)) { + Model::validateArray($this->registerStatusReasons); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->operatorCode) { + $res['OperatorCode'] = $this->operatorCode; + } + + if (null !== $this->operatorCompleteTime) { + $res['OperatorCompleteTime'] = $this->operatorCompleteTime; + } + + if (null !== $this->registerStatus) { + $res['RegisterStatus'] = $this->registerStatus; + } + + if (null !== $this->registerStatusReasons) { + if (\is_array($this->registerStatusReasons)) { + $res['RegisterStatusReasons'] = []; + $n1 = 0; + foreach ($this->registerStatusReasons as $item1) { + $res['RegisterStatusReasons'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; + } + } + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['OperatorCode'])) { + $model->operatorCode = $map['OperatorCode']; + } + + if (isset($map['OperatorCompleteTime'])) { + $model->operatorCompleteTime = $map['OperatorCompleteTime']; + } + + if (isset($map['RegisterStatus'])) { + $model->registerStatus = $map['RegisterStatus']; + } + + if (isset($map['RegisterStatusReasons'])) { + if (!empty($map['RegisterStatusReasons'])) { + $model->registerStatusReasons = []; + $n1 = 0; + foreach ($map['RegisterStatusReasons'] as $item1) { + $model->registerStatusReasons[$n1] = registerStatusReasons::fromMap($item1); + ++$n1; + } + } + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponseBody/signIspRegisterDetailList/registerStatusReasons.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponseBody/signIspRegisterDetailList/registerStatusReasons.php new file mode 100644 index 0000000..a82471f --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponseBody/signIspRegisterDetailList/registerStatusReasons.php @@ -0,0 +1,79 @@ + 'ReasonCode', + 'reasonDescList' => 'ReasonDescList', + ]; + + public function validate() + { + if (\is_array($this->reasonDescList)) { + Model::validateArray($this->reasonDescList); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->reasonCode) { + $res['ReasonCode'] = $this->reasonCode; + } + + if (null !== $this->reasonDescList) { + if (\is_array($this->reasonDescList)) { + $res['ReasonDescList'] = []; + $n1 = 0; + foreach ($this->reasonDescList as $item1) { + $res['ReasonDescList'][$n1] = $item1; + ++$n1; + } + } + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['ReasonCode'])) { + $model->reasonCode = $map['ReasonCode']; + } + + if (isset($map['ReasonDescList'])) { + if (!empty($map['ReasonDescList'])) { + $model->reasonDescList = []; + $n1 = 0; + foreach ($map['ReasonDescList'] as $item1) { + $model->reasonDescList[$n1] = $item1; + ++$n1; + } + } + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListRequest.php new file mode 100644 index 0000000..30ed691 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListRequest.php @@ -0,0 +1,219 @@ + 'AuditStatus', + 'ownerId' => 'OwnerId', + 'pageIndex' => 'PageIndex', + 'pageSize' => 'PageSize', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'signName' => 'SignName', + 'templateCode' => 'TemplateCode', + 'templateName' => 'TemplateName', + 'templateTag' => 'TemplateTag', + 'templateType' => 'TemplateType', + 'usableStateList' => 'UsableStateList', + ]; + + public function validate() + { + if (\is_array($this->usableStateList)) { + Model::validateArray($this->usableStateList); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->auditStatus) { + $res['AuditStatus'] = $this->auditStatus; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->pageIndex) { + $res['PageIndex'] = $this->pageIndex; + } + + if (null !== $this->pageSize) { + $res['PageSize'] = $this->pageSize; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->signName) { + $res['SignName'] = $this->signName; + } + + if (null !== $this->templateCode) { + $res['TemplateCode'] = $this->templateCode; + } + + if (null !== $this->templateName) { + $res['TemplateName'] = $this->templateName; + } + + if (null !== $this->templateTag) { + $res['TemplateTag'] = $this->templateTag; + } + + if (null !== $this->templateType) { + $res['TemplateType'] = $this->templateType; + } + + if (null !== $this->usableStateList) { + if (\is_array($this->usableStateList)) { + $res['UsableStateList'] = []; + $n1 = 0; + foreach ($this->usableStateList as $item1) { + $res['UsableStateList'][$n1] = $item1; + ++$n1; + } + } + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AuditStatus'])) { + $model->auditStatus = $map['AuditStatus']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['PageIndex'])) { + $model->pageIndex = $map['PageIndex']; + } + + if (isset($map['PageSize'])) { + $model->pageSize = $map['PageSize']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['SignName'])) { + $model->signName = $map['SignName']; + } + + if (isset($map['TemplateCode'])) { + $model->templateCode = $map['TemplateCode']; + } + + if (isset($map['TemplateName'])) { + $model->templateName = $map['TemplateName']; + } + + if (isset($map['TemplateTag'])) { + $model->templateTag = $map['TemplateTag']; + } + + if (isset($map['TemplateType'])) { + $model->templateType = $map['TemplateType']; + } + + if (isset($map['UsableStateList'])) { + if (!empty($map['UsableStateList'])) { + $model->usableStateList = []; + $n1 = 0; + foreach ($map['UsableStateList'] as $item1) { + $model->usableStateList[$n1] = $item1; + ++$n1; + } + } + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponse.php new file mode 100644 index 0000000..ab655a5 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = GetSmsTemplateListResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponseBody.php new file mode 100644 index 0000000..9aa8483 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponseBody.php @@ -0,0 +1,122 @@ + 'AccessDeniedDetail', + 'code' => 'Code', + 'data' => 'Data', + 'message' => 'Message', + 'requestId' => 'RequestId', + 'success' => 'Success', + ]; + + public function validate() + { + if (null !== $this->data) { + $this->data->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessDeniedDetail) { + $res['AccessDeniedDetail'] = $this->accessDeniedDetail; + } + + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->data) { + $res['Data'] = null !== $this->data ? $this->data->toArray($noStream) : $this->data; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AccessDeniedDetail'])) { + $model->accessDeniedDetail = $map['AccessDeniedDetail']; + } + + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Data'])) { + $model->data = data::fromMap($map['Data']); + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponseBody/data.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponseBody/data.php new file mode 100644 index 0000000..e68132f --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponseBody/data.php @@ -0,0 +1,108 @@ + 'List', + 'pageNo' => 'PageNo', + 'pageSize' => 'PageSize', + 'total' => 'Total', + ]; + + public function validate() + { + if (\is_array($this->list)) { + Model::validateArray($this->list); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->list) { + if (\is_array($this->list)) { + $res['List'] = []; + $n1 = 0; + foreach ($this->list as $item1) { + $res['List'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; + } + } + } + + if (null !== $this->pageNo) { + $res['PageNo'] = $this->pageNo; + } + + if (null !== $this->pageSize) { + $res['PageSize'] = $this->pageSize; + } + + if (null !== $this->total) { + $res['Total'] = $this->total; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['List'])) { + if (!empty($map['List'])) { + $model->list = []; + $n1 = 0; + foreach ($map['List'] as $item1) { + $model->list[$n1] = list_::fromMap($item1); + ++$n1; + } + } + } + + if (isset($map['PageNo'])) { + $model->pageNo = $map['PageNo']; + } + + if (isset($map['PageSize'])) { + $model->pageSize = $map['PageSize']; + } + + if (isset($map['Total'])) { + $model->total = $map['Total']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponseBody/data/list_.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponseBody/data/list_.php new file mode 100644 index 0000000..4953d6f --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponseBody/data/list_.php @@ -0,0 +1,209 @@ + 'AuditStatus', + 'gmtCreate' => 'GmtCreate', + 'signName' => 'SignName', + 'templateCode' => 'TemplateCode', + 'templateContent' => 'TemplateContent', + 'templateName' => 'TemplateName', + 'templateTag' => 'TemplateTag', + 'templateType' => 'TemplateType', + 'usableStateList' => 'UsableStateList', + 'workOrderId' => 'WorkOrderId', + ]; + + public function validate() + { + if (\is_array($this->templateTag)) { + Model::validateArray($this->templateTag); + } + if (\is_array($this->usableStateList)) { + Model::validateArray($this->usableStateList); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->auditStatus) { + $res['AuditStatus'] = $this->auditStatus; + } + + if (null !== $this->gmtCreate) { + $res['GmtCreate'] = $this->gmtCreate; + } + + if (null !== $this->signName) { + $res['SignName'] = $this->signName; + } + + if (null !== $this->templateCode) { + $res['TemplateCode'] = $this->templateCode; + } + + if (null !== $this->templateContent) { + $res['TemplateContent'] = $this->templateContent; + } + + if (null !== $this->templateName) { + $res['TemplateName'] = $this->templateName; + } + + if (null !== $this->templateTag) { + if (\is_array($this->templateTag)) { + $res['TemplateTag'] = []; + $n1 = 0; + foreach ($this->templateTag as $item1) { + $res['TemplateTag'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; + } + } + } + + if (null !== $this->templateType) { + $res['TemplateType'] = $this->templateType; + } + + if (null !== $this->usableStateList) { + if (\is_array($this->usableStateList)) { + $res['UsableStateList'] = []; + $n1 = 0; + foreach ($this->usableStateList as $item1) { + $res['UsableStateList'][$n1] = $item1; + ++$n1; + } + } + } + + if (null !== $this->workOrderId) { + $res['WorkOrderId'] = $this->workOrderId; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AuditStatus'])) { + $model->auditStatus = $map['AuditStatus']; + } + + if (isset($map['GmtCreate'])) { + $model->gmtCreate = $map['GmtCreate']; + } + + if (isset($map['SignName'])) { + $model->signName = $map['SignName']; + } + + if (isset($map['TemplateCode'])) { + $model->templateCode = $map['TemplateCode']; + } + + if (isset($map['TemplateContent'])) { + $model->templateContent = $map['TemplateContent']; + } + + if (isset($map['TemplateName'])) { + $model->templateName = $map['TemplateName']; + } + + if (isset($map['TemplateTag'])) { + if (!empty($map['TemplateTag'])) { + $model->templateTag = []; + $n1 = 0; + foreach ($map['TemplateTag'] as $item1) { + $model->templateTag[$n1] = templateTag::fromMap($item1); + ++$n1; + } + } + } + + if (isset($map['TemplateType'])) { + $model->templateType = $map['TemplateType']; + } + + if (isset($map['UsableStateList'])) { + if (!empty($map['UsableStateList'])) { + $model->usableStateList = []; + $n1 = 0; + foreach ($map['UsableStateList'] as $item1) { + $model->usableStateList[$n1] = $item1; + ++$n1; + } + } + } + + if (isset($map['WorkOrderId'])) { + $model->workOrderId = $map['WorkOrderId']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponseBody/data/list_/templateTag.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponseBody/data/list_/templateTag.php new file mode 100644 index 0000000..d9dc2e2 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponseBody/data/list_/templateTag.php @@ -0,0 +1,62 @@ + 'TagKey', + 'tagValue' => 'TagValue', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->tagKey) { + $res['TagKey'] = $this->tagKey; + } + + if (null !== $this->tagValue) { + $res['TagValue'] = $this->tagValue; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['TagKey'])) { + $model->tagKey = $map['TagKey']; + } + + if (isset($map['TagValue'])) { + $model->tagValue = $map['TagValue']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListShrinkRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListShrinkRequest.php new file mode 100644 index 0000000..c73a8cf --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListShrinkRequest.php @@ -0,0 +1,202 @@ + 'AuditStatus', + 'ownerId' => 'OwnerId', + 'pageIndex' => 'PageIndex', + 'pageSize' => 'PageSize', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'signName' => 'SignName', + 'templateCode' => 'TemplateCode', + 'templateName' => 'TemplateName', + 'templateTag' => 'TemplateTag', + 'templateType' => 'TemplateType', + 'usableStateListShrink' => 'UsableStateList', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->auditStatus) { + $res['AuditStatus'] = $this->auditStatus; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->pageIndex) { + $res['PageIndex'] = $this->pageIndex; + } + + if (null !== $this->pageSize) { + $res['PageSize'] = $this->pageSize; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->signName) { + $res['SignName'] = $this->signName; + } + + if (null !== $this->templateCode) { + $res['TemplateCode'] = $this->templateCode; + } + + if (null !== $this->templateName) { + $res['TemplateName'] = $this->templateName; + } + + if (null !== $this->templateTag) { + $res['TemplateTag'] = $this->templateTag; + } + + if (null !== $this->templateType) { + $res['TemplateType'] = $this->templateType; + } + + if (null !== $this->usableStateListShrink) { + $res['UsableStateList'] = $this->usableStateListShrink; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AuditStatus'])) { + $model->auditStatus = $map['AuditStatus']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['PageIndex'])) { + $model->pageIndex = $map['PageIndex']; + } + + if (isset($map['PageSize'])) { + $model->pageSize = $map['PageSize']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['SignName'])) { + $model->signName = $map['SignName']; + } + + if (isset($map['TemplateCode'])) { + $model->templateCode = $map['TemplateCode']; + } + + if (isset($map['TemplateName'])) { + $model->templateName = $map['TemplateName']; + } + + if (isset($map['TemplateTag'])) { + $model->templateTag = $map['TemplateTag']; + } + + if (isset($map['TemplateType'])) { + $model->templateType = $map['TemplateType']; + } + + if (isset($map['UsableStateList'])) { + $model->usableStateListShrink = $map['UsableStateList']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateRequest.php new file mode 100644 index 0000000..ad5e337 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateRequest.php @@ -0,0 +1,90 @@ + 'OwnerId', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'templateCode' => 'TemplateCode', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->templateCode) { + $res['TemplateCode'] = $this->templateCode; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['TemplateCode'])) { + $model->templateCode = $map['TemplateCode']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponse.php new file mode 100644 index 0000000..865f271 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = GetSmsTemplateResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody.php new file mode 100644 index 0000000..f21920a --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody.php @@ -0,0 +1,357 @@ + 'ApplyScene', + 'auditInfo' => 'AuditInfo', + 'code' => 'Code', + 'createDate' => 'CreateDate', + 'fileUrlList' => 'FileUrlList', + 'intlType' => 'IntlType', + 'message' => 'Message', + 'moreDataFileUrlList' => 'MoreDataFileUrlList', + 'orderId' => 'OrderId', + 'relatedSignName' => 'RelatedSignName', + 'remark' => 'Remark', + 'requestId' => 'RequestId', + 'signList' => 'SignList', + 'templateCode' => 'TemplateCode', + 'templateContent' => 'TemplateContent', + 'templateName' => 'TemplateName', + 'templateStatus' => 'TemplateStatus', + 'templateTag' => 'TemplateTag', + 'templateType' => 'TemplateType', + 'variableAttribute' => 'VariableAttribute', + 'vendorAuditStatus' => 'VendorAuditStatus', + ]; + + public function validate() + { + if (null !== $this->auditInfo) { + $this->auditInfo->validate(); + } + if (null !== $this->fileUrlList) { + $this->fileUrlList->validate(); + } + if (null !== $this->moreDataFileUrlList) { + $this->moreDataFileUrlList->validate(); + } + if (null !== $this->signList) { + $this->signList->validate(); + } + if (\is_array($this->vendorAuditStatus)) { + Model::validateArray($this->vendorAuditStatus); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + 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->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->createDate) { + $res['CreateDate'] = $this->createDate; + } + + if (null !== $this->fileUrlList) { + $res['FileUrlList'] = null !== $this->fileUrlList ? $this->fileUrlList->toArray($noStream) : $this->fileUrlList; + } + + if (null !== $this->intlType) { + $res['IntlType'] = $this->intlType; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->moreDataFileUrlList) { + $res['MoreDataFileUrlList'] = null !== $this->moreDataFileUrlList ? $this->moreDataFileUrlList->toArray($noStream) : $this->moreDataFileUrlList; + } + + if (null !== $this->orderId) { + $res['OrderId'] = $this->orderId; + } + + if (null !== $this->relatedSignName) { + $res['RelatedSignName'] = $this->relatedSignName; + } + + if (null !== $this->remark) { + $res['Remark'] = $this->remark; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->signList) { + $res['SignList'] = null !== $this->signList ? $this->signList->toArray($noStream) : $this->signList; + } + + if (null !== $this->templateCode) { + $res['TemplateCode'] = $this->templateCode; + } + + if (null !== $this->templateContent) { + $res['TemplateContent'] = $this->templateContent; + } + + if (null !== $this->templateName) { + $res['TemplateName'] = $this->templateName; + } + + if (null !== $this->templateStatus) { + $res['TemplateStatus'] = $this->templateStatus; + } + + if (null !== $this->templateTag) { + $res['TemplateTag'] = $this->templateTag; + } + + if (null !== $this->templateType) { + $res['TemplateType'] = $this->templateType; + } + + if (null !== $this->variableAttribute) { + $res['VariableAttribute'] = $this->variableAttribute; + } + + if (null !== $this->vendorAuditStatus) { + if (\is_array($this->vendorAuditStatus)) { + $res['VendorAuditStatus'] = []; + foreach ($this->vendorAuditStatus as $key1 => $value1) { + $res['VendorAuditStatus'][$key1] = $value1; + } + } + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['ApplyScene'])) { + $model->applyScene = $map['ApplyScene']; + } + + if (isset($map['AuditInfo'])) { + $model->auditInfo = auditInfo::fromMap($map['AuditInfo']); + } + + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['CreateDate'])) { + $model->createDate = $map['CreateDate']; + } + + if (isset($map['FileUrlList'])) { + $model->fileUrlList = fileUrlList::fromMap($map['FileUrlList']); + } + + if (isset($map['IntlType'])) { + $model->intlType = $map['IntlType']; + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['MoreDataFileUrlList'])) { + $model->moreDataFileUrlList = moreDataFileUrlList::fromMap($map['MoreDataFileUrlList']); + } + + if (isset($map['OrderId'])) { + $model->orderId = $map['OrderId']; + } + + if (isset($map['RelatedSignName'])) { + $model->relatedSignName = $map['RelatedSignName']; + } + + if (isset($map['Remark'])) { + $model->remark = $map['Remark']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['SignList'])) { + $model->signList = signList::fromMap($map['SignList']); + } + + if (isset($map['TemplateCode'])) { + $model->templateCode = $map['TemplateCode']; + } + + if (isset($map['TemplateContent'])) { + $model->templateContent = $map['TemplateContent']; + } + + if (isset($map['TemplateName'])) { + $model->templateName = $map['TemplateName']; + } + + if (isset($map['TemplateStatus'])) { + $model->templateStatus = $map['TemplateStatus']; + } + + if (isset($map['TemplateTag'])) { + $model->templateTag = $map['TemplateTag']; + } + + if (isset($map['TemplateType'])) { + $model->templateType = $map['TemplateType']; + } + + if (isset($map['VariableAttribute'])) { + $model->variableAttribute = $map['VariableAttribute']; + } + + if (isset($map['VendorAuditStatus'])) { + if (!empty($map['VendorAuditStatus'])) { + $model->vendorAuditStatus = []; + foreach ($map['VendorAuditStatus'] as $key1 => $value1) { + $model->vendorAuditStatus[$key1] = $value1; + } + } + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody/auditInfo.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody/auditInfo.php new file mode 100644 index 0000000..16b3db0 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody/auditInfo.php @@ -0,0 +1,62 @@ + 'AuditDate', + 'rejectInfo' => 'RejectInfo', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->auditDate) { + $res['AuditDate'] = $this->auditDate; + } + + if (null !== $this->rejectInfo) { + $res['RejectInfo'] = $this->rejectInfo; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AuditDate'])) { + $model->auditDate = $map['AuditDate']; + } + + if (isset($map['RejectInfo'])) { + $model->rejectInfo = $map['RejectInfo']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody/fileUrlList.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody/fileUrlList.php new file mode 100644 index 0000000..db701be --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody/fileUrlList.php @@ -0,0 +1,65 @@ + 'FileUrl', + ]; + + public function validate() + { + if (\is_array($this->fileUrl)) { + Model::validateArray($this->fileUrl); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->fileUrl) { + if (\is_array($this->fileUrl)) { + $res['FileUrl'] = []; + $n1 = 0; + foreach ($this->fileUrl as $item1) { + $res['FileUrl'][$n1] = $item1; + ++$n1; + } + } + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['FileUrl'])) { + if (!empty($map['FileUrl'])) { + $model->fileUrl = []; + $n1 = 0; + foreach ($map['FileUrl'] as $item1) { + $model->fileUrl[$n1] = $item1; + ++$n1; + } + } + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody/moreDataFileUrlList.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody/moreDataFileUrlList.php new file mode 100644 index 0000000..d0ebcd1 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody/moreDataFileUrlList.php @@ -0,0 +1,65 @@ + 'MoreDataFileUrl', + ]; + + public function validate() + { + if (\is_array($this->moreDataFileUrl)) { + Model::validateArray($this->moreDataFileUrl); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->moreDataFileUrl) { + if (\is_array($this->moreDataFileUrl)) { + $res['MoreDataFileUrl'] = []; + $n1 = 0; + foreach ($this->moreDataFileUrl as $item1) { + $res['MoreDataFileUrl'][$n1] = $item1; + ++$n1; + } + } + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['MoreDataFileUrl'])) { + if (!empty($map['MoreDataFileUrl'])) { + $model->moreDataFileUrl = []; + $n1 = 0; + foreach ($map['MoreDataFileUrl'] as $item1) { + $model->moreDataFileUrl[$n1] = $item1; + ++$n1; + } + } + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody/signList.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody/signList.php new file mode 100644 index 0000000..3118c2b --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody/signList.php @@ -0,0 +1,65 @@ + 'SignList', + ]; + + public function validate() + { + if (\is_array($this->signList)) { + Model::validateArray($this->signList); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->signList) { + if (\is_array($this->signList)) { + $res['SignList'] = []; + $n1 = 0; + foreach ($this->signList as $item1) { + $res['SignList'][$n1] = $item1; + ++$n1; + } + } + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['SignList'])) { + if (!empty($map['SignList'])) { + $model->signList = []; + $n1 = 0; + foreach ($map['SignList'] as $item1) { + $model->signList[$n1] = $item1; + ++$n1; + } + } + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesRequest.php index 331c496..17c651b 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesRequest.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesRequest.php @@ -4,8 +4,8 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; +use AlibabaCloud\Dara\Model; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\ListTagResourcesRequest\tag; -use AlibabaCloud\Tea\Model; class ListTagResourcesRequest extends Model { @@ -59,58 +59,82 @@ class ListTagResourcesRequest extends Model */ public $tag; protected $_name = [ - 'nextToken' => 'NextToken', - 'ownerId' => 'OwnerId', - 'pageSize' => 'PageSize', - 'prodCode' => 'ProdCode', - 'regionId' => 'RegionId', - 'resourceId' => 'ResourceId', + 'nextToken' => 'NextToken', + 'ownerId' => 'OwnerId', + 'pageSize' => 'PageSize', + 'prodCode' => 'ProdCode', + 'regionId' => 'RegionId', + 'resourceId' => 'ResourceId', 'resourceOwnerAccount' => 'ResourceOwnerAccount', - 'resourceOwnerId' => 'ResourceOwnerId', - 'resourceType' => 'ResourceType', - 'tag' => 'Tag', + 'resourceOwnerId' => 'ResourceOwnerId', + 'resourceType' => 'ResourceType', + 'tag' => 'Tag', ]; public function validate() { + if (\is_array($this->resourceId)) { + Model::validateArray($this->resourceId); + } + if (\is_array($this->tag)) { + Model::validateArray($this->tag); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->nextToken) { $res['NextToken'] = $this->nextToken; } + if (null !== $this->ownerId) { $res['OwnerId'] = $this->ownerId; } + if (null !== $this->pageSize) { $res['PageSize'] = $this->pageSize; } + if (null !== $this->prodCode) { $res['ProdCode'] = $this->prodCode; } + if (null !== $this->regionId) { $res['RegionId'] = $this->regionId; } + if (null !== $this->resourceId) { - $res['ResourceId'] = $this->resourceId; + if (\is_array($this->resourceId)) { + $res['ResourceId'] = []; + $n1 = 0; + foreach ($this->resourceId as $item1) { + $res['ResourceId'][$n1] = $item1; + ++$n1; + } + } } + if (null !== $this->resourceOwnerAccount) { $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; } + if (null !== $this->resourceOwnerId) { $res['ResourceOwnerId'] = $this->resourceOwnerId; } + if (null !== $this->resourceType) { $res['ResourceType'] = $this->resourceType; } + if (null !== $this->tag) { - $res['Tag'] = []; - if (null !== $this->tag && \is_array($this->tag)) { - $n = 0; - foreach ($this->tag as $item) { - $res['Tag'][$n++] = null !== $item ? $item->toMap() : $item; + if (\is_array($this->tag)) { + $res['Tag'] = []; + $n1 = 0; + foreach ($this->tag as $item1) { + $res['Tag'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; } } } @@ -118,49 +142,64 @@ class ListTagResourcesRequest extends Model return $res; } - /** - * @param array $map - * - * @return ListTagResourcesRequest - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['NextToken'])) { $model->nextToken = $map['NextToken']; } + if (isset($map['OwnerId'])) { $model->ownerId = $map['OwnerId']; } + if (isset($map['PageSize'])) { $model->pageSize = $map['PageSize']; } + if (isset($map['ProdCode'])) { $model->prodCode = $map['ProdCode']; } + if (isset($map['RegionId'])) { $model->regionId = $map['RegionId']; } + if (isset($map['ResourceId'])) { if (!empty($map['ResourceId'])) { - $model->resourceId = $map['ResourceId']; + $model->resourceId = []; + $n1 = 0; + foreach ($map['ResourceId'] as $item1) { + $model->resourceId[$n1] = $item1; + ++$n1; + } } } + if (isset($map['ResourceOwnerAccount'])) { $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; } + if (isset($map['ResourceOwnerId'])) { $model->resourceOwnerId = $map['ResourceOwnerId']; } + if (isset($map['ResourceType'])) { $model->resourceType = $map['ResourceType']; } + if (isset($map['Tag'])) { if (!empty($map['Tag'])) { $model->tag = []; - $n = 0; - foreach ($map['Tag'] as $item) { - $model->tag[$n++] = null !== $item ? tag::fromMap($item) : $item; + $n1 = 0; + foreach ($map['Tag'] as $item1) { + $model->tag[$n1] = tag::fromMap($item1); + ++$n1; } } } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesRequest/tag.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesRequest/tag.php index dc71f32..ded5f58 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesRequest/tag.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesRequest/tag.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models\ListTagResourcesRequest; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class tag extends Model { @@ -18,20 +18,22 @@ class tag extends Model */ public $value; protected $_name = [ - 'key' => 'Key', + 'key' => 'Key', 'value' => 'Value', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->key) { $res['Key'] = $this->key; } + if (null !== $this->value) { $res['Value'] = $this->value; } @@ -39,17 +41,18 @@ class tag extends Model return $res; } - /** - * @param array $map - * - * @return tag - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Key'])) { $model->key = $map['Key']; } + if (isset($map['Value'])) { $model->value = $map['Value']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesResponse.php index f2c0c75..19fcf20 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesResponse.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesResponse.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class ListTagResourcesResponse extends Model { @@ -23,48 +23,66 @@ class ListTagResourcesResponse extends Model */ public $body; protected $_name = [ - 'headers' => 'headers', + 'headers' => 'headers', 'statusCode' => 'statusCode', - 'body' => 'body', + 'body' => 'body', ]; public function validate() { - Model::validateRequired('headers', $this->headers, true); - Model::validateRequired('statusCode', $this->statusCode, true); - Model::validateRequired('body', $this->body, true); + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->headers) { - $res['headers'] = $this->headers; + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } } + if (null !== $this->statusCode) { $res['statusCode'] = $this->statusCode; } + if (null !== $this->body) { - $res['body'] = null !== $this->body ? $this->body->toMap() : null; + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; } return $res; } - /** - * @param array $map - * - * @return ListTagResourcesResponse - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['headers'])) { - $model->headers = $map['headers']; + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } } + if (isset($map['statusCode'])) { $model->statusCode = $map['statusCode']; } + if (isset($map['body'])) { $model->body = ListTagResourcesResponseBody::fromMap($map['body']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesResponseBody.php index 3312422..d0d00d0 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesResponseBody.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesResponseBody.php @@ -4,8 +4,8 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; +use AlibabaCloud\Dara\Model; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\ListTagResourcesResponseBody\tagResources; -use AlibabaCloud\Tea\Model; class ListTagResourcesResponseBody extends Model { @@ -29,52 +29,62 @@ class ListTagResourcesResponseBody extends Model */ public $tagResources; protected $_name = [ - 'code' => 'Code', - 'nextToken' => 'NextToken', - 'requestId' => 'RequestId', + 'code' => 'Code', + 'nextToken' => 'NextToken', + 'requestId' => 'RequestId', 'tagResources' => 'TagResources', ]; public function validate() { + if (null !== $this->tagResources) { + $this->tagResources->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->code) { $res['Code'] = $this->code; } + if (null !== $this->nextToken) { $res['NextToken'] = $this->nextToken; } + if (null !== $this->requestId) { $res['RequestId'] = $this->requestId; } + if (null !== $this->tagResources) { - $res['TagResources'] = null !== $this->tagResources ? $this->tagResources->toMap() : null; + $res['TagResources'] = null !== $this->tagResources ? $this->tagResources->toArray($noStream) : $this->tagResources; } return $res; } - /** - * @param array $map - * - * @return ListTagResourcesResponseBody - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Code'])) { $model->code = $map['Code']; } + if (isset($map['NextToken'])) { $model->nextToken = $map['NextToken']; } + if (isset($map['RequestId'])) { $model->requestId = $map['RequestId']; } + if (isset($map['TagResources'])) { $model->tagResources = tagResources::fromMap($map['TagResources']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesResponseBody/tagResources.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesResponseBody/tagResources.php index b360bea..b3b5ac1 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesResponseBody/tagResources.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesResponseBody/tagResources.php @@ -4,8 +4,8 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models\ListTagResourcesResponseBody; +use AlibabaCloud\Dara\Model; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\ListTagResourcesResponseBody\tagResources\tagResource; -use AlibabaCloud\Tea\Model; class tagResources extends Model { @@ -19,17 +19,22 @@ class tagResources extends Model public function validate() { + if (\is_array($this->tagResource)) { + Model::validateArray($this->tagResource); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->tagResource) { - $res['TagResource'] = []; - if (null !== $this->tagResource && \is_array($this->tagResource)) { - $n = 0; - foreach ($this->tagResource as $item) { - $res['TagResource'][$n++] = null !== $item ? $item->toMap() : $item; + if (\is_array($this->tagResource)) { + $res['TagResource'] = []; + $n1 = 0; + foreach ($this->tagResource as $item1) { + $res['TagResource'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; } } } @@ -37,20 +42,21 @@ class tagResources extends Model return $res; } - /** - * @param array $map - * - * @return tagResources - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['TagResource'])) { if (!empty($map['TagResource'])) { $model->tagResource = []; - $n = 0; - foreach ($map['TagResource'] as $item) { - $model->tagResource[$n++] = null !== $item ? tagResource::fromMap($item) : $item; + $n1 = 0; + foreach ($map['TagResource'] as $item1) { + $model->tagResource[$n1] = tagResource::fromMap($item1); + ++$n1; } } } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesResponseBody/tagResources/tagResource.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesResponseBody/tagResources/tagResource.php index 53ed0ad..9c0ce5d 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesResponseBody/tagResources/tagResource.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesResponseBody/tagResources/tagResource.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models\ListTagResourcesResponseBody\tagResources; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class tagResource extends Model { @@ -28,28 +28,32 @@ class tagResource extends Model */ public $tagValue; protected $_name = [ - 'resourceId' => 'ResourceId', + 'resourceId' => 'ResourceId', 'resourceType' => 'ResourceType', - 'tagKey' => 'TagKey', - 'tagValue' => 'TagValue', + 'tagKey' => 'TagKey', + 'tagValue' => 'TagValue', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->resourceId) { $res['ResourceId'] = $this->resourceId; } + if (null !== $this->resourceType) { $res['ResourceType'] = $this->resourceType; } + if (null !== $this->tagKey) { $res['TagKey'] = $this->tagKey; } + if (null !== $this->tagValue) { $res['TagValue'] = $this->tagValue; } @@ -57,23 +61,26 @@ class tagResource extends Model return $res; } - /** - * @param array $map - * - * @return tagResource - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['ResourceId'])) { $model->resourceId = $map['ResourceId']; } + if (isset($map['ResourceType'])) { $model->resourceType = $map['ResourceType']; } + if (isset($map['TagKey'])) { $model->tagKey = $map['TagKey']; } + if (isset($map['TagValue'])) { $model->tagValue = $map['TagValue']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsSignRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsSignRequest.php index 2fe18d0..2ed35d9 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsSignRequest.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsSignRequest.php @@ -4,8 +4,8 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; +use AlibabaCloud\Dara\Model; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\ModifySmsSignRequest\signFileList; -use AlibabaCloud\Tea\Model; class ModifySmsSignRequest extends Model { @@ -49,50 +49,62 @@ class ModifySmsSignRequest extends Model */ public $signType; protected $_name = [ - 'ownerId' => 'OwnerId', - 'remark' => 'Remark', + 'ownerId' => 'OwnerId', + 'remark' => 'Remark', 'resourceOwnerAccount' => 'ResourceOwnerAccount', - 'resourceOwnerId' => 'ResourceOwnerId', - 'signFileList' => 'SignFileList', - 'signName' => 'SignName', - 'signSource' => 'SignSource', - 'signType' => 'SignType', + 'resourceOwnerId' => 'ResourceOwnerId', + 'signFileList' => 'SignFileList', + 'signName' => 'SignName', + 'signSource' => 'SignSource', + 'signType' => 'SignType', ]; public function validate() { + if (\is_array($this->signFileList)) { + Model::validateArray($this->signFileList); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->ownerId) { $res['OwnerId'] = $this->ownerId; } + if (null !== $this->remark) { $res['Remark'] = $this->remark; } + if (null !== $this->resourceOwnerAccount) { $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; } + if (null !== $this->resourceOwnerId) { $res['ResourceOwnerId'] = $this->resourceOwnerId; } + if (null !== $this->signFileList) { - $res['SignFileList'] = []; - if (null !== $this->signFileList && \is_array($this->signFileList)) { - $n = 0; - foreach ($this->signFileList as $item) { - $res['SignFileList'][$n++] = null !== $item ? $item->toMap() : $item; + if (\is_array($this->signFileList)) { + $res['SignFileList'] = []; + $n1 = 0; + foreach ($this->signFileList as $item1) { + $res['SignFileList'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; } } } + if (null !== $this->signName) { $res['SignName'] = $this->signName; } + if (null !== $this->signSource) { $res['SignSource'] = $this->signSource; } + if (null !== $this->signType) { $res['SignType'] = $this->signType; } @@ -100,41 +112,49 @@ class ModifySmsSignRequest extends Model return $res; } - /** - * @param array $map - * - * @return ModifySmsSignRequest - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['OwnerId'])) { $model->ownerId = $map['OwnerId']; } + if (isset($map['Remark'])) { $model->remark = $map['Remark']; } + if (isset($map['ResourceOwnerAccount'])) { $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; } + if (isset($map['ResourceOwnerId'])) { $model->resourceOwnerId = $map['ResourceOwnerId']; } + if (isset($map['SignFileList'])) { if (!empty($map['SignFileList'])) { $model->signFileList = []; - $n = 0; - foreach ($map['SignFileList'] as $item) { - $model->signFileList[$n++] = null !== $item ? signFileList::fromMap($item) : $item; + $n1 = 0; + foreach ($map['SignFileList'] as $item1) { + $model->signFileList[$n1] = signFileList::fromMap($item1); + ++$n1; } } } + if (isset($map['SignName'])) { $model->signName = $map['SignName']; } + if (isset($map['SignSource'])) { $model->signSource = $map['SignSource']; } + if (isset($map['SignType'])) { $model->signType = $map['SignType']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsSignRequest/signFileList.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsSignRequest/signFileList.php index f0dc661..a791c60 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsSignRequest/signFileList.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsSignRequest/signFileList.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models\ModifySmsSignRequest; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class signFileList extends Model { @@ -19,19 +19,21 @@ class signFileList extends Model public $fileSuffix; protected $_name = [ 'fileContents' => 'FileContents', - 'fileSuffix' => 'FileSuffix', + 'fileSuffix' => 'FileSuffix', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->fileContents) { $res['FileContents'] = $this->fileContents; } + if (null !== $this->fileSuffix) { $res['FileSuffix'] = $this->fileSuffix; } @@ -39,17 +41,18 @@ class signFileList extends Model return $res; } - /** - * @param array $map - * - * @return signFileList - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['FileContents'])) { $model->fileContents = $map['FileContents']; } + if (isset($map['FileSuffix'])) { $model->fileSuffix = $map['FileSuffix']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsSignResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsSignResponse.php index 668103e..0f0c56f 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsSignResponse.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsSignResponse.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class ModifySmsSignResponse extends Model { @@ -23,48 +23,66 @@ class ModifySmsSignResponse extends Model */ public $body; protected $_name = [ - 'headers' => 'headers', + 'headers' => 'headers', 'statusCode' => 'statusCode', - 'body' => 'body', + 'body' => 'body', ]; public function validate() { - Model::validateRequired('headers', $this->headers, true); - Model::validateRequired('statusCode', $this->statusCode, true); - Model::validateRequired('body', $this->body, true); + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->headers) { - $res['headers'] = $this->headers; + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } } + if (null !== $this->statusCode) { $res['statusCode'] = $this->statusCode; } + if (null !== $this->body) { - $res['body'] = null !== $this->body ? $this->body->toMap() : null; + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; } return $res; } - /** - * @param array $map - * - * @return ModifySmsSignResponse - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['headers'])) { - $model->headers = $map['headers']; + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } } + if (isset($map['statusCode'])) { $model->statusCode = $map['statusCode']; } + if (isset($map['body'])) { $model->body = ModifySmsSignResponseBody::fromMap($map['body']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsSignResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsSignResponseBody.php index a6bfe93..61699c8 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsSignResponseBody.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsSignResponseBody.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class ModifySmsSignResponseBody extends Model { @@ -28,28 +28,32 @@ class ModifySmsSignResponseBody extends Model */ public $signName; protected $_name = [ - 'code' => 'Code', - 'message' => 'Message', + 'code' => 'Code', + 'message' => 'Message', 'requestId' => 'RequestId', - 'signName' => 'SignName', + 'signName' => 'SignName', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->code) { $res['Code'] = $this->code; } + if (null !== $this->message) { $res['Message'] = $this->message; } + if (null !== $this->requestId) { $res['RequestId'] = $this->requestId; } + if (null !== $this->signName) { $res['SignName'] = $this->signName; } @@ -57,23 +61,26 @@ class ModifySmsSignResponseBody extends Model return $res; } - /** - * @param array $map - * - * @return ModifySmsSignResponseBody - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Code'])) { $model->code = $map['Code']; } + if (isset($map['Message'])) { $model->message = $map['Message']; } + if (isset($map['RequestId'])) { $model->requestId = $map['RequestId']; } + if (isset($map['SignName'])) { $model->signName = $map['SignName']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsTemplateRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsTemplateRequest.php index d8e438c..7dbbc4c 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsTemplateRequest.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsTemplateRequest.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class ModifySmsTemplateRequest extends Model { @@ -48,44 +48,52 @@ class ModifySmsTemplateRequest extends Model */ public $templateType; protected $_name = [ - 'ownerId' => 'OwnerId', - 'remark' => 'Remark', + 'ownerId' => 'OwnerId', + 'remark' => 'Remark', 'resourceOwnerAccount' => 'ResourceOwnerAccount', - 'resourceOwnerId' => 'ResourceOwnerId', - 'templateCode' => 'TemplateCode', - 'templateContent' => 'TemplateContent', - 'templateName' => 'TemplateName', - 'templateType' => 'TemplateType', + 'resourceOwnerId' => 'ResourceOwnerId', + 'templateCode' => 'TemplateCode', + 'templateContent' => 'TemplateContent', + 'templateName' => 'TemplateName', + 'templateType' => 'TemplateType', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->ownerId) { $res['OwnerId'] = $this->ownerId; } + if (null !== $this->remark) { $res['Remark'] = $this->remark; } + if (null !== $this->resourceOwnerAccount) { $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; } + if (null !== $this->resourceOwnerId) { $res['ResourceOwnerId'] = $this->resourceOwnerId; } + if (null !== $this->templateCode) { $res['TemplateCode'] = $this->templateCode; } + if (null !== $this->templateContent) { $res['TemplateContent'] = $this->templateContent; } + if (null !== $this->templateName) { $res['TemplateName'] = $this->templateName; } + if (null !== $this->templateType) { $res['TemplateType'] = $this->templateType; } @@ -93,35 +101,42 @@ class ModifySmsTemplateRequest extends Model return $res; } - /** - * @param array $map - * - * @return ModifySmsTemplateRequest - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['OwnerId'])) { $model->ownerId = $map['OwnerId']; } + if (isset($map['Remark'])) { $model->remark = $map['Remark']; } + if (isset($map['ResourceOwnerAccount'])) { $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; } + if (isset($map['ResourceOwnerId'])) { $model->resourceOwnerId = $map['ResourceOwnerId']; } + if (isset($map['TemplateCode'])) { $model->templateCode = $map['TemplateCode']; } + if (isset($map['TemplateContent'])) { $model->templateContent = $map['TemplateContent']; } + if (isset($map['TemplateName'])) { $model->templateName = $map['TemplateName']; } + if (isset($map['TemplateType'])) { $model->templateType = $map['TemplateType']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsTemplateResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsTemplateResponse.php index 1df302c..bea8d1e 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsTemplateResponse.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsTemplateResponse.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class ModifySmsTemplateResponse extends Model { @@ -23,48 +23,66 @@ class ModifySmsTemplateResponse extends Model */ public $body; protected $_name = [ - 'headers' => 'headers', + 'headers' => 'headers', 'statusCode' => 'statusCode', - 'body' => 'body', + 'body' => 'body', ]; public function validate() { - Model::validateRequired('headers', $this->headers, true); - Model::validateRequired('statusCode', $this->statusCode, true); - Model::validateRequired('body', $this->body, true); + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->headers) { - $res['headers'] = $this->headers; + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } } + if (null !== $this->statusCode) { $res['statusCode'] = $this->statusCode; } + if (null !== $this->body) { - $res['body'] = null !== $this->body ? $this->body->toMap() : null; + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; } return $res; } - /** - * @param array $map - * - * @return ModifySmsTemplateResponse - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['headers'])) { - $model->headers = $map['headers']; + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } } + if (isset($map['statusCode'])) { $model->statusCode = $map['statusCode']; } + if (isset($map['body'])) { $model->body = ModifySmsTemplateResponseBody::fromMap($map['body']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsTemplateResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsTemplateResponseBody.php index 7403f14..f66217e 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsTemplateResponseBody.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsTemplateResponseBody.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class ModifySmsTemplateResponseBody extends Model { @@ -28,28 +28,32 @@ class ModifySmsTemplateResponseBody extends Model */ public $templateCode; protected $_name = [ - 'code' => 'Code', - 'message' => 'Message', - 'requestId' => 'RequestId', + 'code' => 'Code', + 'message' => 'Message', + 'requestId' => 'RequestId', 'templateCode' => 'TemplateCode', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->code) { $res['Code'] = $this->code; } + if (null !== $this->message) { $res['Message'] = $this->message; } + if (null !== $this->requestId) { $res['RequestId'] = $this->requestId; } + if (null !== $this->templateCode) { $res['TemplateCode'] = $this->templateCode; } @@ -57,23 +61,26 @@ class ModifySmsTemplateResponseBody extends Model return $res; } - /** - * @param array $map - * - * @return ModifySmsTemplateResponseBody - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Code'])) { $model->code = $map['Code']; } + if (isset($map['Message'])) { $model->message = $map['Message']; } + if (isset($map['RequestId'])) { $model->requestId = $map['RequestId']; } + if (isset($map['TemplateCode'])) { $model->templateCode = $map['TemplateCode']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateReportRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateReportRequest.php index 6eea9b0..1ffc9bf 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateReportRequest.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateReportRequest.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class QueryCardSmsTemplateReportRequest extends Model { @@ -23,48 +23,68 @@ class QueryCardSmsTemplateReportRequest extends Model */ public $templateCodes; protected $_name = [ - 'endDate' => 'EndDate', - 'startDate' => 'StartDate', + 'endDate' => 'EndDate', + 'startDate' => 'StartDate', 'templateCodes' => 'TemplateCodes', ]; public function validate() { + if (\is_array($this->templateCodes)) { + Model::validateArray($this->templateCodes); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->endDate) { $res['EndDate'] = $this->endDate; } + if (null !== $this->startDate) { $res['StartDate'] = $this->startDate; } + if (null !== $this->templateCodes) { - $res['TemplateCodes'] = $this->templateCodes; + if (\is_array($this->templateCodes)) { + $res['TemplateCodes'] = []; + $n1 = 0; + foreach ($this->templateCodes as $item1) { + $res['TemplateCodes'][$n1] = $item1; + ++$n1; + } + } } return $res; } - /** - * @param array $map - * - * @return QueryCardSmsTemplateReportRequest - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['EndDate'])) { $model->endDate = $map['EndDate']; } + if (isset($map['StartDate'])) { $model->startDate = $map['StartDate']; } + if (isset($map['TemplateCodes'])) { if (!empty($map['TemplateCodes'])) { - $model->templateCodes = $map['TemplateCodes']; + $model->templateCodes = []; + $n1 = 0; + foreach ($map['TemplateCodes'] as $item1) { + $model->templateCodes[$n1] = $item1; + ++$n1; + } } } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateReportResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateReportResponse.php index 7af83a4..4e7e9b5 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateReportResponse.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateReportResponse.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class QueryCardSmsTemplateReportResponse extends Model { @@ -23,48 +23,66 @@ class QueryCardSmsTemplateReportResponse extends Model */ public $body; protected $_name = [ - 'headers' => 'headers', + 'headers' => 'headers', 'statusCode' => 'statusCode', - 'body' => 'body', + 'body' => 'body', ]; public function validate() { - Model::validateRequired('headers', $this->headers, true); - Model::validateRequired('statusCode', $this->statusCode, true); - Model::validateRequired('body', $this->body, true); + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->headers) { - $res['headers'] = $this->headers; + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } } + if (null !== $this->statusCode) { $res['statusCode'] = $this->statusCode; } + if (null !== $this->body) { - $res['body'] = null !== $this->body ? $this->body->toMap() : null; + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; } return $res; } - /** - * @param array $map - * - * @return QueryCardSmsTemplateReportResponse - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['headers'])) { - $model->headers = $map['headers']; + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } } + if (isset($map['statusCode'])) { $model->statusCode = $map['statusCode']; } + if (isset($map['body'])) { $model->body = QueryCardSmsTemplateReportResponseBody::fromMap($map['body']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateReportResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateReportResponseBody.php index 3c434ca..2d1c5bb 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateReportResponseBody.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateReportResponseBody.php @@ -4,7 +4,8 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; +use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryCardSmsTemplateReportResponseBody\data; class QueryCardSmsTemplateReportResponseBody extends Model { @@ -14,7 +15,7 @@ class QueryCardSmsTemplateReportResponseBody extends Model public $code; /** - * @var mixed[][] + * @var data */ public $data; @@ -28,28 +29,35 @@ class QueryCardSmsTemplateReportResponseBody extends Model */ public $success; protected $_name = [ - 'code' => 'Code', - 'data' => 'Data', + 'code' => 'Code', + 'data' => 'Data', 'requestId' => 'RequestId', - 'success' => 'Success', + 'success' => 'Success', ]; public function validate() { + if (null !== $this->data) { + $this->data->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->code) { $res['Code'] = $this->code; } + if (null !== $this->data) { - $res['Data'] = $this->data; + $res['Data'] = null !== $this->data ? $this->data->toArray($noStream) : $this->data; } + if (null !== $this->requestId) { $res['RequestId'] = $this->requestId; } + if (null !== $this->success) { $res['Success'] = $this->success; } @@ -57,25 +65,26 @@ class QueryCardSmsTemplateReportResponseBody extends Model return $res; } - /** - * @param array $map - * - * @return QueryCardSmsTemplateReportResponseBody - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Code'])) { $model->code = $map['Code']; } + if (isset($map['Data'])) { - if (!empty($map['Data'])) { - $model->data = $map['Data']; - } + $model->data = data::fromMap($map['Data']); } + if (isset($map['RequestId'])) { $model->requestId = $map['RequestId']; } + if (isset($map['Success'])) { $model->success = $map['Success']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateReportResponseBody/data.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateReportResponseBody/data.php new file mode 100644 index 0000000..7961b93 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateReportResponseBody/data.php @@ -0,0 +1,75 @@ + 'model', + ]; + + public function validate() + { + if (\is_array($this->model)) { + Model::validateArray($this->model); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->model) { + if (\is_array($this->model)) { + $res['model'] = []; + $n1 = 0; + foreach ($this->model as $item1) { + if (\is_array($item1)) { + $res['model'][$n1] = []; + foreach ($item1 as $key2 => $value2) { + $res['model'][$n1][$key2] = $value2; + } + } + ++$n1; + } + } + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['model'])) { + if (!empty($map['model'])) { + $model->model = []; + $n1 = 0; + foreach ($map['model'] as $item1) { + if (!empty($item1)) { + $model->model[$n1] = []; + foreach ($item1 as $key2 => $value2) { + $model->model[$n1][$key2] = $value2; + } + } + ++$n1; + } + } + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateRequest.php index 26747a8..20c5e26 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateRequest.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateRequest.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class QueryCardSmsTemplateRequest extends Model { @@ -18,9 +18,10 @@ class QueryCardSmsTemplateRequest extends Model public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->templateCode) { @@ -30,11 +31,11 @@ class QueryCardSmsTemplateRequest extends Model return $res; } - /** - * @param array $map - * - * @return QueryCardSmsTemplateRequest - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateResponse.php index 3c70cb5..718f027 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateResponse.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateResponse.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class QueryCardSmsTemplateResponse extends Model { @@ -23,48 +23,66 @@ class QueryCardSmsTemplateResponse extends Model */ public $body; protected $_name = [ - 'headers' => 'headers', + 'headers' => 'headers', 'statusCode' => 'statusCode', - 'body' => 'body', + 'body' => 'body', ]; public function validate() { - Model::validateRequired('headers', $this->headers, true); - Model::validateRequired('statusCode', $this->statusCode, true); - Model::validateRequired('body', $this->body, true); + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->headers) { - $res['headers'] = $this->headers; + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } } + if (null !== $this->statusCode) { $res['statusCode'] = $this->statusCode; } + if (null !== $this->body) { - $res['body'] = null !== $this->body ? $this->body->toMap() : null; + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; } return $res; } - /** - * @param array $map - * - * @return QueryCardSmsTemplateResponse - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['headers'])) { - $model->headers = $map['headers']; + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } } + if (isset($map['statusCode'])) { $model->statusCode = $map['statusCode']; } + if (isset($map['body'])) { $model->body = QueryCardSmsTemplateResponseBody::fromMap($map['body']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateResponseBody.php index 6911c41..a7b7f0b 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateResponseBody.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateResponseBody.php @@ -4,8 +4,8 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; +use AlibabaCloud\Dara\Model; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryCardSmsTemplateResponseBody\data; -use AlibabaCloud\Tea\Model; class QueryCardSmsTemplateResponseBody extends Model { @@ -29,28 +29,35 @@ class QueryCardSmsTemplateResponseBody extends Model */ public $success; protected $_name = [ - 'code' => 'Code', - 'data' => 'Data', + 'code' => 'Code', + 'data' => 'Data', 'requestId' => 'RequestId', - 'success' => 'Success', + 'success' => 'Success', ]; public function validate() { + if (null !== $this->data) { + $this->data->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->code) { $res['Code'] = $this->code; } + if (null !== $this->data) { - $res['Data'] = null !== $this->data ? $this->data->toMap() : null; + $res['Data'] = null !== $this->data ? $this->data->toArray($noStream) : $this->data; } + if (null !== $this->requestId) { $res['RequestId'] = $this->requestId; } + if (null !== $this->success) { $res['Success'] = $this->success; } @@ -58,23 +65,26 @@ class QueryCardSmsTemplateResponseBody extends Model return $res; } - /** - * @param array $map - * - * @return QueryCardSmsTemplateResponseBody - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Code'])) { $model->code = $map['Code']; } + if (isset($map['Data'])) { $model->data = data::fromMap($map['Data']); } + if (isset($map['RequestId'])) { $model->requestId = $map['RequestId']; } + if (isset($map['Success'])) { $model->success = $map['Success']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateResponseBody/data.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateResponseBody/data.php index 1c7e6a7..c08bfc3 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateResponseBody/data.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateResponseBody/data.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryCardSmsTemplateResponseBody; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class data extends Model { @@ -18,29 +18,55 @@ class data extends Model public function validate() { + if (\is_array($this->templates)) { + Model::validateArray($this->templates); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->templates) { - $res['Templates'] = $this->templates; + if (\is_array($this->templates)) { + $res['Templates'] = []; + $n1 = 0; + foreach ($this->templates as $item1) { + if (\is_array($item1)) { + $res['Templates'][$n1] = []; + foreach ($item1 as $key2 => $value2) { + $res['Templates'][$n1][$key2] = $value2; + } + } + ++$n1; + } + } } return $res; } - /** - * @param array $map - * - * @return data - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Templates'])) { if (!empty($map['Templates'])) { - $model->templates = $map['Templates']; + $model->templates = []; + $n1 = 0; + foreach ($map['Templates'] as $item1) { + if (!empty($item1)) { + $model->templates[$n1] = []; + foreach ($item1 as $key2 => $value2) { + $model->templates[$n1][$key2] = $value2; + } + } + ++$n1; + } } } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryDigitalSignByNameRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryDigitalSignByNameRequest.php new file mode 100644 index 0000000..8b454e8 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryDigitalSignByNameRequest.php @@ -0,0 +1,90 @@ + 'OwnerId', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'signName' => 'SignName', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->signName) { + $res['SignName'] = $this->signName; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['SignName'])) { + $model->signName = $map['SignName']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryDigitalSignByNameResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryDigitalSignByNameResponse.php new file mode 100644 index 0000000..6d619c6 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryDigitalSignByNameResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = QueryDigitalSignByNameResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryDigitalSignByNameResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryDigitalSignByNameResponseBody.php new file mode 100644 index 0000000..87264bf --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryDigitalSignByNameResponseBody.php @@ -0,0 +1,131 @@ + 'AccessDeniedDetail', + 'code' => 'Code', + 'data' => 'Data', + 'message' => 'Message', + 'requestId' => 'RequestId', + 'success' => 'Success', + ]; + + public function validate() + { + if (\is_array($this->data)) { + Model::validateArray($this->data); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessDeniedDetail) { + $res['AccessDeniedDetail'] = $this->accessDeniedDetail; + } + + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->data) { + if (\is_array($this->data)) { + $res['Data'] = []; + foreach ($this->data as $key1 => $value1) { + $res['Data'][$key1] = $value1; + } + } + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AccessDeniedDetail'])) { + $model->accessDeniedDetail = $map['AccessDeniedDetail']; + } + + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Data'])) { + if (!empty($map['Data'])) { + $model->data = []; + foreach ($map['Data'] as $key1 => $value1) { + $model->data[$key1] = $value1; + } + } + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignRequest.php new file mode 100644 index 0000000..5286d86 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignRequest.php @@ -0,0 +1,132 @@ + 'ExtCode', + 'ownerId' => 'OwnerId', + 'pageNo' => 'PageNo', + 'pageSize' => 'PageSize', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'signName' => 'SignName', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->extCode) { + $res['ExtCode'] = $this->extCode; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->pageNo) { + $res['PageNo'] = $this->pageNo; + } + + if (null !== $this->pageSize) { + $res['PageSize'] = $this->pageSize; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->signName) { + $res['SignName'] = $this->signName; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['ExtCode'])) { + $model->extCode = $map['ExtCode']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['PageNo'])) { + $model->pageNo = $map['PageNo']; + } + + if (isset($map['PageSize'])) { + $model->pageSize = $map['PageSize']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['SignName'])) { + $model->signName = $map['SignName']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignResponse.php new file mode 100644 index 0000000..e57dff8 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = QueryExtCodeSignResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignResponseBody.php new file mode 100644 index 0000000..3522332 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignResponseBody.php @@ -0,0 +1,122 @@ + 'AccessDeniedDetail', + 'code' => 'Code', + 'data' => 'Data', + 'message' => 'Message', + 'requestId' => 'RequestId', + 'success' => 'Success', + ]; + + public function validate() + { + if (null !== $this->data) { + $this->data->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessDeniedDetail) { + $res['AccessDeniedDetail'] = $this->accessDeniedDetail; + } + + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->data) { + $res['Data'] = null !== $this->data ? $this->data->toArray($noStream) : $this->data; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AccessDeniedDetail'])) { + $model->accessDeniedDetail = $map['AccessDeniedDetail']; + } + + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Data'])) { + $model->data = data::fromMap($map['Data']); + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignResponseBody/data.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignResponseBody/data.php new file mode 100644 index 0000000..24f218c --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignResponseBody/data.php @@ -0,0 +1,108 @@ + 'List', + 'pageNo' => 'PageNo', + 'pageSize' => 'PageSize', + 'total' => 'Total', + ]; + + public function validate() + { + if (\is_array($this->list)) { + Model::validateArray($this->list); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->list) { + if (\is_array($this->list)) { + $res['List'] = []; + $n1 = 0; + foreach ($this->list as $item1) { + $res['List'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; + } + } + } + + if (null !== $this->pageNo) { + $res['PageNo'] = $this->pageNo; + } + + if (null !== $this->pageSize) { + $res['PageSize'] = $this->pageSize; + } + + if (null !== $this->total) { + $res['Total'] = $this->total; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['List'])) { + if (!empty($map['List'])) { + $model->list = []; + $n1 = 0; + foreach ($map['List'] as $item1) { + $model->list[$n1] = list_::fromMap($item1); + ++$n1; + } + } + } + + if (isset($map['PageNo'])) { + $model->pageNo = $map['PageNo']; + } + + if (isset($map['PageSize'])) { + $model->pageSize = $map['PageSize']; + } + + if (isset($map['Total'])) { + $model->total = $map['Total']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignResponseBody/data/list_.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignResponseBody/data/list_.php new file mode 100644 index 0000000..9056b8d --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignResponseBody/data/list_.php @@ -0,0 +1,104 @@ + 'Active', + 'extCode' => 'ExtCode', + 'sendCount' => 'SendCount', + 'signName' => 'SignName', + 'source' => 'Source', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->active) { + $res['Active'] = $this->active; + } + + if (null !== $this->extCode) { + $res['ExtCode'] = $this->extCode; + } + + if (null !== $this->sendCount) { + $res['SendCount'] = $this->sendCount; + } + + if (null !== $this->signName) { + $res['SignName'] = $this->signName; + } + + if (null !== $this->source) { + $res['Source'] = $this->source; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['Active'])) { + $model->active = $map['Active']; + } + + if (isset($map['ExtCode'])) { + $model->extCode = $map['ExtCode']; + } + + if (isset($map['SendCount'])) { + $model->sendCount = $map['SendCount']; + } + + if (isset($map['SignName'])) { + $model->signName = $map['SignName']; + } + + if (isset($map['Source'])) { + $model->source = $map['Source']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportRequest.php new file mode 100644 index 0000000..5d2a41f --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportRequest.php @@ -0,0 +1,103 @@ + 'EncryptType', + 'mobiles' => 'Mobiles', + 'templateCode' => 'TemplateCode', + ]; + + public function validate() + { + if (\is_array($this->mobiles)) { + Model::validateArray($this->mobiles); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->encryptType) { + $res['EncryptType'] = $this->encryptType; + } + + if (null !== $this->mobiles) { + if (\is_array($this->mobiles)) { + $res['Mobiles'] = []; + $n1 = 0; + foreach ($this->mobiles as $item1) { + if (\is_array($item1)) { + $res['Mobiles'][$n1] = []; + foreach ($item1 as $key2 => $value2) { + $res['Mobiles'][$n1][$key2] = $value2; + } + } + ++$n1; + } + } + } + + if (null !== $this->templateCode) { + $res['TemplateCode'] = $this->templateCode; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['EncryptType'])) { + $model->encryptType = $map['EncryptType']; + } + + if (isset($map['Mobiles'])) { + if (!empty($map['Mobiles'])) { + $model->mobiles = []; + $n1 = 0; + foreach ($map['Mobiles'] as $item1) { + if (!empty($item1)) { + $model->mobiles[$n1] = []; + foreach ($item1 as $key2 => $value2) { + $model->mobiles[$n1][$key2] = $value2; + } + } + ++$n1; + } + } + } + + if (isset($map['TemplateCode'])) { + $model->templateCode = $map['TemplateCode']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportResponse.php new file mode 100644 index 0000000..103e44e --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = QueryMobilesCardSupportResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportResponseBody.php new file mode 100644 index 0000000..433e9a4 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportResponseBody.php @@ -0,0 +1,94 @@ + 'Code', + 'data' => 'Data', + 'requestId' => 'RequestId', + 'success' => 'Success', + ]; + + public function validate() + { + if (null !== $this->data) { + $this->data->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->data) { + $res['Data'] = null !== $this->data ? $this->data->toArray($noStream) : $this->data; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Data'])) { + $model->data = data::fromMap($map['Data']); + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportResponseBody/data.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportResponseBody/data.php new file mode 100644 index 0000000..6436f57 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportResponseBody/data.php @@ -0,0 +1,66 @@ + 'QueryResult', + ]; + + public function validate() + { + if (\is_array($this->queryResult)) { + Model::validateArray($this->queryResult); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->queryResult) { + if (\is_array($this->queryResult)) { + $res['QueryResult'] = []; + $n1 = 0; + foreach ($this->queryResult as $item1) { + $res['QueryResult'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; + } + } + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['QueryResult'])) { + if (!empty($map['QueryResult'])) { + $model->queryResult = []; + $n1 = 0; + foreach ($map['QueryResult'] as $item1) { + $model->queryResult[$n1] = queryResult::fromMap($item1); + ++$n1; + } + } + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportResponseBody/data/queryResult.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportResponseBody/data/queryResult.php new file mode 100644 index 0000000..dc43fba --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportResponseBody/data/queryResult.php @@ -0,0 +1,62 @@ + 'Mobile', + 'support' => 'Support', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->mobile) { + $res['Mobile'] = $this->mobile; + } + + if (null !== $this->support) { + $res['Support'] = $this->support; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['Mobile'])) { + $model->mobile = $map['Mobile']; + } + + if (isset($map['Support'])) { + $model->support = $map['Support']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportShrinkRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportShrinkRequest.php new file mode 100644 index 0000000..ae2cae3 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportShrinkRequest.php @@ -0,0 +1,76 @@ + 'EncryptType', + 'mobilesShrink' => 'Mobiles', + 'templateCode' => 'TemplateCode', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->encryptType) { + $res['EncryptType'] = $this->encryptType; + } + + if (null !== $this->mobilesShrink) { + $res['Mobiles'] = $this->mobilesShrink; + } + + if (null !== $this->templateCode) { + $res['TemplateCode'] = $this->templateCode; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['EncryptType'])) { + $model->encryptType = $map['EncryptType']; + } + + if (isset($map['Mobiles'])) { + $model->mobilesShrink = $map['Mobiles']; + } + + if (isset($map['TemplateCode'])) { + $model->templateCode = $map['TemplateCode']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogRequest.php new file mode 100644 index 0000000..a14cc62 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogRequest.php @@ -0,0 +1,160 @@ + 'CreateDateEnd', + 'createDateStart' => 'CreateDateStart', + 'ownerId' => 'OwnerId', + 'pageNo' => 'PageNo', + 'pageSize' => 'PageSize', + 'phoneNumber' => 'PhoneNumber', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'shortUrl' => 'ShortUrl', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->createDateEnd) { + $res['CreateDateEnd'] = $this->createDateEnd; + } + + if (null !== $this->createDateStart) { + $res['CreateDateStart'] = $this->createDateStart; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->pageNo) { + $res['PageNo'] = $this->pageNo; + } + + if (null !== $this->pageSize) { + $res['PageSize'] = $this->pageSize; + } + + if (null !== $this->phoneNumber) { + $res['PhoneNumber'] = $this->phoneNumber; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->shortUrl) { + $res['ShortUrl'] = $this->shortUrl; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['CreateDateEnd'])) { + $model->createDateEnd = $map['CreateDateEnd']; + } + + if (isset($map['CreateDateStart'])) { + $model->createDateStart = $map['CreateDateStart']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['PageNo'])) { + $model->pageNo = $map['PageNo']; + } + + if (isset($map['PageSize'])) { + $model->pageSize = $map['PageSize']; + } + + if (isset($map['PhoneNumber'])) { + $model->phoneNumber = $map['PhoneNumber']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['ShortUrl'])) { + $model->shortUrl = $map['ShortUrl']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogResponse.php new file mode 100644 index 0000000..178ceb6 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = QueryPageSmartShortUrlLogResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogResponseBody.php new file mode 100644 index 0000000..4bb1b74 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogResponseBody.php @@ -0,0 +1,108 @@ + 'Code', + 'message' => 'Message', + 'model' => 'Model', + 'requestId' => 'RequestId', + 'success' => 'Success', + ]; + + public function validate() + { + if (null !== $this->model) { + $this->model->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->model) { + $res['Model'] = null !== $this->model ? $this->model->toArray($noStream) : $this->model; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['Model'])) { + $model->model = model_::fromMap($map['Model']); + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogResponseBody/model/list_.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogResponseBody/model/list_.php new file mode 100644 index 0000000..6ffbb1e --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogResponseBody/model/list_.php @@ -0,0 +1,118 @@ + 'ClickState', + 'clickTime' => 'ClickTime', + 'createTime' => 'CreateTime', + 'phoneNumber' => 'PhoneNumber', + 'shortName' => 'ShortName', + 'shortUrl' => 'ShortUrl', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->clickState) { + $res['ClickState'] = $this->clickState; + } + + if (null !== $this->clickTime) { + $res['ClickTime'] = $this->clickTime; + } + + if (null !== $this->createTime) { + $res['CreateTime'] = $this->createTime; + } + + if (null !== $this->phoneNumber) { + $res['PhoneNumber'] = $this->phoneNumber; + } + + if (null !== $this->shortName) { + $res['ShortName'] = $this->shortName; + } + + if (null !== $this->shortUrl) { + $res['ShortUrl'] = $this->shortUrl; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['ClickState'])) { + $model->clickState = $map['ClickState']; + } + + if (isset($map['ClickTime'])) { + $model->clickTime = $map['ClickTime']; + } + + if (isset($map['CreateTime'])) { + $model->createTime = $map['CreateTime']; + } + + if (isset($map['PhoneNumber'])) { + $model->phoneNumber = $map['PhoneNumber']; + } + + if (isset($map['ShortName'])) { + $model->shortName = $map['ShortName']; + } + + if (isset($map['ShortUrl'])) { + $model->shortUrl = $map['ShortUrl']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogResponseBody/model_.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogResponseBody/model_.php new file mode 100644 index 0000000..270c7c1 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogResponseBody/model_.php @@ -0,0 +1,122 @@ + 'List', + 'pageNo' => 'PageNo', + 'pageSize' => 'PageSize', + 'totalCount' => 'TotalCount', + 'totalPage' => 'TotalPage', + ]; + + public function validate() + { + if (\is_array($this->list)) { + Model::validateArray($this->list); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->list) { + if (\is_array($this->list)) { + $res['List'] = []; + $n1 = 0; + foreach ($this->list as $item1) { + $res['List'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; + } + } + } + + if (null !== $this->pageNo) { + $res['PageNo'] = $this->pageNo; + } + + if (null !== $this->pageSize) { + $res['PageSize'] = $this->pageSize; + } + + if (null !== $this->totalCount) { + $res['TotalCount'] = $this->totalCount; + } + + if (null !== $this->totalPage) { + $res['TotalPage'] = $this->totalPage; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['List'])) { + if (!empty($map['List'])) { + $model->list = []; + $n1 = 0; + foreach ($map['List'] as $item1) { + $model->list[$n1] = list_::fromMap($item1); + ++$n1; + } + } + } + + if (isset($map['PageNo'])) { + $model->pageNo = $map['PageNo']; + } + + if (isset($map['PageSize'])) { + $model->pageSize = $map['PageSize']; + } + + if (isset($map['TotalCount'])) { + $model->totalCount = $map['TotalCount']; + } + + if (isset($map['TotalPage'])) { + $model->totalPage = $map['TotalPage']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsRequest.php index 7ba305c..ec9c478 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsRequest.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsRequest.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class QuerySendDetailsRequest extends Model { @@ -48,44 +48,52 @@ class QuerySendDetailsRequest extends Model */ public $sendDate; protected $_name = [ - 'bizId' => 'BizId', - 'currentPage' => 'CurrentPage', - 'ownerId' => 'OwnerId', - 'pageSize' => 'PageSize', - 'phoneNumber' => 'PhoneNumber', + 'bizId' => 'BizId', + 'currentPage' => 'CurrentPage', + 'ownerId' => 'OwnerId', + 'pageSize' => 'PageSize', + 'phoneNumber' => 'PhoneNumber', 'resourceOwnerAccount' => 'ResourceOwnerAccount', - 'resourceOwnerId' => 'ResourceOwnerId', - 'sendDate' => 'SendDate', + 'resourceOwnerId' => 'ResourceOwnerId', + 'sendDate' => 'SendDate', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->bizId) { $res['BizId'] = $this->bizId; } + if (null !== $this->currentPage) { $res['CurrentPage'] = $this->currentPage; } + if (null !== $this->ownerId) { $res['OwnerId'] = $this->ownerId; } + if (null !== $this->pageSize) { $res['PageSize'] = $this->pageSize; } + if (null !== $this->phoneNumber) { $res['PhoneNumber'] = $this->phoneNumber; } + if (null !== $this->resourceOwnerAccount) { $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; } + if (null !== $this->resourceOwnerId) { $res['ResourceOwnerId'] = $this->resourceOwnerId; } + if (null !== $this->sendDate) { $res['SendDate'] = $this->sendDate; } @@ -93,35 +101,42 @@ class QuerySendDetailsRequest extends Model return $res; } - /** - * @param array $map - * - * @return QuerySendDetailsRequest - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['BizId'])) { $model->bizId = $map['BizId']; } + if (isset($map['CurrentPage'])) { $model->currentPage = $map['CurrentPage']; } + if (isset($map['OwnerId'])) { $model->ownerId = $map['OwnerId']; } + if (isset($map['PageSize'])) { $model->pageSize = $map['PageSize']; } + if (isset($map['PhoneNumber'])) { $model->phoneNumber = $map['PhoneNumber']; } + if (isset($map['ResourceOwnerAccount'])) { $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; } + if (isset($map['ResourceOwnerId'])) { $model->resourceOwnerId = $map['ResourceOwnerId']; } + if (isset($map['SendDate'])) { $model->sendDate = $map['SendDate']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsResponse.php index 5f42954..f6eb20e 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsResponse.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsResponse.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class QuerySendDetailsResponse extends Model { @@ -23,48 +23,66 @@ class QuerySendDetailsResponse extends Model */ public $body; protected $_name = [ - 'headers' => 'headers', + 'headers' => 'headers', 'statusCode' => 'statusCode', - 'body' => 'body', + 'body' => 'body', ]; public function validate() { - Model::validateRequired('headers', $this->headers, true); - Model::validateRequired('statusCode', $this->statusCode, true); - Model::validateRequired('body', $this->body, true); + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->headers) { - $res['headers'] = $this->headers; + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } } + if (null !== $this->statusCode) { $res['statusCode'] = $this->statusCode; } + if (null !== $this->body) { - $res['body'] = null !== $this->body ? $this->body->toMap() : null; + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; } return $res; } - /** - * @param array $map - * - * @return QuerySendDetailsResponse - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['headers'])) { - $model->headers = $map['headers']; + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } } + if (isset($map['statusCode'])) { $model->statusCode = $map['statusCode']; } + if (isset($map['body'])) { $model->body = QuerySendDetailsResponseBody::fromMap($map['body']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsResponseBody.php index 6618e46..264b86d 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsResponseBody.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsResponseBody.php @@ -4,8 +4,8 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; +use AlibabaCloud\Dara\Model; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySendDetailsResponseBody\smsSendDetailDTOs; -use AlibabaCloud\Tea\Model; class QuerySendDetailsResponseBody extends Model { @@ -34,32 +34,40 @@ class QuerySendDetailsResponseBody extends Model */ public $totalCount; protected $_name = [ - 'code' => 'Code', - 'message' => 'Message', - 'requestId' => 'RequestId', + 'code' => 'Code', + 'message' => 'Message', + 'requestId' => 'RequestId', 'smsSendDetailDTOs' => 'SmsSendDetailDTOs', - 'totalCount' => 'TotalCount', + 'totalCount' => 'TotalCount', ]; public function validate() { + if (null !== $this->smsSendDetailDTOs) { + $this->smsSendDetailDTOs->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->code) { $res['Code'] = $this->code; } + if (null !== $this->message) { $res['Message'] = $this->message; } + if (null !== $this->requestId) { $res['RequestId'] = $this->requestId; } + if (null !== $this->smsSendDetailDTOs) { - $res['SmsSendDetailDTOs'] = null !== $this->smsSendDetailDTOs ? $this->smsSendDetailDTOs->toMap() : null; + $res['SmsSendDetailDTOs'] = null !== $this->smsSendDetailDTOs ? $this->smsSendDetailDTOs->toArray($noStream) : $this->smsSendDetailDTOs; } + if (null !== $this->totalCount) { $res['TotalCount'] = $this->totalCount; } @@ -67,26 +75,30 @@ class QuerySendDetailsResponseBody extends Model return $res; } - /** - * @param array $map - * - * @return QuerySendDetailsResponseBody - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Code'])) { $model->code = $map['Code']; } + if (isset($map['Message'])) { $model->message = $map['Message']; } + if (isset($map['RequestId'])) { $model->requestId = $map['RequestId']; } + if (isset($map['SmsSendDetailDTOs'])) { $model->smsSendDetailDTOs = smsSendDetailDTOs::fromMap($map['SmsSendDetailDTOs']); } + if (isset($map['TotalCount'])) { $model->totalCount = $map['TotalCount']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsResponseBody/smsSendDetailDTOs.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsResponseBody/smsSendDetailDTOs.php index 3b0564d..553cf3e 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsResponseBody/smsSendDetailDTOs.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsResponseBody/smsSendDetailDTOs.php @@ -4,8 +4,8 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySendDetailsResponseBody; +use AlibabaCloud\Dara\Model; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySendDetailsResponseBody\smsSendDetailDTOs\smsSendDetailDTO; -use AlibabaCloud\Tea\Model; class smsSendDetailDTOs extends Model { @@ -19,17 +19,22 @@ class smsSendDetailDTOs extends Model public function validate() { + if (\is_array($this->smsSendDetailDTO)) { + Model::validateArray($this->smsSendDetailDTO); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->smsSendDetailDTO) { - $res['SmsSendDetailDTO'] = []; - if (null !== $this->smsSendDetailDTO && \is_array($this->smsSendDetailDTO)) { - $n = 0; - foreach ($this->smsSendDetailDTO as $item) { - $res['SmsSendDetailDTO'][$n++] = null !== $item ? $item->toMap() : $item; + if (\is_array($this->smsSendDetailDTO)) { + $res['SmsSendDetailDTO'] = []; + $n1 = 0; + foreach ($this->smsSendDetailDTO as $item1) { + $res['SmsSendDetailDTO'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; } } } @@ -37,20 +42,21 @@ class smsSendDetailDTOs extends Model return $res; } - /** - * @param array $map - * - * @return smsSendDetailDTOs - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['SmsSendDetailDTO'])) { if (!empty($map['SmsSendDetailDTO'])) { $model->smsSendDetailDTO = []; - $n = 0; - foreach ($map['SmsSendDetailDTO'] as $item) { - $model->smsSendDetailDTO[$n++] = null !== $item ? smsSendDetailDTO::fromMap($item) : $item; + $n1 = 0; + foreach ($map['SmsSendDetailDTO'] as $item1) { + $model->smsSendDetailDTO[$n1] = smsSendDetailDTO::fromMap($item1); + ++$n1; } } } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsResponseBody/smsSendDetailDTOs/smsSendDetailDTO.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsResponseBody/smsSendDetailDTOs/smsSendDetailDTO.php index b3ee5c3..32fe493 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsResponseBody/smsSendDetailDTOs/smsSendDetailDTO.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsResponseBody/smsSendDetailDTOs/smsSendDetailDTO.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySendDetailsResponseBody\smsSendDetailDTOs; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class smsSendDetailDTO extends Model { @@ -48,44 +48,52 @@ class smsSendDetailDTO extends Model */ public $templateCode; protected $_name = [ - 'content' => 'Content', - 'errCode' => 'ErrCode', - 'outId' => 'OutId', - 'phoneNum' => 'PhoneNum', - 'receiveDate' => 'ReceiveDate', - 'sendDate' => 'SendDate', - 'sendStatus' => 'SendStatus', + 'content' => 'Content', + 'errCode' => 'ErrCode', + 'outId' => 'OutId', + 'phoneNum' => 'PhoneNum', + 'receiveDate' => 'ReceiveDate', + 'sendDate' => 'SendDate', + 'sendStatus' => 'SendStatus', 'templateCode' => 'TemplateCode', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->content) { $res['Content'] = $this->content; } + if (null !== $this->errCode) { $res['ErrCode'] = $this->errCode; } + if (null !== $this->outId) { $res['OutId'] = $this->outId; } + if (null !== $this->phoneNum) { $res['PhoneNum'] = $this->phoneNum; } + if (null !== $this->receiveDate) { $res['ReceiveDate'] = $this->receiveDate; } + if (null !== $this->sendDate) { $res['SendDate'] = $this->sendDate; } + if (null !== $this->sendStatus) { $res['SendStatus'] = $this->sendStatus; } + if (null !== $this->templateCode) { $res['TemplateCode'] = $this->templateCode; } @@ -93,35 +101,42 @@ class smsSendDetailDTO extends Model return $res; } - /** - * @param array $map - * - * @return smsSendDetailDTO - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Content'])) { $model->content = $map['Content']; } + if (isset($map['ErrCode'])) { $model->errCode = $map['ErrCode']; } + if (isset($map['OutId'])) { $model->outId = $map['OutId']; } + if (isset($map['PhoneNum'])) { $model->phoneNum = $map['PhoneNum']; } + if (isset($map['ReceiveDate'])) { $model->receiveDate = $map['ReceiveDate']; } + if (isset($map['SendDate'])) { $model->sendDate = $map['SendDate']; } + if (isset($map['SendStatus'])) { $model->sendStatus = $map['SendStatus']; } + if (isset($map['TemplateCode'])) { $model->templateCode = $map['TemplateCode']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsRequest.php index 814ff37..5e56cb3 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsRequest.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsRequest.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class QuerySendStatisticsRequest extends Model { @@ -43,89 +43,132 @@ class QuerySendStatisticsRequest extends Model */ public $resourceOwnerId; + /** + * @var string + */ + public $signName; + /** * @var string */ public $startDate; + + /** + * @var int + */ + public $templateType; protected $_name = [ - 'endDate' => 'EndDate', - 'isGlobe' => 'IsGlobe', - 'ownerId' => 'OwnerId', - 'pageIndex' => 'PageIndex', - 'pageSize' => 'PageSize', + 'endDate' => 'EndDate', + 'isGlobe' => 'IsGlobe', + 'ownerId' => 'OwnerId', + 'pageIndex' => 'PageIndex', + 'pageSize' => 'PageSize', 'resourceOwnerAccount' => 'ResourceOwnerAccount', - 'resourceOwnerId' => 'ResourceOwnerId', - 'startDate' => 'StartDate', + 'resourceOwnerId' => 'ResourceOwnerId', + 'signName' => 'SignName', + 'startDate' => 'StartDate', + 'templateType' => 'TemplateType', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->endDate) { $res['EndDate'] = $this->endDate; } + if (null !== $this->isGlobe) { $res['IsGlobe'] = $this->isGlobe; } + if (null !== $this->ownerId) { $res['OwnerId'] = $this->ownerId; } + if (null !== $this->pageIndex) { $res['PageIndex'] = $this->pageIndex; } + if (null !== $this->pageSize) { $res['PageSize'] = $this->pageSize; } + if (null !== $this->resourceOwnerAccount) { $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; } + if (null !== $this->resourceOwnerId) { $res['ResourceOwnerId'] = $this->resourceOwnerId; } + + if (null !== $this->signName) { + $res['SignName'] = $this->signName; + } + if (null !== $this->startDate) { $res['StartDate'] = $this->startDate; } + if (null !== $this->templateType) { + $res['TemplateType'] = $this->templateType; + } + return $res; } - /** - * @param array $map - * - * @return QuerySendStatisticsRequest - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['EndDate'])) { $model->endDate = $map['EndDate']; } + if (isset($map['IsGlobe'])) { $model->isGlobe = $map['IsGlobe']; } + if (isset($map['OwnerId'])) { $model->ownerId = $map['OwnerId']; } + if (isset($map['PageIndex'])) { $model->pageIndex = $map['PageIndex']; } + if (isset($map['PageSize'])) { $model->pageSize = $map['PageSize']; } + if (isset($map['ResourceOwnerAccount'])) { $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; } + if (isset($map['ResourceOwnerId'])) { $model->resourceOwnerId = $map['ResourceOwnerId']; } + + if (isset($map['SignName'])) { + $model->signName = $map['SignName']; + } + if (isset($map['StartDate'])) { $model->startDate = $map['StartDate']; } + if (isset($map['TemplateType'])) { + $model->templateType = $map['TemplateType']; + } + return $model; } } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsResponse.php index 51ec054..e5b8092 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsResponse.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsResponse.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class QuerySendStatisticsResponse extends Model { @@ -23,48 +23,66 @@ class QuerySendStatisticsResponse extends Model */ public $body; protected $_name = [ - 'headers' => 'headers', + 'headers' => 'headers', 'statusCode' => 'statusCode', - 'body' => 'body', + 'body' => 'body', ]; public function validate() { - Model::validateRequired('headers', $this->headers, true); - Model::validateRequired('statusCode', $this->statusCode, true); - Model::validateRequired('body', $this->body, true); + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->headers) { - $res['headers'] = $this->headers; + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } } + if (null !== $this->statusCode) { $res['statusCode'] = $this->statusCode; } + if (null !== $this->body) { - $res['body'] = null !== $this->body ? $this->body->toMap() : null; + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; } return $res; } - /** - * @param array $map - * - * @return QuerySendStatisticsResponse - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['headers'])) { - $model->headers = $map['headers']; + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } } + if (isset($map['statusCode'])) { $model->statusCode = $map['statusCode']; } + if (isset($map['body'])) { $model->body = QuerySendStatisticsResponseBody::fromMap($map['body']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsResponseBody.php index b93e921..e32ac76 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsResponseBody.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsResponseBody.php @@ -4,8 +4,8 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; +use AlibabaCloud\Dara\Model; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySendStatisticsResponseBody\data; -use AlibabaCloud\Tea\Model; class QuerySendStatisticsResponseBody extends Model { @@ -29,28 +29,35 @@ class QuerySendStatisticsResponseBody extends Model */ public $requestId; protected $_name = [ - 'code' => 'Code', - 'data' => 'Data', - 'message' => 'Message', + 'code' => 'Code', + 'data' => 'Data', + 'message' => 'Message', 'requestId' => 'RequestId', ]; public function validate() { + if (null !== $this->data) { + $this->data->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->code) { $res['Code'] = $this->code; } + if (null !== $this->data) { - $res['Data'] = null !== $this->data ? $this->data->toMap() : null; + $res['Data'] = null !== $this->data ? $this->data->toArray($noStream) : $this->data; } + if (null !== $this->message) { $res['Message'] = $this->message; } + if (null !== $this->requestId) { $res['RequestId'] = $this->requestId; } @@ -58,23 +65,26 @@ class QuerySendStatisticsResponseBody extends Model return $res; } - /** - * @param array $map - * - * @return QuerySendStatisticsResponseBody - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Code'])) { $model->code = $map['Code']; } + if (isset($map['Data'])) { $model->data = data::fromMap($map['Data']); } + if (isset($map['Message'])) { $model->message = $map['Message']; } + if (isset($map['RequestId'])) { $model->requestId = $map['RequestId']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsResponseBody/data.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsResponseBody/data.php index ffcfaf9..bc7911b 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsResponseBody/data.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsResponseBody/data.php @@ -4,8 +4,8 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySendStatisticsResponseBody; +use AlibabaCloud\Dara\Model; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySendStatisticsResponseBody\data\targetList; -use AlibabaCloud\Tea\Model; class data extends Model { @@ -20,25 +20,31 @@ class data extends Model public $totalSize; protected $_name = [ 'targetList' => 'TargetList', - 'totalSize' => 'TotalSize', + 'totalSize' => 'TotalSize', ]; public function validate() { + if (\is_array($this->targetList)) { + Model::validateArray($this->targetList); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->targetList) { - $res['TargetList'] = []; - if (null !== $this->targetList && \is_array($this->targetList)) { - $n = 0; - foreach ($this->targetList as $item) { - $res['TargetList'][$n++] = null !== $item ? $item->toMap() : $item; + if (\is_array($this->targetList)) { + $res['TargetList'] = []; + $n1 = 0; + foreach ($this->targetList as $item1) { + $res['TargetList'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; } } } + if (null !== $this->totalSize) { $res['TotalSize'] = $this->totalSize; } @@ -46,23 +52,25 @@ class data extends Model return $res; } - /** - * @param array $map - * - * @return data - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['TargetList'])) { if (!empty($map['TargetList'])) { $model->targetList = []; - $n = 0; - foreach ($map['TargetList'] as $item) { - $model->targetList[$n++] = null !== $item ? targetList::fromMap($item) : $item; + $n1 = 0; + foreach ($map['TargetList'] as $item1) { + $model->targetList[$n1] = targetList::fromMap($item1); + ++$n1; } } } + if (isset($map['TotalSize'])) { $model->totalSize = $map['TotalSize']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsResponseBody/data/targetList.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsResponseBody/data/targetList.php index 47bf30e..76693ba 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsResponseBody/data/targetList.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsResponseBody/data/targetList.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySendStatisticsResponseBody\data; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class targetList extends Model { @@ -33,32 +33,37 @@ class targetList extends Model */ public $totalCount; protected $_name = [ - 'noRespondedCount' => 'NoRespondedCount', - 'respondedFailCount' => 'RespondedFailCount', + 'noRespondedCount' => 'NoRespondedCount', + 'respondedFailCount' => 'RespondedFailCount', 'respondedSuccessCount' => 'RespondedSuccessCount', - 'sendDate' => 'SendDate', - 'totalCount' => 'TotalCount', + 'sendDate' => 'SendDate', + 'totalCount' => 'TotalCount', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->noRespondedCount) { $res['NoRespondedCount'] = $this->noRespondedCount; } + if (null !== $this->respondedFailCount) { $res['RespondedFailCount'] = $this->respondedFailCount; } + if (null !== $this->respondedSuccessCount) { $res['RespondedSuccessCount'] = $this->respondedSuccessCount; } + if (null !== $this->sendDate) { $res['SendDate'] = $this->sendDate; } + if (null !== $this->totalCount) { $res['TotalCount'] = $this->totalCount; } @@ -66,26 +71,30 @@ class targetList extends Model return $res; } - /** - * @param array $map - * - * @return targetList - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['NoRespondedCount'])) { $model->noRespondedCount = $map['NoRespondedCount']; } + if (isset($map['RespondedFailCount'])) { $model->respondedFailCount = $map['RespondedFailCount']; } + if (isset($map['RespondedSuccessCount'])) { $model->respondedSuccessCount = $map['RespondedSuccessCount']; } + if (isset($map['SendDate'])) { $model->sendDate = $map['SendDate']; } + if (isset($map['TotalCount'])) { $model->totalCount = $map['TotalCount']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryShortUrlRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryShortUrlRequest.php index e63e2a1..244cf0a 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryShortUrlRequest.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryShortUrlRequest.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class QueryShortUrlRequest extends Model { @@ -28,28 +28,32 @@ class QueryShortUrlRequest extends Model */ public $shortUrl; protected $_name = [ - 'ownerId' => 'OwnerId', + 'ownerId' => 'OwnerId', 'resourceOwnerAccount' => 'ResourceOwnerAccount', - 'resourceOwnerId' => 'ResourceOwnerId', - 'shortUrl' => 'ShortUrl', + 'resourceOwnerId' => 'ResourceOwnerId', + 'shortUrl' => 'ShortUrl', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->ownerId) { $res['OwnerId'] = $this->ownerId; } + if (null !== $this->resourceOwnerAccount) { $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; } + if (null !== $this->resourceOwnerId) { $res['ResourceOwnerId'] = $this->resourceOwnerId; } + if (null !== $this->shortUrl) { $res['ShortUrl'] = $this->shortUrl; } @@ -57,23 +61,26 @@ class QueryShortUrlRequest extends Model return $res; } - /** - * @param array $map - * - * @return QueryShortUrlRequest - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['OwnerId'])) { $model->ownerId = $map['OwnerId']; } + if (isset($map['ResourceOwnerAccount'])) { $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; } + if (isset($map['ResourceOwnerId'])) { $model->resourceOwnerId = $map['ResourceOwnerId']; } + if (isset($map['ShortUrl'])) { $model->shortUrl = $map['ShortUrl']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryShortUrlResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryShortUrlResponse.php index 54840e5..4d037ab 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryShortUrlResponse.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryShortUrlResponse.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class QueryShortUrlResponse extends Model { @@ -23,48 +23,66 @@ class QueryShortUrlResponse extends Model */ public $body; protected $_name = [ - 'headers' => 'headers', + 'headers' => 'headers', 'statusCode' => 'statusCode', - 'body' => 'body', + 'body' => 'body', ]; public function validate() { - Model::validateRequired('headers', $this->headers, true); - Model::validateRequired('statusCode', $this->statusCode, true); - Model::validateRequired('body', $this->body, true); + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->headers) { - $res['headers'] = $this->headers; + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } } + if (null !== $this->statusCode) { $res['statusCode'] = $this->statusCode; } + if (null !== $this->body) { - $res['body'] = null !== $this->body ? $this->body->toMap() : null; + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; } return $res; } - /** - * @param array $map - * - * @return QueryShortUrlResponse - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['headers'])) { - $model->headers = $map['headers']; + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } } + if (isset($map['statusCode'])) { $model->statusCode = $map['statusCode']; } + if (isset($map['body'])) { $model->body = QueryShortUrlResponseBody::fromMap($map['body']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryShortUrlResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryShortUrlResponseBody.php index b5f471c..26ceb8c 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryShortUrlResponseBody.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryShortUrlResponseBody.php @@ -4,8 +4,8 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; +use AlibabaCloud\Dara\Model; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryShortUrlResponseBody\data; -use AlibabaCloud\Tea\Model; class QueryShortUrlResponseBody extends Model { @@ -29,28 +29,35 @@ class QueryShortUrlResponseBody extends Model */ public $requestId; protected $_name = [ - 'code' => 'Code', - 'data' => 'Data', - 'message' => 'Message', + 'code' => 'Code', + 'data' => 'Data', + 'message' => 'Message', 'requestId' => 'RequestId', ]; public function validate() { + if (null !== $this->data) { + $this->data->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->code) { $res['Code'] = $this->code; } + if (null !== $this->data) { - $res['Data'] = null !== $this->data ? $this->data->toMap() : null; + $res['Data'] = null !== $this->data ? $this->data->toArray($noStream) : $this->data; } + if (null !== $this->message) { $res['Message'] = $this->message; } + if (null !== $this->requestId) { $res['RequestId'] = $this->requestId; } @@ -58,23 +65,26 @@ class QueryShortUrlResponseBody extends Model return $res; } - /** - * @param array $map - * - * @return QueryShortUrlResponseBody - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Code'])) { $model->code = $map['Code']; } + if (isset($map['Data'])) { $model->data = data::fromMap($map['Data']); } + if (isset($map['Message'])) { $model->message = $map['Message']; } + if (isset($map['RequestId'])) { $model->requestId = $map['RequestId']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryShortUrlResponseBody/data.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryShortUrlResponseBody/data.php index 377f8ec..118590e 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryShortUrlResponseBody/data.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QueryShortUrlResponseBody/data.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QueryShortUrlResponseBody; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class data extends Model { @@ -48,44 +48,52 @@ class data extends Model */ public $uniqueVisitorCount; protected $_name = [ - 'createDate' => 'CreateDate', - 'expireDate' => 'ExpireDate', - 'pageViewCount' => 'PageViewCount', - 'shortUrl' => 'ShortUrl', - 'shortUrlName' => 'ShortUrlName', - 'shortUrlStatus' => 'ShortUrlStatus', - 'sourceUrl' => 'SourceUrl', + 'createDate' => 'CreateDate', + 'expireDate' => 'ExpireDate', + 'pageViewCount' => 'PageViewCount', + 'shortUrl' => 'ShortUrl', + 'shortUrlName' => 'ShortUrlName', + 'shortUrlStatus' => 'ShortUrlStatus', + 'sourceUrl' => 'SourceUrl', 'uniqueVisitorCount' => 'UniqueVisitorCount', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->createDate) { $res['CreateDate'] = $this->createDate; } + if (null !== $this->expireDate) { $res['ExpireDate'] = $this->expireDate; } + if (null !== $this->pageViewCount) { $res['PageViewCount'] = $this->pageViewCount; } + if (null !== $this->shortUrl) { $res['ShortUrl'] = $this->shortUrl; } + if (null !== $this->shortUrlName) { $res['ShortUrlName'] = $this->shortUrlName; } + if (null !== $this->shortUrlStatus) { $res['ShortUrlStatus'] = $this->shortUrlStatus; } + if (null !== $this->sourceUrl) { $res['SourceUrl'] = $this->sourceUrl; } + if (null !== $this->uniqueVisitorCount) { $res['UniqueVisitorCount'] = $this->uniqueVisitorCount; } @@ -93,35 +101,42 @@ class data extends Model return $res; } - /** - * @param array $map - * - * @return data - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['CreateDate'])) { $model->createDate = $map['CreateDate']; } + if (isset($map['ExpireDate'])) { $model->expireDate = $map['ExpireDate']; } + if (isset($map['PageViewCount'])) { $model->pageViewCount = $map['PageViewCount']; } + if (isset($map['ShortUrl'])) { $model->shortUrl = $map['ShortUrl']; } + if (isset($map['ShortUrlName'])) { $model->shortUrlName = $map['ShortUrlName']; } + if (isset($map['ShortUrlStatus'])) { $model->shortUrlStatus = $map['ShortUrlStatus']; } + if (isset($map['SourceUrl'])) { $model->sourceUrl = $map['SourceUrl']; } + if (isset($map['UniqueVisitorCount'])) { $model->uniqueVisitorCount = $map['UniqueVisitorCount']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationRequest.php new file mode 100644 index 0000000..5efd6b4 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationRequest.php @@ -0,0 +1,104 @@ + 'OrderId', + 'ownerId' => 'OwnerId', + 'qualificationGroupId' => 'QualificationGroupId', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->orderId) { + $res['OrderId'] = $this->orderId; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->qualificationGroupId) { + $res['QualificationGroupId'] = $this->qualificationGroupId; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['OrderId'])) { + $model->orderId = $map['OrderId']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['QualificationGroupId'])) { + $model->qualificationGroupId = $map['QualificationGroupId']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponse.php new file mode 100644 index 0000000..e08acb1 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = QuerySingleSmsQualificationResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponseBody.php new file mode 100644 index 0000000..1fe593a --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponseBody.php @@ -0,0 +1,122 @@ + 'AccessDeniedDetail', + 'code' => 'Code', + 'data' => 'Data', + 'message' => 'Message', + 'requestId' => 'RequestId', + 'success' => 'Success', + ]; + + public function validate() + { + if (null !== $this->data) { + $this->data->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessDeniedDetail) { + $res['AccessDeniedDetail'] = $this->accessDeniedDetail; + } + + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->data) { + $res['Data'] = null !== $this->data ? $this->data->toArray($noStream) : $this->data; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AccessDeniedDetail'])) { + $model->accessDeniedDetail = $map['AccessDeniedDetail']; + } + + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Data'])) { + $model->data = data::fromMap($map['Data']); + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponseBody/data.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponseBody/data.php new file mode 100644 index 0000000..d295848 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponseBody/data.php @@ -0,0 +1,420 @@ + 'AdminIDCardExpDate', + 'adminIDCardFrontFace' => 'AdminIDCardFrontFace', + 'adminIDCardNo' => 'AdminIDCardNo', + 'adminIDCardPic' => 'AdminIDCardPic', + 'adminIDCardType' => 'AdminIDCardType', + 'adminName' => 'AdminName', + 'adminPhoneNo' => 'AdminPhoneNo', + 'businessLicensePics' => 'BusinessLicensePics', + 'businessType' => 'BusinessType', + 'companyName' => 'CompanyName', + 'companyType' => 'CompanyType', + 'effTimeStr' => 'EffTimeStr', + 'legalPersonIDCardNo' => 'LegalPersonIDCardNo', + 'legalPersonIDCardType' => 'LegalPersonIDCardType', + 'legalPersonIdCardEffTime' => 'LegalPersonIdCardEffTime', + 'legalPersonName' => 'LegalPersonName', + 'organizationCode' => 'OrganizationCode', + 'otherFiles' => 'OtherFiles', + 'qualificationGroupId' => 'QualificationGroupId', + 'qualificationName' => 'QualificationName', + 'remark' => 'Remark', + 'state' => 'State', + 'useBySelf' => 'UseBySelf', + 'whetherShare' => 'WhetherShare', + 'workOrderId' => 'WorkOrderId', + ]; + + public function validate() + { + if (\is_array($this->businessLicensePics)) { + Model::validateArray($this->businessLicensePics); + } + if (\is_array($this->otherFiles)) { + Model::validateArray($this->otherFiles); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->adminIDCardExpDate) { + $res['AdminIDCardExpDate'] = $this->adminIDCardExpDate; + } + + if (null !== $this->adminIDCardFrontFace) { + $res['AdminIDCardFrontFace'] = $this->adminIDCardFrontFace; + } + + if (null !== $this->adminIDCardNo) { + $res['AdminIDCardNo'] = $this->adminIDCardNo; + } + + if (null !== $this->adminIDCardPic) { + $res['AdminIDCardPic'] = $this->adminIDCardPic; + } + + if (null !== $this->adminIDCardType) { + $res['AdminIDCardType'] = $this->adminIDCardType; + } + + if (null !== $this->adminName) { + $res['AdminName'] = $this->adminName; + } + + if (null !== $this->adminPhoneNo) { + $res['AdminPhoneNo'] = $this->adminPhoneNo; + } + + if (null !== $this->businessLicensePics) { + if (\is_array($this->businessLicensePics)) { + $res['BusinessLicensePics'] = []; + $n1 = 0; + foreach ($this->businessLicensePics as $item1) { + $res['BusinessLicensePics'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; + } + } + } + + if (null !== $this->businessType) { + $res['BusinessType'] = $this->businessType; + } + + if (null !== $this->companyName) { + $res['CompanyName'] = $this->companyName; + } + + if (null !== $this->companyType) { + $res['CompanyType'] = $this->companyType; + } + + if (null !== $this->effTimeStr) { + $res['EffTimeStr'] = $this->effTimeStr; + } + + if (null !== $this->legalPersonIDCardNo) { + $res['LegalPersonIDCardNo'] = $this->legalPersonIDCardNo; + } + + if (null !== $this->legalPersonIDCardType) { + $res['LegalPersonIDCardType'] = $this->legalPersonIDCardType; + } + + if (null !== $this->legalPersonIdCardEffTime) { + $res['LegalPersonIdCardEffTime'] = $this->legalPersonIdCardEffTime; + } + + if (null !== $this->legalPersonName) { + $res['LegalPersonName'] = $this->legalPersonName; + } + + if (null !== $this->organizationCode) { + $res['OrganizationCode'] = $this->organizationCode; + } + + if (null !== $this->otherFiles) { + if (\is_array($this->otherFiles)) { + $res['OtherFiles'] = []; + $n1 = 0; + foreach ($this->otherFiles as $item1) { + $res['OtherFiles'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; + } + } + } + + if (null !== $this->qualificationGroupId) { + $res['QualificationGroupId'] = $this->qualificationGroupId; + } + + if (null !== $this->qualificationName) { + $res['QualificationName'] = $this->qualificationName; + } + + if (null !== $this->remark) { + $res['Remark'] = $this->remark; + } + + if (null !== $this->state) { + $res['State'] = $this->state; + } + + if (null !== $this->useBySelf) { + $res['UseBySelf'] = $this->useBySelf; + } + + if (null !== $this->whetherShare) { + $res['WhetherShare'] = $this->whetherShare; + } + + if (null !== $this->workOrderId) { + $res['WorkOrderId'] = $this->workOrderId; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AdminIDCardExpDate'])) { + $model->adminIDCardExpDate = $map['AdminIDCardExpDate']; + } + + if (isset($map['AdminIDCardFrontFace'])) { + $model->adminIDCardFrontFace = $map['AdminIDCardFrontFace']; + } + + if (isset($map['AdminIDCardNo'])) { + $model->adminIDCardNo = $map['AdminIDCardNo']; + } + + if (isset($map['AdminIDCardPic'])) { + $model->adminIDCardPic = $map['AdminIDCardPic']; + } + + if (isset($map['AdminIDCardType'])) { + $model->adminIDCardType = $map['AdminIDCardType']; + } + + if (isset($map['AdminName'])) { + $model->adminName = $map['AdminName']; + } + + if (isset($map['AdminPhoneNo'])) { + $model->adminPhoneNo = $map['AdminPhoneNo']; + } + + if (isset($map['BusinessLicensePics'])) { + if (!empty($map['BusinessLicensePics'])) { + $model->businessLicensePics = []; + $n1 = 0; + foreach ($map['BusinessLicensePics'] as $item1) { + $model->businessLicensePics[$n1] = businessLicensePics::fromMap($item1); + ++$n1; + } + } + } + + if (isset($map['BusinessType'])) { + $model->businessType = $map['BusinessType']; + } + + if (isset($map['CompanyName'])) { + $model->companyName = $map['CompanyName']; + } + + if (isset($map['CompanyType'])) { + $model->companyType = $map['CompanyType']; + } + + if (isset($map['EffTimeStr'])) { + $model->effTimeStr = $map['EffTimeStr']; + } + + if (isset($map['LegalPersonIDCardNo'])) { + $model->legalPersonIDCardNo = $map['LegalPersonIDCardNo']; + } + + if (isset($map['LegalPersonIDCardType'])) { + $model->legalPersonIDCardType = $map['LegalPersonIDCardType']; + } + + if (isset($map['LegalPersonIdCardEffTime'])) { + $model->legalPersonIdCardEffTime = $map['LegalPersonIdCardEffTime']; + } + + if (isset($map['LegalPersonName'])) { + $model->legalPersonName = $map['LegalPersonName']; + } + + if (isset($map['OrganizationCode'])) { + $model->organizationCode = $map['OrganizationCode']; + } + + if (isset($map['OtherFiles'])) { + if (!empty($map['OtherFiles'])) { + $model->otherFiles = []; + $n1 = 0; + foreach ($map['OtherFiles'] as $item1) { + $model->otherFiles[$n1] = otherFiles::fromMap($item1); + ++$n1; + } + } + } + + if (isset($map['QualificationGroupId'])) { + $model->qualificationGroupId = $map['QualificationGroupId']; + } + + if (isset($map['QualificationName'])) { + $model->qualificationName = $map['QualificationName']; + } + + if (isset($map['Remark'])) { + $model->remark = $map['Remark']; + } + + if (isset($map['State'])) { + $model->state = $map['State']; + } + + if (isset($map['UseBySelf'])) { + $model->useBySelf = $map['UseBySelf']; + } + + if (isset($map['WhetherShare'])) { + $model->whetherShare = $map['WhetherShare']; + } + + if (isset($map['WorkOrderId'])) { + $model->workOrderId = $map['WorkOrderId']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponseBody/data/businessLicensePics.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponseBody/data/businessLicensePics.php new file mode 100644 index 0000000..e487efd --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponseBody/data/businessLicensePics.php @@ -0,0 +1,76 @@ + 'LicensePic', + 'picUrl' => 'PicUrl', + 'type' => 'Type', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->licensePic) { + $res['LicensePic'] = $this->licensePic; + } + + if (null !== $this->picUrl) { + $res['PicUrl'] = $this->picUrl; + } + + if (null !== $this->type) { + $res['Type'] = $this->type; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['LicensePic'])) { + $model->licensePic = $map['LicensePic']; + } + + if (isset($map['PicUrl'])) { + $model->picUrl = $map['PicUrl']; + } + + if (isset($map['Type'])) { + $model->type = $map['Type']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponseBody/data/otherFiles.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponseBody/data/otherFiles.php new file mode 100644 index 0000000..52ced9c --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponseBody/data/otherFiles.php @@ -0,0 +1,62 @@ + 'LicensePic', + 'picUrl' => 'PicUrl', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->licensePic) { + $res['LicensePic'] = $this->licensePic; + } + + if (null !== $this->picUrl) { + $res['PicUrl'] = $this->picUrl; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['LicensePic'])) { + $model->licensePic = $map['LicensePic']; + } + + if (isset($map['PicUrl'])) { + $model->picUrl = $map['PicUrl']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordRequest.php new file mode 100644 index 0000000..31947c6 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordRequest.php @@ -0,0 +1,107 @@ + 'AppIcpRecordIdList', + 'ownerId' => 'OwnerId', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + ]; + + public function validate() + { + if (\is_array($this->appIcpRecordIdList)) { + Model::validateArray($this->appIcpRecordIdList); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->appIcpRecordIdList) { + if (\is_array($this->appIcpRecordIdList)) { + $res['AppIcpRecordIdList'] = []; + $n1 = 0; + foreach ($this->appIcpRecordIdList as $item1) { + $res['AppIcpRecordIdList'][$n1] = $item1; + ++$n1; + } + } + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AppIcpRecordIdList'])) { + if (!empty($map['AppIcpRecordIdList'])) { + $model->appIcpRecordIdList = []; + $n1 = 0; + foreach ($map['AppIcpRecordIdList'] as $item1) { + $model->appIcpRecordIdList[$n1] = $item1; + ++$n1; + } + } + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordResponse.php new file mode 100644 index 0000000..7bc5a82 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = QuerySmsAppIcpRecordResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordResponseBody.php new file mode 100644 index 0000000..6b9118e --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordResponseBody.php @@ -0,0 +1,136 @@ + 'AccessDeniedDetail', + 'code' => 'Code', + 'data' => 'Data', + 'message' => 'Message', + 'requestId' => 'RequestId', + 'success' => 'Success', + ]; + + public function validate() + { + if (\is_array($this->data)) { + Model::validateArray($this->data); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessDeniedDetail) { + $res['AccessDeniedDetail'] = $this->accessDeniedDetail; + } + + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->data) { + if (\is_array($this->data)) { + $res['Data'] = []; + $n1 = 0; + foreach ($this->data as $item1) { + $res['Data'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; + } + } + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AccessDeniedDetail'])) { + $model->accessDeniedDetail = $map['AccessDeniedDetail']; + } + + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Data'])) { + if (!empty($map['Data'])) { + $model->data = []; + $n1 = 0; + foreach ($map['Data'] as $item1) { + $model->data[$n1] = data::fromMap($item1); + ++$n1; + } + } + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordResponseBody/data.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordResponseBody/data.php new file mode 100644 index 0000000..c33af7f --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordResponseBody/data.php @@ -0,0 +1,146 @@ + 'AppApprovalDate', + 'appIcpLicenseNumber' => 'AppIcpLicenseNumber', + 'appIcpRecordId' => 'AppIcpRecordId', + 'appIcpRecordPic' => 'AppIcpRecordPic', + 'appIcpRecordPicUrl' => 'AppIcpRecordPicUrl', + 'appPrincipalUnitName' => 'AppPrincipalUnitName', + 'appServiceName' => 'AppServiceName', + 'domain' => 'Domain', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->appApprovalDate) { + $res['AppApprovalDate'] = $this->appApprovalDate; + } + + if (null !== $this->appIcpLicenseNumber) { + $res['AppIcpLicenseNumber'] = $this->appIcpLicenseNumber; + } + + if (null !== $this->appIcpRecordId) { + $res['AppIcpRecordId'] = $this->appIcpRecordId; + } + + if (null !== $this->appIcpRecordPic) { + $res['AppIcpRecordPic'] = $this->appIcpRecordPic; + } + + if (null !== $this->appIcpRecordPicUrl) { + $res['AppIcpRecordPicUrl'] = $this->appIcpRecordPicUrl; + } + + if (null !== $this->appPrincipalUnitName) { + $res['AppPrincipalUnitName'] = $this->appPrincipalUnitName; + } + + if (null !== $this->appServiceName) { + $res['AppServiceName'] = $this->appServiceName; + } + + if (null !== $this->domain) { + $res['Domain'] = $this->domain; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AppApprovalDate'])) { + $model->appApprovalDate = $map['AppApprovalDate']; + } + + if (isset($map['AppIcpLicenseNumber'])) { + $model->appIcpLicenseNumber = $map['AppIcpLicenseNumber']; + } + + if (isset($map['AppIcpRecordId'])) { + $model->appIcpRecordId = $map['AppIcpRecordId']; + } + + if (isset($map['AppIcpRecordPic'])) { + $model->appIcpRecordPic = $map['AppIcpRecordPic']; + } + + if (isset($map['AppIcpRecordPicUrl'])) { + $model->appIcpRecordPicUrl = $map['AppIcpRecordPicUrl']; + } + + if (isset($map['AppPrincipalUnitName'])) { + $model->appPrincipalUnitName = $map['AppPrincipalUnitName']; + } + + if (isset($map['AppServiceName'])) { + $model->appServiceName = $map['AppServiceName']; + } + + if (isset($map['Domain'])) { + $model->domain = $map['Domain']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordShrinkRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordShrinkRequest.php new file mode 100644 index 0000000..2bf2ee1 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordShrinkRequest.php @@ -0,0 +1,90 @@ + 'AppIcpRecordIdList', + 'ownerId' => 'OwnerId', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->appIcpRecordIdListShrink) { + $res['AppIcpRecordIdList'] = $this->appIcpRecordIdListShrink; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AppIcpRecordIdList'])) { + $model->appIcpRecordIdListShrink = $map['AppIcpRecordIdList']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterRequest.php new file mode 100644 index 0000000..0273910 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterRequest.php @@ -0,0 +1,163 @@ + 'AuthorizationLetterIdList', + 'organizationCode' => 'OrganizationCode', + 'ownerId' => 'OwnerId', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'signName' => 'SignName', + 'state' => 'State', + 'status' => 'Status', + ]; + + public function validate() + { + if (\is_array($this->authorizationLetterIdList)) { + Model::validateArray($this->authorizationLetterIdList); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->authorizationLetterIdList) { + if (\is_array($this->authorizationLetterIdList)) { + $res['AuthorizationLetterIdList'] = []; + $n1 = 0; + foreach ($this->authorizationLetterIdList as $item1) { + $res['AuthorizationLetterIdList'][$n1] = $item1; + ++$n1; + } + } + } + + if (null !== $this->organizationCode) { + $res['OrganizationCode'] = $this->organizationCode; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->signName) { + $res['SignName'] = $this->signName; + } + + if (null !== $this->state) { + $res['State'] = $this->state; + } + + if (null !== $this->status) { + $res['Status'] = $this->status; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AuthorizationLetterIdList'])) { + if (!empty($map['AuthorizationLetterIdList'])) { + $model->authorizationLetterIdList = []; + $n1 = 0; + foreach ($map['AuthorizationLetterIdList'] as $item1) { + $model->authorizationLetterIdList[$n1] = $item1; + ++$n1; + } + } + } + + if (isset($map['OrganizationCode'])) { + $model->organizationCode = $map['OrganizationCode']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['SignName'])) { + $model->signName = $map['SignName']; + } + + if (isset($map['State'])) { + $model->state = $map['State']; + } + + if (isset($map['Status'])) { + $model->status = $map['Status']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterResponse.php new file mode 100644 index 0000000..e0693f8 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = QuerySmsAuthorizationLetterResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterResponseBody.php new file mode 100644 index 0000000..43ff05c --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterResponseBody.php @@ -0,0 +1,136 @@ + 'AccessDeniedDetail', + 'code' => 'Code', + 'data' => 'Data', + 'message' => 'Message', + 'requestId' => 'RequestId', + 'success' => 'Success', + ]; + + public function validate() + { + if (\is_array($this->data)) { + Model::validateArray($this->data); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessDeniedDetail) { + $res['AccessDeniedDetail'] = $this->accessDeniedDetail; + } + + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->data) { + if (\is_array($this->data)) { + $res['Data'] = []; + $n1 = 0; + foreach ($this->data as $item1) { + $res['Data'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; + } + } + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AccessDeniedDetail'])) { + $model->accessDeniedDetail = $map['AccessDeniedDetail']; + } + + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Data'])) { + if (!empty($map['Data'])) { + $model->data = []; + $n1 = 0; + foreach ($map['Data'] as $item1) { + $model->data[$n1] = data::fromMap($item1); + ++$n1; + } + } + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterResponseBody/data.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterResponseBody/data.php new file mode 100644 index 0000000..6bd336d --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterResponseBody/data.php @@ -0,0 +1,174 @@ + 'Authorization', + 'authorizationLetterExpDate' => 'AuthorizationLetterExpDate', + 'authorizationLetterId' => 'AuthorizationLetterId', + 'authorizationLetterName' => 'AuthorizationLetterName', + 'authorizationLetterPic' => 'AuthorizationLetterPic', + 'organizationCode' => 'OrganizationCode', + 'proxyAuthorization' => 'ProxyAuthorization', + 'signScope' => 'SignScope', + 'state' => 'State', + 'status' => 'Status', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->authorization) { + $res['Authorization'] = $this->authorization; + } + + if (null !== $this->authorizationLetterExpDate) { + $res['AuthorizationLetterExpDate'] = $this->authorizationLetterExpDate; + } + + if (null !== $this->authorizationLetterId) { + $res['AuthorizationLetterId'] = $this->authorizationLetterId; + } + + if (null !== $this->authorizationLetterName) { + $res['AuthorizationLetterName'] = $this->authorizationLetterName; + } + + if (null !== $this->authorizationLetterPic) { + $res['AuthorizationLetterPic'] = $this->authorizationLetterPic; + } + + if (null !== $this->organizationCode) { + $res['OrganizationCode'] = $this->organizationCode; + } + + if (null !== $this->proxyAuthorization) { + $res['ProxyAuthorization'] = $this->proxyAuthorization; + } + + if (null !== $this->signScope) { + $res['SignScope'] = $this->signScope; + } + + if (null !== $this->state) { + $res['State'] = $this->state; + } + + if (null !== $this->status) { + $res['Status'] = $this->status; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['Authorization'])) { + $model->authorization = $map['Authorization']; + } + + if (isset($map['AuthorizationLetterExpDate'])) { + $model->authorizationLetterExpDate = $map['AuthorizationLetterExpDate']; + } + + if (isset($map['AuthorizationLetterId'])) { + $model->authorizationLetterId = $map['AuthorizationLetterId']; + } + + if (isset($map['AuthorizationLetterName'])) { + $model->authorizationLetterName = $map['AuthorizationLetterName']; + } + + if (isset($map['AuthorizationLetterPic'])) { + $model->authorizationLetterPic = $map['AuthorizationLetterPic']; + } + + if (isset($map['OrganizationCode'])) { + $model->organizationCode = $map['OrganizationCode']; + } + + if (isset($map['ProxyAuthorization'])) { + $model->proxyAuthorization = $map['ProxyAuthorization']; + } + + if (isset($map['SignScope'])) { + $model->signScope = $map['SignScope']; + } + + if (isset($map['State'])) { + $model->state = $map['State']; + } + + if (isset($map['Status'])) { + $model->status = $map['Status']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterShrinkRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterShrinkRequest.php new file mode 100644 index 0000000..772dcbc --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterShrinkRequest.php @@ -0,0 +1,146 @@ + 'AuthorizationLetterIdList', + 'organizationCode' => 'OrganizationCode', + 'ownerId' => 'OwnerId', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'signName' => 'SignName', + 'state' => 'State', + 'status' => 'Status', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->authorizationLetterIdListShrink) { + $res['AuthorizationLetterIdList'] = $this->authorizationLetterIdListShrink; + } + + if (null !== $this->organizationCode) { + $res['OrganizationCode'] = $this->organizationCode; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->signName) { + $res['SignName'] = $this->signName; + } + + if (null !== $this->state) { + $res['State'] = $this->state; + } + + if (null !== $this->status) { + $res['Status'] = $this->status; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AuthorizationLetterIdList'])) { + $model->authorizationLetterIdListShrink = $map['AuthorizationLetterIdList']; + } + + if (isset($map['OrganizationCode'])) { + $model->organizationCode = $map['OrganizationCode']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['SignName'])) { + $model->signName = $map['SignName']; + } + + if (isset($map['State'])) { + $model->state = $map['State']; + } + + if (isset($map['Status'])) { + $model->status = $map['Status']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordRequest.php new file mode 100644 index 0000000..7f180f6 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordRequest.php @@ -0,0 +1,188 @@ + 'CompanyName', + 'legalPersonName' => 'LegalPersonName', + 'ownerId' => 'OwnerId', + 'pageNo' => 'PageNo', + 'pageSize' => 'PageSize', + 'qualificationGroupName' => 'QualificationGroupName', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'state' => 'State', + 'useBySelf' => 'UseBySelf', + 'workOrderId' => 'WorkOrderId', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->companyName) { + $res['CompanyName'] = $this->companyName; + } + + if (null !== $this->legalPersonName) { + $res['LegalPersonName'] = $this->legalPersonName; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->pageNo) { + $res['PageNo'] = $this->pageNo; + } + + if (null !== $this->pageSize) { + $res['PageSize'] = $this->pageSize; + } + + if (null !== $this->qualificationGroupName) { + $res['QualificationGroupName'] = $this->qualificationGroupName; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->state) { + $res['State'] = $this->state; + } + + if (null !== $this->useBySelf) { + $res['UseBySelf'] = $this->useBySelf; + } + + if (null !== $this->workOrderId) { + $res['WorkOrderId'] = $this->workOrderId; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['CompanyName'])) { + $model->companyName = $map['CompanyName']; + } + + if (isset($map['LegalPersonName'])) { + $model->legalPersonName = $map['LegalPersonName']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['PageNo'])) { + $model->pageNo = $map['PageNo']; + } + + if (isset($map['PageSize'])) { + $model->pageSize = $map['PageSize']; + } + + if (isset($map['QualificationGroupName'])) { + $model->qualificationGroupName = $map['QualificationGroupName']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['State'])) { + $model->state = $map['State']; + } + + if (isset($map['UseBySelf'])) { + $model->useBySelf = $map['UseBySelf']; + } + + if (isset($map['WorkOrderId'])) { + $model->workOrderId = $map['WorkOrderId']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordResponse.php new file mode 100644 index 0000000..9abbcbf --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = QuerySmsQualificationRecordResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordResponseBody.php new file mode 100644 index 0000000..1de952a --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordResponseBody.php @@ -0,0 +1,122 @@ + 'AccessDeniedDetail', + 'code' => 'Code', + 'data' => 'Data', + 'message' => 'Message', + 'requestId' => 'RequestId', + 'success' => 'Success', + ]; + + public function validate() + { + if (null !== $this->data) { + $this->data->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessDeniedDetail) { + $res['AccessDeniedDetail'] = $this->accessDeniedDetail; + } + + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->data) { + $res['Data'] = null !== $this->data ? $this->data->toArray($noStream) : $this->data; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AccessDeniedDetail'])) { + $model->accessDeniedDetail = $map['AccessDeniedDetail']; + } + + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Data'])) { + $model->data = data::fromMap($map['Data']); + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordResponseBody/data.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordResponseBody/data.php new file mode 100644 index 0000000..9682d31 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordResponseBody/data.php @@ -0,0 +1,108 @@ + 'List', + 'pageNo' => 'PageNo', + 'pageSize' => 'PageSize', + 'total' => 'Total', + ]; + + public function validate() + { + if (\is_array($this->list)) { + Model::validateArray($this->list); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->list) { + if (\is_array($this->list)) { + $res['List'] = []; + $n1 = 0; + foreach ($this->list as $item1) { + $res['List'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; + } + } + } + + if (null !== $this->pageNo) { + $res['PageNo'] = $this->pageNo; + } + + if (null !== $this->pageSize) { + $res['PageSize'] = $this->pageSize; + } + + if (null !== $this->total) { + $res['Total'] = $this->total; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['List'])) { + if (!empty($map['List'])) { + $model->list = []; + $n1 = 0; + foreach ($map['List'] as $item1) { + $model->list[$n1] = list_::fromMap($item1); + ++$n1; + } + } + } + + if (isset($map['PageNo'])) { + $model->pageNo = $map['PageNo']; + } + + if (isset($map['PageSize'])) { + $model->pageSize = $map['PageSize']; + } + + if (isset($map['Total'])) { + $model->total = $map['Total']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordResponseBody/data/list_.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordResponseBody/data/list_.php new file mode 100644 index 0000000..b5600bd --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordResponseBody/data/list_.php @@ -0,0 +1,174 @@ + 'AuditRemark', + 'auditTime' => 'AuditTime', + 'companyName' => 'CompanyName', + 'createDate' => 'CreateDate', + 'groupId' => 'GroupId', + 'legalPersonName' => 'LegalPersonName', + 'qualificationGroupName' => 'QualificationGroupName', + 'stateName' => 'StateName', + 'useBySelf' => 'UseBySelf', + 'workOrderId' => 'WorkOrderId', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->auditRemark) { + $res['AuditRemark'] = $this->auditRemark; + } + + if (null !== $this->auditTime) { + $res['AuditTime'] = $this->auditTime; + } + + if (null !== $this->companyName) { + $res['CompanyName'] = $this->companyName; + } + + if (null !== $this->createDate) { + $res['CreateDate'] = $this->createDate; + } + + if (null !== $this->groupId) { + $res['GroupId'] = $this->groupId; + } + + if (null !== $this->legalPersonName) { + $res['LegalPersonName'] = $this->legalPersonName; + } + + if (null !== $this->qualificationGroupName) { + $res['QualificationGroupName'] = $this->qualificationGroupName; + } + + if (null !== $this->stateName) { + $res['StateName'] = $this->stateName; + } + + if (null !== $this->useBySelf) { + $res['UseBySelf'] = $this->useBySelf; + } + + if (null !== $this->workOrderId) { + $res['WorkOrderId'] = $this->workOrderId; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AuditRemark'])) { + $model->auditRemark = $map['AuditRemark']; + } + + if (isset($map['AuditTime'])) { + $model->auditTime = $map['AuditTime']; + } + + if (isset($map['CompanyName'])) { + $model->companyName = $map['CompanyName']; + } + + if (isset($map['CreateDate'])) { + $model->createDate = $map['CreateDate']; + } + + if (isset($map['GroupId'])) { + $model->groupId = $map['GroupId']; + } + + if (isset($map['LegalPersonName'])) { + $model->legalPersonName = $map['LegalPersonName']; + } + + if (isset($map['QualificationGroupName'])) { + $model->qualificationGroupName = $map['QualificationGroupName']; + } + + if (isset($map['StateName'])) { + $model->stateName = $map['StateName']; + } + + if (isset($map['UseBySelf'])) { + $model->useBySelf = $map['UseBySelf']; + } + + if (isset($map['WorkOrderId'])) { + $model->workOrderId = $map['WorkOrderId']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListRequest.php index 8ef6fa1..2119866 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListRequest.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListRequest.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class QuerySmsSignListRequest extends Model { @@ -33,32 +33,37 @@ class QuerySmsSignListRequest extends Model */ public $resourceOwnerId; protected $_name = [ - 'ownerId' => 'OwnerId', - 'pageIndex' => 'PageIndex', - 'pageSize' => 'PageSize', + 'ownerId' => 'OwnerId', + 'pageIndex' => 'PageIndex', + 'pageSize' => 'PageSize', 'resourceOwnerAccount' => 'ResourceOwnerAccount', - 'resourceOwnerId' => 'ResourceOwnerId', + 'resourceOwnerId' => 'ResourceOwnerId', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->ownerId) { $res['OwnerId'] = $this->ownerId; } + if (null !== $this->pageIndex) { $res['PageIndex'] = $this->pageIndex; } + if (null !== $this->pageSize) { $res['PageSize'] = $this->pageSize; } + if (null !== $this->resourceOwnerAccount) { $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; } + if (null !== $this->resourceOwnerId) { $res['ResourceOwnerId'] = $this->resourceOwnerId; } @@ -66,26 +71,30 @@ class QuerySmsSignListRequest extends Model return $res; } - /** - * @param array $map - * - * @return QuerySmsSignListRequest - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['OwnerId'])) { $model->ownerId = $map['OwnerId']; } + if (isset($map['PageIndex'])) { $model->pageIndex = $map['PageIndex']; } + if (isset($map['PageSize'])) { $model->pageSize = $map['PageSize']; } + if (isset($map['ResourceOwnerAccount'])) { $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; } + if (isset($map['ResourceOwnerId'])) { $model->resourceOwnerId = $map['ResourceOwnerId']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListResponse.php index b11100d..44bc154 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListResponse.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListResponse.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class QuerySmsSignListResponse extends Model { @@ -23,48 +23,66 @@ class QuerySmsSignListResponse extends Model */ public $body; protected $_name = [ - 'headers' => 'headers', + 'headers' => 'headers', 'statusCode' => 'statusCode', - 'body' => 'body', + 'body' => 'body', ]; public function validate() { - Model::validateRequired('headers', $this->headers, true); - Model::validateRequired('statusCode', $this->statusCode, true); - Model::validateRequired('body', $this->body, true); + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->headers) { - $res['headers'] = $this->headers; + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } } + if (null !== $this->statusCode) { $res['statusCode'] = $this->statusCode; } + if (null !== $this->body) { - $res['body'] = null !== $this->body ? $this->body->toMap() : null; + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; } return $res; } - /** - * @param array $map - * - * @return QuerySmsSignListResponse - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['headers'])) { - $model->headers = $map['headers']; + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } } + if (isset($map['statusCode'])) { $model->statusCode = $map['statusCode']; } + if (isset($map['body'])) { $model->body = QuerySmsSignListResponseBody::fromMap($map['body']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListResponseBody.php index 82b3798..0c4e95e 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListResponseBody.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListResponseBody.php @@ -4,8 +4,8 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; +use AlibabaCloud\Dara\Model; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsSignListResponseBody\smsSignList; -use AlibabaCloud\Tea\Model; class QuerySmsSignListResponseBody extends Model { @@ -44,46 +44,57 @@ class QuerySmsSignListResponseBody extends Model */ public $totalCount; protected $_name = [ - 'code' => 'Code', + 'code' => 'Code', 'currentPage' => 'CurrentPage', - 'message' => 'Message', - 'pageSize' => 'PageSize', - 'requestId' => 'RequestId', + 'message' => 'Message', + 'pageSize' => 'PageSize', + 'requestId' => 'RequestId', 'smsSignList' => 'SmsSignList', - 'totalCount' => 'TotalCount', + 'totalCount' => 'TotalCount', ]; public function validate() { + if (\is_array($this->smsSignList)) { + Model::validateArray($this->smsSignList); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->code) { $res['Code'] = $this->code; } + if (null !== $this->currentPage) { $res['CurrentPage'] = $this->currentPage; } + if (null !== $this->message) { $res['Message'] = $this->message; } + if (null !== $this->pageSize) { $res['PageSize'] = $this->pageSize; } + if (null !== $this->requestId) { $res['RequestId'] = $this->requestId; } + if (null !== $this->smsSignList) { - $res['SmsSignList'] = []; - if (null !== $this->smsSignList && \is_array($this->smsSignList)) { - $n = 0; - foreach ($this->smsSignList as $item) { - $res['SmsSignList'][$n++] = null !== $item ? $item->toMap() : $item; + if (\is_array($this->smsSignList)) { + $res['SmsSignList'] = []; + $n1 = 0; + foreach ($this->smsSignList as $item1) { + $res['SmsSignList'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; } } } + if (null !== $this->totalCount) { $res['TotalCount'] = $this->totalCount; } @@ -91,38 +102,45 @@ class QuerySmsSignListResponseBody extends Model return $res; } - /** - * @param array $map - * - * @return QuerySmsSignListResponseBody - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Code'])) { $model->code = $map['Code']; } + if (isset($map['CurrentPage'])) { $model->currentPage = $map['CurrentPage']; } + if (isset($map['Message'])) { $model->message = $map['Message']; } + if (isset($map['PageSize'])) { $model->pageSize = $map['PageSize']; } + if (isset($map['RequestId'])) { $model->requestId = $map['RequestId']; } + if (isset($map['SmsSignList'])) { if (!empty($map['SmsSignList'])) { $model->smsSignList = []; - $n = 0; - foreach ($map['SmsSignList'] as $item) { - $model->smsSignList[$n++] = null !== $item ? smsSignList::fromMap($item) : $item; + $n1 = 0; + foreach ($map['SmsSignList'] as $item1) { + $model->smsSignList[$n1] = smsSignList::fromMap($item1); + ++$n1; } } } + if (isset($map['TotalCount'])) { $model->totalCount = $map['TotalCount']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListResponseBody/smsSignList.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListResponseBody/smsSignList.php index 370f2f9..8a5e854 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListResponseBody/smsSignList.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListResponseBody/smsSignList.php @@ -4,16 +4,26 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsSignListResponseBody; +use AlibabaCloud\Dara\Model; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsSignListResponseBody\smsSignList\reason; -use AlibabaCloud\Tea\Model; class smsSignList extends Model { + /** + * @var int + */ + public $appIcpRecordId; + /** * @var string */ public $auditStatus; + /** + * @var int + */ + public $authorizationLetterId; + /** * @var string */ @@ -38,71 +48,131 @@ class smsSignList extends Model * @var string */ public $signName; + + /** + * @var int + */ + public $trademarkId; + + /** + * @var bool + */ + public $authorizationLetterAuditPass; protected $_name = [ - 'auditStatus' => 'AuditStatus', + 'appIcpRecordId' => 'AppIcpRecordId', + 'auditStatus' => 'AuditStatus', + 'authorizationLetterId' => 'AuthorizationLetterId', 'businessType' => 'BusinessType', - 'createDate' => 'CreateDate', - 'orderId' => 'OrderId', - 'reason' => 'Reason', - 'signName' => 'SignName', + 'createDate' => 'CreateDate', + 'orderId' => 'OrderId', + 'reason' => 'Reason', + 'signName' => 'SignName', + 'trademarkId' => 'TrademarkId', + 'authorizationLetterAuditPass' => 'authorizationLetterAuditPass', ]; public function validate() { + if (null !== $this->reason) { + $this->reason->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; + if (null !== $this->appIcpRecordId) { + $res['AppIcpRecordId'] = $this->appIcpRecordId; + } + if (null !== $this->auditStatus) { $res['AuditStatus'] = $this->auditStatus; } + + if (null !== $this->authorizationLetterId) { + $res['AuthorizationLetterId'] = $this->authorizationLetterId; + } + if (null !== $this->businessType) { $res['BusinessType'] = $this->businessType; } + if (null !== $this->createDate) { $res['CreateDate'] = $this->createDate; } + if (null !== $this->orderId) { $res['OrderId'] = $this->orderId; } + if (null !== $this->reason) { - $res['Reason'] = null !== $this->reason ? $this->reason->toMap() : null; + $res['Reason'] = null !== $this->reason ? $this->reason->toArray($noStream) : $this->reason; } + if (null !== $this->signName) { $res['SignName'] = $this->signName; } + if (null !== $this->trademarkId) { + $res['TrademarkId'] = $this->trademarkId; + } + + if (null !== $this->authorizationLetterAuditPass) { + $res['authorizationLetterAuditPass'] = $this->authorizationLetterAuditPass; + } + return $res; } - /** - * @param array $map - * - * @return smsSignList - */ + 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['AuditStatus'])) { $model->auditStatus = $map['AuditStatus']; } + + if (isset($map['AuthorizationLetterId'])) { + $model->authorizationLetterId = $map['AuthorizationLetterId']; + } + if (isset($map['BusinessType'])) { $model->businessType = $map['BusinessType']; } + if (isset($map['CreateDate'])) { $model->createDate = $map['CreateDate']; } + if (isset($map['OrderId'])) { $model->orderId = $map['OrderId']; } + if (isset($map['Reason'])) { $model->reason = reason::fromMap($map['Reason']); } + if (isset($map['SignName'])) { $model->signName = $map['SignName']; } + if (isset($map['TrademarkId'])) { + $model->trademarkId = $map['TrademarkId']; + } + + if (isset($map['authorizationLetterAuditPass'])) { + $model->authorizationLetterAuditPass = $map['authorizationLetterAuditPass']; + } + return $model; } } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListResponseBody/smsSignList/reason.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListResponseBody/smsSignList/reason.php index fe017d1..99d02df 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListResponseBody/smsSignList/reason.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListResponseBody/smsSignList/reason.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsSignListResponseBody\smsSignList; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class reason extends Model { @@ -23,24 +23,27 @@ class reason extends Model */ public $rejectSubInfo; protected $_name = [ - 'rejectDate' => 'RejectDate', - 'rejectInfo' => 'RejectInfo', + 'rejectDate' => 'RejectDate', + 'rejectInfo' => 'RejectInfo', 'rejectSubInfo' => 'RejectSubInfo', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->rejectDate) { $res['RejectDate'] = $this->rejectDate; } + if (null !== $this->rejectInfo) { $res['RejectInfo'] = $this->rejectInfo; } + if (null !== $this->rejectSubInfo) { $res['RejectSubInfo'] = $this->rejectSubInfo; } @@ -48,20 +51,22 @@ class reason extends Model return $res; } - /** - * @param array $map - * - * @return reason - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['RejectDate'])) { $model->rejectDate = $map['RejectDate']; } + if (isset($map['RejectInfo'])) { $model->rejectInfo = $map['RejectInfo']; } + if (isset($map['RejectSubInfo'])) { $model->rejectSubInfo = $map['RejectSubInfo']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignRequest.php index fbf1450..7ecfb5b 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignRequest.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignRequest.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class QuerySmsSignRequest extends Model { @@ -28,28 +28,32 @@ class QuerySmsSignRequest extends Model */ public $signName; protected $_name = [ - 'ownerId' => 'OwnerId', + 'ownerId' => 'OwnerId', 'resourceOwnerAccount' => 'ResourceOwnerAccount', - 'resourceOwnerId' => 'ResourceOwnerId', - 'signName' => 'SignName', + 'resourceOwnerId' => 'ResourceOwnerId', + 'signName' => 'SignName', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->ownerId) { $res['OwnerId'] = $this->ownerId; } + if (null !== $this->resourceOwnerAccount) { $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; } + if (null !== $this->resourceOwnerId) { $res['ResourceOwnerId'] = $this->resourceOwnerId; } + if (null !== $this->signName) { $res['SignName'] = $this->signName; } @@ -57,23 +61,26 @@ class QuerySmsSignRequest extends Model return $res; } - /** - * @param array $map - * - * @return QuerySmsSignRequest - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['OwnerId'])) { $model->ownerId = $map['OwnerId']; } + if (isset($map['ResourceOwnerAccount'])) { $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; } + if (isset($map['ResourceOwnerId'])) { $model->resourceOwnerId = $map['ResourceOwnerId']; } + if (isset($map['SignName'])) { $model->signName = $map['SignName']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignResponse.php index d6d130a..a1c917a 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignResponse.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignResponse.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class QuerySmsSignResponse extends Model { @@ -23,48 +23,66 @@ class QuerySmsSignResponse extends Model */ public $body; protected $_name = [ - 'headers' => 'headers', + 'headers' => 'headers', 'statusCode' => 'statusCode', - 'body' => 'body', + 'body' => 'body', ]; public function validate() { - Model::validateRequired('headers', $this->headers, true); - Model::validateRequired('statusCode', $this->statusCode, true); - Model::validateRequired('body', $this->body, true); + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->headers) { - $res['headers'] = $this->headers; + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } } + if (null !== $this->statusCode) { $res['statusCode'] = $this->statusCode; } + if (null !== $this->body) { - $res['body'] = null !== $this->body ? $this->body->toMap() : null; + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; } return $res; } - /** - * @param array $map - * - * @return QuerySmsSignResponse - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['headers'])) { - $model->headers = $map['headers']; + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } } + if (isset($map['statusCode'])) { $model->statusCode = $map['statusCode']; } + if (isset($map['body'])) { $model->body = QuerySmsSignResponseBody::fromMap($map['body']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignResponseBody.php index e2e28d7..895f38b 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignResponseBody.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignResponseBody.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class QuerySmsSignResponseBody extends Model { @@ -43,40 +43,47 @@ class QuerySmsSignResponseBody extends Model */ public $signStatus; protected $_name = [ - 'code' => 'Code', + 'code' => 'Code', 'createDate' => 'CreateDate', - 'message' => 'Message', - 'reason' => 'Reason', - 'requestId' => 'RequestId', - 'signName' => 'SignName', + 'message' => 'Message', + 'reason' => 'Reason', + 'requestId' => 'RequestId', + 'signName' => 'SignName', 'signStatus' => 'SignStatus', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->code) { $res['Code'] = $this->code; } + if (null !== $this->createDate) { $res['CreateDate'] = $this->createDate; } + if (null !== $this->message) { $res['Message'] = $this->message; } + if (null !== $this->reason) { $res['Reason'] = $this->reason; } + if (null !== $this->requestId) { $res['RequestId'] = $this->requestId; } + if (null !== $this->signName) { $res['SignName'] = $this->signName; } + if (null !== $this->signStatus) { $res['SignStatus'] = $this->signStatus; } @@ -84,32 +91,38 @@ class QuerySmsSignResponseBody extends Model return $res; } - /** - * @param array $map - * - * @return QuerySmsSignResponseBody - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Code'])) { $model->code = $map['Code']; } + if (isset($map['CreateDate'])) { $model->createDate = $map['CreateDate']; } + if (isset($map['Message'])) { $model->message = $map['Message']; } + if (isset($map['Reason'])) { $model->reason = $map['Reason']; } + if (isset($map['RequestId'])) { $model->requestId = $map['RequestId']; } + if (isset($map['SignName'])) { $model->signName = $map['SignName']; } + if (isset($map['SignStatus'])) { $model->signStatus = $map['SignStatus']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListRequest.php index 10b758e..6dca125 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListRequest.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListRequest.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class QuerySmsTemplateListRequest extends Model { @@ -33,32 +33,37 @@ class QuerySmsTemplateListRequest extends Model */ public $resourceOwnerId; protected $_name = [ - 'ownerId' => 'OwnerId', - 'pageIndex' => 'PageIndex', - 'pageSize' => 'PageSize', + 'ownerId' => 'OwnerId', + 'pageIndex' => 'PageIndex', + 'pageSize' => 'PageSize', 'resourceOwnerAccount' => 'ResourceOwnerAccount', - 'resourceOwnerId' => 'ResourceOwnerId', + 'resourceOwnerId' => 'ResourceOwnerId', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->ownerId) { $res['OwnerId'] = $this->ownerId; } + if (null !== $this->pageIndex) { $res['PageIndex'] = $this->pageIndex; } + if (null !== $this->pageSize) { $res['PageSize'] = $this->pageSize; } + if (null !== $this->resourceOwnerAccount) { $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; } + if (null !== $this->resourceOwnerId) { $res['ResourceOwnerId'] = $this->resourceOwnerId; } @@ -66,26 +71,30 @@ class QuerySmsTemplateListRequest extends Model return $res; } - /** - * @param array $map - * - * @return QuerySmsTemplateListRequest - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['OwnerId'])) { $model->ownerId = $map['OwnerId']; } + if (isset($map['PageIndex'])) { $model->pageIndex = $map['PageIndex']; } + if (isset($map['PageSize'])) { $model->pageSize = $map['PageSize']; } + if (isset($map['ResourceOwnerAccount'])) { $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; } + if (isset($map['ResourceOwnerId'])) { $model->resourceOwnerId = $map['ResourceOwnerId']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListResponse.php index 53668bb..cb8ba03 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListResponse.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListResponse.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class QuerySmsTemplateListResponse extends Model { @@ -23,48 +23,66 @@ class QuerySmsTemplateListResponse extends Model */ public $body; protected $_name = [ - 'headers' => 'headers', + 'headers' => 'headers', 'statusCode' => 'statusCode', - 'body' => 'body', + 'body' => 'body', ]; public function validate() { - Model::validateRequired('headers', $this->headers, true); - Model::validateRequired('statusCode', $this->statusCode, true); - Model::validateRequired('body', $this->body, true); + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->headers) { - $res['headers'] = $this->headers; + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } } + if (null !== $this->statusCode) { $res['statusCode'] = $this->statusCode; } + if (null !== $this->body) { - $res['body'] = null !== $this->body ? $this->body->toMap() : null; + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; } return $res; } - /** - * @param array $map - * - * @return QuerySmsTemplateListResponse - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['headers'])) { - $model->headers = $map['headers']; + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } } + if (isset($map['statusCode'])) { $model->statusCode = $map['statusCode']; } + if (isset($map['body'])) { $model->body = QuerySmsTemplateListResponseBody::fromMap($map['body']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListResponseBody.php index f8ecb46..45c2a1e 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListResponseBody.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListResponseBody.php @@ -4,8 +4,8 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; +use AlibabaCloud\Dara\Model; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsTemplateListResponseBody\smsTemplateList; -use AlibabaCloud\Tea\Model; class QuerySmsTemplateListResponseBody extends Model { @@ -44,46 +44,57 @@ class QuerySmsTemplateListResponseBody extends Model */ public $totalCount; protected $_name = [ - 'code' => 'Code', - 'currentPage' => 'CurrentPage', - 'message' => 'Message', - 'pageSize' => 'PageSize', - 'requestId' => 'RequestId', + 'code' => 'Code', + 'currentPage' => 'CurrentPage', + 'message' => 'Message', + 'pageSize' => 'PageSize', + 'requestId' => 'RequestId', 'smsTemplateList' => 'SmsTemplateList', - 'totalCount' => 'TotalCount', + 'totalCount' => 'TotalCount', ]; public function validate() { + if (\is_array($this->smsTemplateList)) { + Model::validateArray($this->smsTemplateList); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->code) { $res['Code'] = $this->code; } + if (null !== $this->currentPage) { $res['CurrentPage'] = $this->currentPage; } + if (null !== $this->message) { $res['Message'] = $this->message; } + if (null !== $this->pageSize) { $res['PageSize'] = $this->pageSize; } + if (null !== $this->requestId) { $res['RequestId'] = $this->requestId; } + if (null !== $this->smsTemplateList) { - $res['SmsTemplateList'] = []; - if (null !== $this->smsTemplateList && \is_array($this->smsTemplateList)) { - $n = 0; - foreach ($this->smsTemplateList as $item) { - $res['SmsTemplateList'][$n++] = null !== $item ? $item->toMap() : $item; + if (\is_array($this->smsTemplateList)) { + $res['SmsTemplateList'] = []; + $n1 = 0; + foreach ($this->smsTemplateList as $item1) { + $res['SmsTemplateList'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; } } } + if (null !== $this->totalCount) { $res['TotalCount'] = $this->totalCount; } @@ -91,38 +102,45 @@ class QuerySmsTemplateListResponseBody extends Model return $res; } - /** - * @param array $map - * - * @return QuerySmsTemplateListResponseBody - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Code'])) { $model->code = $map['Code']; } + if (isset($map['CurrentPage'])) { $model->currentPage = $map['CurrentPage']; } + if (isset($map['Message'])) { $model->message = $map['Message']; } + if (isset($map['PageSize'])) { $model->pageSize = $map['PageSize']; } + if (isset($map['RequestId'])) { $model->requestId = $map['RequestId']; } + if (isset($map['SmsTemplateList'])) { if (!empty($map['SmsTemplateList'])) { $model->smsTemplateList = []; - $n = 0; - foreach ($map['SmsTemplateList'] as $item) { - $model->smsTemplateList[$n++] = null !== $item ? smsTemplateList::fromMap($item) : $item; + $n1 = 0; + foreach ($map['SmsTemplateList'] as $item1) { + $model->smsTemplateList[$n1] = smsTemplateList::fromMap($item1); + ++$n1; } } } + if (isset($map['TotalCount'])) { $model->totalCount = $map['TotalCount']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListResponseBody/smsTemplateList.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListResponseBody/smsTemplateList.php index fb93f21..13b1442 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListResponseBody/smsTemplateList.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListResponseBody/smsTemplateList.php @@ -4,8 +4,8 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsTemplateListResponseBody; +use AlibabaCloud\Dara\Model; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsTemplateListResponseBody\smsTemplateList\reason; -use AlibabaCloud\Tea\Model; class smsTemplateList extends Model { @@ -34,6 +34,11 @@ class smsTemplateList extends Model */ public $reason; + /** + * @var string + */ + public $signatureName; + /** * @var string */ @@ -53,92 +58,135 @@ class smsTemplateList extends Model * @var int */ public $templateType; + + /** + * @var string + */ + public $trafficDriving; protected $_name = [ - 'auditStatus' => 'AuditStatus', - 'createDate' => 'CreateDate', - 'orderId' => 'OrderId', + 'auditStatus' => 'AuditStatus', + 'createDate' => 'CreateDate', + 'orderId' => 'OrderId', 'outerTemplateType' => 'OuterTemplateType', - 'reason' => 'Reason', - 'templateCode' => 'TemplateCode', - 'templateContent' => 'TemplateContent', - 'templateName' => 'TemplateName', - 'templateType' => 'TemplateType', + 'reason' => 'Reason', + 'signatureName' => 'SignatureName', + 'templateCode' => 'TemplateCode', + 'templateContent' => 'TemplateContent', + 'templateName' => 'TemplateName', + 'templateType' => 'TemplateType', + 'trafficDriving' => 'TrafficDriving', ]; public function validate() { + if (null !== $this->reason) { + $this->reason->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->auditStatus) { $res['AuditStatus'] = $this->auditStatus; } + if (null !== $this->createDate) { $res['CreateDate'] = $this->createDate; } + if (null !== $this->orderId) { $res['OrderId'] = $this->orderId; } + if (null !== $this->outerTemplateType) { $res['OuterTemplateType'] = $this->outerTemplateType; } + if (null !== $this->reason) { - $res['Reason'] = null !== $this->reason ? $this->reason->toMap() : null; + $res['Reason'] = null !== $this->reason ? $this->reason->toArray($noStream) : $this->reason; } + + if (null !== $this->signatureName) { + $res['SignatureName'] = $this->signatureName; + } + if (null !== $this->templateCode) { $res['TemplateCode'] = $this->templateCode; } + if (null !== $this->templateContent) { $res['TemplateContent'] = $this->templateContent; } + if (null !== $this->templateName) { $res['TemplateName'] = $this->templateName; } + if (null !== $this->templateType) { $res['TemplateType'] = $this->templateType; } + if (null !== $this->trafficDriving) { + $res['TrafficDriving'] = $this->trafficDriving; + } + return $res; } - /** - * @param array $map - * - * @return smsTemplateList - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['AuditStatus'])) { $model->auditStatus = $map['AuditStatus']; } + if (isset($map['CreateDate'])) { $model->createDate = $map['CreateDate']; } + if (isset($map['OrderId'])) { $model->orderId = $map['OrderId']; } + if (isset($map['OuterTemplateType'])) { $model->outerTemplateType = $map['OuterTemplateType']; } + if (isset($map['Reason'])) { $model->reason = reason::fromMap($map['Reason']); } + + if (isset($map['SignatureName'])) { + $model->signatureName = $map['SignatureName']; + } + if (isset($map['TemplateCode'])) { $model->templateCode = $map['TemplateCode']; } + if (isset($map['TemplateContent'])) { $model->templateContent = $map['TemplateContent']; } + if (isset($map['TemplateName'])) { $model->templateName = $map['TemplateName']; } + if (isset($map['TemplateType'])) { $model->templateType = $map['TemplateType']; } + if (isset($map['TrafficDriving'])) { + $model->trafficDriving = $map['TrafficDriving']; + } + return $model; } } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListResponseBody/smsTemplateList/reason.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListResponseBody/smsTemplateList/reason.php index d93f43b..639cd85 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListResponseBody/smsTemplateList/reason.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListResponseBody/smsTemplateList/reason.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models\QuerySmsTemplateListResponseBody\smsTemplateList; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class reason extends Model { @@ -23,24 +23,27 @@ class reason extends Model */ public $rejectSubInfo; protected $_name = [ - 'rejectDate' => 'RejectDate', - 'rejectInfo' => 'RejectInfo', + 'rejectDate' => 'RejectDate', + 'rejectInfo' => 'RejectInfo', 'rejectSubInfo' => 'RejectSubInfo', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->rejectDate) { $res['RejectDate'] = $this->rejectDate; } + if (null !== $this->rejectInfo) { $res['RejectInfo'] = $this->rejectInfo; } + if (null !== $this->rejectSubInfo) { $res['RejectSubInfo'] = $this->rejectSubInfo; } @@ -48,20 +51,22 @@ class reason extends Model return $res; } - /** - * @param array $map - * - * @return reason - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['RejectDate'])) { $model->rejectDate = $map['RejectDate']; } + if (isset($map['RejectInfo'])) { $model->rejectInfo = $map['RejectInfo']; } + if (isset($map['RejectSubInfo'])) { $model->rejectSubInfo = $map['RejectSubInfo']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateRequest.php index 9d5305b..29d4f95 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateRequest.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateRequest.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class QuerySmsTemplateRequest extends Model { @@ -28,28 +28,32 @@ class QuerySmsTemplateRequest extends Model */ public $templateCode; protected $_name = [ - 'ownerId' => 'OwnerId', + 'ownerId' => 'OwnerId', 'resourceOwnerAccount' => 'ResourceOwnerAccount', - 'resourceOwnerId' => 'ResourceOwnerId', - 'templateCode' => 'TemplateCode', + 'resourceOwnerId' => 'ResourceOwnerId', + 'templateCode' => 'TemplateCode', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->ownerId) { $res['OwnerId'] = $this->ownerId; } + if (null !== $this->resourceOwnerAccount) { $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; } + if (null !== $this->resourceOwnerId) { $res['ResourceOwnerId'] = $this->resourceOwnerId; } + if (null !== $this->templateCode) { $res['TemplateCode'] = $this->templateCode; } @@ -57,23 +61,26 @@ class QuerySmsTemplateRequest extends Model return $res; } - /** - * @param array $map - * - * @return QuerySmsTemplateRequest - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['OwnerId'])) { $model->ownerId = $map['OwnerId']; } + if (isset($map['ResourceOwnerAccount'])) { $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; } + if (isset($map['ResourceOwnerId'])) { $model->resourceOwnerId = $map['ResourceOwnerId']; } + if (isset($map['TemplateCode'])) { $model->templateCode = $map['TemplateCode']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateResponse.php index 6c3083c..335b81a 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateResponse.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateResponse.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class QuerySmsTemplateResponse extends Model { @@ -23,48 +23,66 @@ class QuerySmsTemplateResponse extends Model */ public $body; protected $_name = [ - 'headers' => 'headers', + 'headers' => 'headers', 'statusCode' => 'statusCode', - 'body' => 'body', + 'body' => 'body', ]; public function validate() { - Model::validateRequired('headers', $this->headers, true); - Model::validateRequired('statusCode', $this->statusCode, true); - Model::validateRequired('body', $this->body, true); + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->headers) { - $res['headers'] = $this->headers; + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } } + if (null !== $this->statusCode) { $res['statusCode'] = $this->statusCode; } + if (null !== $this->body) { - $res['body'] = null !== $this->body ? $this->body->toMap() : null; + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; } return $res; } - /** - * @param array $map - * - * @return QuerySmsTemplateResponse - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['headers'])) { - $model->headers = $map['headers']; + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } } + if (isset($map['statusCode'])) { $model->statusCode = $map['statusCode']; } + if (isset($map['body'])) { $model->body = QuerySmsTemplateResponseBody::fromMap($map['body']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateResponseBody.php index 157a1cd..0847c1c 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateResponseBody.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateResponseBody.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class QuerySmsTemplateResponseBody extends Model { @@ -58,52 +58,62 @@ class QuerySmsTemplateResponseBody extends Model */ public $templateType; protected $_name = [ - 'code' => 'Code', - 'createDate' => 'CreateDate', - 'message' => 'Message', - 'reason' => 'Reason', - 'requestId' => 'RequestId', - 'templateCode' => 'TemplateCode', + 'code' => 'Code', + 'createDate' => 'CreateDate', + 'message' => 'Message', + 'reason' => 'Reason', + 'requestId' => 'RequestId', + 'templateCode' => 'TemplateCode', 'templateContent' => 'TemplateContent', - 'templateName' => 'TemplateName', - 'templateStatus' => 'TemplateStatus', - 'templateType' => 'TemplateType', + 'templateName' => 'TemplateName', + 'templateStatus' => 'TemplateStatus', + 'templateType' => 'TemplateType', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->code) { $res['Code'] = $this->code; } + if (null !== $this->createDate) { $res['CreateDate'] = $this->createDate; } + if (null !== $this->message) { $res['Message'] = $this->message; } + if (null !== $this->reason) { $res['Reason'] = $this->reason; } + if (null !== $this->requestId) { $res['RequestId'] = $this->requestId; } + if (null !== $this->templateCode) { $res['TemplateCode'] = $this->templateCode; } + if (null !== $this->templateContent) { $res['TemplateContent'] = $this->templateContent; } + if (null !== $this->templateName) { $res['TemplateName'] = $this->templateName; } + if (null !== $this->templateStatus) { $res['TemplateStatus'] = $this->templateStatus; } + if (null !== $this->templateType) { $res['TemplateType'] = $this->templateType; } @@ -111,41 +121,50 @@ class QuerySmsTemplateResponseBody extends Model return $res; } - /** - * @param array $map - * - * @return QuerySmsTemplateResponseBody - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Code'])) { $model->code = $map['Code']; } + if (isset($map['CreateDate'])) { $model->createDate = $map['CreateDate']; } + if (isset($map['Message'])) { $model->message = $map['Message']; } + if (isset($map['Reason'])) { $model->reason = $map['Reason']; } + if (isset($map['RequestId'])) { $model->requestId = $map['RequestId']; } + if (isset($map['TemplateCode'])) { $model->templateCode = $map['TemplateCode']; } + if (isset($map['TemplateContent'])) { $model->templateContent = $map['TemplateContent']; } + if (isset($map['TemplateName'])) { $model->templateName = $map['TemplateName']; } + if (isset($map['TemplateStatus'])) { $model->templateStatus = $map['TemplateStatus']; } + if (isset($map['TemplateType'])) { $model->templateType = $map['TemplateType']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkRequest.php new file mode 100644 index 0000000..ab94954 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkRequest.php @@ -0,0 +1,107 @@ + 'OwnerId', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'trademarkIdList' => 'TrademarkIdList', + ]; + + public function validate() + { + if (\is_array($this->trademarkIdList)) { + Model::validateArray($this->trademarkIdList); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->trademarkIdList) { + if (\is_array($this->trademarkIdList)) { + $res['TrademarkIdList'] = []; + $n1 = 0; + foreach ($this->trademarkIdList as $item1) { + $res['TrademarkIdList'][$n1] = $item1; + ++$n1; + } + } + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['TrademarkIdList'])) { + if (!empty($map['TrademarkIdList'])) { + $model->trademarkIdList = []; + $n1 = 0; + foreach ($map['TrademarkIdList'] as $item1) { + $model->trademarkIdList[$n1] = $item1; + ++$n1; + } + } + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkResponse.php new file mode 100644 index 0000000..cb93a5a --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = QuerySmsTrademarkResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkResponseBody.php new file mode 100644 index 0000000..9c61291 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkResponseBody.php @@ -0,0 +1,136 @@ + 'AccessDeniedDetail', + 'code' => 'Code', + 'data' => 'Data', + 'message' => 'Message', + 'requestId' => 'RequestId', + 'success' => 'Success', + ]; + + public function validate() + { + if (\is_array($this->data)) { + Model::validateArray($this->data); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessDeniedDetail) { + $res['AccessDeniedDetail'] = $this->accessDeniedDetail; + } + + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->data) { + if (\is_array($this->data)) { + $res['Data'] = []; + $n1 = 0; + foreach ($this->data as $item1) { + $res['Data'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; + } + } + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AccessDeniedDetail'])) { + $model->accessDeniedDetail = $map['AccessDeniedDetail']; + } + + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Data'])) { + if (!empty($map['Data'])) { + $model->data = []; + $n1 = 0; + foreach ($map['Data'] as $item1) { + $model->data[$n1] = data::fromMap($item1); + ++$n1; + } + } + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkResponseBody/data.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkResponseBody/data.php new file mode 100644 index 0000000..fb50f65 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkResponseBody/data.php @@ -0,0 +1,132 @@ + 'TrademarkApplicantName', + 'trademarkEffExpDate' => 'TrademarkEffExpDate', + 'trademarkId' => 'TrademarkId', + 'trademarkName' => 'TrademarkName', + 'trademarkPic' => 'TrademarkPic', + 'trademarkPicUrl' => 'TrademarkPicUrl', + 'trademarkRegistrationNumber' => 'TrademarkRegistrationNumber', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->trademarkApplicantName) { + $res['TrademarkApplicantName'] = $this->trademarkApplicantName; + } + + if (null !== $this->trademarkEffExpDate) { + $res['TrademarkEffExpDate'] = $this->trademarkEffExpDate; + } + + if (null !== $this->trademarkId) { + $res['TrademarkId'] = $this->trademarkId; + } + + if (null !== $this->trademarkName) { + $res['TrademarkName'] = $this->trademarkName; + } + + if (null !== $this->trademarkPic) { + $res['TrademarkPic'] = $this->trademarkPic; + } + + if (null !== $this->trademarkPicUrl) { + $res['TrademarkPicUrl'] = $this->trademarkPicUrl; + } + + if (null !== $this->trademarkRegistrationNumber) { + $res['TrademarkRegistrationNumber'] = $this->trademarkRegistrationNumber; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['TrademarkApplicantName'])) { + $model->trademarkApplicantName = $map['TrademarkApplicantName']; + } + + if (isset($map['TrademarkEffExpDate'])) { + $model->trademarkEffExpDate = $map['TrademarkEffExpDate']; + } + + if (isset($map['TrademarkId'])) { + $model->trademarkId = $map['TrademarkId']; + } + + if (isset($map['TrademarkName'])) { + $model->trademarkName = $map['TrademarkName']; + } + + if (isset($map['TrademarkPic'])) { + $model->trademarkPic = $map['TrademarkPic']; + } + + if (isset($map['TrademarkPicUrl'])) { + $model->trademarkPicUrl = $map['TrademarkPicUrl']; + } + + if (isset($map['TrademarkRegistrationNumber'])) { + $model->trademarkRegistrationNumber = $map['TrademarkRegistrationNumber']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkShrinkRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkShrinkRequest.php new file mode 100644 index 0000000..8a90f98 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkShrinkRequest.php @@ -0,0 +1,90 @@ + 'OwnerId', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'trademarkIdListShrink' => 'TrademarkIdList', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->trademarkIdListShrink) { + $res['TrademarkIdList'] = $this->trademarkIdListShrink; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['TrademarkIdList'])) { + $model->trademarkIdListShrink = $map['TrademarkIdList']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/RequiredPhoneCodeRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/RequiredPhoneCodeRequest.php new file mode 100644 index 0000000..843bc61 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/RequiredPhoneCodeRequest.php @@ -0,0 +1,90 @@ + 'OwnerId', + 'phoneNo' => 'PhoneNo', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->phoneNo) { + $res['PhoneNo'] = $this->phoneNo; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['PhoneNo'])) { + $model->phoneNo = $map['PhoneNo']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/RequiredPhoneCodeResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/RequiredPhoneCodeResponse.php new file mode 100644 index 0000000..0ee3203 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/RequiredPhoneCodeResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = RequiredPhoneCodeResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/RequiredPhoneCodeResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/RequiredPhoneCodeResponseBody.php new file mode 100644 index 0000000..deb0aff --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/RequiredPhoneCodeResponseBody.php @@ -0,0 +1,118 @@ + 'AccessDeniedDetail', + 'code' => 'Code', + 'data' => 'Data', + 'message' => 'Message', + 'requestId' => 'RequestId', + 'success' => 'Success', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessDeniedDetail) { + $res['AccessDeniedDetail'] = $this->accessDeniedDetail; + } + + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->data) { + $res['Data'] = $this->data; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AccessDeniedDetail'])) { + $model->accessDeniedDetail = $map['AccessDeniedDetail']; + } + + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Data'])) { + $model->data = $map['Data']; + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendBatchCardSmsRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendBatchCardSmsRequest.php index 48a517b..f1367ed 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendBatchCardSmsRequest.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendBatchCardSmsRequest.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class SendBatchCardSmsRequest extends Model { @@ -62,106 +62,155 @@ class SendBatchCardSmsRequest extends Model * @var string */ public $smsUpExtendCodeJson; + + /** + * @var string + */ + public $templateCode; + + /** + * @var string + */ + public $templateParamJson; protected $_name = [ - 'cardTemplateCode' => 'CardTemplateCode', - 'cardTemplateParamJson' => 'CardTemplateParamJson', - 'digitalTemplateCode' => 'DigitalTemplateCode', + 'cardTemplateCode' => 'CardTemplateCode', + 'cardTemplateParamJson' => 'CardTemplateParamJson', + 'digitalTemplateCode' => 'DigitalTemplateCode', 'digitalTemplateParamJson' => 'DigitalTemplateParamJson', - 'fallbackType' => 'FallbackType', - 'outId' => 'OutId', - 'phoneNumberJson' => 'PhoneNumberJson', - 'signNameJson' => 'SignNameJson', - 'smsTemplateCode' => 'SmsTemplateCode', - 'smsTemplateParamJson' => 'SmsTemplateParamJson', - 'smsUpExtendCodeJson' => 'SmsUpExtendCodeJson', + 'fallbackType' => 'FallbackType', + 'outId' => 'OutId', + 'phoneNumberJson' => 'PhoneNumberJson', + 'signNameJson' => 'SignNameJson', + 'smsTemplateCode' => 'SmsTemplateCode', + 'smsTemplateParamJson' => 'SmsTemplateParamJson', + 'smsUpExtendCodeJson' => 'SmsUpExtendCodeJson', + 'templateCode' => 'TemplateCode', + 'templateParamJson' => 'TemplateParamJson', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->cardTemplateCode) { $res['CardTemplateCode'] = $this->cardTemplateCode; } + if (null !== $this->cardTemplateParamJson) { $res['CardTemplateParamJson'] = $this->cardTemplateParamJson; } + if (null !== $this->digitalTemplateCode) { $res['DigitalTemplateCode'] = $this->digitalTemplateCode; } + if (null !== $this->digitalTemplateParamJson) { $res['DigitalTemplateParamJson'] = $this->digitalTemplateParamJson; } + if (null !== $this->fallbackType) { $res['FallbackType'] = $this->fallbackType; } + if (null !== $this->outId) { $res['OutId'] = $this->outId; } + if (null !== $this->phoneNumberJson) { $res['PhoneNumberJson'] = $this->phoneNumberJson; } + if (null !== $this->signNameJson) { $res['SignNameJson'] = $this->signNameJson; } + if (null !== $this->smsTemplateCode) { $res['SmsTemplateCode'] = $this->smsTemplateCode; } + if (null !== $this->smsTemplateParamJson) { $res['SmsTemplateParamJson'] = $this->smsTemplateParamJson; } + if (null !== $this->smsUpExtendCodeJson) { $res['SmsUpExtendCodeJson'] = $this->smsUpExtendCodeJson; } + if (null !== $this->templateCode) { + $res['TemplateCode'] = $this->templateCode; + } + + if (null !== $this->templateParamJson) { + $res['TemplateParamJson'] = $this->templateParamJson; + } + return $res; } - /** - * @param array $map - * - * @return SendBatchCardSmsRequest - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['CardTemplateCode'])) { $model->cardTemplateCode = $map['CardTemplateCode']; } + if (isset($map['CardTemplateParamJson'])) { $model->cardTemplateParamJson = $map['CardTemplateParamJson']; } + if (isset($map['DigitalTemplateCode'])) { $model->digitalTemplateCode = $map['DigitalTemplateCode']; } + if (isset($map['DigitalTemplateParamJson'])) { $model->digitalTemplateParamJson = $map['DigitalTemplateParamJson']; } + if (isset($map['FallbackType'])) { $model->fallbackType = $map['FallbackType']; } + if (isset($map['OutId'])) { $model->outId = $map['OutId']; } + if (isset($map['PhoneNumberJson'])) { $model->phoneNumberJson = $map['PhoneNumberJson']; } + if (isset($map['SignNameJson'])) { $model->signNameJson = $map['SignNameJson']; } + if (isset($map['SmsTemplateCode'])) { $model->smsTemplateCode = $map['SmsTemplateCode']; } + if (isset($map['SmsTemplateParamJson'])) { $model->smsTemplateParamJson = $map['SmsTemplateParamJson']; } + if (isset($map['SmsUpExtendCodeJson'])) { $model->smsUpExtendCodeJson = $map['SmsUpExtendCodeJson']; } + if (isset($map['TemplateCode'])) { + $model->templateCode = $map['TemplateCode']; + } + + if (isset($map['TemplateParamJson'])) { + $model->templateParamJson = $map['TemplateParamJson']; + } + return $model; } } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendBatchCardSmsResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendBatchCardSmsResponse.php index c6a3bcc..706c683 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendBatchCardSmsResponse.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendBatchCardSmsResponse.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class SendBatchCardSmsResponse extends Model { @@ -23,48 +23,66 @@ class SendBatchCardSmsResponse extends Model */ public $body; protected $_name = [ - 'headers' => 'headers', + 'headers' => 'headers', 'statusCode' => 'statusCode', - 'body' => 'body', + 'body' => 'body', ]; public function validate() { - Model::validateRequired('headers', $this->headers, true); - Model::validateRequired('statusCode', $this->statusCode, true); - Model::validateRequired('body', $this->body, true); + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->headers) { - $res['headers'] = $this->headers; + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } } + if (null !== $this->statusCode) { $res['statusCode'] = $this->statusCode; } + if (null !== $this->body) { - $res['body'] = null !== $this->body ? $this->body->toMap() : null; + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; } return $res; } - /** - * @param array $map - * - * @return SendBatchCardSmsResponse - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['headers'])) { - $model->headers = $map['headers']; + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } } + if (isset($map['statusCode'])) { $model->statusCode = $map['statusCode']; } + if (isset($map['body'])) { $model->body = SendBatchCardSmsResponseBody::fromMap($map['body']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendBatchCardSmsResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendBatchCardSmsResponseBody.php index 271604e..cb9f328 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendBatchCardSmsResponseBody.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendBatchCardSmsResponseBody.php @@ -4,8 +4,8 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; +use AlibabaCloud\Dara\Model; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SendBatchCardSmsResponseBody\data; -use AlibabaCloud\Tea\Model; class SendBatchCardSmsResponseBody extends Model { @@ -29,28 +29,35 @@ class SendBatchCardSmsResponseBody extends Model */ public $success; protected $_name = [ - 'code' => 'Code', - 'data' => 'Data', + 'code' => 'Code', + 'data' => 'Data', 'requestId' => 'RequestId', - 'success' => 'Success', + 'success' => 'Success', ]; public function validate() { + if (null !== $this->data) { + $this->data->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->code) { $res['Code'] = $this->code; } + if (null !== $this->data) { - $res['Data'] = null !== $this->data ? $this->data->toMap() : null; + $res['Data'] = null !== $this->data ? $this->data->toArray($noStream) : $this->data; } + if (null !== $this->requestId) { $res['RequestId'] = $this->requestId; } + if (null !== $this->success) { $res['Success'] = $this->success; } @@ -58,23 +65,26 @@ class SendBatchCardSmsResponseBody extends Model return $res; } - /** - * @param array $map - * - * @return SendBatchCardSmsResponseBody - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Code'])) { $model->code = $map['Code']; } + if (isset($map['Data'])) { $model->data = data::fromMap($map['Data']); } + if (isset($map['RequestId'])) { $model->requestId = $map['RequestId']; } + if (isset($map['Success'])) { $model->success = $map['Success']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendBatchCardSmsResponseBody/data.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendBatchCardSmsResponseBody/data.php index d50d2e8..c3b8df6 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendBatchCardSmsResponseBody/data.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendBatchCardSmsResponseBody/data.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SendBatchCardSmsResponseBody; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class data extends Model { @@ -38,36 +38,42 @@ class data extends Model */ public $notMediaMobiles; protected $_name = [ - 'bizCardId' => 'BizCardId', - 'bizDigitalId' => 'BizDigitalId', - 'bizSmsId' => 'BizSmsId', - 'cardTmpState' => 'CardTmpState', - 'mediaMobiles' => 'MediaMobiles', + 'bizCardId' => 'BizCardId', + 'bizDigitalId' => 'BizDigitalId', + 'bizSmsId' => 'BizSmsId', + 'cardTmpState' => 'CardTmpState', + 'mediaMobiles' => 'MediaMobiles', 'notMediaMobiles' => 'NotMediaMobiles', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->bizCardId) { $res['BizCardId'] = $this->bizCardId; } + if (null !== $this->bizDigitalId) { $res['BizDigitalId'] = $this->bizDigitalId; } + if (null !== $this->bizSmsId) { $res['BizSmsId'] = $this->bizSmsId; } + if (null !== $this->cardTmpState) { $res['CardTmpState'] = $this->cardTmpState; } + if (null !== $this->mediaMobiles) { $res['MediaMobiles'] = $this->mediaMobiles; } + if (null !== $this->notMediaMobiles) { $res['NotMediaMobiles'] = $this->notMediaMobiles; } @@ -75,29 +81,34 @@ class data extends Model return $res; } - /** - * @param array $map - * - * @return data - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['BizCardId'])) { $model->bizCardId = $map['BizCardId']; } + if (isset($map['BizDigitalId'])) { $model->bizDigitalId = $map['BizDigitalId']; } + if (isset($map['BizSmsId'])) { $model->bizSmsId = $map['BizSmsId']; } + if (isset($map['CardTmpState'])) { $model->cardTmpState = $map['CardTmpState']; } + if (isset($map['MediaMobiles'])) { $model->mediaMobiles = $map['MediaMobiles']; } + if (isset($map['NotMediaMobiles'])) { $model->notMediaMobiles = $map['NotMediaMobiles']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendBatchSmsRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendBatchSmsRequest.php index 54f89f9..af592df 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendBatchSmsRequest.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendBatchSmsRequest.php @@ -4,10 +4,15 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class SendBatchSmsRequest extends Model { + /** + * @var string + */ + public $outId; + /** * @var int */ @@ -48,44 +53,57 @@ class SendBatchSmsRequest extends Model */ public $templateParamJson; protected $_name = [ - 'ownerId' => 'OwnerId', - 'phoneNumberJson' => 'PhoneNumberJson', + 'outId' => 'OutId', + 'ownerId' => 'OwnerId', + 'phoneNumberJson' => 'PhoneNumberJson', 'resourceOwnerAccount' => 'ResourceOwnerAccount', - 'resourceOwnerId' => 'ResourceOwnerId', - 'signNameJson' => 'SignNameJson', - 'smsUpExtendCodeJson' => 'SmsUpExtendCodeJson', - 'templateCode' => 'TemplateCode', - 'templateParamJson' => 'TemplateParamJson', + 'resourceOwnerId' => 'ResourceOwnerId', + 'signNameJson' => 'SignNameJson', + 'smsUpExtendCodeJson' => 'SmsUpExtendCodeJson', + 'templateCode' => 'TemplateCode', + 'templateParamJson' => 'TemplateParamJson', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; + if (null !== $this->outId) { + $res['OutId'] = $this->outId; + } + if (null !== $this->ownerId) { $res['OwnerId'] = $this->ownerId; } + if (null !== $this->phoneNumberJson) { $res['PhoneNumberJson'] = $this->phoneNumberJson; } + if (null !== $this->resourceOwnerAccount) { $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; } + if (null !== $this->resourceOwnerId) { $res['ResourceOwnerId'] = $this->resourceOwnerId; } + if (null !== $this->signNameJson) { $res['SignNameJson'] = $this->signNameJson; } + if (null !== $this->smsUpExtendCodeJson) { $res['SmsUpExtendCodeJson'] = $this->smsUpExtendCodeJson; } + if (null !== $this->templateCode) { $res['TemplateCode'] = $this->templateCode; } + if (null !== $this->templateParamJson) { $res['TemplateParamJson'] = $this->templateParamJson; } @@ -93,35 +111,46 @@ class SendBatchSmsRequest extends Model return $res; } - /** - * @param array $map - * - * @return SendBatchSmsRequest - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); + if (isset($map['OutId'])) { + $model->outId = $map['OutId']; + } + if (isset($map['OwnerId'])) { $model->ownerId = $map['OwnerId']; } + if (isset($map['PhoneNumberJson'])) { $model->phoneNumberJson = $map['PhoneNumberJson']; } + if (isset($map['ResourceOwnerAccount'])) { $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; } + if (isset($map['ResourceOwnerId'])) { $model->resourceOwnerId = $map['ResourceOwnerId']; } + if (isset($map['SignNameJson'])) { $model->signNameJson = $map['SignNameJson']; } + if (isset($map['SmsUpExtendCodeJson'])) { $model->smsUpExtendCodeJson = $map['SmsUpExtendCodeJson']; } + if (isset($map['TemplateCode'])) { $model->templateCode = $map['TemplateCode']; } + if (isset($map['TemplateParamJson'])) { $model->templateParamJson = $map['TemplateParamJson']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendBatchSmsResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendBatchSmsResponse.php index 54fd18b..7cc8763 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendBatchSmsResponse.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendBatchSmsResponse.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class SendBatchSmsResponse extends Model { @@ -23,48 +23,66 @@ class SendBatchSmsResponse extends Model */ public $body; protected $_name = [ - 'headers' => 'headers', + 'headers' => 'headers', 'statusCode' => 'statusCode', - 'body' => 'body', + 'body' => 'body', ]; public function validate() { - Model::validateRequired('headers', $this->headers, true); - Model::validateRequired('statusCode', $this->statusCode, true); - Model::validateRequired('body', $this->body, true); + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->headers) { - $res['headers'] = $this->headers; + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } } + if (null !== $this->statusCode) { $res['statusCode'] = $this->statusCode; } + if (null !== $this->body) { - $res['body'] = null !== $this->body ? $this->body->toMap() : null; + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; } return $res; } - /** - * @param array $map - * - * @return SendBatchSmsResponse - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['headers'])) { - $model->headers = $map['headers']; + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } } + if (isset($map['statusCode'])) { $model->statusCode = $map['statusCode']; } + if (isset($map['body'])) { $model->body = SendBatchSmsResponseBody::fromMap($map['body']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendBatchSmsResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendBatchSmsResponseBody.php index 9164f66..4ed23b8 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendBatchSmsResponseBody.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendBatchSmsResponseBody.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class SendBatchSmsResponseBody extends Model { @@ -28,28 +28,32 @@ class SendBatchSmsResponseBody extends Model */ public $requestId; protected $_name = [ - 'bizId' => 'BizId', - 'code' => 'Code', - 'message' => 'Message', + 'bizId' => 'BizId', + 'code' => 'Code', + 'message' => 'Message', 'requestId' => 'RequestId', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->bizId) { $res['BizId'] = $this->bizId; } + if (null !== $this->code) { $res['Code'] = $this->code; } + if (null !== $this->message) { $res['Message'] = $this->message; } + if (null !== $this->requestId) { $res['RequestId'] = $this->requestId; } @@ -57,23 +61,26 @@ class SendBatchSmsResponseBody extends Model return $res; } - /** - * @param array $map - * - * @return SendBatchSmsResponseBody - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['BizId'])) { $model->bizId = $map['BizId']; } + if (isset($map['Code'])) { $model->code = $map['Code']; } + if (isset($map['Message'])) { $model->message = $map['Message']; } + if (isset($map['RequestId'])) { $model->requestId = $map['RequestId']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsRequest.php index 1a4dd98..283a0f1 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsRequest.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsRequest.php @@ -4,8 +4,8 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; +use AlibabaCloud\Dara\Model; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SendCardSmsRequest\cardObjects; -use AlibabaCloud\Tea\Model; class SendCardSmsRequest extends Model { @@ -58,111 +58,163 @@ class SendCardSmsRequest extends Model * @var string */ public $smsUpExtendCode; + + /** + * @var string + */ + public $templateCode; + + /** + * @var string + */ + public $templateParam; protected $_name = [ - 'cardObjects' => 'CardObjects', - 'cardTemplateCode' => 'CardTemplateCode', - 'digitalTemplateCode' => 'DigitalTemplateCode', + 'cardObjects' => 'CardObjects', + 'cardTemplateCode' => 'CardTemplateCode', + 'digitalTemplateCode' => 'DigitalTemplateCode', 'digitalTemplateParam' => 'DigitalTemplateParam', - 'fallbackType' => 'FallbackType', - 'outId' => 'OutId', - 'signName' => 'SignName', - 'smsTemplateCode' => 'SmsTemplateCode', - 'smsTemplateParam' => 'SmsTemplateParam', - 'smsUpExtendCode' => 'SmsUpExtendCode', + 'fallbackType' => 'FallbackType', + 'outId' => 'OutId', + 'signName' => 'SignName', + 'smsTemplateCode' => 'SmsTemplateCode', + 'smsTemplateParam' => 'SmsTemplateParam', + 'smsUpExtendCode' => 'SmsUpExtendCode', + 'templateCode' => 'TemplateCode', + 'templateParam' => 'TemplateParam', ]; public function validate() { + if (\is_array($this->cardObjects)) { + Model::validateArray($this->cardObjects); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->cardObjects) { - $res['CardObjects'] = []; - if (null !== $this->cardObjects && \is_array($this->cardObjects)) { - $n = 0; - foreach ($this->cardObjects as $item) { - $res['CardObjects'][$n++] = null !== $item ? $item->toMap() : $item; + if (\is_array($this->cardObjects)) { + $res['CardObjects'] = []; + $n1 = 0; + foreach ($this->cardObjects as $item1) { + $res['CardObjects'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; } } } + if (null !== $this->cardTemplateCode) { $res['CardTemplateCode'] = $this->cardTemplateCode; } + if (null !== $this->digitalTemplateCode) { $res['DigitalTemplateCode'] = $this->digitalTemplateCode; } + if (null !== $this->digitalTemplateParam) { $res['DigitalTemplateParam'] = $this->digitalTemplateParam; } + if (null !== $this->fallbackType) { $res['FallbackType'] = $this->fallbackType; } + if (null !== $this->outId) { $res['OutId'] = $this->outId; } + if (null !== $this->signName) { $res['SignName'] = $this->signName; } + if (null !== $this->smsTemplateCode) { $res['SmsTemplateCode'] = $this->smsTemplateCode; } + if (null !== $this->smsTemplateParam) { $res['SmsTemplateParam'] = $this->smsTemplateParam; } + if (null !== $this->smsUpExtendCode) { $res['SmsUpExtendCode'] = $this->smsUpExtendCode; } + if (null !== $this->templateCode) { + $res['TemplateCode'] = $this->templateCode; + } + + if (null !== $this->templateParam) { + $res['TemplateParam'] = $this->templateParam; + } + return $res; } - /** - * @param array $map - * - * @return SendCardSmsRequest - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['CardObjects'])) { if (!empty($map['CardObjects'])) { $model->cardObjects = []; - $n = 0; - foreach ($map['CardObjects'] as $item) { - $model->cardObjects[$n++] = null !== $item ? cardObjects::fromMap($item) : $item; + $n1 = 0; + foreach ($map['CardObjects'] as $item1) { + $model->cardObjects[$n1] = cardObjects::fromMap($item1); + ++$n1; } } } + if (isset($map['CardTemplateCode'])) { $model->cardTemplateCode = $map['CardTemplateCode']; } + if (isset($map['DigitalTemplateCode'])) { $model->digitalTemplateCode = $map['DigitalTemplateCode']; } + if (isset($map['DigitalTemplateParam'])) { $model->digitalTemplateParam = $map['DigitalTemplateParam']; } + if (isset($map['FallbackType'])) { $model->fallbackType = $map['FallbackType']; } + if (isset($map['OutId'])) { $model->outId = $map['OutId']; } + if (isset($map['SignName'])) { $model->signName = $map['SignName']; } + if (isset($map['SmsTemplateCode'])) { $model->smsTemplateCode = $map['SmsTemplateCode']; } + if (isset($map['SmsTemplateParam'])) { $model->smsTemplateParam = $map['SmsTemplateParam']; } + if (isset($map['SmsUpExtendCode'])) { $model->smsUpExtendCode = $map['SmsUpExtendCode']; } + if (isset($map['TemplateCode'])) { + $model->templateCode = $map['TemplateCode']; + } + + if (isset($map['TemplateParam'])) { + $model->templateParam = $map['TemplateParam']; + } + return $model; } } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsRequest/cardObjects.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsRequest/cardObjects.php index 3a451fe..a1ec4d1 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsRequest/cardObjects.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsRequest/cardObjects.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SendCardSmsRequest; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class cardObjects extends Model { @@ -23,24 +23,27 @@ class cardObjects extends Model */ public $mobile; protected $_name = [ - 'customUrl' => 'customUrl', + 'customUrl' => 'customUrl', 'dyncParams' => 'dyncParams', - 'mobile' => 'mobile', + 'mobile' => 'mobile', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->customUrl) { $res['customUrl'] = $this->customUrl; } + if (null !== $this->dyncParams) { $res['dyncParams'] = $this->dyncParams; } + if (null !== $this->mobile) { $res['mobile'] = $this->mobile; } @@ -48,20 +51,22 @@ class cardObjects extends Model return $res; } - /** - * @param array $map - * - * @return cardObjects - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['customUrl'])) { $model->customUrl = $map['customUrl']; } + if (isset($map['dyncParams'])) { $model->dyncParams = $map['dyncParams']; } + if (isset($map['mobile'])) { $model->mobile = $map['mobile']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsResponse.php index cf7da7c..b247b4f 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsResponse.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsResponse.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class SendCardSmsResponse extends Model { @@ -23,48 +23,66 @@ class SendCardSmsResponse extends Model */ public $body; protected $_name = [ - 'headers' => 'headers', + 'headers' => 'headers', 'statusCode' => 'statusCode', - 'body' => 'body', + 'body' => 'body', ]; public function validate() { - Model::validateRequired('headers', $this->headers, true); - Model::validateRequired('statusCode', $this->statusCode, true); - Model::validateRequired('body', $this->body, true); + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->headers) { - $res['headers'] = $this->headers; + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } } + if (null !== $this->statusCode) { $res['statusCode'] = $this->statusCode; } + if (null !== $this->body) { - $res['body'] = null !== $this->body ? $this->body->toMap() : null; + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; } return $res; } - /** - * @param array $map - * - * @return SendCardSmsResponse - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['headers'])) { - $model->headers = $map['headers']; + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } } + if (isset($map['statusCode'])) { $model->statusCode = $map['statusCode']; } + if (isset($map['body'])) { $model->body = SendCardSmsResponseBody::fromMap($map['body']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsResponseBody.php index 4a2d2ba..05ac652 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsResponseBody.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsResponseBody.php @@ -4,8 +4,8 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; +use AlibabaCloud\Dara\Model; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SendCardSmsResponseBody\data; -use AlibabaCloud\Tea\Model; class SendCardSmsResponseBody extends Model { @@ -29,28 +29,35 @@ class SendCardSmsResponseBody extends Model */ public $success; protected $_name = [ - 'code' => 'Code', - 'data' => 'Data', + 'code' => 'Code', + 'data' => 'Data', 'requestId' => 'RequestId', - 'success' => 'Success', + 'success' => 'Success', ]; public function validate() { + if (null !== $this->data) { + $this->data->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->code) { $res['Code'] = $this->code; } + if (null !== $this->data) { - $res['Data'] = null !== $this->data ? $this->data->toMap() : null; + $res['Data'] = null !== $this->data ? $this->data->toArray($noStream) : $this->data; } + if (null !== $this->requestId) { $res['RequestId'] = $this->requestId; } + if (null !== $this->success) { $res['Success'] = $this->success; } @@ -58,23 +65,26 @@ class SendCardSmsResponseBody extends Model return $res; } - /** - * @param array $map - * - * @return SendCardSmsResponseBody - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Code'])) { $model->code = $map['Code']; } + if (isset($map['Data'])) { $model->data = data::fromMap($map['Data']); } + if (isset($map['RequestId'])) { $model->requestId = $map['RequestId']; } + if (isset($map['Success'])) { $model->success = $map['Success']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsResponseBody/data.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsResponseBody/data.php index 520ef7c..bbdde87 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsResponseBody/data.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsResponseBody/data.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models\SendCardSmsResponseBody; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class data extends Model { @@ -38,36 +38,42 @@ class data extends Model */ public $notMediaMobiles; protected $_name = [ - 'bizCardId' => 'BizCardId', - 'bizDigitalId' => 'BizDigitalId', - 'bizSmsId' => 'BizSmsId', - 'cardTmpState' => 'CardTmpState', - 'mediaMobiles' => 'MediaMobiles', + 'bizCardId' => 'BizCardId', + 'bizDigitalId' => 'BizDigitalId', + 'bizSmsId' => 'BizSmsId', + 'cardTmpState' => 'CardTmpState', + 'mediaMobiles' => 'MediaMobiles', 'notMediaMobiles' => 'NotMediaMobiles', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->bizCardId) { $res['BizCardId'] = $this->bizCardId; } + if (null !== $this->bizDigitalId) { $res['BizDigitalId'] = $this->bizDigitalId; } + if (null !== $this->bizSmsId) { $res['BizSmsId'] = $this->bizSmsId; } + if (null !== $this->cardTmpState) { $res['CardTmpState'] = $this->cardTmpState; } + if (null !== $this->mediaMobiles) { $res['MediaMobiles'] = $this->mediaMobiles; } + if (null !== $this->notMediaMobiles) { $res['NotMediaMobiles'] = $this->notMediaMobiles; } @@ -75,29 +81,34 @@ class data extends Model return $res; } - /** - * @param array $map - * - * @return data - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['BizCardId'])) { $model->bizCardId = $map['BizCardId']; } + if (isset($map['BizDigitalId'])) { $model->bizDigitalId = $map['BizDigitalId']; } + if (isset($map['BizSmsId'])) { $model->bizSmsId = $map['BizSmsId']; } + if (isset($map['CardTmpState'])) { $model->cardTmpState = $map['CardTmpState']; } + if (isset($map['MediaMobiles'])) { $model->mediaMobiles = $map['MediaMobiles']; } + if (isset($map['NotMediaMobiles'])) { $model->notMediaMobiles = $map['NotMediaMobiles']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendLogisticsSmsRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendLogisticsSmsRequest.php new file mode 100644 index 0000000..b2d6e9b --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendLogisticsSmsRequest.php @@ -0,0 +1,174 @@ + 'ExpressCompanyCode', + 'mailNo' => 'MailNo', + 'outId' => 'OutId', + 'ownerId' => 'OwnerId', + 'platformCompanyCode' => 'PlatformCompanyCode', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'signName' => 'SignName', + 'templateCode' => 'TemplateCode', + 'templateParam' => 'TemplateParam', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->expressCompanyCode) { + $res['ExpressCompanyCode'] = $this->expressCompanyCode; + } + + if (null !== $this->mailNo) { + $res['MailNo'] = $this->mailNo; + } + + if (null !== $this->outId) { + $res['OutId'] = $this->outId; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->platformCompanyCode) { + $res['PlatformCompanyCode'] = $this->platformCompanyCode; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->signName) { + $res['SignName'] = $this->signName; + } + + if (null !== $this->templateCode) { + $res['TemplateCode'] = $this->templateCode; + } + + if (null !== $this->templateParam) { + $res['TemplateParam'] = $this->templateParam; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['ExpressCompanyCode'])) { + $model->expressCompanyCode = $map['ExpressCompanyCode']; + } + + if (isset($map['MailNo'])) { + $model->mailNo = $map['MailNo']; + } + + if (isset($map['OutId'])) { + $model->outId = $map['OutId']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['PlatformCompanyCode'])) { + $model->platformCompanyCode = $map['PlatformCompanyCode']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['SignName'])) { + $model->signName = $map['SignName']; + } + + if (isset($map['TemplateCode'])) { + $model->templateCode = $map['TemplateCode']; + } + + if (isset($map['TemplateParam'])) { + $model->templateParam = $map['TemplateParam']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendLogisticsSmsResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendLogisticsSmsResponse.php new file mode 100644 index 0000000..05cbc71 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendLogisticsSmsResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = SendLogisticsSmsResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendLogisticsSmsResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendLogisticsSmsResponseBody.php new file mode 100644 index 0000000..fb17ee7 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendLogisticsSmsResponseBody.php @@ -0,0 +1,122 @@ + 'AccessDeniedDetail', + 'code' => 'Code', + 'data' => 'Data', + 'message' => 'Message', + 'requestId' => 'RequestId', + 'success' => 'Success', + ]; + + public function validate() + { + if (null !== $this->data) { + $this->data->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessDeniedDetail) { + $res['AccessDeniedDetail'] = $this->accessDeniedDetail; + } + + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->data) { + $res['Data'] = null !== $this->data ? $this->data->toArray($noStream) : $this->data; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AccessDeniedDetail'])) { + $model->accessDeniedDetail = $map['AccessDeniedDetail']; + } + + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Data'])) { + $model->data = data::fromMap($map['Data']); + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendLogisticsSmsResponseBody/data.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendLogisticsSmsResponseBody/data.php new file mode 100644 index 0000000..52c72c1 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendLogisticsSmsResponseBody/data.php @@ -0,0 +1,48 @@ + 'BizId', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->bizId) { + $res['BizId'] = $this->bizId; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['BizId'])) { + $model->bizId = $map['BizId']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendSmsRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendSmsRequest.php index 57d882b..a23fb7f 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendSmsRequest.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendSmsRequest.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class SendSmsRequest extends Model { @@ -53,48 +53,57 @@ class SendSmsRequest extends Model */ public $templateParam; protected $_name = [ - 'outId' => 'OutId', - 'ownerId' => 'OwnerId', - 'phoneNumbers' => 'PhoneNumbers', + 'outId' => 'OutId', + 'ownerId' => 'OwnerId', + 'phoneNumbers' => 'PhoneNumbers', 'resourceOwnerAccount' => 'ResourceOwnerAccount', - 'resourceOwnerId' => 'ResourceOwnerId', - 'signName' => 'SignName', - 'smsUpExtendCode' => 'SmsUpExtendCode', - 'templateCode' => 'TemplateCode', - 'templateParam' => 'TemplateParam', + 'resourceOwnerId' => 'ResourceOwnerId', + 'signName' => 'SignName', + 'smsUpExtendCode' => 'SmsUpExtendCode', + 'templateCode' => 'TemplateCode', + 'templateParam' => 'TemplateParam', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->outId) { $res['OutId'] = $this->outId; } + if (null !== $this->ownerId) { $res['OwnerId'] = $this->ownerId; } + if (null !== $this->phoneNumbers) { $res['PhoneNumbers'] = $this->phoneNumbers; } + if (null !== $this->resourceOwnerAccount) { $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; } + if (null !== $this->resourceOwnerId) { $res['ResourceOwnerId'] = $this->resourceOwnerId; } + if (null !== $this->signName) { $res['SignName'] = $this->signName; } + if (null !== $this->smsUpExtendCode) { $res['SmsUpExtendCode'] = $this->smsUpExtendCode; } + if (null !== $this->templateCode) { $res['TemplateCode'] = $this->templateCode; } + if (null !== $this->templateParam) { $res['TemplateParam'] = $this->templateParam; } @@ -102,38 +111,46 @@ class SendSmsRequest extends Model return $res; } - /** - * @param array $map - * - * @return SendSmsRequest - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['OutId'])) { $model->outId = $map['OutId']; } + if (isset($map['OwnerId'])) { $model->ownerId = $map['OwnerId']; } + if (isset($map['PhoneNumbers'])) { $model->phoneNumbers = $map['PhoneNumbers']; } + if (isset($map['ResourceOwnerAccount'])) { $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; } + if (isset($map['ResourceOwnerId'])) { $model->resourceOwnerId = $map['ResourceOwnerId']; } + if (isset($map['SignName'])) { $model->signName = $map['SignName']; } + if (isset($map['SmsUpExtendCode'])) { $model->smsUpExtendCode = $map['SmsUpExtendCode']; } + if (isset($map['TemplateCode'])) { $model->templateCode = $map['TemplateCode']; } + if (isset($map['TemplateParam'])) { $model->templateParam = $map['TemplateParam']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendSmsResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendSmsResponse.php index 6ee2e4e..4e18e65 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendSmsResponse.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendSmsResponse.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class SendSmsResponse extends Model { @@ -23,48 +23,66 @@ class SendSmsResponse extends Model */ public $body; protected $_name = [ - 'headers' => 'headers', + 'headers' => 'headers', 'statusCode' => 'statusCode', - 'body' => 'body', + 'body' => 'body', ]; public function validate() { - Model::validateRequired('headers', $this->headers, true); - Model::validateRequired('statusCode', $this->statusCode, true); - Model::validateRequired('body', $this->body, true); + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->headers) { - $res['headers'] = $this->headers; + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } } + if (null !== $this->statusCode) { $res['statusCode'] = $this->statusCode; } + if (null !== $this->body) { - $res['body'] = null !== $this->body ? $this->body->toMap() : null; + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; } return $res; } - /** - * @param array $map - * - * @return SendSmsResponse - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['headers'])) { - $model->headers = $map['headers']; + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } } + if (isset($map['statusCode'])) { $model->statusCode = $map['statusCode']; } + if (isset($map['body'])) { $model->body = SendSmsResponseBody::fromMap($map['body']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendSmsResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendSmsResponseBody.php index f3b118c..c46006c 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendSmsResponseBody.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SendSmsResponseBody.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class SendSmsResponseBody extends Model { @@ -28,28 +28,32 @@ class SendSmsResponseBody extends Model */ public $requestId; protected $_name = [ - 'bizId' => 'BizId', - 'code' => 'Code', - 'message' => 'Message', + 'bizId' => 'BizId', + 'code' => 'Code', + 'message' => 'Message', 'requestId' => 'RequestId', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->bizId) { $res['BizId'] = $this->bizId; } + if (null !== $this->code) { $res['Code'] = $this->code; } + if (null !== $this->message) { $res['Message'] = $this->message; } + if (null !== $this->requestId) { $res['RequestId'] = $this->requestId; } @@ -57,23 +61,26 @@ class SendSmsResponseBody extends Model return $res; } - /** - * @param array $map - * - * @return SendSmsResponseBody - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['BizId'])) { $model->bizId = $map['BizId']; } + if (isset($map['Code'])) { $model->code = $map['Code']; } + if (isset($map['Message'])) { $model->message = $map['Message']; } + if (isset($map['RequestId'])) { $model->requestId = $map['RequestId']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SmsConversionIntlRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SmsConversionIntlRequest.php new file mode 100644 index 0000000..fe17e44 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SmsConversionIntlRequest.php @@ -0,0 +1,118 @@ + 'ConversionTime', + 'delivered' => 'Delivered', + 'messageId' => 'MessageId', + 'ownerId' => 'OwnerId', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->conversionTime) { + $res['ConversionTime'] = $this->conversionTime; + } + + if (null !== $this->delivered) { + $res['Delivered'] = $this->delivered; + } + + if (null !== $this->messageId) { + $res['MessageId'] = $this->messageId; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['ConversionTime'])) { + $model->conversionTime = $map['ConversionTime']; + } + + if (isset($map['Delivered'])) { + $model->delivered = $map['Delivered']; + } + + if (isset($map['MessageId'])) { + $model->messageId = $map['MessageId']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SmsConversionIntlResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SmsConversionIntlResponse.php new file mode 100644 index 0000000..005ec0b --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SmsConversionIntlResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = SmsConversionIntlResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SmsConversionIntlResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SmsConversionIntlResponseBody.php new file mode 100644 index 0000000..c537f88 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SmsConversionIntlResponseBody.php @@ -0,0 +1,76 @@ + 'Code', + 'message' => 'Message', + 'requestId' => 'RequestId', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationRequest.php new file mode 100644 index 0000000..02261e1 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationRequest.php @@ -0,0 +1,448 @@ + 'AdminIDCardExpDate', + 'adminIDCardFrontFace' => 'AdminIDCardFrontFace', + 'adminIDCardNo' => 'AdminIDCardNo', + 'adminIDCardPic' => 'AdminIDCardPic', + 'adminIDCardType' => 'AdminIDCardType', + 'adminName' => 'AdminName', + 'adminPhoneNo' => 'AdminPhoneNo', + 'businessLicensePics' => 'BusinessLicensePics', + 'bussinessLicenseExpDate' => 'BussinessLicenseExpDate', + 'certifyCode' => 'CertifyCode', + 'companyName' => 'CompanyName', + 'companyType' => 'CompanyType', + 'legalPersonIDCardNo' => 'LegalPersonIDCardNo', + 'legalPersonIDCardType' => 'LegalPersonIDCardType', + 'legalPersonIdCardBackSide' => 'LegalPersonIdCardBackSide', + 'legalPersonIdCardEffTime' => 'LegalPersonIdCardEffTime', + 'legalPersonIdCardFrontSide' => 'LegalPersonIdCardFrontSide', + 'legalPersonName' => 'LegalPersonName', + 'organizationCode' => 'OrganizationCode', + 'otherFiles' => 'OtherFiles', + 'ownerId' => 'OwnerId', + 'qualificationName' => 'QualificationName', + 'remark' => 'Remark', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'useBySelf' => 'UseBySelf', + 'whetherShare' => 'WhetherShare', + ]; + + public function validate() + { + if (\is_array($this->businessLicensePics)) { + Model::validateArray($this->businessLicensePics); + } + if (\is_array($this->otherFiles)) { + Model::validateArray($this->otherFiles); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->adminIDCardExpDate) { + $res['AdminIDCardExpDate'] = $this->adminIDCardExpDate; + } + + if (null !== $this->adminIDCardFrontFace) { + $res['AdminIDCardFrontFace'] = $this->adminIDCardFrontFace; + } + + if (null !== $this->adminIDCardNo) { + $res['AdminIDCardNo'] = $this->adminIDCardNo; + } + + if (null !== $this->adminIDCardPic) { + $res['AdminIDCardPic'] = $this->adminIDCardPic; + } + + if (null !== $this->adminIDCardType) { + $res['AdminIDCardType'] = $this->adminIDCardType; + } + + if (null !== $this->adminName) { + $res['AdminName'] = $this->adminName; + } + + if (null !== $this->adminPhoneNo) { + $res['AdminPhoneNo'] = $this->adminPhoneNo; + } + + if (null !== $this->businessLicensePics) { + if (\is_array($this->businessLicensePics)) { + $res['BusinessLicensePics'] = []; + $n1 = 0; + foreach ($this->businessLicensePics as $item1) { + $res['BusinessLicensePics'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; + } + } + } + + if (null !== $this->bussinessLicenseExpDate) { + $res['BussinessLicenseExpDate'] = $this->bussinessLicenseExpDate; + } + + if (null !== $this->certifyCode) { + $res['CertifyCode'] = $this->certifyCode; + } + + if (null !== $this->companyName) { + $res['CompanyName'] = $this->companyName; + } + + if (null !== $this->companyType) { + $res['CompanyType'] = $this->companyType; + } + + if (null !== $this->legalPersonIDCardNo) { + $res['LegalPersonIDCardNo'] = $this->legalPersonIDCardNo; + } + + if (null !== $this->legalPersonIDCardType) { + $res['LegalPersonIDCardType'] = $this->legalPersonIDCardType; + } + + if (null !== $this->legalPersonIdCardBackSide) { + $res['LegalPersonIdCardBackSide'] = $this->legalPersonIdCardBackSide; + } + + if (null !== $this->legalPersonIdCardEffTime) { + $res['LegalPersonIdCardEffTime'] = $this->legalPersonIdCardEffTime; + } + + if (null !== $this->legalPersonIdCardFrontSide) { + $res['LegalPersonIdCardFrontSide'] = $this->legalPersonIdCardFrontSide; + } + + if (null !== $this->legalPersonName) { + $res['LegalPersonName'] = $this->legalPersonName; + } + + if (null !== $this->organizationCode) { + $res['OrganizationCode'] = $this->organizationCode; + } + + if (null !== $this->otherFiles) { + if (\is_array($this->otherFiles)) { + $res['OtherFiles'] = []; + $n1 = 0; + foreach ($this->otherFiles as $item1) { + $res['OtherFiles'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; + } + } + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->qualificationName) { + $res['QualificationName'] = $this->qualificationName; + } + + if (null !== $this->remark) { + $res['Remark'] = $this->remark; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->useBySelf) { + $res['UseBySelf'] = $this->useBySelf; + } + + if (null !== $this->whetherShare) { + $res['WhetherShare'] = $this->whetherShare; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AdminIDCardExpDate'])) { + $model->adminIDCardExpDate = $map['AdminIDCardExpDate']; + } + + if (isset($map['AdminIDCardFrontFace'])) { + $model->adminIDCardFrontFace = $map['AdminIDCardFrontFace']; + } + + if (isset($map['AdminIDCardNo'])) { + $model->adminIDCardNo = $map['AdminIDCardNo']; + } + + if (isset($map['AdminIDCardPic'])) { + $model->adminIDCardPic = $map['AdminIDCardPic']; + } + + if (isset($map['AdminIDCardType'])) { + $model->adminIDCardType = $map['AdminIDCardType']; + } + + if (isset($map['AdminName'])) { + $model->adminName = $map['AdminName']; + } + + if (isset($map['AdminPhoneNo'])) { + $model->adminPhoneNo = $map['AdminPhoneNo']; + } + + if (isset($map['BusinessLicensePics'])) { + if (!empty($map['BusinessLicensePics'])) { + $model->businessLicensePics = []; + $n1 = 0; + foreach ($map['BusinessLicensePics'] as $item1) { + $model->businessLicensePics[$n1] = businessLicensePics::fromMap($item1); + ++$n1; + } + } + } + + if (isset($map['BussinessLicenseExpDate'])) { + $model->bussinessLicenseExpDate = $map['BussinessLicenseExpDate']; + } + + if (isset($map['CertifyCode'])) { + $model->certifyCode = $map['CertifyCode']; + } + + if (isset($map['CompanyName'])) { + $model->companyName = $map['CompanyName']; + } + + if (isset($map['CompanyType'])) { + $model->companyType = $map['CompanyType']; + } + + if (isset($map['LegalPersonIDCardNo'])) { + $model->legalPersonIDCardNo = $map['LegalPersonIDCardNo']; + } + + if (isset($map['LegalPersonIDCardType'])) { + $model->legalPersonIDCardType = $map['LegalPersonIDCardType']; + } + + if (isset($map['LegalPersonIdCardBackSide'])) { + $model->legalPersonIdCardBackSide = $map['LegalPersonIdCardBackSide']; + } + + if (isset($map['LegalPersonIdCardEffTime'])) { + $model->legalPersonIdCardEffTime = $map['LegalPersonIdCardEffTime']; + } + + if (isset($map['LegalPersonIdCardFrontSide'])) { + $model->legalPersonIdCardFrontSide = $map['LegalPersonIdCardFrontSide']; + } + + if (isset($map['LegalPersonName'])) { + $model->legalPersonName = $map['LegalPersonName']; + } + + if (isset($map['OrganizationCode'])) { + $model->organizationCode = $map['OrganizationCode']; + } + + if (isset($map['OtherFiles'])) { + if (!empty($map['OtherFiles'])) { + $model->otherFiles = []; + $n1 = 0; + foreach ($map['OtherFiles'] as $item1) { + $model->otherFiles[$n1] = otherFiles::fromMap($item1); + ++$n1; + } + } + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['QualificationName'])) { + $model->qualificationName = $map['QualificationName']; + } + + if (isset($map['Remark'])) { + $model->remark = $map['Remark']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['UseBySelf'])) { + $model->useBySelf = $map['UseBySelf']; + } + + if (isset($map['WhetherShare'])) { + $model->whetherShare = $map['WhetherShare']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationRequest/businessLicensePics.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationRequest/businessLicensePics.php new file mode 100644 index 0000000..52ab7c4 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationRequest/businessLicensePics.php @@ -0,0 +1,62 @@ + 'LicensePic', + 'type' => 'Type', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->licensePic) { + $res['LicensePic'] = $this->licensePic; + } + + if (null !== $this->type) { + $res['Type'] = $this->type; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['LicensePic'])) { + $model->licensePic = $map['LicensePic']; + } + + if (isset($map['Type'])) { + $model->type = $map['Type']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationRequest/otherFiles.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationRequest/otherFiles.php new file mode 100644 index 0000000..a3a2259 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationRequest/otherFiles.php @@ -0,0 +1,48 @@ + 'LicensePic', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->licensePic) { + $res['LicensePic'] = $this->licensePic; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['LicensePic'])) { + $model->licensePic = $map['LicensePic']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationResponse.php new file mode 100644 index 0000000..2c674be --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = SubmitSmsQualificationResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationResponseBody.php new file mode 100644 index 0000000..78c20c4 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationResponseBody.php @@ -0,0 +1,118 @@ + 'AccessDeniedDetail', + 'code' => 'Code', + 'data' => 'Data', + 'message' => 'Message', + 'requestId' => 'RequestId', + 'success' => 'Success', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessDeniedDetail) { + $res['AccessDeniedDetail'] = $this->accessDeniedDetail; + } + + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->data) { + $res['Data'] = $this->data; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AccessDeniedDetail'])) { + $model->accessDeniedDetail = $map['AccessDeniedDetail']; + } + + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Data'])) { + $model->data = $map['Data']; + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationShrinkRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationShrinkRequest.php new file mode 100644 index 0000000..805074b --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationShrinkRequest.php @@ -0,0 +1,412 @@ + 'AdminIDCardExpDate', + 'adminIDCardFrontFace' => 'AdminIDCardFrontFace', + 'adminIDCardNo' => 'AdminIDCardNo', + 'adminIDCardPic' => 'AdminIDCardPic', + 'adminIDCardType' => 'AdminIDCardType', + 'adminName' => 'AdminName', + 'adminPhoneNo' => 'AdminPhoneNo', + 'businessLicensePicsShrink' => 'BusinessLicensePics', + 'bussinessLicenseExpDate' => 'BussinessLicenseExpDate', + 'certifyCode' => 'CertifyCode', + 'companyName' => 'CompanyName', + 'companyType' => 'CompanyType', + 'legalPersonIDCardNo' => 'LegalPersonIDCardNo', + 'legalPersonIDCardType' => 'LegalPersonIDCardType', + 'legalPersonIdCardBackSide' => 'LegalPersonIdCardBackSide', + 'legalPersonIdCardEffTime' => 'LegalPersonIdCardEffTime', + 'legalPersonIdCardFrontSide' => 'LegalPersonIdCardFrontSide', + 'legalPersonName' => 'LegalPersonName', + 'organizationCode' => 'OrganizationCode', + 'otherFilesShrink' => 'OtherFiles', + 'ownerId' => 'OwnerId', + 'qualificationName' => 'QualificationName', + 'remark' => 'Remark', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'useBySelf' => 'UseBySelf', + 'whetherShare' => 'WhetherShare', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->adminIDCardExpDate) { + $res['AdminIDCardExpDate'] = $this->adminIDCardExpDate; + } + + if (null !== $this->adminIDCardFrontFace) { + $res['AdminIDCardFrontFace'] = $this->adminIDCardFrontFace; + } + + if (null !== $this->adminIDCardNo) { + $res['AdminIDCardNo'] = $this->adminIDCardNo; + } + + if (null !== $this->adminIDCardPic) { + $res['AdminIDCardPic'] = $this->adminIDCardPic; + } + + if (null !== $this->adminIDCardType) { + $res['AdminIDCardType'] = $this->adminIDCardType; + } + + if (null !== $this->adminName) { + $res['AdminName'] = $this->adminName; + } + + if (null !== $this->adminPhoneNo) { + $res['AdminPhoneNo'] = $this->adminPhoneNo; + } + + if (null !== $this->businessLicensePicsShrink) { + $res['BusinessLicensePics'] = $this->businessLicensePicsShrink; + } + + if (null !== $this->bussinessLicenseExpDate) { + $res['BussinessLicenseExpDate'] = $this->bussinessLicenseExpDate; + } + + if (null !== $this->certifyCode) { + $res['CertifyCode'] = $this->certifyCode; + } + + if (null !== $this->companyName) { + $res['CompanyName'] = $this->companyName; + } + + if (null !== $this->companyType) { + $res['CompanyType'] = $this->companyType; + } + + if (null !== $this->legalPersonIDCardNo) { + $res['LegalPersonIDCardNo'] = $this->legalPersonIDCardNo; + } + + if (null !== $this->legalPersonIDCardType) { + $res['LegalPersonIDCardType'] = $this->legalPersonIDCardType; + } + + if (null !== $this->legalPersonIdCardBackSide) { + $res['LegalPersonIdCardBackSide'] = $this->legalPersonIdCardBackSide; + } + + if (null !== $this->legalPersonIdCardEffTime) { + $res['LegalPersonIdCardEffTime'] = $this->legalPersonIdCardEffTime; + } + + if (null !== $this->legalPersonIdCardFrontSide) { + $res['LegalPersonIdCardFrontSide'] = $this->legalPersonIdCardFrontSide; + } + + if (null !== $this->legalPersonName) { + $res['LegalPersonName'] = $this->legalPersonName; + } + + if (null !== $this->organizationCode) { + $res['OrganizationCode'] = $this->organizationCode; + } + + if (null !== $this->otherFilesShrink) { + $res['OtherFiles'] = $this->otherFilesShrink; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->qualificationName) { + $res['QualificationName'] = $this->qualificationName; + } + + if (null !== $this->remark) { + $res['Remark'] = $this->remark; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->useBySelf) { + $res['UseBySelf'] = $this->useBySelf; + } + + if (null !== $this->whetherShare) { + $res['WhetherShare'] = $this->whetherShare; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AdminIDCardExpDate'])) { + $model->adminIDCardExpDate = $map['AdminIDCardExpDate']; + } + + if (isset($map['AdminIDCardFrontFace'])) { + $model->adminIDCardFrontFace = $map['AdminIDCardFrontFace']; + } + + if (isset($map['AdminIDCardNo'])) { + $model->adminIDCardNo = $map['AdminIDCardNo']; + } + + if (isset($map['AdminIDCardPic'])) { + $model->adminIDCardPic = $map['AdminIDCardPic']; + } + + if (isset($map['AdminIDCardType'])) { + $model->adminIDCardType = $map['AdminIDCardType']; + } + + if (isset($map['AdminName'])) { + $model->adminName = $map['AdminName']; + } + + if (isset($map['AdminPhoneNo'])) { + $model->adminPhoneNo = $map['AdminPhoneNo']; + } + + if (isset($map['BusinessLicensePics'])) { + $model->businessLicensePicsShrink = $map['BusinessLicensePics']; + } + + if (isset($map['BussinessLicenseExpDate'])) { + $model->bussinessLicenseExpDate = $map['BussinessLicenseExpDate']; + } + + if (isset($map['CertifyCode'])) { + $model->certifyCode = $map['CertifyCode']; + } + + if (isset($map['CompanyName'])) { + $model->companyName = $map['CompanyName']; + } + + if (isset($map['CompanyType'])) { + $model->companyType = $map['CompanyType']; + } + + if (isset($map['LegalPersonIDCardNo'])) { + $model->legalPersonIDCardNo = $map['LegalPersonIDCardNo']; + } + + if (isset($map['LegalPersonIDCardType'])) { + $model->legalPersonIDCardType = $map['LegalPersonIDCardType']; + } + + if (isset($map['LegalPersonIdCardBackSide'])) { + $model->legalPersonIdCardBackSide = $map['LegalPersonIdCardBackSide']; + } + + if (isset($map['LegalPersonIdCardEffTime'])) { + $model->legalPersonIdCardEffTime = $map['LegalPersonIdCardEffTime']; + } + + if (isset($map['LegalPersonIdCardFrontSide'])) { + $model->legalPersonIdCardFrontSide = $map['LegalPersonIdCardFrontSide']; + } + + if (isset($map['LegalPersonName'])) { + $model->legalPersonName = $map['LegalPersonName']; + } + + if (isset($map['OrganizationCode'])) { + $model->organizationCode = $map['OrganizationCode']; + } + + if (isset($map['OtherFiles'])) { + $model->otherFilesShrink = $map['OtherFiles']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['QualificationName'])) { + $model->qualificationName = $map['QualificationName']; + } + + if (isset($map['Remark'])) { + $model->remark = $map['Remark']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['UseBySelf'])) { + $model->useBySelf = $map['UseBySelf']; + } + + if (isset($map['WhetherShare'])) { + $model->whetherShare = $map['WhetherShare']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/TagResourcesRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/TagResourcesRequest.php index a9d7800..ee03f02 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/TagResourcesRequest.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/TagResourcesRequest.php @@ -4,8 +4,8 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; +use AlibabaCloud\Dara\Model; use AlibabaCloud\SDK\Dysmsapi\V20170525\Models\TagResourcesRequest\tag; -use AlibabaCloud\Tea\Model; class TagResourcesRequest extends Model { @@ -49,50 +49,72 @@ class TagResourcesRequest extends Model */ public $tag; protected $_name = [ - 'ownerId' => 'OwnerId', - 'prodCode' => 'ProdCode', - 'regionId' => 'RegionId', - 'resourceId' => 'ResourceId', + 'ownerId' => 'OwnerId', + 'prodCode' => 'ProdCode', + 'regionId' => 'RegionId', + 'resourceId' => 'ResourceId', 'resourceOwnerAccount' => 'ResourceOwnerAccount', - 'resourceOwnerId' => 'ResourceOwnerId', - 'resourceType' => 'ResourceType', - 'tag' => 'Tag', + 'resourceOwnerId' => 'ResourceOwnerId', + 'resourceType' => 'ResourceType', + 'tag' => 'Tag', ]; public function validate() { + if (\is_array($this->resourceId)) { + Model::validateArray($this->resourceId); + } + if (\is_array($this->tag)) { + Model::validateArray($this->tag); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->ownerId) { $res['OwnerId'] = $this->ownerId; } + if (null !== $this->prodCode) { $res['ProdCode'] = $this->prodCode; } + if (null !== $this->regionId) { $res['RegionId'] = $this->regionId; } + if (null !== $this->resourceId) { - $res['ResourceId'] = $this->resourceId; + if (\is_array($this->resourceId)) { + $res['ResourceId'] = []; + $n1 = 0; + foreach ($this->resourceId as $item1) { + $res['ResourceId'][$n1] = $item1; + ++$n1; + } + } } + if (null !== $this->resourceOwnerAccount) { $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; } + if (null !== $this->resourceOwnerId) { $res['ResourceOwnerId'] = $this->resourceOwnerId; } + if (null !== $this->resourceType) { $res['ResourceType'] = $this->resourceType; } + if (null !== $this->tag) { - $res['Tag'] = []; - if (null !== $this->tag && \is_array($this->tag)) { - $n = 0; - foreach ($this->tag as $item) { - $res['Tag'][$n++] = null !== $item ? $item->toMap() : $item; + if (\is_array($this->tag)) { + $res['Tag'] = []; + $n1 = 0; + foreach ($this->tag as $item1) { + $res['Tag'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; } } } @@ -100,43 +122,56 @@ class TagResourcesRequest extends Model return $res; } - /** - * @param array $map - * - * @return TagResourcesRequest - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['OwnerId'])) { $model->ownerId = $map['OwnerId']; } + if (isset($map['ProdCode'])) { $model->prodCode = $map['ProdCode']; } + if (isset($map['RegionId'])) { $model->regionId = $map['RegionId']; } + if (isset($map['ResourceId'])) { if (!empty($map['ResourceId'])) { - $model->resourceId = $map['ResourceId']; + $model->resourceId = []; + $n1 = 0; + foreach ($map['ResourceId'] as $item1) { + $model->resourceId[$n1] = $item1; + ++$n1; + } } } + if (isset($map['ResourceOwnerAccount'])) { $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; } + if (isset($map['ResourceOwnerId'])) { $model->resourceOwnerId = $map['ResourceOwnerId']; } + if (isset($map['ResourceType'])) { $model->resourceType = $map['ResourceType']; } + if (isset($map['Tag'])) { if (!empty($map['Tag'])) { $model->tag = []; - $n = 0; - foreach ($map['Tag'] as $item) { - $model->tag[$n++] = null !== $item ? tag::fromMap($item) : $item; + $n1 = 0; + foreach ($map['Tag'] as $item1) { + $model->tag[$n1] = tag::fromMap($item1); + ++$n1; } } } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/TagResourcesRequest/tag.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/TagResourcesRequest/tag.php index beb7bb8..f8c5b79 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/TagResourcesRequest/tag.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/TagResourcesRequest/tag.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models\TagResourcesRequest; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class tag extends Model { @@ -18,20 +18,22 @@ class tag extends Model */ public $value; protected $_name = [ - 'key' => 'Key', + 'key' => 'Key', 'value' => 'Value', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->key) { $res['Key'] = $this->key; } + if (null !== $this->value) { $res['Value'] = $this->value; } @@ -39,17 +41,18 @@ class tag extends Model return $res; } - /** - * @param array $map - * - * @return tag - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Key'])) { $model->key = $map['Key']; } + if (isset($map['Value'])) { $model->value = $map['Value']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/TagResourcesResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/TagResourcesResponse.php index bc06d73..79ba655 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/TagResourcesResponse.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/TagResourcesResponse.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class TagResourcesResponse extends Model { @@ -23,48 +23,66 @@ class TagResourcesResponse extends Model */ public $body; protected $_name = [ - 'headers' => 'headers', + 'headers' => 'headers', 'statusCode' => 'statusCode', - 'body' => 'body', + 'body' => 'body', ]; public function validate() { - Model::validateRequired('headers', $this->headers, true); - Model::validateRequired('statusCode', $this->statusCode, true); - Model::validateRequired('body', $this->body, true); + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->headers) { - $res['headers'] = $this->headers; + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } } + if (null !== $this->statusCode) { $res['statusCode'] = $this->statusCode; } + if (null !== $this->body) { - $res['body'] = null !== $this->body ? $this->body->toMap() : null; + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; } return $res; } - /** - * @param array $map - * - * @return TagResourcesResponse - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['headers'])) { - $model->headers = $map['headers']; + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } } + if (isset($map['statusCode'])) { $model->statusCode = $map['statusCode']; } + if (isset($map['body'])) { $model->body = TagResourcesResponseBody::fromMap($map['body']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/TagResourcesResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/TagResourcesResponseBody.php index ad5e550..873b234 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/TagResourcesResponseBody.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/TagResourcesResponseBody.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class TagResourcesResponseBody extends Model { @@ -23,24 +23,27 @@ class TagResourcesResponseBody extends Model */ public $requestId; protected $_name = [ - 'code' => 'Code', - 'data' => 'Data', + 'code' => 'Code', + 'data' => 'Data', 'requestId' => 'RequestId', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->code) { $res['Code'] = $this->code; } + if (null !== $this->data) { $res['Data'] = $this->data; } + if (null !== $this->requestId) { $res['RequestId'] = $this->requestId; } @@ -48,20 +51,22 @@ class TagResourcesResponseBody extends Model return $res; } - /** - * @param array $map - * - * @return TagResourcesResponseBody - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Code'])) { $model->code = $map['Code']; } + if (isset($map['Data'])) { $model->data = $map['Data']; } + if (isset($map['RequestId'])) { $model->requestId = $map['RequestId']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/UntagResourcesRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UntagResourcesRequest.php index 64a00d4..e868e0a 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/UntagResourcesRequest.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UntagResourcesRequest.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class UntagResourcesRequest extends Model { @@ -53,92 +53,139 @@ class UntagResourcesRequest extends Model */ public $tagKey; protected $_name = [ - 'all' => 'All', - 'ownerId' => 'OwnerId', - 'prodCode' => 'ProdCode', - 'regionId' => 'RegionId', - 'resourceId' => 'ResourceId', + 'all' => 'All', + 'ownerId' => 'OwnerId', + 'prodCode' => 'ProdCode', + 'regionId' => 'RegionId', + 'resourceId' => 'ResourceId', 'resourceOwnerAccount' => 'ResourceOwnerAccount', - 'resourceOwnerId' => 'ResourceOwnerId', - 'resourceType' => 'ResourceType', - 'tagKey' => 'TagKey', + 'resourceOwnerId' => 'ResourceOwnerId', + 'resourceType' => 'ResourceType', + 'tagKey' => 'TagKey', ]; public function validate() { + if (\is_array($this->resourceId)) { + Model::validateArray($this->resourceId); + } + if (\is_array($this->tagKey)) { + Model::validateArray($this->tagKey); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->all) { $res['All'] = $this->all; } + if (null !== $this->ownerId) { $res['OwnerId'] = $this->ownerId; } + if (null !== $this->prodCode) { $res['ProdCode'] = $this->prodCode; } + if (null !== $this->regionId) { $res['RegionId'] = $this->regionId; } + if (null !== $this->resourceId) { - $res['ResourceId'] = $this->resourceId; + if (\is_array($this->resourceId)) { + $res['ResourceId'] = []; + $n1 = 0; + foreach ($this->resourceId as $item1) { + $res['ResourceId'][$n1] = $item1; + ++$n1; + } + } } + if (null !== $this->resourceOwnerAccount) { $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; } + if (null !== $this->resourceOwnerId) { $res['ResourceOwnerId'] = $this->resourceOwnerId; } + if (null !== $this->resourceType) { $res['ResourceType'] = $this->resourceType; } + if (null !== $this->tagKey) { - $res['TagKey'] = $this->tagKey; + if (\is_array($this->tagKey)) { + $res['TagKey'] = []; + $n1 = 0; + foreach ($this->tagKey as $item1) { + $res['TagKey'][$n1] = $item1; + ++$n1; + } + } } return $res; } - /** - * @param array $map - * - * @return UntagResourcesRequest - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['All'])) { $model->all = $map['All']; } + if (isset($map['OwnerId'])) { $model->ownerId = $map['OwnerId']; } + if (isset($map['ProdCode'])) { $model->prodCode = $map['ProdCode']; } + if (isset($map['RegionId'])) { $model->regionId = $map['RegionId']; } + if (isset($map['ResourceId'])) { if (!empty($map['ResourceId'])) { - $model->resourceId = $map['ResourceId']; + $model->resourceId = []; + $n1 = 0; + foreach ($map['ResourceId'] as $item1) { + $model->resourceId[$n1] = $item1; + ++$n1; + } } } + if (isset($map['ResourceOwnerAccount'])) { $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; } + if (isset($map['ResourceOwnerId'])) { $model->resourceOwnerId = $map['ResourceOwnerId']; } + if (isset($map['ResourceType'])) { $model->resourceType = $map['ResourceType']; } + if (isset($map['TagKey'])) { if (!empty($map['TagKey'])) { - $model->tagKey = $map['TagKey']; + $model->tagKey = []; + $n1 = 0; + foreach ($map['TagKey'] as $item1) { + $model->tagKey[$n1] = $item1; + ++$n1; + } } } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/UntagResourcesResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UntagResourcesResponse.php index 58840fc..35422a9 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/UntagResourcesResponse.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UntagResourcesResponse.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class UntagResourcesResponse extends Model { @@ -23,48 +23,66 @@ class UntagResourcesResponse extends Model */ public $body; protected $_name = [ - 'headers' => 'headers', + 'headers' => 'headers', 'statusCode' => 'statusCode', - 'body' => 'body', + 'body' => 'body', ]; public function validate() { - Model::validateRequired('headers', $this->headers, true); - Model::validateRequired('statusCode', $this->statusCode, true); - Model::validateRequired('body', $this->body, true); + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->headers) { - $res['headers'] = $this->headers; + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } } + if (null !== $this->statusCode) { $res['statusCode'] = $this->statusCode; } + if (null !== $this->body) { - $res['body'] = null !== $this->body ? $this->body->toMap() : null; + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; } return $res; } - /** - * @param array $map - * - * @return UntagResourcesResponse - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['headers'])) { - $model->headers = $map['headers']; + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } } + if (isset($map['statusCode'])) { $model->statusCode = $map['statusCode']; } + if (isset($map['body'])) { $model->body = UntagResourcesResponseBody::fromMap($map['body']); } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/UntagResourcesResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UntagResourcesResponseBody.php index 3b6b8e7..90e5d3a 100644 --- a/vendor/alibabacloud/dysmsapi-20170525/src/Models/UntagResourcesResponseBody.php +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UntagResourcesResponseBody.php @@ -4,7 +4,7 @@ namespace AlibabaCloud\SDK\Dysmsapi\V20170525\Models; -use AlibabaCloud\Tea\Model; +use AlibabaCloud\Dara\Model; class UntagResourcesResponseBody extends Model { @@ -23,24 +23,27 @@ class UntagResourcesResponseBody extends Model */ public $requestId; protected $_name = [ - 'code' => 'Code', - 'data' => 'Data', + 'code' => 'Code', + 'data' => 'Data', 'requestId' => 'RequestId', ]; public function validate() { + parent::validate(); } - public function toMap() + public function toArray($noStream = false) { $res = []; if (null !== $this->code) { $res['Code'] = $this->code; } + if (null !== $this->data) { $res['Data'] = $this->data; } + if (null !== $this->requestId) { $res['RequestId'] = $this->requestId; } @@ -48,20 +51,22 @@ class UntagResourcesResponseBody extends Model return $res; } - /** - * @param array $map - * - * @return UntagResourcesResponseBody - */ + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + public static function fromMap($map = []) { $model = new self(); if (isset($map['Code'])) { $model->code = $map['Code']; } + if (isset($map['Data'])) { $model->data = $map['Data']; } + if (isset($map['RequestId'])) { $model->requestId = $map['RequestId']; } diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateExtCodeSignRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateExtCodeSignRequest.php new file mode 100644 index 0000000..98c56cb --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateExtCodeSignRequest.php @@ -0,0 +1,118 @@ + 'ExistExtCode', + 'newExtCode' => 'NewExtCode', + 'ownerId' => 'OwnerId', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'signName' => 'SignName', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->existExtCode) { + $res['ExistExtCode'] = $this->existExtCode; + } + + if (null !== $this->newExtCode) { + $res['NewExtCode'] = $this->newExtCode; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->signName) { + $res['SignName'] = $this->signName; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['ExistExtCode'])) { + $model->existExtCode = $map['ExistExtCode']; + } + + if (isset($map['NewExtCode'])) { + $model->newExtCode = $map['NewExtCode']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['SignName'])) { + $model->signName = $map['SignName']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateExtCodeSignResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateExtCodeSignResponse.php new file mode 100644 index 0000000..96af907 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateExtCodeSignResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = UpdateExtCodeSignResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateExtCodeSignResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateExtCodeSignResponseBody.php new file mode 100644 index 0000000..f4609a3 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateExtCodeSignResponseBody.php @@ -0,0 +1,118 @@ + 'AccessDeniedDetail', + 'code' => 'Code', + 'data' => 'Data', + 'message' => 'Message', + 'requestId' => 'RequestId', + 'success' => 'Success', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessDeniedDetail) { + $res['AccessDeniedDetail'] = $this->accessDeniedDetail; + } + + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->data) { + $res['Data'] = $this->data; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AccessDeniedDetail'])) { + $model->accessDeniedDetail = $map['AccessDeniedDetail']; + } + + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Data'])) { + $model->data = $map['Data']; + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationRequest.php new file mode 100644 index 0000000..c728934 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationRequest.php @@ -0,0 +1,392 @@ + 'AdminIDCardExpDate', + 'adminIDCardFrontFace' => 'AdminIDCardFrontFace', + 'adminIDCardNo' => 'AdminIDCardNo', + 'adminIDCardPic' => 'AdminIDCardPic', + 'adminIDCardType' => 'AdminIDCardType', + 'adminName' => 'AdminName', + 'adminPhoneNo' => 'AdminPhoneNo', + 'businessLicensePics' => 'BusinessLicensePics', + 'bussinessLicenseExpDate' => 'BussinessLicenseExpDate', + 'certifyCode' => 'CertifyCode', + 'companyName' => 'CompanyName', + 'legalPersonIDCardNo' => 'LegalPersonIDCardNo', + 'legalPersonIDCardType' => 'LegalPersonIDCardType', + 'legalPersonIdCardBackSide' => 'LegalPersonIdCardBackSide', + 'legalPersonIdCardEffTime' => 'LegalPersonIdCardEffTime', + 'legalPersonIdCardFrontSide' => 'LegalPersonIdCardFrontSide', + 'legalPersonName' => 'LegalPersonName', + 'orderId' => 'OrderId', + 'otherFiles' => 'OtherFiles', + 'ownerId' => 'OwnerId', + 'qualificationGroupId' => 'QualificationGroupId', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + ]; + + public function validate() + { + if (\is_array($this->businessLicensePics)) { + Model::validateArray($this->businessLicensePics); + } + if (\is_array($this->otherFiles)) { + Model::validateArray($this->otherFiles); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->adminIDCardExpDate) { + $res['AdminIDCardExpDate'] = $this->adminIDCardExpDate; + } + + if (null !== $this->adminIDCardFrontFace) { + $res['AdminIDCardFrontFace'] = $this->adminIDCardFrontFace; + } + + if (null !== $this->adminIDCardNo) { + $res['AdminIDCardNo'] = $this->adminIDCardNo; + } + + if (null !== $this->adminIDCardPic) { + $res['AdminIDCardPic'] = $this->adminIDCardPic; + } + + if (null !== $this->adminIDCardType) { + $res['AdminIDCardType'] = $this->adminIDCardType; + } + + if (null !== $this->adminName) { + $res['AdminName'] = $this->adminName; + } + + if (null !== $this->adminPhoneNo) { + $res['AdminPhoneNo'] = $this->adminPhoneNo; + } + + if (null !== $this->businessLicensePics) { + if (\is_array($this->businessLicensePics)) { + $res['BusinessLicensePics'] = []; + $n1 = 0; + foreach ($this->businessLicensePics as $item1) { + $res['BusinessLicensePics'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; + } + } + } + + if (null !== $this->bussinessLicenseExpDate) { + $res['BussinessLicenseExpDate'] = $this->bussinessLicenseExpDate; + } + + if (null !== $this->certifyCode) { + $res['CertifyCode'] = $this->certifyCode; + } + + if (null !== $this->companyName) { + $res['CompanyName'] = $this->companyName; + } + + if (null !== $this->legalPersonIDCardNo) { + $res['LegalPersonIDCardNo'] = $this->legalPersonIDCardNo; + } + + if (null !== $this->legalPersonIDCardType) { + $res['LegalPersonIDCardType'] = $this->legalPersonIDCardType; + } + + if (null !== $this->legalPersonIdCardBackSide) { + $res['LegalPersonIdCardBackSide'] = $this->legalPersonIdCardBackSide; + } + + if (null !== $this->legalPersonIdCardEffTime) { + $res['LegalPersonIdCardEffTime'] = $this->legalPersonIdCardEffTime; + } + + if (null !== $this->legalPersonIdCardFrontSide) { + $res['LegalPersonIdCardFrontSide'] = $this->legalPersonIdCardFrontSide; + } + + if (null !== $this->legalPersonName) { + $res['LegalPersonName'] = $this->legalPersonName; + } + + if (null !== $this->orderId) { + $res['OrderId'] = $this->orderId; + } + + if (null !== $this->otherFiles) { + if (\is_array($this->otherFiles)) { + $res['OtherFiles'] = []; + $n1 = 0; + foreach ($this->otherFiles as $item1) { + $res['OtherFiles'][$n1] = null !== $item1 ? $item1->toArray($noStream) : $item1; + ++$n1; + } + } + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->qualificationGroupId) { + $res['QualificationGroupId'] = $this->qualificationGroupId; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AdminIDCardExpDate'])) { + $model->adminIDCardExpDate = $map['AdminIDCardExpDate']; + } + + if (isset($map['AdminIDCardFrontFace'])) { + $model->adminIDCardFrontFace = $map['AdminIDCardFrontFace']; + } + + if (isset($map['AdminIDCardNo'])) { + $model->adminIDCardNo = $map['AdminIDCardNo']; + } + + if (isset($map['AdminIDCardPic'])) { + $model->adminIDCardPic = $map['AdminIDCardPic']; + } + + if (isset($map['AdminIDCardType'])) { + $model->adminIDCardType = $map['AdminIDCardType']; + } + + if (isset($map['AdminName'])) { + $model->adminName = $map['AdminName']; + } + + if (isset($map['AdminPhoneNo'])) { + $model->adminPhoneNo = $map['AdminPhoneNo']; + } + + if (isset($map['BusinessLicensePics'])) { + if (!empty($map['BusinessLicensePics'])) { + $model->businessLicensePics = []; + $n1 = 0; + foreach ($map['BusinessLicensePics'] as $item1) { + $model->businessLicensePics[$n1] = businessLicensePics::fromMap($item1); + ++$n1; + } + } + } + + if (isset($map['BussinessLicenseExpDate'])) { + $model->bussinessLicenseExpDate = $map['BussinessLicenseExpDate']; + } + + if (isset($map['CertifyCode'])) { + $model->certifyCode = $map['CertifyCode']; + } + + if (isset($map['CompanyName'])) { + $model->companyName = $map['CompanyName']; + } + + if (isset($map['LegalPersonIDCardNo'])) { + $model->legalPersonIDCardNo = $map['LegalPersonIDCardNo']; + } + + if (isset($map['LegalPersonIDCardType'])) { + $model->legalPersonIDCardType = $map['LegalPersonIDCardType']; + } + + if (isset($map['LegalPersonIdCardBackSide'])) { + $model->legalPersonIdCardBackSide = $map['LegalPersonIdCardBackSide']; + } + + if (isset($map['LegalPersonIdCardEffTime'])) { + $model->legalPersonIdCardEffTime = $map['LegalPersonIdCardEffTime']; + } + + if (isset($map['LegalPersonIdCardFrontSide'])) { + $model->legalPersonIdCardFrontSide = $map['LegalPersonIdCardFrontSide']; + } + + if (isset($map['LegalPersonName'])) { + $model->legalPersonName = $map['LegalPersonName']; + } + + if (isset($map['OrderId'])) { + $model->orderId = $map['OrderId']; + } + + if (isset($map['OtherFiles'])) { + if (!empty($map['OtherFiles'])) { + $model->otherFiles = []; + $n1 = 0; + foreach ($map['OtherFiles'] as $item1) { + $model->otherFiles[$n1] = otherFiles::fromMap($item1); + ++$n1; + } + } + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['QualificationGroupId'])) { + $model->qualificationGroupId = $map['QualificationGroupId']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationRequest/businessLicensePics.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationRequest/businessLicensePics.php new file mode 100644 index 0000000..c9d9aab --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationRequest/businessLicensePics.php @@ -0,0 +1,62 @@ + 'LicensePic', + 'type' => 'Type', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->licensePic) { + $res['LicensePic'] = $this->licensePic; + } + + if (null !== $this->type) { + $res['Type'] = $this->type; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['LicensePic'])) { + $model->licensePic = $map['LicensePic']; + } + + if (isset($map['Type'])) { + $model->type = $map['Type']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationRequest/otherFiles.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationRequest/otherFiles.php new file mode 100644 index 0000000..d775da3 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationRequest/otherFiles.php @@ -0,0 +1,48 @@ + 'LicensePic', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->licensePic) { + $res['LicensePic'] = $this->licensePic; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['LicensePic'])) { + $model->licensePic = $map['LicensePic']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationResponse.php new file mode 100644 index 0000000..58975ec --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = UpdateSmsQualificationResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationResponseBody.php new file mode 100644 index 0000000..21f4719 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationResponseBody.php @@ -0,0 +1,118 @@ + 'AccessDeniedDetail', + 'code' => 'Code', + 'data' => 'Data', + 'message' => 'Message', + 'requestId' => 'RequestId', + 'success' => 'Success', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessDeniedDetail) { + $res['AccessDeniedDetail'] = $this->accessDeniedDetail; + } + + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->data) { + $res['Data'] = $this->data; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AccessDeniedDetail'])) { + $model->accessDeniedDetail = $map['AccessDeniedDetail']; + } + + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Data'])) { + $model->data = $map['Data']; + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationShrinkRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationShrinkRequest.php new file mode 100644 index 0000000..b1c8086 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationShrinkRequest.php @@ -0,0 +1,356 @@ + 'AdminIDCardExpDate', + 'adminIDCardFrontFace' => 'AdminIDCardFrontFace', + 'adminIDCardNo' => 'AdminIDCardNo', + 'adminIDCardPic' => 'AdminIDCardPic', + 'adminIDCardType' => 'AdminIDCardType', + 'adminName' => 'AdminName', + 'adminPhoneNo' => 'AdminPhoneNo', + 'businessLicensePicsShrink' => 'BusinessLicensePics', + 'bussinessLicenseExpDate' => 'BussinessLicenseExpDate', + 'certifyCode' => 'CertifyCode', + 'companyName' => 'CompanyName', + 'legalPersonIDCardNo' => 'LegalPersonIDCardNo', + 'legalPersonIDCardType' => 'LegalPersonIDCardType', + 'legalPersonIdCardBackSide' => 'LegalPersonIdCardBackSide', + 'legalPersonIdCardEffTime' => 'LegalPersonIdCardEffTime', + 'legalPersonIdCardFrontSide' => 'LegalPersonIdCardFrontSide', + 'legalPersonName' => 'LegalPersonName', + 'orderId' => 'OrderId', + 'otherFilesShrink' => 'OtherFiles', + 'ownerId' => 'OwnerId', + 'qualificationGroupId' => 'QualificationGroupId', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->adminIDCardExpDate) { + $res['AdminIDCardExpDate'] = $this->adminIDCardExpDate; + } + + if (null !== $this->adminIDCardFrontFace) { + $res['AdminIDCardFrontFace'] = $this->adminIDCardFrontFace; + } + + if (null !== $this->adminIDCardNo) { + $res['AdminIDCardNo'] = $this->adminIDCardNo; + } + + if (null !== $this->adminIDCardPic) { + $res['AdminIDCardPic'] = $this->adminIDCardPic; + } + + if (null !== $this->adminIDCardType) { + $res['AdminIDCardType'] = $this->adminIDCardType; + } + + if (null !== $this->adminName) { + $res['AdminName'] = $this->adminName; + } + + if (null !== $this->adminPhoneNo) { + $res['AdminPhoneNo'] = $this->adminPhoneNo; + } + + if (null !== $this->businessLicensePicsShrink) { + $res['BusinessLicensePics'] = $this->businessLicensePicsShrink; + } + + if (null !== $this->bussinessLicenseExpDate) { + $res['BussinessLicenseExpDate'] = $this->bussinessLicenseExpDate; + } + + if (null !== $this->certifyCode) { + $res['CertifyCode'] = $this->certifyCode; + } + + if (null !== $this->companyName) { + $res['CompanyName'] = $this->companyName; + } + + if (null !== $this->legalPersonIDCardNo) { + $res['LegalPersonIDCardNo'] = $this->legalPersonIDCardNo; + } + + if (null !== $this->legalPersonIDCardType) { + $res['LegalPersonIDCardType'] = $this->legalPersonIDCardType; + } + + if (null !== $this->legalPersonIdCardBackSide) { + $res['LegalPersonIdCardBackSide'] = $this->legalPersonIdCardBackSide; + } + + if (null !== $this->legalPersonIdCardEffTime) { + $res['LegalPersonIdCardEffTime'] = $this->legalPersonIdCardEffTime; + } + + if (null !== $this->legalPersonIdCardFrontSide) { + $res['LegalPersonIdCardFrontSide'] = $this->legalPersonIdCardFrontSide; + } + + if (null !== $this->legalPersonName) { + $res['LegalPersonName'] = $this->legalPersonName; + } + + if (null !== $this->orderId) { + $res['OrderId'] = $this->orderId; + } + + if (null !== $this->otherFilesShrink) { + $res['OtherFiles'] = $this->otherFilesShrink; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->qualificationGroupId) { + $res['QualificationGroupId'] = $this->qualificationGroupId; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AdminIDCardExpDate'])) { + $model->adminIDCardExpDate = $map['AdminIDCardExpDate']; + } + + if (isset($map['AdminIDCardFrontFace'])) { + $model->adminIDCardFrontFace = $map['AdminIDCardFrontFace']; + } + + if (isset($map['AdminIDCardNo'])) { + $model->adminIDCardNo = $map['AdminIDCardNo']; + } + + if (isset($map['AdminIDCardPic'])) { + $model->adminIDCardPic = $map['AdminIDCardPic']; + } + + if (isset($map['AdminIDCardType'])) { + $model->adminIDCardType = $map['AdminIDCardType']; + } + + if (isset($map['AdminName'])) { + $model->adminName = $map['AdminName']; + } + + if (isset($map['AdminPhoneNo'])) { + $model->adminPhoneNo = $map['AdminPhoneNo']; + } + + if (isset($map['BusinessLicensePics'])) { + $model->businessLicensePicsShrink = $map['BusinessLicensePics']; + } + + if (isset($map['BussinessLicenseExpDate'])) { + $model->bussinessLicenseExpDate = $map['BussinessLicenseExpDate']; + } + + if (isset($map['CertifyCode'])) { + $model->certifyCode = $map['CertifyCode']; + } + + if (isset($map['CompanyName'])) { + $model->companyName = $map['CompanyName']; + } + + if (isset($map['LegalPersonIDCardNo'])) { + $model->legalPersonIDCardNo = $map['LegalPersonIDCardNo']; + } + + if (isset($map['LegalPersonIDCardType'])) { + $model->legalPersonIDCardType = $map['LegalPersonIDCardType']; + } + + if (isset($map['LegalPersonIdCardBackSide'])) { + $model->legalPersonIdCardBackSide = $map['LegalPersonIdCardBackSide']; + } + + if (isset($map['LegalPersonIdCardEffTime'])) { + $model->legalPersonIdCardEffTime = $map['LegalPersonIdCardEffTime']; + } + + if (isset($map['LegalPersonIdCardFrontSide'])) { + $model->legalPersonIdCardFrontSide = $map['LegalPersonIdCardFrontSide']; + } + + if (isset($map['LegalPersonName'])) { + $model->legalPersonName = $map['LegalPersonName']; + } + + if (isset($map['OrderId'])) { + $model->orderId = $map['OrderId']; + } + + if (isset($map['OtherFiles'])) { + $model->otherFilesShrink = $map['OtherFiles']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['QualificationGroupId'])) { + $model->qualificationGroupId = $map['QualificationGroupId']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsSignRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsSignRequest.php new file mode 100644 index 0000000..e8e1141 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsSignRequest.php @@ -0,0 +1,247 @@ + 'AppIcpRecordId', + 'applySceneContent' => 'ApplySceneContent', + 'authorizationLetterId' => 'AuthorizationLetterId', + 'moreData' => 'MoreData', + 'ownerId' => 'OwnerId', + 'qualificationId' => 'QualificationId', + 'remark' => 'Remark', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'signName' => 'SignName', + 'signSource' => 'SignSource', + 'signType' => 'SignType', + 'thirdParty' => 'ThirdParty', + 'trademarkId' => 'TrademarkId', + ]; + + public function validate() + { + if (\is_array($this->moreData)) { + Model::validateArray($this->moreData); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->appIcpRecordId) { + $res['AppIcpRecordId'] = $this->appIcpRecordId; + } + + if (null !== $this->applySceneContent) { + $res['ApplySceneContent'] = $this->applySceneContent; + } + + if (null !== $this->authorizationLetterId) { + $res['AuthorizationLetterId'] = $this->authorizationLetterId; + } + + if (null !== $this->moreData) { + if (\is_array($this->moreData)) { + $res['MoreData'] = []; + $n1 = 0; + foreach ($this->moreData as $item1) { + $res['MoreData'][$n1] = $item1; + ++$n1; + } + } + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->qualificationId) { + $res['QualificationId'] = $this->qualificationId; + } + + if (null !== $this->remark) { + $res['Remark'] = $this->remark; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->signName) { + $res['SignName'] = $this->signName; + } + + if (null !== $this->signSource) { + $res['SignSource'] = $this->signSource; + } + + if (null !== $this->signType) { + $res['SignType'] = $this->signType; + } + + 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['ApplySceneContent'])) { + $model->applySceneContent = $map['ApplySceneContent']; + } + + if (isset($map['AuthorizationLetterId'])) { + $model->authorizationLetterId = $map['AuthorizationLetterId']; + } + + if (isset($map['MoreData'])) { + if (!empty($map['MoreData'])) { + $model->moreData = []; + $n1 = 0; + foreach ($map['MoreData'] as $item1) { + $model->moreData[$n1] = $item1; + ++$n1; + } + } + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['QualificationId'])) { + $model->qualificationId = $map['QualificationId']; + } + + if (isset($map['Remark'])) { + $model->remark = $map['Remark']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['SignName'])) { + $model->signName = $map['SignName']; + } + + if (isset($map['SignSource'])) { + $model->signSource = $map['SignSource']; + } + + if (isset($map['SignType'])) { + $model->signType = $map['SignType']; + } + + if (isset($map['ThirdParty'])) { + $model->thirdParty = $map['ThirdParty']; + } + + if (isset($map['TrademarkId'])) { + $model->trademarkId = $map['TrademarkId']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsSignResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsSignResponse.php new file mode 100644 index 0000000..bd8c617 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsSignResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = UpdateSmsSignResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsSignResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsSignResponseBody.php new file mode 100644 index 0000000..6b4ae83 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsSignResponseBody.php @@ -0,0 +1,104 @@ + 'Code', + 'message' => 'Message', + 'orderId' => 'OrderId', + 'requestId' => 'RequestId', + 'signName' => 'SignName', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->orderId) { + $res['OrderId'] = $this->orderId; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->signName) { + $res['SignName'] = $this->signName; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['OrderId'])) { + $model->orderId = $map['OrderId']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['SignName'])) { + $model->signName = $map['SignName']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsSignShrinkRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsSignShrinkRequest.php new file mode 100644 index 0000000..cc953ef --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsSignShrinkRequest.php @@ -0,0 +1,230 @@ + 'AppIcpRecordId', + 'applySceneContent' => 'ApplySceneContent', + 'authorizationLetterId' => 'AuthorizationLetterId', + 'moreDataShrink' => 'MoreData', + 'ownerId' => 'OwnerId', + 'qualificationId' => 'QualificationId', + 'remark' => 'Remark', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'signName' => 'SignName', + 'signSource' => 'SignSource', + 'signType' => 'SignType', + 'thirdParty' => 'ThirdParty', + 'trademarkId' => 'TrademarkId', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->appIcpRecordId) { + $res['AppIcpRecordId'] = $this->appIcpRecordId; + } + + if (null !== $this->applySceneContent) { + $res['ApplySceneContent'] = $this->applySceneContent; + } + + if (null !== $this->authorizationLetterId) { + $res['AuthorizationLetterId'] = $this->authorizationLetterId; + } + + if (null !== $this->moreDataShrink) { + $res['MoreData'] = $this->moreDataShrink; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->qualificationId) { + $res['QualificationId'] = $this->qualificationId; + } + + if (null !== $this->remark) { + $res['Remark'] = $this->remark; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->signName) { + $res['SignName'] = $this->signName; + } + + if (null !== $this->signSource) { + $res['SignSource'] = $this->signSource; + } + + if (null !== $this->signType) { + $res['SignType'] = $this->signType; + } + + 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['ApplySceneContent'])) { + $model->applySceneContent = $map['ApplySceneContent']; + } + + if (isset($map['AuthorizationLetterId'])) { + $model->authorizationLetterId = $map['AuthorizationLetterId']; + } + + if (isset($map['MoreData'])) { + $model->moreDataShrink = $map['MoreData']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['QualificationId'])) { + $model->qualificationId = $map['QualificationId']; + } + + if (isset($map['Remark'])) { + $model->remark = $map['Remark']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['SignName'])) { + $model->signName = $map['SignName']; + } + + if (isset($map['SignSource'])) { + $model->signSource = $map['SignSource']; + } + + if (isset($map['SignType'])) { + $model->signType = $map['SignType']; + } + + if (isset($map['ThirdParty'])) { + $model->thirdParty = $map['ThirdParty']; + } + + if (isset($map['TrademarkId'])) { + $model->trademarkId = $map['TrademarkId']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsTemplateRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsTemplateRequest.php new file mode 100644 index 0000000..601d227 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsTemplateRequest.php @@ -0,0 +1,247 @@ + 'ApplySceneContent', + 'intlType' => 'IntlType', + 'moreData' => 'MoreData', + 'ownerId' => 'OwnerId', + 'relatedSignName' => 'RelatedSignName', + 'remark' => 'Remark', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'templateCode' => 'TemplateCode', + 'templateContent' => 'TemplateContent', + 'templateName' => 'TemplateName', + 'templateRule' => 'TemplateRule', + 'templateType' => 'TemplateType', + 'trafficDriving' => 'TrafficDriving', + ]; + + public function validate() + { + if (\is_array($this->moreData)) { + Model::validateArray($this->moreData); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->applySceneContent) { + $res['ApplySceneContent'] = $this->applySceneContent; + } + + if (null !== $this->intlType) { + $res['IntlType'] = $this->intlType; + } + + if (null !== $this->moreData) { + if (\is_array($this->moreData)) { + $res['MoreData'] = []; + $n1 = 0; + foreach ($this->moreData as $item1) { + $res['MoreData'][$n1] = $item1; + ++$n1; + } + } + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->relatedSignName) { + $res['RelatedSignName'] = $this->relatedSignName; + } + + if (null !== $this->remark) { + $res['Remark'] = $this->remark; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->templateCode) { + $res['TemplateCode'] = $this->templateCode; + } + + if (null !== $this->templateContent) { + $res['TemplateContent'] = $this->templateContent; + } + + if (null !== $this->templateName) { + $res['TemplateName'] = $this->templateName; + } + + if (null !== $this->templateRule) { + $res['TemplateRule'] = $this->templateRule; + } + + if (null !== $this->templateType) { + $res['TemplateType'] = $this->templateType; + } + + if (null !== $this->trafficDriving) { + $res['TrafficDriving'] = $this->trafficDriving; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['ApplySceneContent'])) { + $model->applySceneContent = $map['ApplySceneContent']; + } + + if (isset($map['IntlType'])) { + $model->intlType = $map['IntlType']; + } + + if (isset($map['MoreData'])) { + if (!empty($map['MoreData'])) { + $model->moreData = []; + $n1 = 0; + foreach ($map['MoreData'] as $item1) { + $model->moreData[$n1] = $item1; + ++$n1; + } + } + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['RelatedSignName'])) { + $model->relatedSignName = $map['RelatedSignName']; + } + + if (isset($map['Remark'])) { + $model->remark = $map['Remark']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['TemplateCode'])) { + $model->templateCode = $map['TemplateCode']; + } + + if (isset($map['TemplateContent'])) { + $model->templateContent = $map['TemplateContent']; + } + + if (isset($map['TemplateName'])) { + $model->templateName = $map['TemplateName']; + } + + if (isset($map['TemplateRule'])) { + $model->templateRule = $map['TemplateRule']; + } + + if (isset($map['TemplateType'])) { + $model->templateType = $map['TemplateType']; + } + + if (isset($map['TrafficDriving'])) { + $model->trafficDriving = $map['TrafficDriving']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsTemplateResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsTemplateResponse.php new file mode 100644 index 0000000..280aad5 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsTemplateResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = UpdateSmsTemplateResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsTemplateResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsTemplateResponseBody.php new file mode 100644 index 0000000..06ec748 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsTemplateResponseBody.php @@ -0,0 +1,118 @@ + 'Code', + 'message' => 'Message', + 'orderId' => 'OrderId', + 'requestId' => 'RequestId', + 'templateCode' => 'TemplateCode', + 'templateName' => 'TemplateName', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->orderId) { + $res['OrderId'] = $this->orderId; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->templateCode) { + $res['TemplateCode'] = $this->templateCode; + } + + if (null !== $this->templateName) { + $res['TemplateName'] = $this->templateName; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['OrderId'])) { + $model->orderId = $map['OrderId']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['TemplateCode'])) { + $model->templateCode = $map['TemplateCode']; + } + + if (isset($map['TemplateName'])) { + $model->templateName = $map['TemplateName']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsTemplateShrinkRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsTemplateShrinkRequest.php new file mode 100644 index 0000000..c3d8f8d --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsTemplateShrinkRequest.php @@ -0,0 +1,230 @@ + 'ApplySceneContent', + 'intlType' => 'IntlType', + 'moreDataShrink' => 'MoreData', + 'ownerId' => 'OwnerId', + 'relatedSignName' => 'RelatedSignName', + 'remark' => 'Remark', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + 'templateCode' => 'TemplateCode', + 'templateContent' => 'TemplateContent', + 'templateName' => 'TemplateName', + 'templateRule' => 'TemplateRule', + 'templateType' => 'TemplateType', + 'trafficDriving' => 'TrafficDriving', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->applySceneContent) { + $res['ApplySceneContent'] = $this->applySceneContent; + } + + if (null !== $this->intlType) { + $res['IntlType'] = $this->intlType; + } + + if (null !== $this->moreDataShrink) { + $res['MoreData'] = $this->moreDataShrink; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->relatedSignName) { + $res['RelatedSignName'] = $this->relatedSignName; + } + + if (null !== $this->remark) { + $res['Remark'] = $this->remark; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + if (null !== $this->templateCode) { + $res['TemplateCode'] = $this->templateCode; + } + + if (null !== $this->templateContent) { + $res['TemplateContent'] = $this->templateContent; + } + + if (null !== $this->templateName) { + $res['TemplateName'] = $this->templateName; + } + + if (null !== $this->templateRule) { + $res['TemplateRule'] = $this->templateRule; + } + + if (null !== $this->templateType) { + $res['TemplateType'] = $this->templateType; + } + + if (null !== $this->trafficDriving) { + $res['TrafficDriving'] = $this->trafficDriving; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['ApplySceneContent'])) { + $model->applySceneContent = $map['ApplySceneContent']; + } + + if (isset($map['IntlType'])) { + $model->intlType = $map['IntlType']; + } + + if (isset($map['MoreData'])) { + $model->moreDataShrink = $map['MoreData']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['RelatedSignName'])) { + $model->relatedSignName = $map['RelatedSignName']; + } + + if (isset($map['Remark'])) { + $model->remark = $map['Remark']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + if (isset($map['TemplateCode'])) { + $model->templateCode = $map['TemplateCode']; + } + + if (isset($map['TemplateContent'])) { + $model->templateContent = $map['TemplateContent']; + } + + if (isset($map['TemplateName'])) { + $model->templateName = $map['TemplateName']; + } + + if (isset($map['TemplateRule'])) { + $model->templateRule = $map['TemplateRule']; + } + + if (isset($map['TemplateType'])) { + $model->templateType = $map['TemplateType']; + } + + if (isset($map['TrafficDriving'])) { + $model->trafficDriving = $map['TrafficDriving']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ValidPhoneCodeRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ValidPhoneCodeRequest.php new file mode 100644 index 0000000..5ef95a6 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ValidPhoneCodeRequest.php @@ -0,0 +1,104 @@ + 'CertifyCode', + 'ownerId' => 'OwnerId', + 'phoneNo' => 'PhoneNo', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->certifyCode) { + $res['CertifyCode'] = $this->certifyCode; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->phoneNo) { + $res['PhoneNo'] = $this->phoneNo; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['CertifyCode'])) { + $model->certifyCode = $map['CertifyCode']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['PhoneNo'])) { + $model->phoneNo = $map['PhoneNo']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ValidPhoneCodeResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ValidPhoneCodeResponse.php new file mode 100644 index 0000000..a850f9e --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ValidPhoneCodeResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = ValidPhoneCodeResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/ValidPhoneCodeResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ValidPhoneCodeResponseBody.php new file mode 100644 index 0000000..84ffd6b --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/ValidPhoneCodeResponseBody.php @@ -0,0 +1,118 @@ + 'AccessDeniedDetail', + 'code' => 'Code', + 'data' => 'Data', + 'message' => 'Message', + 'requestId' => 'RequestId', + 'success' => 'Success', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessDeniedDetail) { + $res['AccessDeniedDetail'] = $this->accessDeniedDetail; + } + + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->data) { + $res['Data'] = $this->data; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AccessDeniedDetail'])) { + $model->accessDeniedDetail = $map['AccessDeniedDetail']; + } + + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Data'])) { + $model->data = $map['Data']; + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/VerifyLogisticsSmsMailNoRequest.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/VerifyLogisticsSmsMailNoRequest.php new file mode 100644 index 0000000..97af3cc --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/VerifyLogisticsSmsMailNoRequest.php @@ -0,0 +1,118 @@ + 'ExpressCompanyCode', + 'mailNo' => 'MailNo', + 'ownerId' => 'OwnerId', + 'platformCompanyCode' => 'PlatformCompanyCode', + 'resourceOwnerAccount' => 'ResourceOwnerAccount', + 'resourceOwnerId' => 'ResourceOwnerId', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->expressCompanyCode) { + $res['ExpressCompanyCode'] = $this->expressCompanyCode; + } + + if (null !== $this->mailNo) { + $res['MailNo'] = $this->mailNo; + } + + if (null !== $this->ownerId) { + $res['OwnerId'] = $this->ownerId; + } + + if (null !== $this->platformCompanyCode) { + $res['PlatformCompanyCode'] = $this->platformCompanyCode; + } + + if (null !== $this->resourceOwnerAccount) { + $res['ResourceOwnerAccount'] = $this->resourceOwnerAccount; + } + + if (null !== $this->resourceOwnerId) { + $res['ResourceOwnerId'] = $this->resourceOwnerId; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['ExpressCompanyCode'])) { + $model->expressCompanyCode = $map['ExpressCompanyCode']; + } + + if (isset($map['MailNo'])) { + $model->mailNo = $map['MailNo']; + } + + if (isset($map['OwnerId'])) { + $model->ownerId = $map['OwnerId']; + } + + if (isset($map['PlatformCompanyCode'])) { + $model->platformCompanyCode = $map['PlatformCompanyCode']; + } + + if (isset($map['ResourceOwnerAccount'])) { + $model->resourceOwnerAccount = $map['ResourceOwnerAccount']; + } + + if (isset($map['ResourceOwnerId'])) { + $model->resourceOwnerId = $map['ResourceOwnerId']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/VerifyLogisticsSmsMailNoResponse.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/VerifyLogisticsSmsMailNoResponse.php new file mode 100644 index 0000000..a7f2bc7 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/VerifyLogisticsSmsMailNoResponse.php @@ -0,0 +1,92 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + if (\is_array($this->headers)) { + Model::validateArray($this->headers); + } + if (null !== $this->body) { + $this->body->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if (\is_array($this->headers)) { + $res['headers'] = []; + foreach ($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toArray($noStream) : $this->body; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if (!empty($map['headers'])) { + $model->headers = []; + foreach ($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['body'])) { + $model->body = VerifyLogisticsSmsMailNoResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/VerifyLogisticsSmsMailNoResponseBody.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/VerifyLogisticsSmsMailNoResponseBody.php new file mode 100644 index 0000000..31f4a62 --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/VerifyLogisticsSmsMailNoResponseBody.php @@ -0,0 +1,122 @@ + 'AccessDeniedDetail', + 'code' => 'Code', + 'data' => 'Data', + 'message' => 'Message', + 'requestId' => 'RequestId', + 'success' => 'Success', + ]; + + public function validate() + { + if (null !== $this->data) { + $this->data->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessDeniedDetail) { + $res['AccessDeniedDetail'] = $this->accessDeniedDetail; + } + + if (null !== $this->code) { + $res['Code'] = $this->code; + } + + if (null !== $this->data) { + $res['Data'] = null !== $this->data ? $this->data->toArray($noStream) : $this->data; + } + + if (null !== $this->message) { + $res['Message'] = $this->message; + } + + if (null !== $this->requestId) { + $res['RequestId'] = $this->requestId; + } + + if (null !== $this->success) { + $res['Success'] = $this->success; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['AccessDeniedDetail'])) { + $model->accessDeniedDetail = $map['AccessDeniedDetail']; + } + + if (isset($map['Code'])) { + $model->code = $map['Code']; + } + + if (isset($map['Data'])) { + $model->data = data::fromMap($map['Data']); + } + + if (isset($map['Message'])) { + $model->message = $map['Message']; + } + + if (isset($map['RequestId'])) { + $model->requestId = $map['RequestId']; + } + + if (isset($map['Success'])) { + $model->success = $map['Success']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/dysmsapi-20170525/src/Models/VerifyLogisticsSmsMailNoResponseBody/data.php b/vendor/alibabacloud/dysmsapi-20170525/src/Models/VerifyLogisticsSmsMailNoResponseBody/data.php new file mode 100644 index 0000000..5a3e5ec --- /dev/null +++ b/vendor/alibabacloud/dysmsapi-20170525/src/Models/VerifyLogisticsSmsMailNoResponseBody/data.php @@ -0,0 +1,76 @@ + 'ExpressCompanyCode', + 'mobileSuffix' => 'MobileSuffix', + 'verifyResult' => 'VerifyResult', + ]; + + public function validate() + { + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->expressCompanyCode) { + $res['ExpressCompanyCode'] = $this->expressCompanyCode; + } + + if (null !== $this->mobileSuffix) { + $res['MobileSuffix'] = $this->mobileSuffix; + } + + if (null !== $this->verifyResult) { + $res['VerifyResult'] = $this->verifyResult; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['ExpressCompanyCode'])) { + $model->expressCompanyCode = $map['ExpressCompanyCode']; + } + + if (isset($map['MobileSuffix'])) { + $model->mobileSuffix = $map['MobileSuffix']; + } + + if (isset($map['VerifyResult'])) { + $model->verifyResult = $map['VerifyResult']; + } + + return $model; + } +} diff --git a/vendor/alibabacloud/gateway-spi/.gitignore b/vendor/alibabacloud/gateway-spi/.gitignore new file mode 100644 index 0000000..89c7aa5 --- /dev/null +++ b/vendor/alibabacloud/gateway-spi/.gitignore @@ -0,0 +1,15 @@ +composer.phar +/vendor/ + +# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control +# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file +composer.lock + +.vscode/ +.idea +.DS_Store + +cache/ +*.cache +runtime/ +.php_cs.cache diff --git a/vendor/alibabacloud/gateway-spi/.php_cs.dist b/vendor/alibabacloud/gateway-spi/.php_cs.dist new file mode 100644 index 0000000..8617ec2 --- /dev/null +++ b/vendor/alibabacloud/gateway-spi/.php_cs.dist @@ -0,0 +1,65 @@ +setRiskyAllowed(true) + ->setIndent(' ') + ->setRules([ + '@PSR2' => true, + '@PhpCsFixer' => true, + '@Symfony:risky' => true, + 'concat_space' => ['spacing' => 'one'], + 'array_syntax' => ['syntax' => 'short'], + 'array_indentation' => true, + 'combine_consecutive_unsets' => true, + 'method_separation' => true, + 'single_quote' => true, + 'declare_equal_normalize' => true, + 'function_typehint_space' => true, + 'hash_to_slash_comment' => true, + 'include' => true, + 'lowercase_cast' => true, + 'no_multiline_whitespace_before_semicolons' => true, + 'no_leading_import_slash' => true, + 'no_multiline_whitespace_around_double_arrow' => true, + 'no_spaces_around_offset' => true, + 'no_unneeded_control_parentheses' => true, + 'no_unused_imports' => true, + 'no_whitespace_before_comma_in_array' => true, + 'no_whitespace_in_blank_line' => true, + 'object_operator_without_whitespace' => true, + 'single_blank_line_before_namespace' => true, + 'single_class_element_per_statement' => true, + 'space_after_semicolon' => true, + 'standardize_not_equals' => true, + 'ternary_operator_spaces' => true, + 'trailing_comma_in_multiline_array' => true, + 'trim_array_spaces' => true, + 'unary_operator_spaces' => true, + 'whitespace_after_comma_in_array' => true, + 'no_extra_consecutive_blank_lines' => [ + 'curly_brace_block', + 'extra', + 'parenthesis_brace_block', + 'square_brace_block', + 'throw', + 'use', + ], + 'binary_operator_spaces' => [ + 'align_double_arrow' => true, + 'align_equals' => true, + ], + 'braces' => [ + 'allow_single_line_closure' => true, + ], + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->exclude('vendor') + ->exclude('tests') + ->in(__DIR__) + ); diff --git a/vendor/alibabacloud/gateway-spi/autoload.php b/vendor/alibabacloud/gateway-spi/autoload.php new file mode 100644 index 0000000..f48d6cb --- /dev/null +++ b/vendor/alibabacloud/gateway-spi/autoload.php @@ -0,0 +1,15 @@ +5.5", + "alibabacloud/credentials": "^1.1" + }, + "autoload": { + "psr-4": { + "Darabonba\\GatewaySpi\\": "src" + } + }, + "scripts": { + "fixer": "php-cs-fixer fix ./" + }, + "config": { + "sort-packages": true, + "preferred-install": "dist", + "optimize-autoloader": true + }, + "prefer-stable": true +} \ No newline at end of file diff --git a/vendor/alibabacloud/gateway-spi/src/Client.php b/vendor/alibabacloud/gateway-spi/src/Client.php new file mode 100644 index 0000000..7b7b131 --- /dev/null +++ b/vendor/alibabacloud/gateway-spi/src/Client.php @@ -0,0 +1,35 @@ +attributes, true); + Model::validateRequired('key', $this->key, true); + } + public function toMap() { + $res = []; + if (null !== $this->attributes) { + $res['attributes'] = $this->attributes; + } + if (null !== $this->key) { + $res['key'] = $this->key; + } + return $res; + } + /** + * @param array $map + * @return AttributeMap + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['attributes'])){ + $model->attributes = $map['attributes']; + } + if(isset($map['key'])){ + $model->key = $map['key']; + } + return $model; + } + /** + * @var mixed[] + */ + public $attributes; + + /** + * @var string[] + */ + public $key; + +} diff --git a/vendor/alibabacloud/gateway-spi/src/Models/InterceptorContext.php b/vendor/alibabacloud/gateway-spi/src/Models/InterceptorContext.php new file mode 100644 index 0000000..cc3a436 --- /dev/null +++ b/vendor/alibabacloud/gateway-spi/src/Models/InterceptorContext.php @@ -0,0 +1,63 @@ +request, true); + Model::validateRequired('configuration', $this->configuration, true); + Model::validateRequired('response', $this->response, true); + } + public function toMap() { + $res = []; + if (null !== $this->request) { + $res['request'] = null !== $this->request ? $this->request->toMap() : null; + } + if (null !== $this->configuration) { + $res['configuration'] = null !== $this->configuration ? $this->configuration->toMap() : null; + } + if (null !== $this->response) { + $res['response'] = null !== $this->response ? $this->response->toMap() : null; + } + return $res; + } + /** + * @param array $map + * @return InterceptorContext + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['request'])){ + $model->request = request::fromMap($map['request']); + } + if(isset($map['configuration'])){ + $model->configuration = configuration::fromMap($map['configuration']); + } + if(isset($map['response'])){ + $model->response = response::fromMap($map['response']); + } + return $model; + } + /** + * @var request + */ + public $request; + + /** + * @var configuration + */ + public $configuration; + + /** + * @var response + */ + public $response; + +} diff --git a/vendor/alibabacloud/gateway-spi/src/Models/InterceptorContext/configuration.php b/vendor/alibabacloud/gateway-spi/src/Models/InterceptorContext/configuration.php new file mode 100644 index 0000000..02e6f92 --- /dev/null +++ b/vendor/alibabacloud/gateway-spi/src/Models/InterceptorContext/configuration.php @@ -0,0 +1,83 @@ +regionId, true); + } + public function toMap() { + $res = []; + if (null !== $this->regionId) { + $res['regionId'] = $this->regionId; + } + if (null !== $this->endpoint) { + $res['endpoint'] = $this->endpoint; + } + if (null !== $this->endpointRule) { + $res['endpointRule'] = $this->endpointRule; + } + if (null !== $this->endpointMap) { + $res['endpointMap'] = $this->endpointMap; + } + if (null !== $this->endpointType) { + $res['endpointType'] = $this->endpointType; + } + if (null !== $this->network) { + $res['network'] = $this->network; + } + if (null !== $this->suffix) { + $res['suffix'] = $this->suffix; + } + return $res; + } + /** + * @param array $map + * @return configuration + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['regionId'])){ + $model->regionId = $map['regionId']; + } + if(isset($map['endpoint'])){ + $model->endpoint = $map['endpoint']; + } + if(isset($map['endpointRule'])){ + $model->endpointRule = $map['endpointRule']; + } + if(isset($map['endpointMap'])){ + $model->endpointMap = $map['endpointMap']; + } + if(isset($map['endpointType'])){ + $model->endpointType = $map['endpointType']; + } + if(isset($map['network'])){ + $model->network = $map['network']; + } + if(isset($map['suffix'])){ + $model->suffix = $map['suffix']; + } + return $model; + } + /** + * @var string + */ + public $regionId; + + public $endpoint; + + public $endpointRule; + + public $endpointMap; + + public $endpointType; + + public $network; + + public $suffix; + +} diff --git a/vendor/alibabacloud/gateway-spi/src/Models/InterceptorContext/request.php b/vendor/alibabacloud/gateway-spi/src/Models/InterceptorContext/request.php new file mode 100644 index 0000000..878ca95 --- /dev/null +++ b/vendor/alibabacloud/gateway-spi/src/Models/InterceptorContext/request.php @@ -0,0 +1,220 @@ +pathname, true); + Model::validateRequired('productId', $this->productId, true); + Model::validateRequired('action', $this->action, true); + Model::validateRequired('version', $this->version, true); + Model::validateRequired('protocol', $this->protocol, true); + Model::validateRequired('method', $this->method, true); + Model::validateRequired('authType', $this->authType, true); + Model::validateRequired('bodyType', $this->bodyType, true); + Model::validateRequired('reqBodyType', $this->reqBodyType, true); + Model::validateRequired('credential', $this->credential, true); + Model::validateRequired('userAgent', $this->userAgent, true); + } + public function toMap() { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->query) { + $res['query'] = $this->query; + } + if (null !== $this->body) { + $res['body'] = $this->body; + } + if (null !== $this->stream) { + $res['stream'] = $this->stream; + } + if (null !== $this->hostMap) { + $res['hostMap'] = $this->hostMap; + } + if (null !== $this->pathname) { + $res['pathname'] = $this->pathname; + } + if (null !== $this->productId) { + $res['productId'] = $this->productId; + } + if (null !== $this->action) { + $res['action'] = $this->action; + } + if (null !== $this->version) { + $res['version'] = $this->version; + } + if (null !== $this->protocol) { + $res['protocol'] = $this->protocol; + } + if (null !== $this->method) { + $res['method'] = $this->method; + } + if (null !== $this->authType) { + $res['authType'] = $this->authType; + } + if (null !== $this->bodyType) { + $res['bodyType'] = $this->bodyType; + } + if (null !== $this->reqBodyType) { + $res['reqBodyType'] = $this->reqBodyType; + } + if (null !== $this->style) { + $res['style'] = $this->style; + } + if (null !== $this->credential) { + $res['credential'] = null !== $this->credential ? $this->credential->toMap() : null; + } + if (null !== $this->signatureVersion) { + $res['signatureVersion'] = $this->signatureVersion; + } + if (null !== $this->signatureAlgorithm) { + $res['signatureAlgorithm'] = $this->signatureAlgorithm; + } + if (null !== $this->userAgent) { + $res['userAgent'] = $this->userAgent; + } + return $res; + } + /** + * @param array $map + * @return request + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['query'])){ + $model->query = $map['query']; + } + if(isset($map['body'])){ + $model->body = $map['body']; + } + if(isset($map['stream'])){ + $model->stream = $map['stream']; + } + if(isset($map['hostMap'])){ + $model->hostMap = $map['hostMap']; + } + if(isset($map['pathname'])){ + $model->pathname = $map['pathname']; + } + if(isset($map['productId'])){ + $model->productId = $map['productId']; + } + if(isset($map['action'])){ + $model->action = $map['action']; + } + if(isset($map['version'])){ + $model->version = $map['version']; + } + if(isset($map['protocol'])){ + $model->protocol = $map['protocol']; + } + if(isset($map['method'])){ + $model->method = $map['method']; + } + if(isset($map['authType'])){ + $model->authType = $map['authType']; + } + if(isset($map['bodyType'])){ + $model->bodyType = $map['bodyType']; + } + if(isset($map['reqBodyType'])){ + $model->reqBodyType = $map['reqBodyType']; + } + if(isset($map['style'])){ + $model->style = $map['style']; + } + if(isset($map['credential'])){ + $model->credential = Credential::fromMap($map['credential']); + } + if(isset($map['signatureVersion'])){ + $model->signatureVersion = $map['signatureVersion']; + } + if(isset($map['signatureAlgorithm'])){ + $model->signatureAlgorithm = $map['signatureAlgorithm']; + } + if(isset($map['userAgent'])){ + $model->userAgent = $map['userAgent']; + } + return $model; + } + public $headers; + + public $query; + + public $body; + + public $stream; + + public $hostMap; + + /** + * @var string + */ + public $pathname; + + /** + * @var string + */ + public $productId; + + /** + * @var string + */ + public $action; + + /** + * @var string + */ + public $version; + + /** + * @var string + */ + public $protocol; + + /** + * @var string + */ + public $method; + + /** + * @var string + */ + public $authType; + + /** + * @var string + */ + public $bodyType; + + /** + * @var string + */ + public $reqBodyType; + + public $style; + + /** + * @var Credential + */ + public $credential; + + public $signatureVersion; + + public $signatureAlgorithm; + + /** + * @var string + */ + public $userAgent; + +} diff --git a/vendor/alibabacloud/gateway-spi/src/Models/InterceptorContext/response.php b/vendor/alibabacloud/gateway-spi/src/Models/InterceptorContext/response.php new file mode 100644 index 0000000..d899e4d --- /dev/null +++ b/vendor/alibabacloud/gateway-spi/src/Models/InterceptorContext/response.php @@ -0,0 +1,54 @@ +statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->body) { + $res['body'] = $this->body; + } + if (null !== $this->deserializedBody) { + $res['deserializedBody'] = $this->deserializedBody; + } + return $res; + } + /** + * @param array $map + * @return response + */ + public static function fromMap($map = []) { + $model = new self(); + if(isset($map['statusCode'])){ + $model->statusCode = $map['statusCode']; + } + if(isset($map['headers'])){ + $model->headers = $map['headers']; + } + if(isset($map['body'])){ + $model->body = $map['body']; + } + if(isset($map['deserializedBody'])){ + $model->deserializedBody = $map['deserializedBody']; + } + return $model; + } + public $statusCode; + + public $headers; + + public $body; + + public $deserializedBody; + +} diff --git a/vendor/alibabacloud/openapi-core/.gitignore b/vendor/alibabacloud/openapi-core/.gitignore new file mode 100644 index 0000000..89c7aa5 --- /dev/null +++ b/vendor/alibabacloud/openapi-core/.gitignore @@ -0,0 +1,15 @@ +composer.phar +/vendor/ + +# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control +# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file +composer.lock + +.vscode/ +.idea +.DS_Store + +cache/ +*.cache +runtime/ +.php_cs.cache diff --git a/vendor/alibabacloud/openapi-core/.php_cs.dist b/vendor/alibabacloud/openapi-core/.php_cs.dist new file mode 100644 index 0000000..8617ec2 --- /dev/null +++ b/vendor/alibabacloud/openapi-core/.php_cs.dist @@ -0,0 +1,65 @@ +setRiskyAllowed(true) + ->setIndent(' ') + ->setRules([ + '@PSR2' => true, + '@PhpCsFixer' => true, + '@Symfony:risky' => true, + 'concat_space' => ['spacing' => 'one'], + 'array_syntax' => ['syntax' => 'short'], + 'array_indentation' => true, + 'combine_consecutive_unsets' => true, + 'method_separation' => true, + 'single_quote' => true, + 'declare_equal_normalize' => true, + 'function_typehint_space' => true, + 'hash_to_slash_comment' => true, + 'include' => true, + 'lowercase_cast' => true, + 'no_multiline_whitespace_before_semicolons' => true, + 'no_leading_import_slash' => true, + 'no_multiline_whitespace_around_double_arrow' => true, + 'no_spaces_around_offset' => true, + 'no_unneeded_control_parentheses' => true, + 'no_unused_imports' => true, + 'no_whitespace_before_comma_in_array' => true, + 'no_whitespace_in_blank_line' => true, + 'object_operator_without_whitespace' => true, + 'single_blank_line_before_namespace' => true, + 'single_class_element_per_statement' => true, + 'space_after_semicolon' => true, + 'standardize_not_equals' => true, + 'ternary_operator_spaces' => true, + 'trailing_comma_in_multiline_array' => true, + 'trim_array_spaces' => true, + 'unary_operator_spaces' => true, + 'whitespace_after_comma_in_array' => true, + 'no_extra_consecutive_blank_lines' => [ + 'curly_brace_block', + 'extra', + 'parenthesis_brace_block', + 'square_brace_block', + 'throw', + 'use', + ], + 'binary_operator_spaces' => [ + 'align_double_arrow' => true, + 'align_equals' => true, + ], + 'braces' => [ + 'allow_single_line_closure' => true, + ], + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->exclude('vendor') + ->exclude('tests') + ->in(__DIR__) + ); diff --git a/vendor/alibabacloud/openapi-core/README-CN.md b/vendor/alibabacloud/openapi-core/README-CN.md new file mode 100644 index 0000000..b45e401 --- /dev/null +++ b/vendor/alibabacloud/openapi-core/README-CN.md @@ -0,0 +1,31 @@ +[English](README.md) | 简体中文 + +![](https://aliyunsdk-pages.alicdn.com/icons/AlibabaCloud.svg) + +## Alibaba Cloud OpenApi Client + +## 安装 + +### Composer + +```bash +composer require alibabacloud/openapi-core +``` + +## 问题 + +[提交 Issue](https://github.com/aliyun/darabonba-openapi/issues/new),不符合指南的问题可能会立即关闭。 + +## 发行说明 + +每个版本的详细更改记录在[发行说明](./ChangeLog.txt)中。 + +## 相关 + +* [最新源码](https://github.com/aliyun/darabonba-openapi) + +## 许可证 + +[Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) + +Copyright (c) 2009-present, Alibaba Cloud All rights reserved. diff --git a/vendor/alibabacloud/openapi-core/README.md b/vendor/alibabacloud/openapi-core/README.md new file mode 100644 index 0000000..1493927 --- /dev/null +++ b/vendor/alibabacloud/openapi-core/README.md @@ -0,0 +1,31 @@ +English | [简体中文](README-CN.md) + +![](https://aliyunsdk-pages.alicdn.com/icons/AlibabaCloud.svg) + +## Alibaba Cloud OpenApi Client + +## Installation + +### Composer + +```bash +composer require alibabacloud/openapi-core +``` + +## Issues + +[Opening an Issue](https://github.com/aliyun/darabonba-openapi/issues/new), Issues not conforming to the guidelines may be closed immediately. + +## Changelog + +Detailed changes for each release are documented in the [release notes](./ChangeLog.txt). + +## References + +* [Latest Release](https://github.com/aliyun/darabonba-openapi) + +## License + +[Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) + +Copyright (c) 2009-present, Alibaba Cloud All rights reserved. diff --git a/vendor/alibabacloud/openapi-core/autoload.php b/vendor/alibabacloud/openapi-core/autoload.php new file mode 100644 index 0000000..526c188 --- /dev/null +++ b/vendor/alibabacloud/openapi-core/autoload.php @@ -0,0 +1,15 @@ +5.5", + "alibabacloud/credentials": "^1.2.2", + "alibabacloud/darabonba": "^1", + "alibabacloud/gateway-spi": "^1" + }, + "require-dev": { + "symfony/dotenv": "^3.4", + "phpunit/phpunit": "^4.8.35|^5.4.3|^9.3", + "symfony/var-dumper": "^3.4" + }, + "autoload": { + "psr-4": { + "Darabonba\\OpenApi\\": "src" + } + }, + "scripts": { + "fixer": "php-cs-fixer fix ./", + "test": "phpunit", + "test:unit": "phpunit tests/UtilsTest.php", + "test:all": "phpunit --testdox" + }, + "config": { + "sort-packages": true, + "preferred-install": "dist", + "optimize-autoloader": true + }, + "prefer-stable": true +} \ No newline at end of file diff --git a/vendor/alibabacloud/openapi-core/phpunit.xml b/vendor/alibabacloud/openapi-core/phpunit.xml new file mode 100644 index 0000000..8d1de2b --- /dev/null +++ b/vendor/alibabacloud/openapi-core/phpunit.xml @@ -0,0 +1,31 @@ + + + + + + tests + + + tests + + + + + + integration + + + + + + + + + + + ./src + + + diff --git a/vendor/alibabacloud/openapi-core/src/Exceptions/AlibabaCloudException.php b/vendor/alibabacloud/openapi-core/src/Exceptions/AlibabaCloudException.php new file mode 100644 index 0000000..13e6d5c --- /dev/null +++ b/vendor/alibabacloud/openapi-core/src/Exceptions/AlibabaCloudException.php @@ -0,0 +1,60 @@ +statusCode = $map['statusCode']; + $this->code = $map['code']; + $this->message = $map['message']; + $this->description = $map['description']; + $this->requestId = $map['requestId']; + } + + /** + * @return int + */ + public function getStatusCode() + { + return $this->statusCode; + } + /** + * @return string + */ + public function getDescription() + { + return $this->description; + } + /** + * @return string + */ + public function getRequestId() + { + return $this->requestId; + } +} diff --git a/vendor/alibabacloud/openapi-core/src/Exceptions/ClientException.php b/vendor/alibabacloud/openapi-core/src/Exceptions/ClientException.php new file mode 100644 index 0000000..d2c72e1 --- /dev/null +++ b/vendor/alibabacloud/openapi-core/src/Exceptions/ClientException.php @@ -0,0 +1,25 @@ +accessDeniedDetail = $map['accessDeniedDetail']; + } + + /** + * @return mixed[] + */ + public function getAccessDeniedDetail() + { + return $this->accessDeniedDetail; + } +} diff --git a/vendor/alibabacloud/openapi-core/src/Exceptions/ServerException.php b/vendor/alibabacloud/openapi-core/src/Exceptions/ServerException.php new file mode 100644 index 0000000..c0df017 --- /dev/null +++ b/vendor/alibabacloud/openapi-core/src/Exceptions/ServerException.php @@ -0,0 +1,13 @@ +retryAfter = $map['retryAfter']; + } + + /** + * @return int + */ + public function getRetryAfter() + { + return $this->retryAfter; + } +} diff --git a/vendor/alibabacloud/openapi-core/src/Models/Config.php b/vendor/alibabacloud/openapi-core/src/Models/Config.php new file mode 100644 index 0000000..d154165 --- /dev/null +++ b/vendor/alibabacloud/openapi-core/src/Models/Config.php @@ -0,0 +1,464 @@ + 'accessKeyId', + 'accessKeySecret' => 'accessKeySecret', + 'securityToken' => 'securityToken', + 'bearerToken' => 'bearerToken', + 'protocol' => 'protocol', + 'method' => 'method', + 'regionId' => 'regionId', + 'readTimeout' => 'readTimeout', + 'connectTimeout' => 'connectTimeout', + 'httpProxy' => 'httpProxy', + 'httpsProxy' => 'httpsProxy', + 'credential' => 'credential', + 'endpoint' => 'endpoint', + 'noProxy' => 'noProxy', + 'maxIdleConns' => 'maxIdleConns', + 'network' => 'network', + 'userAgent' => 'userAgent', + 'suffix' => 'suffix', + 'socks5Proxy' => 'socks5Proxy', + 'socks5NetWork' => 'socks5NetWork', + 'endpointType' => 'endpointType', + 'openPlatformEndpoint' => 'openPlatformEndpoint', + 'type' => 'type', + 'signatureVersion' => 'signatureVersion', + 'signatureAlgorithm' => 'signatureAlgorithm', + 'globalParameters' => 'globalParameters', + 'key' => 'key', + 'cert' => 'cert', + 'ca' => 'ca', + 'disableHttp2' => 'disableHttp2', + 'tlsMinVersion' => 'tlsMinVersion', + 'retryOptions' => 'retryOptions', + ]; + + public function validate() + { + if(null !== $this->credential) { + $this->credential->validate(); + } + if(null !== $this->globalParameters) { + $this->globalParameters->validate(); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->accessKeyId) { + $res['accessKeyId'] = $this->accessKeyId; + } + + if (null !== $this->accessKeySecret) { + $res['accessKeySecret'] = $this->accessKeySecret; + } + + if (null !== $this->securityToken) { + $res['securityToken'] = $this->securityToken; + } + + if (null !== $this->bearerToken) { + $res['bearerToken'] = $this->bearerToken; + } + + if (null !== $this->protocol) { + $res['protocol'] = $this->protocol; + } + + if (null !== $this->method) { + $res['method'] = $this->method; + } + + if (null !== $this->regionId) { + $res['regionId'] = $this->regionId; + } + + if (null !== $this->readTimeout) { + $res['readTimeout'] = $this->readTimeout; + } + + if (null !== $this->connectTimeout) { + $res['connectTimeout'] = $this->connectTimeout; + } + + if (null !== $this->httpProxy) { + $res['httpProxy'] = $this->httpProxy; + } + + if (null !== $this->httpsProxy) { + $res['httpsProxy'] = $this->httpsProxy; + } + + if (null !== $this->credential) { + $res['credential'] = $this->credential; + } + + if (null !== $this->endpoint) { + $res['endpoint'] = $this->endpoint; + } + + if (null !== $this->noProxy) { + $res['noProxy'] = $this->noProxy; + } + + if (null !== $this->maxIdleConns) { + $res['maxIdleConns'] = $this->maxIdleConns; + } + + if (null !== $this->network) { + $res['network'] = $this->network; + } + + if (null !== $this->userAgent) { + $res['userAgent'] = $this->userAgent; + } + + if (null !== $this->suffix) { + $res['suffix'] = $this->suffix; + } + + if (null !== $this->socks5Proxy) { + $res['socks5Proxy'] = $this->socks5Proxy; + } + + if (null !== $this->socks5NetWork) { + $res['socks5NetWork'] = $this->socks5NetWork; + } + + if (null !== $this->endpointType) { + $res['endpointType'] = $this->endpointType; + } + + if (null !== $this->openPlatformEndpoint) { + $res['openPlatformEndpoint'] = $this->openPlatformEndpoint; + } + + if (null !== $this->type) { + $res['type'] = $this->type; + } + + if (null !== $this->signatureVersion) { + $res['signatureVersion'] = $this->signatureVersion; + } + + if (null !== $this->signatureAlgorithm) { + $res['signatureAlgorithm'] = $this->signatureAlgorithm; + } + + if (null !== $this->globalParameters) { + $res['globalParameters'] = null !== $this->globalParameters ? $this->globalParameters->toArray($noStream) : $this->globalParameters; + } + + if (null !== $this->key) { + $res['key'] = $this->key; + } + + if (null !== $this->cert) { + $res['cert'] = $this->cert; + } + + if (null !== $this->ca) { + $res['ca'] = $this->ca; + } + + if (null !== $this->disableHttp2) { + $res['disableHttp2'] = $this->disableHttp2; + } + + if (null !== $this->tlsMinVersion) { + $res['tlsMinVersion'] = $this->tlsMinVersion; + } + + if (null !== $this->retryOptions) { + $res['retryOptions'] = null !== $this->retryOptions ? $this->retryOptions->toArray($noStream) : $this->retryOptions; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['accessKeyId'])) { + $model->accessKeyId = $map['accessKeyId']; + } + + if (isset($map['accessKeySecret'])) { + $model->accessKeySecret = $map['accessKeySecret']; + } + + if (isset($map['securityToken'])) { + $model->securityToken = $map['securityToken']; + } + + if (isset($map['bearerToken'])) { + $model->bearerToken = $map['bearerToken']; + } + + if (isset($map['protocol'])) { + $model->protocol = $map['protocol']; + } + + if (isset($map['method'])) { + $model->method = $map['method']; + } + + if (isset($map['regionId'])) { + $model->regionId = $map['regionId']; + } + + if (isset($map['readTimeout'])) { + $model->readTimeout = $map['readTimeout']; + } + + if (isset($map['connectTimeout'])) { + $model->connectTimeout = $map['connectTimeout']; + } + + if (isset($map['httpProxy'])) { + $model->httpProxy = $map['httpProxy']; + } + + if (isset($map['httpsProxy'])) { + $model->httpsProxy = $map['httpsProxy']; + } + + if (isset($map['credential'])) { + $model->credential = $map['credential']; + } + + if (isset($map['endpoint'])) { + $model->endpoint = $map['endpoint']; + } + + if (isset($map['noProxy'])) { + $model->noProxy = $map['noProxy']; + } + + if (isset($map['maxIdleConns'])) { + $model->maxIdleConns = $map['maxIdleConns']; + } + + if (isset($map['network'])) { + $model->network = $map['network']; + } + + if (isset($map['userAgent'])) { + $model->userAgent = $map['userAgent']; + } + + if (isset($map['suffix'])) { + $model->suffix = $map['suffix']; + } + + if (isset($map['socks5Proxy'])) { + $model->socks5Proxy = $map['socks5Proxy']; + } + + if (isset($map['socks5NetWork'])) { + $model->socks5NetWork = $map['socks5NetWork']; + } + + if (isset($map['endpointType'])) { + $model->endpointType = $map['endpointType']; + } + + if (isset($map['openPlatformEndpoint'])) { + $model->openPlatformEndpoint = $map['openPlatformEndpoint']; + } + + if (isset($map['type'])) { + $model->type = $map['type']; + } + + if (isset($map['signatureVersion'])) { + $model->signatureVersion = $map['signatureVersion']; + } + + if (isset($map['signatureAlgorithm'])) { + $model->signatureAlgorithm = $map['signatureAlgorithm']; + } + + if (isset($map['globalParameters'])) { + $model->globalParameters = GlobalParameters::fromMap($map['globalParameters']); + } + + if (isset($map['key'])) { + $model->key = $map['key']; + } + + if (isset($map['cert'])) { + $model->cert = $map['cert']; + } + + if (isset($map['ca'])) { + $model->ca = $map['ca']; + } + + if (isset($map['disableHttp2'])) { + $model->disableHttp2 = $map['disableHttp2']; + } + + if (isset($map['tlsMinVersion'])) { + $model->tlsMinVersion = $map['tlsMinVersion']; + } + + if (isset($map['retryOptions'])) { + $model->retryOptions = RetryOptions::fromMap($map['retryOptions']); + } + + return $model; + } + + +} + diff --git a/vendor/alibabacloud/openapi-core/src/Models/GlobalParameters.php b/vendor/alibabacloud/openapi-core/src/Models/GlobalParameters.php new file mode 100644 index 0000000..038aa8f --- /dev/null +++ b/vendor/alibabacloud/openapi-core/src/Models/GlobalParameters.php @@ -0,0 +1,87 @@ + 'headers', + 'queries' => 'queries', + ]; + + public function validate() + { + if(is_array($this->headers)) { + Model::validateArray($this->headers); + } + if(is_array($this->queries)) { + Model::validateArray($this->queries); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if(is_array($this->headers)) { + $res['headers'] = []; + foreach($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->queries) { + if(is_array($this->queries)) { + $res['queries'] = []; + foreach($this->queries as $key1 => $value1) { + $res['queries'][$key1] = $value1; + } + } + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if(!empty($map['headers'])) { + $model->headers = []; + foreach($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['queries'])) { + if(!empty($map['queries'])) { + $model->queries = []; + foreach($map['queries'] as $key1 => $value1) { + $model->queries[$key1] = $value1; + } + } + } + + return $model; + } + + +} + diff --git a/vendor/alibabacloud/openapi-core/src/Models/OpenApiRequest.php b/vendor/alibabacloud/openapi-core/src/Models/OpenApiRequest.php new file mode 100644 index 0000000..cf0a34e --- /dev/null +++ b/vendor/alibabacloud/openapi-core/src/Models/OpenApiRequest.php @@ -0,0 +1,153 @@ + 'headers', + 'query' => 'query', + 'body' => 'body', + 'stream' => 'stream', + 'hostMap' => 'hostMap', + 'endpointOverride' => 'endpointOverride', + ]; + + public function validate() + { + if(is_array($this->headers)) { + Model::validateArray($this->headers); + } + if(is_array($this->query)) { + Model::validateArray($this->query); + } + if(is_array($this->hostMap)) { + Model::validateArray($this->hostMap); + } + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if(is_array($this->headers)) { + $res['headers'] = []; + foreach($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->query) { + if(is_array($this->query)) { + $res['query'] = []; + foreach($this->query as $key1 => $value1) { + $res['query'][$key1] = $value1; + } + } + } + + if (null !== $this->body) { + $res['body'] = $this->body; + } + + if (null !== $this->stream) { + $res['stream'] = $this->stream; + } + + if (null !== $this->hostMap) { + if(is_array($this->hostMap)) { + $res['hostMap'] = []; + foreach($this->hostMap as $key1 => $value1) { + $res['hostMap'][$key1] = $value1; + } + } + } + + if (null !== $this->endpointOverride) { + $res['endpointOverride'] = $this->endpointOverride; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if(!empty($map['headers'])) { + $model->headers = []; + foreach($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['query'])) { + if(!empty($map['query'])) { + $model->query = []; + foreach($map['query'] as $key1 => $value1) { + $model->query[$key1] = $value1; + } + } + } + + if (isset($map['body'])) { + $model->body = $map['body']; + } + + if (isset($map['stream'])) { + $model->stream = $map['stream']; + } + + if (isset($map['hostMap'])) { + if(!empty($map['hostMap'])) { + $model->hostMap = []; + foreach($map['hostMap'] as $key1 => $value1) { + $model->hostMap[$key1] = $value1; + } + } + } + + if (isset($map['endpointOverride'])) { + $model->endpointOverride = $map['endpointOverride']; + } + + return $model; + } + + +} + diff --git a/vendor/alibabacloud/openapi-core/src/Models/Params.php b/vendor/alibabacloud/openapi-core/src/Models/Params.php new file mode 100644 index 0000000..eb3a512 --- /dev/null +++ b/vendor/alibabacloud/openapi-core/src/Models/Params.php @@ -0,0 +1,160 @@ + 'action', + 'version' => 'version', + 'protocol' => 'protocol', + 'pathname' => 'pathname', + 'method' => 'method', + 'authType' => 'authType', + 'bodyType' => 'bodyType', + 'reqBodyType' => 'reqBodyType', + 'style' => 'style', + ]; + + public function validate() + { + Model::validateRequired('action', $this->action, true); + Model::validateRequired('version', $this->version, true); + Model::validateRequired('protocol', $this->protocol, true); + Model::validateRequired('pathname', $this->pathname, true); + Model::validateRequired('method', $this->method, true); + Model::validateRequired('authType', $this->authType, true); + Model::validateRequired('bodyType', $this->bodyType, true); + Model::validateRequired('reqBodyType', $this->reqBodyType, true); + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->action) { + $res['action'] = $this->action; + } + + if (null !== $this->version) { + $res['version'] = $this->version; + } + + if (null !== $this->protocol) { + $res['protocol'] = $this->protocol; + } + + if (null !== $this->pathname) { + $res['pathname'] = $this->pathname; + } + + if (null !== $this->method) { + $res['method'] = $this->method; + } + + if (null !== $this->authType) { + $res['authType'] = $this->authType; + } + + if (null !== $this->bodyType) { + $res['bodyType'] = $this->bodyType; + } + + if (null !== $this->reqBodyType) { + $res['reqBodyType'] = $this->reqBodyType; + } + + if (null !== $this->style) { + $res['style'] = $this->style; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['action'])) { + $model->action = $map['action']; + } + + if (isset($map['version'])) { + $model->version = $map['version']; + } + + if (isset($map['protocol'])) { + $model->protocol = $map['protocol']; + } + + if (isset($map['pathname'])) { + $model->pathname = $map['pathname']; + } + + if (isset($map['method'])) { + $model->method = $map['method']; + } + + if (isset($map['authType'])) { + $model->authType = $map['authType']; + } + + if (isset($map['bodyType'])) { + $model->bodyType = $map['bodyType']; + } + + if (isset($map['reqBodyType'])) { + $model->reqBodyType = $map['reqBodyType']; + } + + if (isset($map['style'])) { + $model->style = $map['style']; + } + + return $model; + } + + +} + diff --git a/vendor/alibabacloud/openapi-core/src/Models/SSEResponse.php b/vendor/alibabacloud/openapi-core/src/Models/SSEResponse.php new file mode 100644 index 0000000..262ac37 --- /dev/null +++ b/vendor/alibabacloud/openapi-core/src/Models/SSEResponse.php @@ -0,0 +1,91 @@ + 'headers', + 'statusCode' => 'statusCode', + 'event' => 'event', + ]; + + public function validate() + { + if(is_array($this->headers)) { + Model::validateArray($this->headers); + } + Model::validateRequired('headers', $this->headers, true); + Model::validateRequired('statusCode', $this->statusCode, true); + Model::validateRequired('event', $this->event, true); + parent::validate(); + } + + public function toArray($noStream = false) + { + $res = []; + if (null !== $this->headers) { + if(is_array($this->headers)) { + $res['headers'] = []; + foreach($this->headers as $key1 => $value1) { + $res['headers'][$key1] = $value1; + } + } + } + + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + + if (null !== $this->event) { + $res['event'] = null !== $this->event ? $this->event->toArray($noStream) : $this->event; + } + + return $res; + } + + public function toMap($noStream = false) + { + return $this->toArray($noStream); + } + + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + if(!empty($map['headers'])) { + $model->headers = []; + foreach($map['headers'] as $key1 => $value1) { + $model->headers[$key1] = $value1; + } + } + } + + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + + if (isset($map['event'])) { + $model->event = Event::fromMap($map['event']); + } + + return $model; + } + + +} + diff --git a/vendor/alibabacloud/openapi-core/src/OpenApiClient.php b/vendor/alibabacloud/openapi-core/src/OpenApiClient.php new file mode 100644 index 0000000..2922228 --- /dev/null +++ b/vendor/alibabacloud/openapi-core/src/OpenApiClient.php @@ -0,0 +1,1861 @@ + 'ParameterMissing', + 'message' => '\'config\' can not be unset', + ]); + } + + if ((!is_null($config->accessKeyId) && $config->accessKeyId != '') && (!is_null($config->accessKeySecret) && $config->accessKeySecret != '')) { + if (!is_null($config->securityToken) && $config->securityToken != '') { + $config->type = 'sts'; + } else { + $config->type = 'access_key'; + } + + $credentialConfig = new Config([ + 'accessKeyId' => $config->accessKeyId, + 'type' => $config->type, + 'accessKeySecret' => $config->accessKeySecret, + ]); + $credentialConfig->securityToken = $config->securityToken; + $this->_credential = new Credential($credentialConfig); + } else if (!is_null($config->bearerToken) && $config->bearerToken != '') { + $cc = new Config([ + 'type' => 'bearer', + 'bearerToken' => $config->bearerToken, + ]); + $this->_credential = new Credential($cc); + } else if (!is_null($config->credential)) { + $this->_credential = $config->credential; + } + + $this->_endpoint = $config->endpoint; + $this->_endpointType = $config->endpointType; + $this->_network = $config->network; + $this->_suffix = $config->suffix; + $this->_protocol = $config->protocol; + $this->_method = $config->method; + $this->_regionId = $config->regionId; + $this->_userAgent = $config->userAgent; + $this->_readTimeout = $config->readTimeout; + $this->_connectTimeout = $config->connectTimeout; + $this->_httpProxy = $config->httpProxy; + $this->_httpsProxy = $config->httpsProxy; + $this->_noProxy = $config->noProxy; + $this->_socks5Proxy = $config->socks5Proxy; + $this->_socks5NetWork = $config->socks5NetWork; + $this->_maxIdleConns = $config->maxIdleConns; + $this->_signatureVersion = $config->signatureVersion; + $this->_signatureAlgorithm = $config->signatureAlgorithm; + $this->_globalParameters = $config->globalParameters; + $this->_key = $config->key; + $this->_cert = $config->cert; + $this->_ca = $config->ca; + $this->_disableHttp2 = $config->disableHttp2; + $this->_retryOptions = $config->retryOptions; + $this->_tlsMinVersion = $config->tlsMinVersion; + } + + /** + * @remarks + * Encapsulate the request and invoke the network + * + * @param action - api name + * @param version - product version + * @param protocol - http or https + * @param method - e.g. GET + * @param authType - authorization type e.g. AK + * @param bodyType - response body type e.g. String + * @param request - object of OpenApiRequest + * @param runtime - which controls some details of call api, such as retry times + * @returns the response + * @param string $action + * @param string $version + * @param string $protocol + * @param string $method + * @param string $authType + * @param string $bodyType + * @param OpenApiRequest $request + * @param RuntimeOptions $runtime + * @return mixed[] + */ + public function doRPCRequest($action, $version, $protocol, $method, $authType, $bodyType, $request, $runtime) + { + $_runtime = [ + 'key' => '' . ($runtime->key ? $runtime->key : $this->_key), + 'cert' => '' . ($runtime->cert ? $runtime->cert : $this->_cert), + 'ca' => '' . ($runtime->ca ? $runtime->ca : $this->_ca), + 'readTimeout' => (($runtime->readTimeout ? $runtime->readTimeout : $this->_readTimeout) + 0), + 'connectTimeout' => (($runtime->connectTimeout ? $runtime->connectTimeout : $this->_connectTimeout) + 0), + 'httpProxy' => '' . ($runtime->httpProxy ? $runtime->httpProxy : $this->_httpProxy), + 'httpsProxy' => '' . ($runtime->httpsProxy ? $runtime->httpsProxy : $this->_httpsProxy), + 'noProxy' => '' . ($runtime->noProxy ? $runtime->noProxy : $this->_noProxy), + 'socks5Proxy' => '' . ($runtime->socks5Proxy ? $runtime->socks5Proxy : $this->_socks5Proxy), + 'socks5NetWork' => '' . ($runtime->socks5NetWork ? $runtime->socks5NetWork : $this->_socks5NetWork), + 'maxIdleConns' => (($runtime->maxIdleConns ? $runtime->maxIdleConns : $this->_maxIdleConns) + 0), + 'retryOptions' => $this->_retryOptions, + 'ignoreSSL' => $runtime->ignoreSSL, + 'tlsMinVersion' => $this->_tlsMinVersion, + ]; + + $_retriesAttempted = 0; + $_lastRequest = null; + $_lastResponse = null; + $_context = new RetryPolicyContext([ + 'retriesAttempted' => $_retriesAttempted, + ]); + while (Dara::shouldRetry($_runtime['retryOptions'], $_context)) { + if ($_retriesAttempted > 0) { + $_backoffTime = Dara::getBackoffDelay($_runtime['retryOptions'], $_context); + if ($_backoffTime > 0) { + Dara::sleep($_backoffTime); + } + } + + $_retriesAttempted++; + try { + $_request = new Request(); + $_request->protocol = '' . ($this->_protocol ? $this->_protocol : $protocol); + $_request->method = $method; + $_request->pathname = '/'; + $globalQueries = []; + $globalHeaders = []; + if (!is_null($this->_globalParameters)) { + $globalParams = $this->_globalParameters; + if (!is_null($globalParams->queries)) { + $globalQueries = $globalParams->queries; + } + + if (!is_null($globalParams->headers)) { + $globalHeaders = $globalParams->headers; + } + + } + + $extendsHeaders = []; + $extendsQueries = []; + if (!is_null($runtime->extendsParameters)) { + $extendsParameters = $runtime->extendsParameters; + if (!is_null($extendsParameters->headers)) { + $extendsHeaders = $extendsParameters->headers; + } + + if (!is_null($extendsParameters->queries)) { + $extendsQueries = $extendsParameters->queries; + } + + } + + $_request->query = Dara::merge([ + 'Action' => $action, + 'Format' => 'json', + 'Version' => $version, + 'Timestamp' => Utils::getTimestamp(), + 'SignatureNonce' => Utils::getNonce(), + ], $globalQueries, $extendsQueries, $request->query); + $headers = $this->getRpcHeaders(); + if (is_null($headers)) { + // endpoint is setted in product client + $_request->headers = Dara::merge([ + 'host' => $this->_endpoint, + 'x-acs-version' => $version, + 'x-acs-action' => $action, + 'user-agent' => Utils::getUserAgent($this->_userAgent), + ], $globalHeaders, $extendsHeaders, $request->headers); + } else { + $_request->headers = Dara::merge([ + 'host' => $this->_endpoint, + 'x-acs-version' => $version, + 'x-acs-action' => $action, + 'user-agent' => Utils::getUserAgent($this->_userAgent), + ], $globalHeaders, $extendsHeaders, $request->headers, $headers); + } + + if (!is_null($request->body)) { + $m = $request->body; + $tmp = Utils::query($m); + $_request->body = FormUtil::toFormString($tmp); + @$_request->headers['content-type'] = 'application/x-www-form-urlencoded'; + } + + if ($authType != 'Anonymous') { + if (is_null($this->_credential)) { + throw new ClientException([ + 'code' => 'InvalidCredentials', + 'message' => 'Please set up the credentials correctly. If you are setting them through environment variables, please ensure that ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET are set correctly. See https://help.aliyun.com/zh/sdk/developer-reference/configure-the-alibaba-cloud-accesskey-environment-variable-on-linux-macos-and-windows-systems for more details.', + ]); + } + + $credentialModel = $this->_credential->getCredential(); + if (!is_null($credentialModel->providerName)) { + @$_request->headers['x-acs-credentials-provider'] = $credentialModel->providerName; + } + + $credentialType = $credentialModel->type; + if ($credentialType == 'bearer') { + $bearerToken = $credentialModel->bearerToken; + @$_request->query['BearerToken'] = $bearerToken; + @$_request->query['SignatureType'] = 'BEARERTOKEN'; + } else if ($credentialType == 'id_token') { + $idToken = $credentialModel->securityToken; + @$_request->headers['x-acs-zero-trust-idtoken'] = $idToken; + } else { + $accessKeyId = $credentialModel->accessKeyId; + $accessKeySecret = $credentialModel->accessKeySecret; + $securityToken = $credentialModel->securityToken; + if (!is_null($securityToken) && $securityToken != '') { + @$_request->query['SecurityToken'] = $securityToken; + } + + @$_request->query['SignatureMethod'] = 'HMAC-SHA1'; + @$_request->query['SignatureVersion'] = '1.0'; + @$_request->query['AccessKeyId'] = $accessKeyId; + $t = null; + if (!is_null($request->body)) { + $t = $request->body; + } + + $signedParam = Dara::merge([ + ], $_request->query, Utils::query($t)); + @$_request->query['Signature'] = Utils::getRPCSignature($signedParam, $_request->method, $accessKeySecret); + } + + } + + $_lastRequest = $_request; + $_response = Dara::send($_request, $_runtime); + $_lastResponse = $_response; + + if (($_response->statusCode >= 400) && ($_response->statusCode < 600)) { + $_res = StreamUtil::readAsJSON($_response->body); + $err = $_res; + $requestId = (@$err['RequestId'] ? @$err['RequestId'] : @$err['requestId']); + $code = (@$err['Code'] ? @$err['Code'] : @$err['code']); + if (('' . (string) $code . '' == 'Throttling') || ('' . (string) $code . '' == 'Throttling.User') || ('' . (string) $code . '' == 'Throttling.Api')) { + throw new ThrottlingException([ + 'statusCode' => $_response->statusCode, + 'code' => '' . (string) $code . '', + 'message' => 'code: ' . (string) $_response->statusCode . ', ' . (string) (@$err['Message'] ? @$err['Message'] : @$err['message']) . ' request id: ' . (string) $requestId . '', + 'description' => '' . (string) (@$err['Description'] ? @$err['Description'] : @$err['description']) . '', + 'retryAfter' => Utils::getThrottlingTimeLeft($_response->headers), + 'data' => $err, + 'requestId' => '' . (string) $requestId . '', + ]); + } else if (($_response->statusCode >= 400) && ($_response->statusCode < 500)) { + throw new ClientException([ + 'statusCode' => $_response->statusCode, + 'code' => '' . (string) $code . '', + 'message' => 'code: ' . (string) $_response->statusCode . ', ' . (string) (@$err['Message'] ? @$err['Message'] : @$err['message']) . ' request id: ' . (string) $requestId . '', + 'description' => '' . (string) (@$err['Description'] ? @$err['Description'] : @$err['description']) . '', + 'data' => $err, + 'accessDeniedDetail' => $this->getAccessDeniedDetail($err), + 'requestId' => '' . (string) $requestId . '', + ]); + } else { + throw new ServerException([ + 'statusCode' => $_response->statusCode, + 'code' => '' . (string) $code . '', + 'message' => 'code: ' . (string) $_response->statusCode . ', ' . (string) (@$err['Message'] ? @$err['Message'] : @$err['message']) . ' request id: ' . (string) $requestId . '', + 'description' => '' . (string) (@$err['Description'] ? @$err['Description'] : @$err['description']) . '', + 'data' => $err, + 'requestId' => '' . (string) $requestId . '', + ]); + } + + } + + if ($bodyType == 'binary') { + $resp = [ + 'body' => $_response->body, + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, + ]; + return $resp; + } else if ($bodyType == 'byte') { + $byt = StreamUtil::readAsBytes($_response->body); + return [ + 'body' => $byt, + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, + ]; + } else if ($bodyType == 'string') { + $_str = StreamUtil::readAsString($_response->body); + return [ + 'body' => $_str, + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, + ]; + } else if ($bodyType == 'json') { + $obj = StreamUtil::readAsJSON($_response->body); + $res = $obj; + return [ + 'body' => $res, + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, + ]; + } else if ($bodyType == 'array') { + $arr = StreamUtil::readAsJSON($_response->body); + return [ + 'body' => $arr, + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, + ]; + } else { + return [ + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, + ]; + } + + } catch (DaraException $e) { + $_context = new RetryPolicyContext([ + 'retriesAttempted' => $_retriesAttempted, + 'lastRequest' => $_lastRequest, + 'lastResponse' => $_lastResponse, + 'exception' => $e, + ]); + continue; + } + } + + throw new DaraUnableRetryException($_context); + } + + /** + * @remarks + * Encapsulate the request and invoke the network + * + * @param action - api name + * @param version - product version + * @param protocol - http or https + * @param method - e.g. GET + * @param authType - authorization type e.g. AK + * @param pathname - pathname of every api + * @param bodyType - response body type e.g. String + * @param request - object of OpenApiRequest + * @param runtime - which controls some details of call api, such as retry times + * @returns the response + * @param string $action + * @param string $version + * @param string $protocol + * @param string $method + * @param string $authType + * @param string $pathname + * @param string $bodyType + * @param OpenApiRequest $request + * @param RuntimeOptions $runtime + * @return mixed[] + */ + public function doROARequest($action, $version, $protocol, $method, $authType, $pathname, $bodyType, $request, $runtime) + { + $_runtime = [ + 'key' => '' . ($runtime->key ? $runtime->key : $this->_key), + 'cert' => '' . ($runtime->cert ? $runtime->cert : $this->_cert), + 'ca' => '' . ($runtime->ca ? $runtime->ca : $this->_ca), + 'readTimeout' => (($runtime->readTimeout ? $runtime->readTimeout : $this->_readTimeout) + 0), + 'connectTimeout' => (($runtime->connectTimeout ? $runtime->connectTimeout : $this->_connectTimeout) + 0), + 'httpProxy' => '' . ($runtime->httpProxy ? $runtime->httpProxy : $this->_httpProxy), + 'httpsProxy' => '' . ($runtime->httpsProxy ? $runtime->httpsProxy : $this->_httpsProxy), + 'noProxy' => '' . ($runtime->noProxy ? $runtime->noProxy : $this->_noProxy), + 'socks5Proxy' => '' . ($runtime->socks5Proxy ? $runtime->socks5Proxy : $this->_socks5Proxy), + 'socks5NetWork' => '' . ($runtime->socks5NetWork ? $runtime->socks5NetWork : $this->_socks5NetWork), + 'maxIdleConns' => (($runtime->maxIdleConns ? $runtime->maxIdleConns : $this->_maxIdleConns) + 0), + 'retryOptions' => $this->_retryOptions, + 'ignoreSSL' => $runtime->ignoreSSL, + 'tlsMinVersion' => $this->_tlsMinVersion, + ]; + + $_retriesAttempted = 0; + $_lastRequest = null; + $_lastResponse = null; + $_context = new RetryPolicyContext([ + 'retriesAttempted' => $_retriesAttempted, + ]); + while (Dara::shouldRetry($_runtime['retryOptions'], $_context)) { + if ($_retriesAttempted > 0) { + $_backoffTime = Dara::getBackoffDelay($_runtime['retryOptions'], $_context); + if ($_backoffTime > 0) { + Dara::sleep($_backoffTime); + } + } + + $_retriesAttempted++; + try { + $_request = new Request(); + $_request->protocol = '' . ($this->_protocol ? $this->_protocol : $protocol); + $_request->method = $method; + $_request->pathname = $pathname; + $globalQueries = []; + $globalHeaders = []; + if (!is_null($this->_globalParameters)) { + $globalParams = $this->_globalParameters; + if (!is_null($globalParams->queries)) { + $globalQueries = $globalParams->queries; + } + + if (!is_null($globalParams->headers)) { + $globalHeaders = $globalParams->headers; + } + + } + + $extendsHeaders = []; + $extendsQueries = []; + if (!is_null($runtime->extendsParameters)) { + $extendsParameters = $runtime->extendsParameters; + if (!is_null($extendsParameters->headers)) { + $extendsHeaders = $extendsParameters->headers; + } + + if (!is_null($extendsParameters->queries)) { + $extendsQueries = $extendsParameters->queries; + } + + } + + $_request->headers = Dara::merge([ + 'date' => Utils::getDateUTCString(), + 'host' => $this->_endpoint, + 'accept' => 'application/json', + 'x-acs-signature-nonce' => Utils::getNonce(), + 'x-acs-signature-method' => 'HMAC-SHA1', + 'x-acs-signature-version' => '1.0', + 'x-acs-version' => $version, + 'x-acs-action' => $action, + 'user-agent' => Utils::getUserAgent($this->_userAgent), + ], $globalHeaders, $extendsHeaders, $request->headers); + if (!is_null($request->body)) { + $_request->body = json_encode($request->body, JSON_UNESCAPED_UNICODE + JSON_UNESCAPED_SLASHES); + @$_request->headers['content-type'] = 'application/json; charset=utf-8'; + } + + $_request->query = Dara::merge([ + ], $globalQueries, $extendsQueries); + if (!is_null($request->query)) { + $_request->query = Dara::merge([ + ], $_request->query, $request->query); + } + + if ($authType != 'Anonymous') { + if (is_null($this->_credential)) { + throw new ClientException([ + 'code' => 'InvalidCredentials', + 'message' => 'Please set up the credentials correctly. If you are setting them through environment variables, please ensure that ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET are set correctly. See https://help.aliyun.com/zh/sdk/developer-reference/configure-the-alibaba-cloud-accesskey-environment-variable-on-linux-macos-and-windows-systems for more details.', + ]); + } + + $credentialModel = $this->_credential->getCredential(); + if (!is_null($credentialModel->providerName)) { + @$_request->headers['x-acs-credentials-provider'] = $credentialModel->providerName; + } + + $credentialType = $credentialModel->type; + if ($credentialType == 'bearer') { + $bearerToken = $credentialModel->bearerToken; + @$_request->headers['x-acs-bearer-token'] = $bearerToken; + @$_request->headers['x-acs-signature-type'] = 'BEARERTOKEN'; + } else if ($credentialType == 'id_token') { + $idToken = $credentialModel->securityToken; + @$_request->headers['x-acs-zero-trust-idtoken'] = $idToken; + } else { + $accessKeyId = $credentialModel->accessKeyId; + $accessKeySecret = $credentialModel->accessKeySecret; + $securityToken = $credentialModel->securityToken; + if (!is_null($securityToken) && $securityToken != '') { + @$_request->headers['x-acs-accesskey-id'] = $accessKeyId; + @$_request->headers['x-acs-security-token'] = $securityToken; + } + + $stringToSign = Utils::getStringToSign($_request); + @$_request->headers['authorization'] = 'acs ' . $accessKeyId . ':' . Utils::getROASignature($stringToSign, $accessKeySecret) . ''; + } + + } + + $_lastRequest = $_request; + $_response = Dara::send($_request, $_runtime); + $_lastResponse = $_response; + + if ($_response->statusCode == 204) { + return [ + 'headers' => $_response->headers, + ]; + } + + if (($_response->statusCode >= 400) && ($_response->statusCode < 600)) { + $_res = StreamUtil::readAsJSON($_response->body); + $err = $_res; + $requestId = '' . (@$err['RequestId'] ? @$err['RequestId'] : @$err['requestId']); + $requestId = '' . ($requestId ? $requestId : @$err['requestid']); + $code = '' . (@$err['Code'] ? @$err['Code'] : @$err['code']); + if (('' . $code . '' == 'Throttling') || ('' . $code . '' == 'Throttling.User') || ('' . $code . '' == 'Throttling.Api')) { + throw new ThrottlingException([ + 'statusCode' => $_response->statusCode, + 'code' => '' . $code . '', + 'message' => 'code: ' . (string) $_response->statusCode . ', ' . (string) (@$err['Message'] ? @$err['Message'] : @$err['message']) . ' request id: ' . $requestId . '', + 'description' => '' . (string) (@$err['Description'] ? @$err['Description'] : @$err['description']) . '', + 'retryAfter' => Utils::getThrottlingTimeLeft($_response->headers), + 'data' => $err, + 'requestId' => '' . $requestId . '', + ]); + } else if (($_response->statusCode >= 400) && ($_response->statusCode < 500)) { + throw new ClientException([ + 'statusCode' => $_response->statusCode, + 'code' => '' . $code . '', + 'message' => 'code: ' . (string) $_response->statusCode . ', ' . (string) (@$err['Message'] ? @$err['Message'] : @$err['message']) . ' request id: ' . $requestId . '', + 'description' => '' . (string) (@$err['Description'] ? @$err['Description'] : @$err['description']) . '', + 'data' => $err, + 'accessDeniedDetail' => $this->getAccessDeniedDetail($err), + 'requestId' => '' . $requestId . '', + ]); + } else { + throw new ServerException([ + 'statusCode' => $_response->statusCode, + 'code' => '' . $code . '', + 'message' => 'code: ' . (string) $_response->statusCode . ', ' . (string) (@$err['Message'] ? @$err['Message'] : @$err['message']) . ' request id: ' . $requestId . '', + 'description' => '' . (string) (@$err['Description'] ? @$err['Description'] : @$err['description']) . '', + 'data' => $err, + 'requestId' => '' . $requestId . '', + ]); + } + + } + + if ($bodyType == 'binary') { + $resp = [ + 'body' => $_response->body, + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, + ]; + return $resp; + } else if ($bodyType == 'byte') { + $byt = StreamUtil::readAsBytes($_response->body); + return [ + 'body' => $byt, + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, + ]; + } else if ($bodyType == 'string') { + $_str = StreamUtil::readAsString($_response->body); + return [ + 'body' => $_str, + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, + ]; + } else if ($bodyType == 'json') { + $obj = StreamUtil::readAsJSON($_response->body); + $res = $obj; + return [ + 'body' => $res, + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, + ]; + } else if ($bodyType == 'array') { + $arr = StreamUtil::readAsJSON($_response->body); + return [ + 'body' => $arr, + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, + ]; + } else { + return [ + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, + ]; + } + + } catch (DaraException $e) { + $_context = new RetryPolicyContext([ + 'retriesAttempted' => $_retriesAttempted, + 'lastRequest' => $_lastRequest, + 'lastResponse' => $_lastResponse, + 'exception' => $e, + ]); + continue; + } + } + + throw new DaraUnableRetryException($_context); + } + + /** + * @remarks + * Encapsulate the request and invoke the network with form body + * + * @param action - api name + * @param version - product version + * @param protocol - http or https + * @param method - e.g. GET + * @param authType - authorization type e.g. AK + * @param pathname - pathname of every api + * @param bodyType - response body type e.g. String + * @param request - object of OpenApiRequest + * @param runtime - which controls some details of call api, such as retry times + * @returns the response + * @param string $action + * @param string $version + * @param string $protocol + * @param string $method + * @param string $authType + * @param string $pathname + * @param string $bodyType + * @param OpenApiRequest $request + * @param RuntimeOptions $runtime + * @return mixed[] + */ + public function doROARequestWithForm($action, $version, $protocol, $method, $authType, $pathname, $bodyType, $request, $runtime) + { + $_runtime = [ + 'key' => '' . ($runtime->key ? $runtime->key : $this->_key), + 'cert' => '' . ($runtime->cert ? $runtime->cert : $this->_cert), + 'ca' => '' . ($runtime->ca ? $runtime->ca : $this->_ca), + 'readTimeout' => (($runtime->readTimeout ? $runtime->readTimeout : $this->_readTimeout) + 0), + 'connectTimeout' => (($runtime->connectTimeout ? $runtime->connectTimeout : $this->_connectTimeout) + 0), + 'httpProxy' => '' . ($runtime->httpProxy ? $runtime->httpProxy : $this->_httpProxy), + 'httpsProxy' => '' . ($runtime->httpsProxy ? $runtime->httpsProxy : $this->_httpsProxy), + 'noProxy' => '' . ($runtime->noProxy ? $runtime->noProxy : $this->_noProxy), + 'socks5Proxy' => '' . ($runtime->socks5Proxy ? $runtime->socks5Proxy : $this->_socks5Proxy), + 'socks5NetWork' => '' . ($runtime->socks5NetWork ? $runtime->socks5NetWork : $this->_socks5NetWork), + 'maxIdleConns' => (($runtime->maxIdleConns ? $runtime->maxIdleConns : $this->_maxIdleConns) + 0), + 'retryOptions' => $this->_retryOptions, + 'ignoreSSL' => $runtime->ignoreSSL, + 'tlsMinVersion' => $this->_tlsMinVersion, + ]; + + $_retriesAttempted = 0; + $_lastRequest = null; + $_lastResponse = null; + $_context = new RetryPolicyContext([ + 'retriesAttempted' => $_retriesAttempted, + ]); + while (Dara::shouldRetry($_runtime['retryOptions'], $_context)) { + if ($_retriesAttempted > 0) { + $_backoffTime = Dara::getBackoffDelay($_runtime['retryOptions'], $_context); + if ($_backoffTime > 0) { + Dara::sleep($_backoffTime); + } + } + + $_retriesAttempted++; + try { + $_request = new Request(); + $_request->protocol = '' . ($this->_protocol ? $this->_protocol : $protocol); + $_request->method = $method; + $_request->pathname = $pathname; + $globalQueries = []; + $globalHeaders = []; + if (!is_null($this->_globalParameters)) { + $globalParams = $this->_globalParameters; + if (!is_null($globalParams->queries)) { + $globalQueries = $globalParams->queries; + } + + if (!is_null($globalParams->headers)) { + $globalHeaders = $globalParams->headers; + } + + } + + $extendsHeaders = []; + $extendsQueries = []; + if (!is_null($runtime->extendsParameters)) { + $extendsParameters = $runtime->extendsParameters; + if (!is_null($extendsParameters->headers)) { + $extendsHeaders = $extendsParameters->headers; + } + + if (!is_null($extendsParameters->queries)) { + $extendsQueries = $extendsParameters->queries; + } + + } + + $_request->headers = Dara::merge([ + 'date' => Utils::getDateUTCString(), + 'host' => $this->_endpoint, + 'accept' => 'application/json', + 'x-acs-signature-nonce' => Utils::getNonce(), + 'x-acs-signature-method' => 'HMAC-SHA1', + 'x-acs-signature-version' => '1.0', + 'x-acs-version' => $version, + 'x-acs-action' => $action, + 'user-agent' => Utils::getUserAgent($this->_userAgent), + ], $globalHeaders, $extendsHeaders, $request->headers); + if (!is_null($request->body)) { + $m = $request->body; + $_request->body = Utils::toForm($m); + @$_request->headers['content-type'] = 'application/x-www-form-urlencoded'; + } + + $_request->query = Dara::merge([ + ], $globalQueries, $extendsQueries); + if (!is_null($request->query)) { + $_request->query = Dara::merge([ + ], $_request->query, $request->query); + } + + if ($authType != 'Anonymous') { + if (is_null($this->_credential)) { + throw new ClientException([ + 'code' => 'InvalidCredentials', + 'message' => 'Please set up the credentials correctly. If you are setting them through environment variables, please ensure that ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET are set correctly. See https://help.aliyun.com/zh/sdk/developer-reference/configure-the-alibaba-cloud-accesskey-environment-variable-on-linux-macos-and-windows-systems for more details.', + ]); + } + + $credentialModel = $this->_credential->getCredential(); + if (!is_null($credentialModel->providerName)) { + @$_request->headers['x-acs-credentials-provider'] = $credentialModel->providerName; + } + + $credentialType = $credentialModel->type; + if ($credentialType == 'bearer') { + $bearerToken = $credentialModel->bearerToken; + @$_request->headers['x-acs-bearer-token'] = $bearerToken; + @$_request->headers['x-acs-signature-type'] = 'BEARERTOKEN'; + } else if ($credentialType == 'id_token') { + $idToken = $credentialModel->securityToken; + @$_request->headers['x-acs-zero-trust-idtoken'] = $idToken; + } else { + $accessKeyId = $credentialModel->accessKeyId; + $accessKeySecret = $credentialModel->accessKeySecret; + $securityToken = $credentialModel->securityToken; + if (!is_null($securityToken) && $securityToken != '') { + @$_request->headers['x-acs-accesskey-id'] = $accessKeyId; + @$_request->headers['x-acs-security-token'] = $securityToken; + } + + $stringToSign = Utils::getStringToSign($_request); + @$_request->headers['authorization'] = 'acs ' . $accessKeyId . ':' . Utils::getROASignature($stringToSign, $accessKeySecret) . ''; + } + + } + + $_lastRequest = $_request; + $_response = Dara::send($_request, $_runtime); + $_lastResponse = $_response; + + if ($_response->statusCode == 204) { + return [ + 'headers' => $_response->headers, + ]; + } + + if (($_response->statusCode >= 400) && ($_response->statusCode < 600)) { + $_res = StreamUtil::readAsJSON($_response->body); + $err = $_res; + $requestId = '' . (@$err['RequestId'] ? @$err['RequestId'] : @$err['requestId']); + $code = '' . (@$err['Code'] ? @$err['Code'] : @$err['code']); + if (('' . $code . '' == 'Throttling') || ('' . $code . '' == 'Throttling.User') || ('' . $code . '' == 'Throttling.Api')) { + throw new ThrottlingException([ + 'statusCode' => $_response->statusCode, + 'code' => '' . $code . '', + 'message' => 'code: ' . (string) $_response->statusCode . ', ' . (string) (@$err['Message'] ? @$err['Message'] : @$err['message']) . ' request id: ' . $requestId . '', + 'description' => '' . (string) (@$err['Description'] ? @$err['Description'] : @$err['description']) . '', + 'retryAfter' => Utils::getThrottlingTimeLeft($_response->headers), + 'data' => $err, + 'requestId' => '' . $requestId . '', + ]); + } else if (($_response->statusCode >= 400) && ($_response->statusCode < 500)) { + throw new ClientException([ + 'statusCode' => $_response->statusCode, + 'code' => '' . $code . '', + 'message' => 'code: ' . (string) $_response->statusCode . ', ' . (string) (@$err['Message'] ? @$err['Message'] : @$err['message']) . ' request id: ' . $requestId . '', + 'description' => '' . (string) (@$err['Description'] ? @$err['Description'] : @$err['description']) . '', + 'data' => $err, + 'accessDeniedDetail' => $this->getAccessDeniedDetail($err), + 'requestId' => '' . $requestId . '', + ]); + } else { + throw new ServerException([ + 'statusCode' => $_response->statusCode, + 'code' => '' . $code . '', + 'message' => 'code: ' . (string) $_response->statusCode . ', ' . (string) (@$err['Message'] ? @$err['Message'] : @$err['message']) . ' request id: ' . $requestId . '', + 'description' => '' . (string) (@$err['Description'] ? @$err['Description'] : @$err['description']) . '', + 'data' => $err, + 'requestId' => '' . $requestId . '', + ]); + } + + } + + if ($bodyType == 'binary') { + $resp = [ + 'body' => $_response->body, + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, + ]; + return $resp; + } else if ($bodyType == 'byte') { + $byt = StreamUtil::readAsBytes($_response->body); + return [ + 'body' => $byt, + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, + ]; + } else if ($bodyType == 'string') { + $_str = StreamUtil::readAsString($_response->body); + return [ + 'body' => $_str, + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, + ]; + } else if ($bodyType == 'json') { + $obj = StreamUtil::readAsJSON($_response->body); + $res = $obj; + return [ + 'body' => $res, + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, + ]; + } else if ($bodyType == 'array') { + $arr = StreamUtil::readAsJSON($_response->body); + return [ + 'body' => $arr, + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, + ]; + } else { + return [ + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, + ]; + } + + } catch (DaraException $e) { + $_context = new RetryPolicyContext([ + 'retriesAttempted' => $_retriesAttempted, + 'lastRequest' => $_lastRequest, + 'lastResponse' => $_lastResponse, + 'exception' => $e, + ]); + continue; + } + } + + throw new DaraUnableRetryException($_context); + } + + /** + * @remarks + * Encapsulate the request and invoke the network + * + * @param action - api name + * @param version - product version + * @param protocol - http or https + * @param method - e.g. GET + * @param authType - authorization type e.g. AK + * @param bodyType - response body type e.g. String + * @param request - object of OpenApiRequest + * @param runtime - which controls some details of call api, such as retry times + * @returns the response + * @param Params $params + * @param OpenApiRequest $request + * @param RuntimeOptions $runtime + * @return mixed[] + */ + public function doRequest($params, $request, $runtime) + { + $_runtime = [ + 'key' => '' . ($runtime->key ? $runtime->key : $this->_key), + 'cert' => '' . ($runtime->cert ? $runtime->cert : $this->_cert), + 'ca' => '' . ($runtime->ca ? $runtime->ca : $this->_ca), + 'readTimeout' => (($runtime->readTimeout ? $runtime->readTimeout : $this->_readTimeout) + 0), + 'connectTimeout' => (($runtime->connectTimeout ? $runtime->connectTimeout : $this->_connectTimeout) + 0), + 'httpProxy' => '' . ($runtime->httpProxy ? $runtime->httpProxy : $this->_httpProxy), + 'httpsProxy' => '' . ($runtime->httpsProxy ? $runtime->httpsProxy : $this->_httpsProxy), + 'noProxy' => '' . ($runtime->noProxy ? $runtime->noProxy : $this->_noProxy), + 'socks5Proxy' => '' . ($runtime->socks5Proxy ? $runtime->socks5Proxy : $this->_socks5Proxy), + 'socks5NetWork' => '' . ($runtime->socks5NetWork ? $runtime->socks5NetWork : $this->_socks5NetWork), + 'maxIdleConns' => (($runtime->maxIdleConns ? $runtime->maxIdleConns : $this->_maxIdleConns) + 0), + 'retryOptions' => $this->_retryOptions, + 'ignoreSSL' => $runtime->ignoreSSL, + 'tlsMinVersion' => $this->_tlsMinVersion, + ]; + + $_retriesAttempted = 0; + $_lastRequest = null; + $_lastResponse = null; + $_context = new RetryPolicyContext([ + 'retriesAttempted' => $_retriesAttempted, + ]); + while (Dara::shouldRetry($_runtime['retryOptions'], $_context)) { + if ($_retriesAttempted > 0) { + $_backoffTime = Dara::getBackoffDelay($_runtime['retryOptions'], $_context); + if ($_backoffTime > 0) { + Dara::sleep($_backoffTime); + } + } + + $_retriesAttempted++; + try { + $_request = new Request(); + $_request->protocol = '' . ($this->_protocol ? $this->_protocol : $params->protocol); + $_request->method = $params->method; + $_request->pathname = $params->pathname; + $globalQueries = []; + $globalHeaders = []; + if (!is_null($this->_globalParameters)) { + $globalParams = $this->_globalParameters; + if (!is_null($globalParams->queries)) { + $globalQueries = $globalParams->queries; + } + + if (!is_null($globalParams->headers)) { + $globalHeaders = $globalParams->headers; + } + + } + + $extendsHeaders = []; + $extendsQueries = []; + if (!is_null($runtime->extendsParameters)) { + $extendsParameters = $runtime->extendsParameters; + if (!is_null($extendsParameters->headers)) { + $extendsHeaders = $extendsParameters->headers; + } + + if (!is_null($extendsParameters->queries)) { + $extendsQueries = $extendsParameters->queries; + } + + } + + $_request->query = Dara::merge([ + ], $globalQueries, $extendsQueries, $request->query); + // endpoint is setted in product client + $_request->headers = Dara::merge([ + 'host' => $this->_endpoint, + 'x-acs-version' => $params->version, + 'x-acs-action' => $params->action, + 'user-agent' => Utils::getUserAgent($this->_userAgent), + 'x-acs-date' => Utils::getTimestamp(), + 'x-acs-signature-nonce' => Utils::getNonce(), + 'accept' => 'application/json', + ], $globalHeaders, $extendsHeaders, $request->headers); + if ($params->style == 'RPC') { + $headers = $this->getRpcHeaders(); + if (!is_null($headers)) { + $_request->headers = Dara::merge([ + ], $_request->headers, $headers); + } + + } + + $signatureAlgorithm = '' . ($this->_signatureAlgorithm ? $this->_signatureAlgorithm : 'ACS3-HMAC-SHA256'); + $hashedRequestPayload = Utils::hash(BytesUtil::from('', 'utf-8'), $signatureAlgorithm); + if (!is_null($request->stream)) { + $tmp = StreamUtil::readAsBytes($request->stream); + $hashedRequestPayload = Utils::hash($tmp, $signatureAlgorithm); + $_request->body = $tmp; + @$_request->headers['content-type'] = 'application/octet-stream'; + } else { + if (!is_null($request->body)) { + if ($params->reqBodyType == 'byte') { + $byteObj = unpack('C*', $request->body); + $hashedRequestPayload = Utils::hash($byteObj, $signatureAlgorithm); + $_request->body = $byteObj; + } else if ($params->reqBodyType == 'json') { + $jsonObj = json_encode($request->body, JSON_UNESCAPED_UNICODE + JSON_UNESCAPED_SLASHES); + $hashedRequestPayload = Utils::hash(StringUtil::toBytes($jsonObj, 'utf8'), $signatureAlgorithm); + $_request->body = $jsonObj; + @$_request->headers['content-type'] = 'application/json; charset=utf-8'; + } else { + $m = $request->body; + $formObj = Utils::toForm($m); + $hashedRequestPayload = Utils::hash(StringUtil::toBytes($formObj, 'utf8'), $signatureAlgorithm); + $_request->body = $formObj; + @$_request->headers['content-type'] = 'application/x-www-form-urlencoded'; + } + + } + + } + + @$_request->headers['x-acs-content-sha256'] = bin2hex(BytesUtil::toString($hashedRequestPayload)); + if ($params->authType != 'Anonymous') { + if (is_null($this->_credential)) { + throw new ClientException([ + 'code' => 'InvalidCredentials', + 'message' => 'Please set up the credentials correctly. If you are setting them through environment variables, please ensure that ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET are set correctly. See https://help.aliyun.com/zh/sdk/developer-reference/configure-the-alibaba-cloud-accesskey-environment-variable-on-linux-macos-and-windows-systems for more details.', + ]); + } + + $credentialModel = $this->_credential->getCredential(); + if (!is_null($credentialModel->providerName)) { + @$_request->headers['x-acs-credentials-provider'] = $credentialModel->providerName; + } + + $authType = $credentialModel->type; + if ($authType == 'bearer') { + $bearerToken = $credentialModel->bearerToken; + @$_request->headers['x-acs-bearer-token'] = $bearerToken; + if ($params->style == 'RPC') { + @$_request->query['SignatureType'] = 'BEARERTOKEN'; + } else { + @$_request->headers['x-acs-signature-type'] = 'BEARERTOKEN'; + } + + } else if ($authType == 'id_token') { + $idToken = $credentialModel->securityToken; + @$_request->headers['x-acs-zero-trust-idtoken'] = $idToken; + } else { + $accessKeyId = $credentialModel->accessKeyId; + $accessKeySecret = $credentialModel->accessKeySecret; + $securityToken = $credentialModel->securityToken; + if (!is_null($securityToken) && $securityToken != '') { + @$_request->headers['x-acs-accesskey-id'] = $accessKeyId; + @$_request->headers['x-acs-security-token'] = $securityToken; + } + + @$_request->headers['Authorization'] = Utils::getAuthorization($_request, $signatureAlgorithm, bin2hex(BytesUtil::toString($hashedRequestPayload)), $accessKeyId, $accessKeySecret); + } + + } + + $_lastRequest = $_request; + $_response = Dara::send($_request, $_runtime); + $_lastResponse = $_response; + + if (($_response->statusCode >= 400) && ($_response->statusCode < 600)) { + $err = []; + if (!is_null(@$_response->headers['content-type']) && @$_response->headers['content-type'] == 'text/xml;charset=utf-8') { + $_str = StreamUtil::readAsString($_response->body); + $respMap = XML::parseXml($_str, null); + $err = @$respMap['Error']; + } else { + $_res = StreamUtil::readAsJSON($_response->body); + $err = $_res; + } + + $requestId = '' . (@$err['RequestId'] ? @$err['RequestId'] : @$err['requestId']); + $code = '' . (@$err['Code'] ? @$err['Code'] : @$err['code']); + if (('' . $code . '' == 'Throttling') || ('' . $code . '' == 'Throttling.User') || ('' . $code . '' == 'Throttling.Api')) { + throw new ThrottlingException([ + 'statusCode' => $_response->statusCode, + 'code' => '' . $code . '', + 'message' => 'code: ' . (string) $_response->statusCode . ', ' . (string) (@$err['Message'] ? @$err['Message'] : @$err['message']) . ' request id: ' . $requestId . '', + 'description' => '' . (string) (@$err['Description'] ? @$err['Description'] : @$err['description']) . '', + 'retryAfter' => Utils::getThrottlingTimeLeft($_response->headers), + 'data' => $err, + 'requestId' => '' . $requestId . '', + ]); + } else if (($_response->statusCode >= 400) && ($_response->statusCode < 500)) { + throw new ClientException([ + 'statusCode' => $_response->statusCode, + 'code' => '' . $code . '', + 'message' => 'code: ' . (string) $_response->statusCode . ', ' . (string) (@$err['Message'] ? @$err['Message'] : @$err['message']) . ' request id: ' . $requestId . '', + 'description' => '' . (string) (@$err['Description'] ? @$err['Description'] : @$err['description']) . '', + 'data' => $err, + 'accessDeniedDetail' => $this->getAccessDeniedDetail($err), + 'requestId' => '' . $requestId . '', + ]); + } else { + throw new ServerException([ + 'statusCode' => $_response->statusCode, + 'code' => '' . $code . '', + 'message' => 'code: ' . (string) $_response->statusCode . ', ' . (string) (@$err['Message'] ? @$err['Message'] : @$err['message']) . ' request id: ' . $requestId . '', + 'description' => '' . (string) (@$err['Description'] ? @$err['Description'] : @$err['description']) . '', + 'data' => $err, + 'requestId' => '' . $requestId . '', + ]); + } + + } + + if ($params->bodyType == 'binary') { + $resp = [ + 'body' => $_response->body, + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, + ]; + return $resp; + } else if ($params->bodyType == 'byte') { + $byt = StreamUtil::readAsBytes($_response->body); + return [ + 'body' => $byt, + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, + ]; + } else if ($params->bodyType == 'string') { + $respStr = StreamUtil::readAsString($_response->body); + return [ + 'body' => $respStr, + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, + ]; + } else if ($params->bodyType == 'json') { + $obj = StreamUtil::readAsJSON($_response->body); + $res = $obj; + return [ + 'body' => $res, + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, + ]; + } else if ($params->bodyType == 'array') { + $arr = StreamUtil::readAsJSON($_response->body); + return [ + 'body' => $arr, + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, + ]; + } else { + $anything = StreamUtil::readAsString($_response->body); + return [ + 'body' => $anything, + 'headers' => $_response->headers, + 'statusCode' => $_response->statusCode, + ]; + } + + } catch (DaraException $e) { + $_context = new RetryPolicyContext([ + 'retriesAttempted' => $_retriesAttempted, + 'lastRequest' => $_lastRequest, + 'lastResponse' => $_lastResponse, + 'exception' => $e, + ]); + continue; + } + } + + throw new DaraUnableRetryException($_context); + } + + /** + * @remarks + * Encapsulate the request and invoke the network + * + * @param action - api name + * @param version - product version + * @param protocol - http or https + * @param method - e.g. GET + * @param authType - authorization type e.g. AK + * @param bodyType - response body type e.g. String + * @param request - object of OpenApiRequest + * @param runtime - which controls some details of call api, such as retry times + * @returns the response + * @param Params $params + * @param OpenApiRequest $request + * @param RuntimeOptions $runtime + * @return mixed[] + */ + public function execute($params, $request, $runtime) + { + $_runtime = [ + 'key' => '' . ($runtime->key ? $runtime->key : $this->_key), + 'cert' => '' . ($runtime->cert ? $runtime->cert : $this->_cert), + 'ca' => '' . ($runtime->ca ? $runtime->ca : $this->_ca), + 'readTimeout' => (($runtime->readTimeout ? $runtime->readTimeout : $this->_readTimeout) + 0), + 'connectTimeout' => (($runtime->connectTimeout ? $runtime->connectTimeout : $this->_connectTimeout) + 0), + 'httpProxy' => '' . ($runtime->httpProxy ? $runtime->httpProxy : $this->_httpProxy), + 'httpsProxy' => '' . ($runtime->httpsProxy ? $runtime->httpsProxy : $this->_httpsProxy), + 'noProxy' => '' . ($runtime->noProxy ? $runtime->noProxy : $this->_noProxy), + 'socks5Proxy' => '' . ($runtime->socks5Proxy ? $runtime->socks5Proxy : $this->_socks5Proxy), + 'socks5NetWork' => '' . ($runtime->socks5NetWork ? $runtime->socks5NetWork : $this->_socks5NetWork), + 'maxIdleConns' => (($runtime->maxIdleConns ? $runtime->maxIdleConns : $this->_maxIdleConns) + 0), + 'retryOptions' => $this->_retryOptions, + 'ignoreSSL' => $runtime->ignoreSSL, + 'tlsMinVersion' => $this->_tlsMinVersion, + 'disableHttp2' => boolval(($this->_disableHttp2 ? $this->_disableHttp2 : false)), + ]; + + $_retriesAttempted = 0; + $_lastRequest = null; + $_lastResponse = null; + $_context = new RetryPolicyContext([ + 'retriesAttempted' => $_retriesAttempted, + ]); + while (Dara::shouldRetry($_runtime['retryOptions'], $_context)) { + if ($_retriesAttempted > 0) { + $_backoffTime = Dara::getBackoffDelay($_runtime['retryOptions'], $_context); + if ($_backoffTime > 0) { + Dara::sleep($_backoffTime); + } + } + + $_retriesAttempted++; + try { + $_request = new Request(); + // spi = new Gateway();//Gateway implements SPI,这一步在产品 SDK 中实例化 + $headers = $this->getRpcHeaders(); + $globalQueries = []; + $globalHeaders = []; + if (!is_null($this->_globalParameters)) { + $globalParams = $this->_globalParameters; + if (!is_null($globalParams->queries)) { + $globalQueries = $globalParams->queries; + } + + if (!is_null($globalParams->headers)) { + $globalHeaders = $globalParams->headers; + } + + } + + $extendsHeaders = []; + $extendsQueries = []; + if (!is_null($runtime->extendsParameters)) { + $extendsParameters = $runtime->extendsParameters; + if (!is_null($extendsParameters->headers)) { + $extendsHeaders = $extendsParameters->headers; + } + + if (!is_null($extendsParameters->queries)) { + $extendsQueries = $extendsParameters->queries; + } + + } + + $requestContext = new \Darabonba\GatewaySpi\Models\InterceptorContext\request([ + 'headers' => Dara::merge([ + ], $globalHeaders, $extendsHeaders, $request->headers, $headers), + 'query' => Dara::merge([ + ], $globalQueries, $extendsQueries, $request->query), + 'body' => $request->body, + 'stream' => $request->stream, + 'hostMap' => $request->hostMap, + 'pathname' => $params->pathname, + 'productId' => $this->_productId, + 'action' => $params->action, + 'version' => $params->version, + 'protocol' => '' . ($this->_protocol ? $this->_protocol : $params->protocol), + 'method' => '' . ($this->_method ? $this->_method : $params->method), + 'authType' => $params->authType, + 'bodyType' => $params->bodyType, + 'reqBodyType' => $params->reqBodyType, + 'style' => $params->style, + 'credential' => $this->_credential, + 'signatureVersion' => $this->_signatureVersion, + 'signatureAlgorithm' => $this->_signatureAlgorithm, + 'userAgent' => Utils::getUserAgent($this->_userAgent), + ]); + $configurationContext = new configuration([ + 'regionId' => $this->_regionId, + 'endpoint' => '' . ($request->endpointOverride ? $request->endpointOverride : $this->_endpoint), + 'endpointRule' => $this->_endpointRule, + 'endpointMap' => $this->_endpointMap, + 'endpointType' => $this->_endpointType, + 'network' => $this->_network, + 'suffix' => $this->_suffix, + ]); + $interceptorContext = new InterceptorContext([ + 'request' => $requestContext, + 'configuration' => $configurationContext, + ]); + $attributeMap = new AttributeMap([]); + if (!is_null($this->_attributeMap)) { + $attributeMap = $this->_attributeMap; + } + + // 1. spi.modifyConfiguration(context: SPI.InterceptorContext, attributeMap: SPI.AttributeMap); + $this->_spi->modifyConfiguration($interceptorContext, $attributeMap); + // 2. spi.modifyRequest(context: SPI.InterceptorContext, attributeMap: SPI.AttributeMap); + $this->_spi->modifyRequest($interceptorContext, $attributeMap); + $_request->protocol = $interceptorContext->request->protocol; + $_request->method = $interceptorContext->request->method; + $_request->pathname = $interceptorContext->request->pathname; + $_request->query = $interceptorContext->request->query; + $_request->body = $interceptorContext->request->stream; + $_request->headers = $interceptorContext->request->headers; + $_lastRequest = $_request; + $_response = Dara::send($_request, $_runtime); + $_lastResponse = $_response; + + $responseContext = new response([ + 'statusCode' => $_response->statusCode, + 'headers' => $_response->headers, + 'body' => $_response->body, + ]); + $interceptorContext->response = $responseContext; + // 3. spi.modifyResponse(context: SPI.InterceptorContext, attributeMap: SPI.AttributeMap); + $this->_spi->modifyResponse($interceptorContext, $attributeMap); + return [ + 'headers' => $interceptorContext->response->headers, + 'statusCode' => $interceptorContext->response->statusCode, + 'body' => $interceptorContext->response->deserializedBody, + ]; + } catch (DaraException $e) { + $_context = new RetryPolicyContext([ + 'retriesAttempted' => $_retriesAttempted, + 'lastRequest' => $_lastRequest, + 'lastResponse' => $_lastResponse, + 'exception' => $e, + ]); + continue; + } + } + + throw new DaraUnableRetryException($_context); + } + + /** + * @param Params $params + * @param OpenApiRequest $request + * @param RuntimeOptions $runtime + * @return SSEResponse + */ + public function callSSEApi($params, $request, $runtime) + { + $_runtime = [ + 'key' => '' . ($runtime->key ? $runtime->key : $this->_key), + 'cert' => '' . ($runtime->cert ? $runtime->cert : $this->_cert), + 'ca' => '' . ($runtime->ca ? $runtime->ca : $this->_ca), + 'readTimeout' => (($runtime->readTimeout ? $runtime->readTimeout : $this->_readTimeout) + 0), + 'connectTimeout' => (($runtime->connectTimeout ? $runtime->connectTimeout : $this->_connectTimeout) + 0), + 'httpProxy' => '' . ($runtime->httpProxy ? $runtime->httpProxy : $this->_httpProxy), + 'httpsProxy' => '' . ($runtime->httpsProxy ? $runtime->httpsProxy : $this->_httpsProxy), + 'noProxy' => '' . ($runtime->noProxy ? $runtime->noProxy : $this->_noProxy), + 'socks5Proxy' => '' . ($runtime->socks5Proxy ? $runtime->socks5Proxy : $this->_socks5Proxy), + 'socks5NetWork' => '' . ($runtime->socks5NetWork ? $runtime->socks5NetWork : $this->_socks5NetWork), + 'maxIdleConns' => (($runtime->maxIdleConns ? $runtime->maxIdleConns : $this->_maxIdleConns) + 0), + 'retryOptions' => $this->_retryOptions, + 'ignoreSSL' => $runtime->ignoreSSL, + 'tlsMinVersion' => $this->_tlsMinVersion, + ]; + $_request = new Request(); + $_request->protocol = '' . ($this->_protocol ? $this->_protocol : $params->protocol); + $_request->method = $params->method; + $_request->pathname = $params->pathname; + $globalQueries = []; + $globalHeaders = []; + if (!is_null($this->_globalParameters)) { + $globalParams = $this->_globalParameters; + if (!is_null($globalParams->queries)) { + $globalQueries = $globalParams->queries; + } + + if (!is_null($globalParams->headers)) { + $globalHeaders = $globalParams->headers; + } + + } + + $extendsHeaders = []; + $extendsQueries = []; + if (!is_null($runtime->extendsParameters)) { + $extendsParameters = $runtime->extendsParameters; + if (!is_null($extendsParameters->headers)) { + $extendsHeaders = $extendsParameters->headers; + } + + if (!is_null($extendsParameters->queries)) { + $extendsQueries = $extendsParameters->queries; + } + + } + + $_request->query = Dara::merge([ + ], $globalQueries, $extendsQueries, $request->query); + // endpoint is setted in product client + $_request->headers = Dara::merge([ + 'host' => $this->_endpoint, + 'x-acs-version' => $params->version, + 'x-acs-action' => $params->action, + 'user-agent' => Utils::getUserAgent($this->_userAgent), + 'x-acs-date' => Utils::getTimestamp(), + 'x-acs-signature-nonce' => Utils::getNonce(), + 'accept' => 'application/json', + ], $extendsHeaders, $globalHeaders, $request->headers); + if ($params->style == 'RPC') { + $headers = $this->getRpcHeaders(); + if (!is_null($headers)) { + $_request->headers = Dara::merge([ + ], $_request->headers, $headers); + } + + } + + $signatureAlgorithm = '' . ($this->_signatureAlgorithm ? $this->_signatureAlgorithm : 'ACS3-HMAC-SHA256'); + $hashedRequestPayload = Utils::hash(BytesUtil::from('', 'utf-8'), $signatureAlgorithm); + if (!is_null($request->stream)) { + $tmp = StreamUtil::readAsBytes($request->stream); + $hashedRequestPayload = Utils::hash($tmp, $signatureAlgorithm); + $_request->body = $tmp; + @$_request->headers['content-type'] = 'application/octet-stream'; + } else { + if (!is_null($request->body)) { + if ($params->reqBodyType == 'byte') { + $byteObj = unpack('C*', $request->body); + $hashedRequestPayload = Utils::hash($byteObj, $signatureAlgorithm); + $_request->body = $byteObj; + } else if ($params->reqBodyType == 'json') { + $jsonObj = json_encode($request->body, JSON_UNESCAPED_UNICODE + JSON_UNESCAPED_SLASHES); + $hashedRequestPayload = Utils::hash(StringUtil::toBytes($jsonObj, 'utf8'), $signatureAlgorithm); + $_request->body = $jsonObj; + @$_request->headers['content-type'] = 'application/json; charset=utf-8'; + } else { + $m = $request->body; + $formObj = Utils::toForm($m); + $hashedRequestPayload = Utils::hash(StringUtil::toBytes($formObj, 'utf8'), $signatureAlgorithm); + $_request->body = $formObj; + @$_request->headers['content-type'] = 'application/x-www-form-urlencoded'; + } + + } + + } + + @$_request->headers['x-acs-content-sha256'] = bin2hex(BytesUtil::toString($hashedRequestPayload)); + if ($params->authType != 'Anonymous') { + $credentialModel = $this->_credential->getCredential(); + if (!is_null($credentialModel->providerName)) { + @$_request->headers['x-acs-credentials-provider'] = $credentialModel->providerName; + } + + $authType = $credentialModel->type; + if ($authType == 'bearer') { + $bearerToken = $credentialModel->bearerToken; + @$_request->headers['x-acs-bearer-token'] = $bearerToken; + } else if ($authType == 'id_token') { + $idToken = $credentialModel->securityToken; + @$_request->headers['x-acs-zero-trust-idtoken'] = $idToken; + } else { + $accessKeyId = $credentialModel->accessKeyId; + $accessKeySecret = $credentialModel->accessKeySecret; + $securityToken = $credentialModel->securityToken; + if (!is_null($securityToken) && $securityToken != '') { + @$_request->headers['x-acs-accesskey-id'] = $accessKeyId; + @$_request->headers['x-acs-security-token'] = $securityToken; + } + + @$_request->headers['Authorization'] = Utils::getAuthorization($_request, $signatureAlgorithm, bin2hex(BytesUtil::toString($hashedRequestPayload)), $accessKeyId, $accessKeySecret); + } + + } + + $_runtime['stream'] = true; + $_response = Dara::send($_request, $_runtime); + + if (($_response->statusCode >= 400) && ($_response->statusCode < 600)) { + $err = []; + if (!is_null(@$_response->headers['content-type']) && @$_response->headers['content-type'] == 'text/xml;charset=utf-8') { + $_str = StreamUtil::readAsString($_response->body); + $respMap = XML::parseXml($_str, null); + $err = @$respMap['Error']; + } else { + $_res = StreamUtil::readAsJSON($_response->body); + $err = $_res; + } + + @$err['statusCode'] = $_response->statusCode; + throw new DaraException([ + 'code' => '' . (string) (@$err['Code'] ? @$err['Code'] : @$err['code']) . '', + 'message' => 'code: ' . (string) $_response->statusCode . ', ' . (string) (@$err['Message'] ? @$err['Message'] : @$err['message']) . ' request id: ' . (string) (@$err['RequestId'] ? @$err['RequestId'] : @$err['requestId']) . '', + 'data' => $err, + 'description' => '' . (string) (@$err['Description'] ? @$err['Description'] : @$err['description']) . '', + 'accessDeniedDetail' => (@$err['AccessDeniedDetail'] ? @$err['AccessDeniedDetail'] : @$err['accessDeniedDetail']), + ]); + } + + $events = StreamUtil::readAsSSE($_response->body); + + foreach ($events as $event) { + yield new SSEResponse([ + 'statusCode' => $_response->statusCode, + 'headers' => $_response->headers, + 'event' => $event, + ]); + } + } + + /** + * @param Params $params + * @param OpenApiRequest $request + * @param RuntimeOptions $runtime + * @return mixed[] + */ + public function callApi($params, $request, $runtime) + { + if (is_null($params)) { + throw new ClientException([ + 'code' => 'ParameterMissing', + 'message' => '\'params\' can not be unset', + ]); + } + + if (is_null($this->_signatureVersion) || $this->_signatureVersion != 'v4') { + if (is_null($this->_signatureAlgorithm) || $this->_signatureAlgorithm != 'v2') { + return $this->doRequest($params, $request, $runtime); + } else if (($params->style == 'ROA') && ($params->reqBodyType == 'json')) { + return $this->doROARequest($params->action, $params->version, $params->protocol, $params->method, $params->authType, $params->pathname, $params->bodyType, $request, $runtime); + } else if ($params->style == 'ROA') { + return $this->doROARequestWithForm($params->action, $params->version, $params->protocol, $params->method, $params->authType, $params->pathname, $params->bodyType, $request, $runtime); + } else { + return $this->doRPCRequest($params->action, $params->version, $params->protocol, $params->method, $params->authType, $params->bodyType, $request, $runtime); + } + + } else { + return $this->execute($params, $request, $runtime); + } + + } + + /** + * @remarks + * Get accesskey id by using credential + * @returns accesskey id + * @return string + */ + public function getAccessKeyId() + { + if (is_null($this->_credential)) { + return ''; + } + + $accessKeyId = $this->_credential->getAccessKeyId(); + return $accessKeyId; + } + + /** + * @remarks + * Get accesskey secret by using credential + * @returns accesskey secret + * @return string + */ + public function getAccessKeySecret() + { + if (is_null($this->_credential)) { + return ''; + } + + $secret = $this->_credential->getAccessKeySecret(); + return $secret; + } + + /** + * @remarks + * Get security token by using credential + * @returns security token + * @return string + */ + public function getSecurityToken() + { + if (is_null($this->_credential)) { + return ''; + } + + $token = $this->_credential->getSecurityToken(); + return $token; + } + + /** + * @remarks + * Get bearer token by credential + * @returns bearer token + * @return string + */ + public function getBearerToken() + { + if (is_null($this->_credential)) { + return ''; + } + + $token = $this->_credential->getBearerToken(); + return $token; + } + + /** + * @remarks + * Get credential type by credential + * @returns credential type e.g. access_key + * @return string + */ + public function getType() + { + if (is_null($this->_credential)) { + return ''; + } + + $authType = $this->_credential->getType(); + return $authType; + } + + /** + * @remarks + * If the endpointRule and config.endpoint are empty, throw error + * + * @param config - config contains the necessary information to create a client + * @param \Darabonba\OpenApi\Models\Config $config + * @return void + */ + public function checkConfig($config) + { + if (is_null($this->_endpointRule) && is_null($config->endpoint)) { + throw new ClientException([ + 'code' => 'ParameterMissing', + 'message' => '\'config.endpoint\' can not be empty', + ]); + } + + } + + /** + * @remarks + * set gateway client + * + * @param spi - . + * @param Client $spi + * @return void + */ + public function setGatewayClient($spi) + { + $this->_spi = $spi; + } + + /** + * @remarks + * set RPC header for debug + * + * @param headers - headers for debug, this header can be used only once. + * @param string[] $headers + * @return void + */ + public function setRpcHeaders($headers) + { + $this->_headers = $headers; + } + + /** + * @remarks + * get RPC header for debug + * @return string[] + */ + public function getRpcHeaders() + { + $headers = $this->_headers; + $this->_headers = null; + return $headers; + } + + /** + * @param mixed[] $err + * @return mixed[] + */ + public function getAccessDeniedDetail($err) + { + $accessDeniedDetail = null; + if (!is_null(@$err['AccessDeniedDetail'])) { + $detail1 = @$err['AccessDeniedDetail']; + $accessDeniedDetail = $detail1; + } else if (!is_null(@$err['accessDeniedDetail'])) { + $detail2 = @$err['accessDeniedDetail']; + $accessDeniedDetail = $detail2; + } + + return $accessDeniedDetail; + } + +} diff --git a/vendor/alibabacloud/openapi-core/src/Sm3.php b/vendor/alibabacloud/openapi-core/src/Sm3.php new file mode 100644 index 0000000..d8f4418 --- /dev/null +++ b/vendor/alibabacloud/openapi-core/src/Sm3.php @@ -0,0 +1,183 @@ +> 32); + $message .= pack('N', $bitLen & 0xFFFFFFFF); + + // Process message in 512-bit blocks + $v = self::$IV; + $blocks = str_split($message, 64); + + foreach ($blocks as $block) { + $v = $this->cf($v, $block); + } + + // Convert to hex string + $result = ''; + foreach ($v as $word) { + $result .= sprintf('%08x', $word); + } + + return $result; + } + + /** + * Compression function + */ + private function cf($v, $block) + { + $w = []; + $w1 = []; + + // Expand message block + for ($i = 0; $i < 16; $i++) { + $w[$i] = unpack('N', substr($block, $i * 4, 4))[1]; + } + + for ($i = 16; $i < 68; $i++) { + $w[$i] = $this->p1( + $w[$i - 16] ^ $w[$i - 9] ^ $this->rotl($w[$i - 3], 15) + ) ^ $this->rotl($w[$i - 13], 7) ^ $w[$i - 6]; + } + + for ($i = 0; $i < 64; $i++) { + $w1[$i] = $w[$i] ^ $w[$i + 4]; + } + + // Compression + $a = $v[0]; + $b = $v[1]; + $c = $v[2]; + $d = $v[3]; + $e = $v[4]; + $f = $v[5]; + $g = $v[6]; + $h = $v[7]; + + for ($i = 0; $i < 64; $i++) { + $ss1 = $this->rotl( + $this->add32( + $this->add32($this->rotl($a, 12), $e), + $this->rotl($this->t($i), $i) + ), + 7 + ); + + $ss2 = $ss1 ^ $this->rotl($a, 12); + $tt1 = $this->add32( + $this->add32( + $this->add32($this->ff($a, $b, $c, $i), $d), + $ss2 + ), + $w1[$i] + ); + + $tt2 = $this->add32( + $this->add32( + $this->add32($this->gg($e, $f, $g, $i), $h), + $ss1 + ), + $w[$i] + ); + + $d = $c; + $c = $this->rotl($b, 9); + $b = $a; + $a = $tt1; + $h = $g; + $g = $this->rotl($f, 19); + $f = $e; + $e = $this->p0($tt2); + } + + return [ + $a ^ $v[0], + $b ^ $v[1], + $c ^ $v[2], + $d ^ $v[3], + $e ^ $v[4], + $f ^ $v[5], + $g ^ $v[6], + $h ^ $v[7] + ]; + } + + private function ff($x, $y, $z, $j) + { + if ($j < 16) { + return $x ^ $y ^ $z; + } + return ($x & $y) | ($x & $z) | ($y & $z); + } + + private function gg($x, $y, $z, $j) + { + if ($j < 16) { + return $x ^ $y ^ $z; + } + return ($x & $y) | ((~$x) & $z); + } + + private function t($j) + { + if ($j < 16) { + return self::$T_0_15; + } + return self::$T_16_63; + } + + private function rotl($x, $n) + { + $n = $n % 32; + return (($x << $n) | ($x >> (32 - $n))) & 0xFFFFFFFF; + } + + private function p0($x) + { + return $x ^ $this->rotl($x, 9) ^ $this->rotl($x, 17); + } + + private function p1($x) + { + return $x ^ $this->rotl($x, 15) ^ $this->rotl($x, 23); + } + + private function add32($a, $b) + { + return ($a + $b) & 0xFFFFFFFF; + } +} \ No newline at end of file diff --git a/vendor/alibabacloud/openapi-core/src/Utils.php b/vendor/alibabacloud/openapi-core/src/Utils.php new file mode 100644 index 0000000..3a57b96 --- /dev/null +++ b/vendor/alibabacloud/openapi-core/src/Utils.php @@ -0,0 +1,770 @@ +toMap(); + $map = self::exceptStream($map); + $newContent = $content::fromMap($map); + $class = new \ReflectionClass($newContent); + foreach ($class->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) { + $name = $property->getName(); + if (!$property->isStatic()) { + $content->{$name} = $property->getValue($newContent); + } + } + } + + private static function exceptStream($map) + { + if ($map instanceof StreamInterface) { + return null; + } elseif (\is_array($map)) { + $data = []; + foreach ($map as $k => $v) { + if (null !== $v) { + $item = self::exceptStream($v); + if (null !== $item) { + $data[$k] = $item; + } + } else { + $data[$k] = $v; + } + } + return $data; + } + return $map; + } + + /** + * @remarks + * If endpointType is internal, use internal endpoint + * If serverUse is true and endpointType is accelerate, use accelerate endpoint + * Default return endpoint + * + * @param string $endpoint The endpoint URL + * @param boolean $useAccelerate Whether use accelerate endpoint + * @param string $endpointType Value must be internal or accelerate + * @return string The final endpoint + */ + static public function getEndpoint($endpoint, $useAccelerate, $endpointType) + { + if ('internal' == $endpointType) { + $tmp = explode('.', $endpoint); + $tmp[0] .= '-internal'; + $endpoint = implode('.', $tmp); + } + if ($useAccelerate && 'accelerate' == $endpointType) { + return 'oss-accelerate.aliyuncs.com'; + } + + return $endpoint; + } + + /** + * @remarks + * Get throttling param + * + * @param string[] $headers The response headers + * @return int Time left + */ + public static function getThrottlingTimeLeft(array $headers) { + $rateLimitForUserApi = isset($headers["x-ratelimit-user-api"]) ? $headers["x-ratelimit-user-api"] : null; + $rateLimitForUser = isset($headers["x-ratelimit-user"]) ? $headers["x-ratelimit-user"] : null; + + $timeLeftForUserApi = self::getTimeLeft($rateLimitForUserApi); + $timeLeftForUser = self::getTimeLeft($rateLimitForUser); + + $maxValue = max($timeLeftForUserApi, $timeLeftForUser); + return $maxValue !== null ? $maxValue : 0; + } + + +private static function getTimeLeft($rateLimit) { + if ($rateLimit) { + $pairs = explode(',', $rateLimit); + foreach ($pairs as $pair) { + $kv = explode(':', $pair); + if (count($kv) === 2) { + $key = trim($kv[0]); + $value = trim($kv[1]); + if ($key === 'TimeLeft') { + $timeLeftValue = intval($value); + if ($timeLeftValue === 0 && $value !== "0") { // 确认不是 "0" + return null; + } + return $timeLeftValue; + } + } + } + } + return null; +} + + /** + * @remarks + * Hash the raw data with signatureAlgorithm + * + * @param int[] $raw Hashing data + * @param string $signatureAlgorithm The autograph method + * @return string|array Hashed bytes + */ + static public function hash($raw, $signatureAlgorithm) + { + $str = BytesUtil::toString($raw); + + switch ($signatureAlgorithm) { + case 'ACS3-HMAC-SHA256': + case 'ACS3-RSA-SHA256': + $res = hash('sha256', $str, true); + return $res; + case 'ACS3-HMAC-SM3': + $res = self::sm3($str); + return hex2bin($res); + } + + return []; + } + + /** + * @remarks + * Generate a nonce string + * @returns the nonce string + * @return string + */ + static public function getNonce() + { + return md5(uniqid() . uniqid(md5(microtime(true)), true)); + } + + /** + * @remarks + * Get the string to be signed according to request + * + * @param Request $request Which contains signed messages + * @return string The signed string + */ + static public function getStringToSign($request) + { + $pathname = $request->pathname ?: ''; + $query = $request->query ?: []; + + $accept = isset($request->headers['accept']) ? $request->headers['accept'] : ''; + $contentMD5 = isset($request->headers['content-md5']) ? $request->headers['content-md5'] : ''; + $contentType = isset($request->headers['content-type']) ? $request->headers['content-type'] : ''; + $date = isset($request->headers['date']) ? $request->headers['date'] : ''; + + $result = $request->method . "\n" . + $accept . "\n" . + $contentMD5 . "\n" . + $contentType . "\n" . + $date . "\n"; + + $canonicalizedHeaders = self::getCanonicalizedHeaders($request->headers); + $canonicalizedResource = self::getCanonicalizedResource($pathname, $query); + + return $result . $canonicalizedHeaders . $canonicalizedResource; + } + + private static function getCanonicalizedHeaders($headers, $prefix = 'x-acs-') + { + ksort($headers); + $str = ''; + foreach ($headers as $k => $v) { + if (0 === strpos(strtolower($k), $prefix)) { + $str .= $k . ':' . trim(self::filter($v)) . "\n"; + } + } + + return $str; + } + + private static function getCanonicalizedResource($pathname, $query) + { + if (0 === \count($query)) { + return $pathname; + } + ksort($query); + $tmp = []; + foreach ($query as $k => $v) { + if (!empty($v)) { + $tmp[] = $k . '=' . $v; + } else { + $tmp[] = $k; + } + } + + return $pathname . '?' . implode('&', $tmp); + } + + /** + * @remarks + * Get signature according to stringToSign, secret + * + * @param string $stringToSign The signed string + * @param string $secret Accesskey secret + * @return string The signature + */ + static public function getROASignature($stringToSign, $secret) + { + return base64_encode(hash_hmac('sha1', $stringToSign, $secret, true)); + } + + /** + * @remarks + * Parse filter into a form string + * + * @param mixed[] $filter Object + * @return string The string + */ + static public function toForm($filter) + { + $query = $filter; + if (null === $query) { + return ''; + } + if ($query instanceof Model) { + $query = $query->toMap(); + } + $tmp = []; + foreach ($query as $k => $v) { + if (0 !== strpos($k, '_')) { + $tmp[$k] = $v; + } + } + $res = self::flatten($tmp); + ksort($res); + + return http_build_query($res); + } + + /** + * @remarks + * Get timestamp + * @returns the timestamp string + * @return string + */ + static public function getTimestamp() + { + return gmdate('Y-m-d\\TH:i:s\\Z'); + } + + /** + * @remarks + * Get UTC string + * @returns the UTC string + * @return string + */ + static public function getDateUTCString() + { + return gmdate('D, d M Y H:i:s T'); + } + + /** + * @remarks + * Parse filter into a object which's type is map[string]string + * + * @param mixed[] $filter Query param + * @return string[] The object + */ + static public function query($filter) + { + if (null === $filter) { + return []; + } + $dict = $filter; + if ($dict instanceof Model) { + $dict = $dict->toMap(); + } + $tmp = []; + foreach ($dict as $k => $v) { + if (0 !== strpos($k, '_')) { + $tmp[$k] = $v; + } + } + + return self::flatten($tmp); + } + + /** + * @remarks + * Get signature according to signedParams, method and secret + * + * @param string[] $signedParams Params which need to be signed + * @param string $method HTTP method e.g. GET + * @param string $secret AccessKeySecret + * @return string The signature + */ + static public function getRPCSignature($signedParams, $method, $secret) + { + $secret .= '&'; + $strToSign = self::getRpcStrToSign($method, $signedParams); + + $signMethod = 'HMAC-SHA1'; + + return self::encode($signMethod, $strToSign, $secret); + } + + /** + * @remarks + * Parse array into a string with specified style + * + * @param mixed $object The array + * @param string $prefix The prefix string + * @param string $style The style + * @return string The string + */ + static public function arrayToStringWithSpecifiedStyle($object, $prefix, $style) + { + if (null === $object) { + return ''; + } + if ('repeatList' === $style) { + return self::toForm([$prefix => $object]); + } + if ('simple' == $style || 'spaceDelimited' == $style || 'pipeDelimited' == $style) { + $strs = self::flatten($object); + + switch ($style) { + case 'spaceDelimited': + return implode(' ', $strs); + + case 'pipeDelimited': + return implode('|', $strs); + + default: + return implode(',', $strs); + } + } elseif ('json' === $style) { + self::parse($object, $parsed); + return json_encode($parsed); + } + + return ''; + } + + /** + * @remarks + * Transform input as map. + * @param mixed $input + * @return mixed[] + */ + static public function parseToMap($input) + { + self::parse($input, $result); + return $result; + } + + /** + * @remarks + * Get the authorization + * + * @param Request $request Request params + * @param string $signatureAlgorithm The autograph method + * @param string $payload The hashed request + * @param string $accesskey The accesskey string + * @param string $accessKeySecret The accessKeySecret string + * @return string Authorization string + */ + static public function getAuthorization($request, $signatureAlgorithm, $payload, $accesskey, $accessKeySecret) + { + $canonicalURI = $request->pathname ? $request->pathname : '/'; + $query = $request->query ?: []; + $method = strtoupper($request->method); + $canonicalQueryString = self::getCanonicalQueryString($query); + $signHeaders = []; + foreach ($request->headers as $k => $v) { + $k = strtolower($k); + if (0 === strpos($k, 'x-acs-') || 'host' === $k || 'content-type' === $k) { + $signHeaders[$k] = $v; + } + } + ksort($signHeaders); + $headers = []; + foreach ($request->headers as $k => $v) { + $k = strtolower($k); + if (0 === strpos($k, 'x-acs-') || 'host' === $k || 'content-type' === $k) { + $headers[$k] = trim($v); + } + } + $canonicalHeaderString = ''; + ksort($headers); + foreach ($headers as $k => $v) { + $canonicalHeaderString .= $k . ':' . trim(self::filter($v)) . "\n"; + } + if (empty($canonicalHeaderString)) { + $canonicalHeaderString = "\n"; + } + + $canonicalRequest = $method . "\n" . $canonicalURI . "\n" . $canonicalQueryString . "\n" . + $canonicalHeaderString . "\n" . implode(';', array_keys($signHeaders)) . "\n" . $payload; + $strtosign = $signatureAlgorithm . "\n" . bin2hex(self::hash(BytesUtil::from($canonicalRequest), $signatureAlgorithm)); + + $signature = self::sign($accessKeySecret, $strtosign, $signatureAlgorithm); + $signature = bin2hex($signature); + + return $signatureAlgorithm . + ' Credential=' . $accesskey . + ',SignedHeaders=' . implode(';', array_keys($signHeaders)) . + ',Signature=' . $signature; + } + + /** + * @param string $userAgent + * @return string + */ + static public function getUserAgent($userAgent) + { + if (empty(self::$defaultUserAgent)) { + self::$defaultUserAgent = sprintf('AlibabaCloud (%s; %s) PHP/%s Core/1.0 TeaDSL/2', PHP_OS, \PHP_SAPI, PHP_VERSION); + } + if (!empty($userAgent)) { + return self::$defaultUserAgent . ' ' . $userAgent; + } + + return self::$defaultUserAgent; + } + + private static function filter($str) + { + return str_replace(["\t", "\n", "\r", "\f"], '', $str); + } + + public static function sign($secret, $str, $algorithm) + { + $result = ''; + switch ($algorithm) { + case 'ACS3-HMAC-SHA256': + $result = hash_hmac('sha256', $str, $secret, true); + break; + case 'ACS3-HMAC-SM3': + $result = self::hmac_sm3($str, $secret, true); + break; + case 'ACS3-RSA-SHA256': + $privateKey = "-----BEGIN RSA PRIVATE KEY-----\n" . $secret . "\n-----END RSA PRIVATE KEY-----"; + @openssl_sign($str, $result, $privateKey, OPENSSL_ALGO_SHA256); + } + + return $result; + } + + private static function hmac_sm3($data, $key, $raw_output = false) + { + $pack = 'H' . \strlen(self::sm3('test')); + $blocksize = 64; + if (\strlen($key) > $blocksize) { + $key = pack($pack, self::sm3($key)); + } + $key = str_pad($key, $blocksize, \chr(0x00)); + $ipad = $key ^ str_repeat(\chr(0x36), $blocksize); + $opad = $key ^ str_repeat(\chr(0x5C), $blocksize); + $hmac = self::sm3($opad . pack($pack, self::sm3($ipad . $data))); + + return $raw_output ? pack($pack, $hmac) : $hmac; + } + + private static function sm3($message) + { + return (new Sm3())->sign($message); + } + + private static function encode($signMethod, $strToSign, $secret) + { + switch ($signMethod) { + case 'HMAC-SHA256': + return base64_encode(hash_hmac('sha256', $strToSign, $secret, true)); + default: + return base64_encode(hash_hmac('sha1', $strToSign, $secret, true)); + } + } + + /** + * @param array $items + * @param string $delimiter + * @param string $prepend + * + * @return array + */ + private static function flatten($items = [], $delimiter = '.', $prepend = '') + { + $flatten = []; + + foreach ($items as $key => $value) { + $pos = \is_int($key) ? $key + 1 : $key; + + if ($value instanceof Model) { + $value = $value->toMap(); + } elseif (\is_object($value)) { + $value = get_object_vars($value); + } + + if (\is_array($value) && !empty($value)) { + $flatten = array_merge( + $flatten, + self::flatten($value, $delimiter, $prepend . $pos . $delimiter) + ); + } else { + if (\is_bool($value)) { + $value = true === $value ? 'true' : 'false'; + } + $flatten[$prepend . $pos] = $value; + } + } + + return $flatten; + } + + private static function parse($input, &$output) + { + if (null === $input || '' === $input) { + $output = []; + } + $recursive = function ($input) use (&$recursive) { + if ($input instanceof Model) { + $input = $input->toMap(); + } elseif (\is_object($input)) { + $input = get_object_vars($input); + } + if (!\is_array($input)) { + return $input; + } + $data = []; + foreach ($input as $k => $v) { + $data[$k] = $recursive($v); + } + + return $data; + }; + $output = $recursive($input); + if (!\is_array($output)) { + $output = [$output]; + } + } + + private static function getRpcStrToSign($method, $query) + { + ksort($query); + + $params = []; + foreach ($query as $k => $v) { + if (null !== $v) { + $k = rawurlencode($k); + $v = rawurlencode($v); + $params[] = $k . '=' . (string)$v; + } + } + $str = implode('&', $params); + + return $method . '&' . rawurlencode('/') . '&' . rawurlencode($str); + } + + private static function getCanonicalQueryString($query) + { + ksort($query); + + $params = []; + foreach ($query as $k => $v) { + if (null === $v) { + continue; + } + $str = rawurlencode($k); + if ('' !== $v && null !== $v) { + $str .= '=' . rawurlencode($v); + } else { + $str .= '='; + } + $params[] = $str; + } + + return implode('&', $params); + } + + /** + * Transform input as array. + * + * @param mixed $input + * + * @return array + */ + public static function toArray($input) + { + if (\is_array($input)) { + foreach ($input as $k => &$v) { + $v = self::toArray($v); + } + } elseif ($input instanceof Model) { + $input = $input->toMap(); + foreach ($input as $k => &$v) { + $v = self::toArray($v); + } + } + + return $input; + } + + /** + * Stringify the value of map. + * + * @param array $map + * + * @return array the new stringified map + */ + public static function stringifyMapValue($map) + { + if (null === $map) { + return []; + } + foreach ($map as &$node) { + if (is_numeric($node)) { + $node = (string) $node; + } elseif (null === $node) { + $node = ''; + } elseif (\is_bool($node)) { + $node = true === $node ? 'true' : 'false'; + } elseif (\is_object($node)) { + $node = json_decode(json_encode($node), true); + } + } + + return $map; + } + /** + * @param string $product + * @param string $regionId + * @param string $endpointRule + * @param string $network + * @param string $suffix + * + * @return string + */ + static public function getEndpointRules($product, $regionId, $endpointType, $network, $suffix = null) { + $product = $product ?: ""; + $network = $network ?: ""; + + if ($endpointType == "regional") { + if ($regionId === null || $regionId === "") { + throw new RuntimeException("RegionId is empty, please set a valid RegionId"); + } + $result = "..aliyuncs.com"; + $result = str_replace("", $regionId, $result); + } else { + $result = ".aliyuncs.com"; + } + + $result = str_replace("", strtolower($product), $result); + if ($network === "" || $network === "public") { + $result = str_replace("", "", $result); + } else { + $result = str_replace("", "-" . $network, $result); + } + return $result; + } + + /** + * @param string $product + * @param string $regionId + * @param string $endpointRule + * @param string $network + * @param string $suffix + * @param string[] $endpointMap + * @param string $endpoint + * + * @return string + */ + static function getProductEndpoint($product, $regionId, $endpointRule, $network, $suffix, $endpointMap, $endpoint) + { + if (null !== $endpoint) { + return $endpoint; + } + + if (null !== $endpointMap && null !== @$endpointMap[$regionId]) { + return @$endpointMap[$regionId]; + } + + return self::getEndpointRules($product, $regionId, $endpointRule, $network, $suffix); + } + + /** + * Transform a map to a flat style map where keys are prefixed with length info. + * Map keys are transformed from "key" to "#length#key" format. + * + * @param mixed $input the input (can be an array, Model, or primitive type) + * @return mixed the transformed input + */ + public static function mapToFlatStyle($input) + { + if ($input === null) { + return $input; + } + + // Handle array (list) + if (\is_array($input) && array_keys($input) === range(0, count($input) - 1)) { + $result = []; + foreach ($input as $item) { + $result[] = self::mapToFlatStyle($item); + } + return $result; + } + + // Handle Model + if ($input instanceof Model) { + // Modify the original Model object's fields using reflection + $reflection = new \ReflectionClass($input); + $properties = $reflection->getProperties(\ReflectionProperty::IS_PUBLIC); + + foreach ($properties as $property) { + $propertyName = $property->getName(); + $value = $property->getValue($input); + + if (\is_array($value) && !empty($value) && array_keys($value) !== range(0, count($value) - 1)) { + // This is an associative array (dictionary), apply flat style to keys + $flatMap = []; + foreach ($value as $nestedKey => $nestedValue) { + $flatKey = '#' . strlen($nestedKey) . '#' . $nestedKey; + $flatMap[$flatKey] = self::mapToFlatStyle($nestedValue); + } + $property->setValue($input, $flatMap); + } else { + // Recursively process other fields + $property->setValue($input, self::mapToFlatStyle($value)); + } + } + return $input; // Return the modified original Model + } + + // Handle associative array (dictionary) + if (\is_array($input) && !empty($input)) { + $flatMap = []; + foreach ($input as $key => $value) { + $flatKey = '#' . strlen($key) . '#' . $key; + $flatMap[$flatKey] = self::mapToFlatStyle($value); + } + return $flatMap; + } + + // For primitive types, return as-is + return $input; + } +} \ No newline at end of file diff --git a/vendor/alibabacloud/openapi-core/tests/Mock/MockServer.php b/vendor/alibabacloud/openapi-core/tests/Mock/MockServer.php new file mode 100644 index 0000000..aefded5 --- /dev/null +++ b/vendor/alibabacloud/openapi-core/tests/Mock/MockServer.php @@ -0,0 +1,173 @@ + $value) { + $responseHeaders .= $name . ": " . $value . "\r\n"; + } + $responseHeaders .= "\r\n"; + fwrite($client, $responseHeaders); + // 刷新缓冲区,确保头部被立刻发送 + flush(); + + // 模拟发送事件流 + $count = 0; + while ($count < 5) { + $data = [ + "count" => $count + ]; + $sseData = "id: sse-test\n"; + $sseData .= "event: flow\n"; + $sseData .= "data: " . json_encode($data) . "\n"; + $sseData .= "retry: 3000\n\n"; // 重试时间可选 + fwrite($client, $sseData); + + // 再次刷新缓冲区,以确保数据被发送 + flush(); + + // 等待100毫秒 + usleep(100000); + $count++; + } + fclose($client); + continue; + } + + if ($timeoutMatch) { + // 模拟超时 + sleep(5); + $responseHeaders = "HTTP/1.1 500 Internal Server Error\r\n" . + "Content-Type: text/plain\r\n" . + "Connection: close\r\n\r\n"; + fwrite($client, $responseHeaders . "Server Timeout"); + } else { + $headerAssoc = []; + foreach ($headerLines as $headerLine) { + list($key, $value) = explode(': ', $headerLine, 2); + $headerAssoc[strtolower($key)] = trim($value); + } + + // 获取路径和请求方法 + preg_match('/^(GET|POST|PUT|DELETE)\s(\/\S*)\sHTTP\/1.1/', $requestLine, $matches); + $method = $matches[1]; + $path = $matches[2]; + + // 构建响应头 + $responseHeaders = "HTTP/1.1 200 OK\r\n" . + "Connection: close\r\n" . + "Content-Type: application/json\r\n" . + "x-acs-request-id: A45EE076-334D-5012-9746-A8F828D20FD4\r\n" . + "http-method: $method\r\n" . + "pathname: $path\r\n" . + "raw-body: $body\r\n"; + + // 构建响应体 + $responseBody = ""; + + echo $bodyType."\n"; + + switch ($bodyType) { + case 'array': + $responseBody = json_encode(["AppId", "ClassId", "UserId"]); + break; + case 'error': + $responseHeaders = "HTTP/1.1 400 Bad Request\r\n" . + "Connection: close\r\n" . + "Content-Type: application/json\r\n" . + "x-acs-request-id: A45EE076-334D-5012-9746-A8F828D20FD4\r\n" . + "http-method: $method\r\n" . + "pathname: $path\r\n"; + $responseBody = json_encode([ + "Code" => "error code", + "Message" => "error message", + "RequestId" => "A45EE076-334D-5012-9746-A8F828D20FD4", + "Description" => "error description", + "AccessDeniedDetail" => new stdClass() + ]); + break; + case 'error1': + $responseHeaders = "HTTP/1.1 400 Bad Request\r\n" . + "Connection: close\r\n" . + "Content-Type: application/json\r\n" . + "x-acs-request-id: A45EE076-334D-5012-9746-A8F828D20FD4\r\n" . + "http-method: $method\r\n" . + "pathname: $path\r\n"; + $responseBody = json_encode([ + "Code" => "error code", + "Message" => "error message", + "RequestId" => "A45EE076-334D-5012-9746-A8F828D20FD4", + "Description" => "error description", + "AccessDeniedDetail" => new stdClass(), + "accessDeniedDetail" => ["test" => 0] + ]); + break; + case 'error2': + $responseHeaders = "HTTP/1.1 400 Bad Request\r\n" . + "Connection: close\r\n" . + "Content-Type: application/json\r\n" . + "x-acs-request-id: A45EE076-334D-5012-9746-A8F828D20FD4\r\n" . + "http-method: $method\r\n" . + "pathname: $path\r\n"; + $responseBody = json_encode([ + "Code" => "error code", + "Message" => "error message", + "RequestId" => "A45EE076-334D-5012-9746-A8F828D20FD4", + "Description" => "error description", + "accessDeniedDetail" => ["test" => 0] + ]); + break; + default: + $responseBody = json_encode([ + "AppId" => "test", + "ClassId" => "test", + "UserId" => 123 + ]); + } + + fwrite($client, $responseHeaders . "\r\n" . $responseBody); + } + fclose($client); + continue; +} + +fclose($server); diff --git a/vendor/alibabacloud/openapi-core/tests/OpenApiClientTest.php b/vendor/alibabacloud/openapi-core/tests/OpenApiClientTest.php new file mode 100644 index 0000000..2f8f5cc --- /dev/null +++ b/vendor/alibabacloud/openapi-core/tests/OpenApiClientTest.php @@ -0,0 +1,512 @@ + /dev/null 2>&1 & echo $!"; + $output = shell_exec($command); + self::$serverPid = (int)trim($output); + self::$serverStarted = true; + // 等待服务器启动并验证 + sleep(2); // 增加等待时间确保服务器完全启动 + // 注册关闭钩子 + register_shutdown_function(array(__CLASS__, 'stopMockServer')); + } + + /** + * Stop Mock Server + */ + public static function stopMockServer() + { + if (self::$serverStarted && self::$serverPid > 0) { + shell_exec('kill ' . self::$serverPid); + self::$serverStarted = false; + } + } + + /** + * @before + */ + protected function initialize() + { + // Mock 服务器已在 setUpBeforeClass 中启动 + } + + /** + * @after + */ + protected function cleanup() + { + // Mock 服务器会在 tearDownAfterClass 中关闭 + } + + public function testConfig(){ + $globalParameters = new GlobalParameters([ + "headers" => [ + "global-key" => "global-value" + ], + "queries" => [ + "global-query" => "global-value" + ] + ]); + $config = new Config([ + "endpoint" => "config.endpoint", + "endpointType" => "regional", + "network" => "config.network", + "suffix" => "config.suffix", + "protocol" => "config.protocol", + "method" => "config.method", + "regionId" => "config.regionId", + "userAgent" => "config.userAgent", + "readTimeout" => 3000, + "connectTimeout" => 3000, + "httpProxy" => "config.httpProxy", + "httpsProxy" => "config.httpsProxy", + "noProxy" => "config.noProxy", + "socks5Proxy" => "config.socks5Proxy", + "socks5NetWork" => "config.socks5NetWork", + "maxIdleConns" => 128, + "signatureVersion" => "config.signatureVersion", + "signatureAlgorithm" => "config.signatureAlgorithm", + "globalParameters" => $globalParameters + ]); + $creConfig = new \AlibabaCloud\Credentials\Credential\Config([ + "accessKeyId" => "accessKeyId", + "accessKeySecret" => "accessKeySecret", + "securityToken" => "securityToken", + "type" => "sts" + ]); + $credential = new Credential($creConfig); + $config->credential = $credential; + $client = new OpenApiClient($config); + $this->assertInstanceOf(OpenApiClient::class, $client); + + $config->accessKeyId = "ak"; + $config->accessKeySecret = "secret"; + $config->securityToken = "token"; + $config->type = "sts"; + $client = new OpenApiClient($config); + $this->assertInstanceOf(OpenApiClient::class, $client); + } + + /** + * @return Config + */ + public static function createConfig(){ + $globalParameters = new GlobalParameters([ + "headers" => [ + "global-key" => "global-value" + ], + "queries" => [ + "global-query" => "global-value" + ] + ]); + $config = new Config([ + "accessKeyId" => "ak", + "accessKeySecret" => "secret", + "securityToken" => "token", + "type" => "sts", + "userAgent" => "config.userAgent", + "readTimeout" => 3000, + "connectTimeout" => 3000, + "maxIdleConns" => 128, + "signatureVersion" => "config.signatureVersion", + "signatureAlgorithm" => "ACS3-HMAC-SHA256", + "globalParameters" => $globalParameters + ]); + return $config; + } + + /** + * @return RuntimeOptions + */ + public static function createRuntimeOptions(){ + $runtime = new RuntimeOptions([ + "readTimeout" => 4000, + "connectTimeout" => 4000, + "maxIdleConns" => 100, + "autoretry" => true, + "backoffPolicy" => "no", + "backoffPeriod" => 1, + "ignoreSSL" => true, + "retryOptions" => new RetryOptions([ + "retryable" => false, + "retryCondition" => [new RetryCondition([ + "retryOnNonIdempotent" => true, + "retryOnThrottling" => true + ])] + ]), + "extendsParameters" => new ExtendsParameters([ + "headers" => [ + "extends-key" => "extends-value" + ], + ]) + ]); + return $runtime; + } + + /** + * @return OpenApiRequest + */ + public static function createOpenApiRequest(){ + $query = []; + $query["key1"] = "value"; + $query["key2"] = 1; + $query["key3"] = true; + $body = []; + $body["key1"] = "value"; + $body["key2"] = 1; + $body["key3"] = true; + $headers = [ + "for-test" => "sdk" + ]; + $req = new OpenApiRequest([ + "headers" => $headers, + "query" => Utils::query($query), + "body" => Utils::parseToMap($body) + ]); + return $req; + } + + public function testCallApiForRPCWithV2Sign_AK_Form(){ + self::ensureMockServer(); + $config = self::createConfig(); + $runtime = self::createRuntimeOptions(); + $config->protocol = "HTTP"; + $config->signatureAlgorithm = "v2"; + $config->endpoint = "127.0.0.1:8000"; + $client = new OpenApiClient($config); + $request = self::createOpenApiRequest(); + $params = new Params([ + "action" => "TestAPI", + "version" => "2022-06-01", + "protocol" => "HTTPS", + "pathname" => "/", + "method" => "POST", + "authType" => "AK", + "style" => "RPC", + "reqBodyType" => "formData", + "bodyType" => "json" + ]); + $response = $client->callApi($params, $request, $runtime); + $this->assertNotEmpty($response); + if (is_array($response) && isset($response['AppId'])) { + $this->assertEquals('test', $response['AppId']); + } + } + + public function testCallApiForRPCWithV2Sign_Anonymous_JSON(){ + $config = self::createConfig(); + $runtime = self::createRuntimeOptions(); + $config->protocol = "HTTP"; + $config->signatureAlgorithm = "v2"; + $config->endpoint = "127.0.0.1:8000"; + $client = new OpenApiClient($config); + $request = self::createOpenApiRequest(); + $params = new Params([ + "action" => "TestAPI", + "version" => "2022-06-01", + "protocol" => "HTTPS", + "pathname" => "/", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + $response = $client->callApi($params, $request, $runtime); + $this->assertNotEmpty($response); + if (is_array($response) && isset($response['AppId'])) { + $this->assertEquals('test', $response['AppId']); + } + } + + public function testCallApiForROAWithV2Sign_HTTPS_AK_Form(){ + $config = self::createConfig(); + $runtime = self::createRuntimeOptions(); + $config->signatureAlgorithm = "v2"; + $config->protocol = "HTTP"; + $config->endpoint = "127.0.0.1:8000"; + $client = new OpenApiClient($config); + $request = self::createOpenApiRequest(); + $params = new Params([ + "action" => "TestAPI", + "version" => "2022-06-01", + "protocol" => "HTTPS", + "pathname" => "/test", + "method" => "POST", + "authType" => "AK", + "style" => "ROA", + "reqBodyType" => "formData", + "bodyType" => "json" + ]); + $response = $client->callApi($params, $request, $runtime); + $this->assertNotEmpty($response); + if (is_array($response) && isset($response['AppId'])) { + $this->assertEquals('test', $response['AppId']); + } + } + + public function testCallApiForROAWithV2Sign_Anonymous_JSON(){ + $config = self::createConfig(); + $runtime = self::createRuntimeOptions(); + $config->protocol = "HTTP"; + $config->signatureAlgorithm = "v2"; + $config->endpoint = "127.0.0.1:8000"; + $client = new OpenApiClient($config); + $request = self::createOpenApiRequest(); + $params = new Params([ + "action" => "TestAPI", + "version" => "2022-06-01", + "protocol" => "HTTPS", + "pathname" => "/test", + "method" => "POST", + "authType" => "Anonymous", + "style" => "ROA", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + $response = $client->callApi($params, $request, $runtime); + $this->assertNotEmpty($response); + if (is_array($response) && isset($response['AppId'])) { + $this->assertEquals('test', $response['AppId']); + } + } + + public function testCallApiForRPCWithV3Sign_AK_Form(){ + $config = self::createConfig(); + $runtime = self::createRuntimeOptions(); + $config->protocol = "HTTP"; + $config->endpoint = "127.0.0.1:8000"; + $client = new OpenApiClient($config); + $request = self::createOpenApiRequest(); + $params = new Params([ + "action" => "TestAPI", + "version" => "2022-06-01", + "protocol" => "HTTPS", + "pathname" => "/", + "method" => "POST", + "authType" => "AK", + "style" => "RPC", + "reqBodyType" => "formData", + "bodyType" => "json" + ]); + $response = $client->callApi($params, $request, $runtime); + $this->assertNotEmpty($response); + if (is_array($response) && isset($response['AppId'])) { + $this->assertEquals('test', $response['AppId']); + } + } + + public function testCallApiForRPCWithV3Sign_Anonymous_JSON(){ + $config = self::createConfig(); + $runtime = self::createRuntimeOptions(); + $config->protocol = "HTTP"; + $config->endpoint = "127.0.0.1:8000"; + $client = new OpenApiClient($config); + $request = self::createOpenApiRequest(); + $params = new Params([ + "action" => "TestAPI", + "version" => "2022-06-01", + "protocol" => "HTTPS", + "pathname" => "/", + "method" => "POST", + "authType" => "Anonymous", + "style" => "RPC", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + $response = $client->callApi($params, $request, $runtime); + $this->assertNotEmpty($response); + if (is_array($response) && isset($response['AppId'])) { + $this->assertEquals('test', $response['AppId']); + } + } + + public function testCallApiForROAWithV3Sign_AK_Form(){ + $config = self::createConfig(); + $runtime = self::createRuntimeOptions(); + $config->protocol = "HTTP"; + $config->endpoint = "127.0.0.1:8000"; + $client = new OpenApiClient($config); + $request = self::createOpenApiRequest(); + $params = new Params([ + "action" => "TestAPI", + "version" => "2022-06-01", + "protocol" => "HTTPS", + "pathname" => "/test", + "method" => "POST", + "authType" => "AK", + "style" => "ROA", + "reqBodyType" => "formData", + "bodyType" => "json" + ]); + $response = $client->callApi($params, $request, $runtime); + $this->assertNotEmpty($response); + if (is_array($response) && isset($response['AppId'])) { + $this->assertEquals('test', $response['AppId']); + } + } + + public function testCallApiForROAWithV3Sign_Anonymous_JSON(){ + $config = self::createConfig(); + $runtime = self::createRuntimeOptions(); + $config->protocol = "HTTP"; + $config->endpoint = "127.0.0.1:8000"; + $client = new OpenApiClient($config); + $request = self::createOpenApiRequest(); + $params = new Params([ + "action" => "TestAPI", + "version" => "2022-06-01", + "protocol" => "HTTPS", + "pathname" => "/test", + "method" => "POST", + "authType" => "Anonymous", + "style" => "ROA", + "reqBodyType" => "json", + "bodyType" => "json" + ]); + $response = $client->callApi($params, $request, $runtime); + $this->assertNotEmpty($response); + if (is_array($response) && isset($response['AppId'])) { + $this->assertEquals('test', $response['AppId']); + } + } + + public function testResponseBodyType(){ + $config = self::createConfig(); + $runtime = self::createRuntimeOptions(); + $config->protocol = "HTTP"; + $config->endpoint = "127.0.0.1:8000"; + $client = new OpenApiClient($config); + $request = self::createOpenApiRequest(); + $params = new Params([ + "action" => "TestAPI", + "version" => "2022-06-01", + "protocol" => "HTTPS", + "pathname" => "/test", + "method" => "POST", + "authType" => "AK", + "style" => "ROA", + "reqBodyType" => "formData", + "bodyType" => "json" + ]); + $response = $client->callApi($params, $request, $runtime); + $this->assertTrue(is_array($response)); + + $params->bodyType = "array"; + $request->headers['bodytype'] = 'array'; + $response = $client->callApi($params, $request, $runtime); + $this->assertTrue(is_array($response)); + // Mock server returns ["AppId", "ClassId", "UserId"] for array type + $this->assertNotEmpty($response); + + $params->bodyType = "string"; + $request->headers['bodytype'] = 'string'; + $response = $client->callApi($params, $request, $runtime); + // For string type, check if response body exists + $this->assertNotEmpty($response); + if (is_array($response) && isset($response['body'])) { + $this->assertTrue(is_string($response['body'])); + } + + $params->bodyType = "byte"; + $request->headers['bodytype'] = 'byte'; + $response = $client->callApi($params, $request, $runtime); + $this->assertNotEmpty($response); + } + + public function testCallSSEApiWithSignV3() + { + self::ensureMockServer(); + + // 额外等待确保 Mock 服务器完全启动 (for CI environments) + usleep(500000); // 0.5秒 + + $config = self::createConfig(); + $runtime = self::createRuntimeOptions(); + $config->protocol = "HTTP"; + $config->endpoint = "127.0.0.1:8000"; + $client = new OpenApiClient($config); + $request = self::createOpenApiRequest(); + $params = new Params([ + "action" => "TestAPI", + "version" => "2022-06-01", + "protocol" => "HTTPS", + "pathname" => "/sse", + "method" => "POST", + "authType" => "AK", + "style" => "ROA", + "reqBodyType" => "json", + "bodyType" => "sse" + ]); + $response = $client->callSSEApi($params, $request, $runtime); + + + // Add more assertions as needed + $events = []; + + // SSE events are typically separated by double newline + foreach ($response as $event) { + $this->assertEquals(200, $event->statusCode); + $headers = $event->headers; + $this->assertEquals('text/event-stream;charset=UTF-8', $headers['Content-Type'][0]); + $this->assertEquals('sdk', $headers['for-test'][0]); + $userAgentArray = explode(' ', $headers['user-agent'][0]); + $this->assertEquals('config.userAgent', end($userAgentArray)); + $this->assertEquals('global-value', $headers['global-key'][0]); + $this->assertEquals('extends-value', $headers['extends-key'][0]); + $this->assertNotEmpty($headers['x-acs-signature-nonce'][0]); + $this->assertNotEmpty($headers['x-acs-date'][0]); + $this->assertEquals('application/json', $headers['accept'][0]); + $event = $event->event->toArray(); + // var_dump($event); + $events[] = json_decode($event['data'], true); + } + $expectedEvents = [ + ['count' => 0], + ['count' => 1], + ['count' => 2], + ['count' => 3], + ['count' => 4], + ]; + $this->assertCount(5, $events); + $this->assertEquals($expectedEvents, $events); + } +} diff --git a/vendor/alibabacloud/openapi-core/tests/UtilsTest.php b/vendor/alibabacloud/openapi-core/tests/UtilsTest.php new file mode 100644 index 0000000..84d5c10 --- /dev/null +++ b/vendor/alibabacloud/openapi-core/tests/UtilsTest.php @@ -0,0 +1,586 @@ +assertEquals('ecs-internal.aliyuncs.com', $endpoint); + + // Test accelerate endpoint + $endpoint = Utils::getEndpoint('oss.aliyuncs.com', true, 'accelerate'); + $this->assertEquals('oss-accelerate.aliyuncs.com', $endpoint); + + // Test normal endpoint + $endpoint = Utils::getEndpoint('ecs.aliyuncs.com', false, 'public'); + $this->assertEquals('ecs.aliyuncs.com', $endpoint); + + // Test accelerate without flag + $endpoint = Utils::getEndpoint('oss.aliyuncs.com', false, 'accelerate'); + $this->assertEquals('oss.aliyuncs.com', $endpoint); + } + + /** + * Test getThrottlingTimeLeft function + */ + public function testGetThrottlingTimeLeft() + { + // Test with both headers + $headers = array( + 'x-ratelimit-user-api' => 'Remaining:10,TimeLeft:5', + 'x-ratelimit-user' => 'Remaining:20,TimeLeft:3' + ); + $timeLeft = Utils::getThrottlingTimeLeft($headers); + $this->assertEquals(5, $timeLeft); + + // Test with empty headers + $headers = array(); + $timeLeft = Utils::getThrottlingTimeLeft($headers); + $this->assertEquals(0, $timeLeft); + + // Test with only one header + $headers = array('x-ratelimit-user' => 'TimeLeft:10'); + $timeLeft = Utils::getThrottlingTimeLeft($headers); + $this->assertEquals(10, $timeLeft); + + // Test with invalid value + $headers = array('x-ratelimit-user-api' => 'Invalid'); + $timeLeft = Utils::getThrottlingTimeLeft($headers); + $this->assertEquals(0, $timeLeft); + } + + /** + * Test hash function + */ + public function testHash() + { + // Test SHA256 + $data = 'test message'; + $bytes = BytesUtil::from($data); + $result = Utils::hash($bytes, 'ACS3-HMAC-SHA256'); + + $this->checkInternalType('string', $result); + $this->assertEquals(32, strlen($result)); // SHA256 produces 32 bytes + + // Test SM3 + $result = Utils::hash($bytes, 'ACS3-HMAC-SM3'); + $this->checkInternalType('string', $result); + $this->assertEquals(32, strlen($result)); // SM3 produces 32 bytes + + // Test default case + $result = Utils::hash($bytes, 'UNKNOWN'); + $this->checkInternalType('array', $result); + $this->assertEmpty($result); + } + + /** + * Test getNonce function + */ + public function testGetNonce() + { + $nonce1 = Utils::getNonce(); + $nonce2 = Utils::getNonce(); + + $this->checkInternalType('string', $nonce1); + $this->checkInternalType('string', $nonce2); + $this->assertEquals(32, strlen($nonce1)); + $this->assertEquals(32, strlen($nonce2)); + $this->assertNotEquals($nonce1, $nonce2); // Should be unique + } + + /** + * Test getTimestamp function + */ + public function testGetTimestamp() + { + $timestamp = Utils::getTimestamp(); + + $this->checkInternalType('string', $timestamp); + // Format: 2023-12-26T10:30:00Z + $this->checkRegExp('/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$/', $timestamp); + } + + /** + * Test getDateUTCString function + */ + public function testGetDateUTCString() + { + $dateString = Utils::getDateUTCString(); + + $this->checkInternalType('string', $dateString); + // Format: Mon, 26 Dec 2023 10:30:00 GMT + $this->checkRegExp('/^\w{3}, \d{2} \w{3} \d{4} \d{2}:\d{2}:\d{2} \w+$/', $dateString); + } + + /** + * Test getROASignature function + */ + public function testGetROASignature() + { + $stringToSign = "GET\n\n\n\nTue, 26 Dec 2023 10:30:00 GMT\n/test"; + $secret = "test-secret"; + + $signature = Utils::getROASignature($stringToSign, $secret); + + $this->checkInternalType('string', $signature); + $this->assertNotEmpty($signature); + } + + /** + * Test getRPCSignature function + */ + public function testGetRPCSignature() + { + $signedParams = array( + 'Action' => 'DescribeInstances', + 'Version' => '2014-05-26', + 'Timestamp' => '2023-12-26T10:30:00Z' + ); + $method = 'GET'; + $secret = 'test-secret'; + + $signature = Utils::getRPCSignature($signedParams, $method, $secret); + + $this->checkInternalType('string', $signature); + $this->assertNotEmpty($signature); + } + + /** + * Test toForm function + */ + public function testToForm() + { + $filter = array( + 'key1' => 'value1', + 'key2' => 'value2', + 'nested' => array('key3' => 'value3') + ); + + $result = Utils::toForm($filter); + + $this->checkInternalType('string', $result); + $this->checkStringContains('key1=value1', $result); + $this->checkStringContains('key2=value2', $result); + + // Test with null + $result = Utils::toForm(null); + $this->assertEquals('', $result); + } + + /** + * Test query function + */ + public function testQuery() + { + $filter = array( + 'key1' => 'value1', + 'key2' => 'value2', + '_private' => 'ignore', + 'nested' => array('key3' => 'value3') + ); + + $result = Utils::query($filter); + + $this->checkInternalType('array', $result); + $this->assertArrayHasKey('key1', $result); + $this->assertArrayHasKey('key2', $result); + $this->assertArrayNotHasKey('_private', $result); + + // Test with null + $result = Utils::query(null); + $this->checkInternalType('array', $result); + $this->assertEmpty($result); + } + + /** + * Test arrayToStringWithSpecifiedStyle function + */ + public function testArrayToStringWithSpecifiedStyle() + { + $array = array('a', 'b', 'c'); + + // Test simple style (comma-separated) + $result = Utils::arrayToStringWithSpecifiedStyle($array, 'prefix', 'simple'); + $this->assertEquals('a,b,c', $result); + + // Test spaceDelimited style + $result = Utils::arrayToStringWithSpecifiedStyle($array, 'prefix', 'spaceDelimited'); + $this->assertEquals('a b c', $result); + + // Test pipeDelimited style + $result = Utils::arrayToStringWithSpecifiedStyle($array, 'prefix', 'pipeDelimited'); + $this->assertEquals('a|b|c', $result); + + // Test json style + $result = Utils::arrayToStringWithSpecifiedStyle($array, 'prefix', 'json'); + $this->checkStringContains('a', $result); + $this->checkStringContains('b', $result); + + // Test with null + $result = Utils::arrayToStringWithSpecifiedStyle(null, 'prefix', 'simple'); + $this->assertEquals('', $result); + } + + /** + * Test parseToMap function + */ + public function testParseToMap() + { + $input = array( + 'key1' => 'value1', + 'key2' => array('nested' => 'value2') + ); + + $result = Utils::parseToMap($input); + + $this->checkInternalType('array', $result); + $this->assertEquals('value1', $result['key1']); + $this->checkInternalType('array', $result['key2']); + + // Test with null + $result = Utils::parseToMap(null); + $this->checkInternalType('array', $result); + // parseToMap(null) returns array() from parse function + $this->assertTrue(is_array($result)); + } + + /** + * Test getUserAgent function + */ + public function testGetUserAgent() + { + // Test with custom user agent + $userAgent = Utils::getUserAgent('MyApp/1.0'); + + $this->checkInternalType('string', $userAgent); + $this->checkStringContains('AlibabaCloud', $userAgent); + $this->checkStringContains('PHP/', $userAgent); + $this->checkStringContains('MyApp/1.0', $userAgent); + + // Test with empty user agent + $userAgent = Utils::getUserAgent(''); + $this->checkStringContains('AlibabaCloud', $userAgent); + $this->assertFalse(strpos($userAgent, 'MyApp') !== false); + } + + /** + * Test toArray function + */ + public function testToArray() + { + $input = array( + 'key1' => 'value1', + 'key2' => array('nested' => 'value2') + ); + + $result = Utils::toArray($input); + + $this->checkInternalType('array', $result); + $this->assertEquals($input, $result); + + // Test with non-array + $result = Utils::toArray('string'); + $this->assertEquals('string', $result); + } + + /** + * Test stringifyMapValue function + */ + public function testStringifyMapValue() + { + $map = array( + 'int' => 123, + 'bool' => true, + 'null' => null, + 'string' => 'test' + ); + + $result = Utils::stringifyMapValue($map); + + $this->checkInternalType('array', $result); + $this->assertEquals('123', $result['int']); + $this->assertEquals('true', $result['bool']); + $this->assertEquals('', $result['null']); + $this->assertEquals('test', $result['string']); + + // Test with null + $result = Utils::stringifyMapValue(null); + $this->checkInternalType('array', $result); + $this->assertEmpty($result); + } + + /** + * Test getEndpointRules function + */ + public function testGetEndpointRules() + { + // Test regional endpoint + $result = Utils::getEndpointRules('ecs', 'cn-hangzhou', 'regional', ''); + $this->assertEquals('ecs.cn-hangzhou.aliyuncs.com', $result); + + // Test non-regional endpoint + $result = Utils::getEndpointRules('oss', '', 'public', ''); + $this->assertEquals('oss.aliyuncs.com', $result); + + // Test with vpc network + $result = Utils::getEndpointRules('ecs', 'cn-beijing', 'regional', 'vpc'); + $this->assertEquals('ecs-vpc.cn-beijing.aliyuncs.com', $result); + + // Test with internal network + $result = Utils::getEndpointRules('rds', 'cn-shanghai', 'regional', 'internal'); + $this->assertEquals('rds-internal.cn-shanghai.aliyuncs.com', $result); + + // Test with public network (should be ignored) + $result = Utils::getEndpointRules('ecs', 'cn-hangzhou', 'regional', 'public'); + $this->assertEquals('ecs.cn-hangzhou.aliyuncs.com', $result); + } + + /** + * Test getEndpointRules with missing regionId + */ + public function testGetEndpointRulesThrowsException() + { + try { + Utils::getEndpointRules('ecs', '', 'regional', ''); + $this->fail('Expected RuntimeException was not thrown'); + } catch (\RuntimeException $e) { + $this->checkStringContains('RegionId is empty', $e->getMessage()); + } + } + + /** + * Test getProductEndpoint function + */ + public function testGetProductEndpoint() + { + // Test with provided endpoint + $result = Utils::getProductEndpoint('ecs', 'cn-hangzhou', 'regional', '', null, array(), 'custom.endpoint.com'); + $this->assertEquals('custom.endpoint.com', $result); + + // Test with endpoint map + $endpointMap = array('cn-hangzhou' => 'map.endpoint.com'); + $result = Utils::getProductEndpoint('ecs', 'cn-hangzhou', 'regional', '', null, $endpointMap, null); + $this->assertEquals('map.endpoint.com', $result); + + // Test fallback to getEndpointRules + $result = Utils::getProductEndpoint('ecs', 'cn-hangzhou', 'regional', '', null, array(), null); + $this->assertEquals('ecs.cn-hangzhou.aliyuncs.com', $result); + } + + /** + * Test sign function + */ + public function testSign() + { + $secret = 'test-secret'; + $str = 'test-string'; + + // Test HMAC-SHA256 + $result = Utils::sign($secret, $str, 'ACS3-HMAC-SHA256'); + $this->checkInternalType('string', $result); + $this->assertEquals(32, strlen($result)); + + // Test HMAC-SM3 + $result = Utils::sign($secret, $str, 'ACS3-HMAC-SM3'); + $this->checkInternalType('string', $result); + } + + /** + * Test getStringToSign function + */ + public function testGetStringToSign() + { + $request = new Request(); + $request->method = 'GET'; + $request->pathname = '/test'; + $request->query = array('key' => 'value'); + $request->headers = array( + 'accept' => 'application/json', + 'content-type' => 'application/json', + 'date' => 'Tue, 26 Dec 2023 10:30:00 GMT', + 'x-acs-custom' => 'custom-value' + ); + + $result = Utils::getStringToSign($request); + + $this->checkInternalType('string', $result); + $this->checkStringContains('GET', $result); + $this->checkStringContains('/test', $result); + $this->checkStringContains('x-acs-custom', $result); + } + + /** + * Test getAuthorization function + */ + public function testGetAuthorization() + { + $request = new Request(); + $request->method = 'GET'; + $request->pathname = '/test'; + $request->query = array('key' => 'value'); + $request->headers = array( + 'host' => 'test.aliyuncs.com', + 'content-type' => 'application/json', + 'x-acs-custom' => 'custom-value' + ); + + $result = Utils::getAuthorization( + $request, + 'ACS3-HMAC-SHA256', + 'payload-hash', + 'test-ak', + 'test-sk' + ); + + $this->checkInternalType('string', $result); + $this->checkStringContains('ACS3-HMAC-SHA256', $result); + $this->checkStringContains('Credential=test-ak', $result); + $this->checkStringContains('SignedHeaders=', $result); + $this->checkStringContains('Signature=', $result); + } + + /** + * Test Sm3 class + */ + public function testSm3() + { + $sm3 = new Sm3(); + + // Test known value + $result = $sm3->sign('abc'); + $this->assertEquals('66c7f0f462eeedd9d1f2d46bdc10e4e24167c4875cf2f7a2297da02b8f4ba8e0', $result); + + // Test another value + $result = $sm3->sign('test'); + $this->checkInternalType('string', $result); + $this->assertEquals(64, strlen($result)); // Hex string of 32 bytes + } + + /** + * Helper method for string contains assertion (cross-version compatibility) + */ + private function checkStringContains($needle, $haystack, $message = '') + { + if (method_exists($this, 'assertStringContainsString')) { + $this->assertStringContainsString($needle, $haystack, $message); + } else { + // Fallback for older PHPUnit + $this->assertContains($needle, $haystack, $message); + } + } + + /** + * Helper method for PHP 5.5 compatibility + * assertInternalType was deprecated in PHPUnit 8 + */ + private function checkInternalType($type, $value, $message = '') + { + if (method_exists($this, 'assertIsString') && $type === 'string') { + $this->assertIsString($value, $message); + } elseif (method_exists($this, 'assertIsArray') && $type === 'array') { + $this->assertIsArray($value, $message); + } elseif (method_exists($this, 'assertIsInt') && $type === 'int') { + $this->assertIsInt($value, $message); + } else { + // Fallback for older PHPUnit - use parent method or assertTrue + if (method_exists('PHPUnit_Framework_Assert', 'assertInternalType')) { + parent::assertInternalType($type, $value, $message); + } else { + $typeMap = array( + 'string' => 'is_string', + 'array' => 'is_array', + 'int' => 'is_int', + 'integer' => 'is_int', + 'bool' => 'is_bool', + 'boolean' => 'is_bool' + ); + if (isset($typeMap[$type])) { + $this->assertTrue(call_user_func($typeMap[$type], $value), $message); + } + } + } + } + + /** + * Helper method for PHP 5.5 compatibility + * assertRegExp was deprecated in PHPUnit 9 + */ + private function checkRegExp($pattern, $string, $message = '') + { + if (method_exists($this, 'assertMatchesRegularExpression')) { + $this->assertMatchesRegularExpression($pattern, $string, $message); + } else { + // Fallback for older PHPUnit - use assertTrue with preg_match + $this->assertTrue((bool) preg_match($pattern, $string), $message); + } + } + + public function testMapToFlatStyle() + { + // Test null + $this->assertNull(Utils::mapToFlatStyle(null)); + + // Test primitive values + $this->assertEquals('test', Utils::mapToFlatStyle('test')); + $this->assertEquals(123, Utils::mapToFlatStyle(123)); + $this->assertEquals(true, Utils::mapToFlatStyle(true)); + + // Test plain array (associative array) + $plainMap = [ + 'key1' => 'value1', + 'key2' => 'value2' + ]; + $flatMap = Utils::mapToFlatStyle($plainMap); + $this->assertEquals('value1', $flatMap['#4#key1']); + $this->assertEquals('value2', $flatMap['#4#key2']); + + // Test nested array + $nestedMap = [ + 'outerKey' => [ + 'innerKey' => 'innerValue' + ] + ]; + $flatNestedMap = Utils::mapToFlatStyle($nestedMap); + $this->assertEquals('innerValue', $flatNestedMap['#8#outerKey']['#8#innerKey']); + + // Test indexed array (list) + $arr = ['item1', 'item2']; + $flatArr = Utils::mapToFlatStyle($arr); + $this->assertEquals('item1', $flatArr[0]); + $this->assertEquals('item2', $flatArr[1]); + + // Test indexed array with associative array elements + $arrWithDict = [ + ['key' => 'value'] + ]; + $flatArrWithDict = Utils::mapToFlatStyle($arrWithDict); + $this->assertEquals('value', $flatArrWithDict[0]['#3#key']); + + // Test with nested structures + $complexMap = [ + 'name' => 'testName', + 'tags' => [ + 'tagKey' => 'tagValue' + ] + ]; + $flatComplexMap = Utils::mapToFlatStyle($complexMap); + $this->assertEquals('testName', $flatComplexMap['#4#name']); + $this->assertEquals('tagValue', $flatComplexMap['#4#tags']['#6#tagKey']); + } +} \ No newline at end of file diff --git a/vendor/alibabacloud/openapi-core/tests/bootstrap.php b/vendor/alibabacloud/openapi-core/tests/bootstrap.php new file mode 100644 index 0000000..c62c4e8 --- /dev/null +++ b/vendor/alibabacloud/openapi-core/tests/bootstrap.php @@ -0,0 +1,3 @@ +realpath = realpath($opened_path) ?: $opened_path; + $opened_path = $this->realpath; + $this->handle = fopen($this->realpath, $mode); + $this->position = 0; + + return (bool) $this->handle; + } + + public function stream_read($count) + { + $data = fread($this->handle, $count); + + if ($this->position === 0) { + $data = preg_replace('{^#!.*\r?\n}', '', $data); + } + + $this->position += strlen($data); + + return $data; + } + + public function stream_cast($castAs) + { + return $this->handle; + } + + public function stream_close() + { + fclose($this->handle); + } + + public function stream_lock($operation) + { + return $operation ? flock($this->handle, $operation) : true; + } + + public function stream_seek($offset, $whence) + { + if (0 === fseek($this->handle, $offset, $whence)) { + $this->position = ftell($this->handle); + return true; + } + + return false; + } + + public function stream_tell() + { + return $this->position; + } + + public function stream_eof() + { + return feof($this->handle); + } + + public function stream_stat() + { + return array(); + } + + public function stream_set_option($option, $arg1, $arg2) + { + return true; + } + + public function url_stat($path, $flags) + { + $path = substr($path, 17); + if (file_exists($path)) { + return stat($path); + } + + return false; + } + } + } + + if ( + (function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true)) + || (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) + ) { + return include("phpvfscomposer://" . __DIR__ . '/..'.'/symfony/var-dumper/Resources/bin/var-dump-server'); + } +} + +return include __DIR__ . '/..'.'/symfony/var-dumper/Resources/bin/var-dump-server'; diff --git a/vendor/bin/var-dump-server.bat b/vendor/bin/var-dump-server.bat new file mode 100755 index 0000000..c425720 --- /dev/null +++ b/vendor/bin/var-dump-server.bat @@ -0,0 +1,5 @@ +@ECHO OFF +setlocal DISABLEDELAYEDEXPANSION +SET BIN_TARGET=%~dp0/var-dump-server +SET COMPOSER_RUNTIME_BIN_DIR=%~dp0 +php "%BIN_TARGET%" %* diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 88608e1..5d3c845 100755 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -7,6 +7,363 @@ $baseDir = dirname($vendorDir); return array( 'Adbar\\Dot' => $vendorDir . '/adbario/php-dot-notation/src/Dot.php', + 'AlibabaCloud\\Credentials\\AccessKeyCredential' => $vendorDir . '/alibabacloud/credentials/src/AccessKeyCredential.php', + 'AlibabaCloud\\Credentials\\BearerTokenCredential' => $vendorDir . '/alibabacloud/credentials/src/BearerTokenCredential.php', + 'AlibabaCloud\\Credentials\\Credential' => $vendorDir . '/alibabacloud/credentials/src/Credential.php', + 'AlibabaCloud\\Credentials\\Credential\\Config' => $vendorDir . '/alibabacloud/credentials/src/Credential/Config.php', + 'AlibabaCloud\\Credentials\\Credential\\CredentialModel' => $vendorDir . '/alibabacloud/credentials/src/Credential/CredentialModel.php', + 'AlibabaCloud\\Credentials\\Credential\\RefreshResult' => $vendorDir . '/alibabacloud/credentials/src/Credential/RefreshResult.php', + 'AlibabaCloud\\Credentials\\Credentials' => $vendorDir . '/alibabacloud/credentials/src/Credentials.php', + 'AlibabaCloud\\Credentials\\CredentialsInterface' => $vendorDir . '/alibabacloud/credentials/src/CredentialsInterface.php', + 'AlibabaCloud\\Credentials\\CredentialsProviderWrap' => $vendorDir . '/alibabacloud/credentials/src/CredentialsProviderWrap.php', + 'AlibabaCloud\\Credentials\\EcsRamRoleCredential' => $vendorDir . '/alibabacloud/credentials/src/EcsRamRoleCredential.php', + 'AlibabaCloud\\Credentials\\Providers\\CLIProfileCredentialsProvider' => $vendorDir . '/alibabacloud/credentials/src/Providers/CLIProfileCredentialsProvider.php', + 'AlibabaCloud\\Credentials\\Providers\\ChainProvider' => $vendorDir . '/alibabacloud/credentials/src/Providers/ChainProvider.php', + 'AlibabaCloud\\Credentials\\Providers\\Credentials' => $vendorDir . '/alibabacloud/credentials/src/Providers/Credentials.php', + 'AlibabaCloud\\Credentials\\Providers\\CredentialsProvider' => $vendorDir . '/alibabacloud/credentials/src/Providers/CredentialsProvider.php', + 'AlibabaCloud\\Credentials\\Providers\\DefaultCredentialsProvider' => $vendorDir . '/alibabacloud/credentials/src/Providers/DefaultCredentialsProvider.php', + 'AlibabaCloud\\Credentials\\Providers\\EcsRamRoleCredentialsProvider' => $vendorDir . '/alibabacloud/credentials/src/Providers/EcsRamRoleCredentialsProvider.php', + 'AlibabaCloud\\Credentials\\Providers\\EnvironmentVariableCredentialsProvider' => $vendorDir . '/alibabacloud/credentials/src/Providers/EnvironmentVariableCredentialsProvider.php', + 'AlibabaCloud\\Credentials\\Providers\\OIDCRoleArnCredentialsProvider' => $vendorDir . '/alibabacloud/credentials/src/Providers/OIDCRoleArnCredentialsProvider.php', + 'AlibabaCloud\\Credentials\\Providers\\ProfileCredentialsProvider' => $vendorDir . '/alibabacloud/credentials/src/Providers/ProfileCredentialsProvider.php', + 'AlibabaCloud\\Credentials\\Providers\\RamRoleArnCredentialsProvider' => $vendorDir . '/alibabacloud/credentials/src/Providers/RamRoleArnCredentialsProvider.php', + 'AlibabaCloud\\Credentials\\Providers\\RsaKeyPairCredentialsProvider' => $vendorDir . '/alibabacloud/credentials/src/Providers/RsaKeyPairCredentialsProvider.php', + 'AlibabaCloud\\Credentials\\Providers\\SessionCredentialsProvider' => $vendorDir . '/alibabacloud/credentials/src/Providers/SessionCredentialsProvider.php', + 'AlibabaCloud\\Credentials\\Providers\\StaticAKCredentialsProvider' => $vendorDir . '/alibabacloud/credentials/src/Providers/StaticAKCredentialsProvider.php', + 'AlibabaCloud\\Credentials\\Providers\\StaticSTSCredentialsProvider' => $vendorDir . '/alibabacloud/credentials/src/Providers/StaticSTSCredentialsProvider.php', + 'AlibabaCloud\\Credentials\\Providers\\URLCredentialsProvider' => $vendorDir . '/alibabacloud/credentials/src/Providers/URLCredentialsProvider.php', + 'AlibabaCloud\\Credentials\\RamRoleArnCredential' => $vendorDir . '/alibabacloud/credentials/src/RamRoleArnCredential.php', + 'AlibabaCloud\\Credentials\\Request\\Request' => $vendorDir . '/alibabacloud/credentials/src/Request/Request.php', + 'AlibabaCloud\\Credentials\\RsaKeyPairCredential' => $vendorDir . '/alibabacloud/credentials/src/RsaKeyPairCredential.php', + 'AlibabaCloud\\Credentials\\Signature\\BearerTokenSignature' => $vendorDir . '/alibabacloud/credentials/src/Signature/BearerTokenSignature.php', + 'AlibabaCloud\\Credentials\\Signature\\ShaHmac1Signature' => $vendorDir . '/alibabacloud/credentials/src/Signature/ShaHmac1Signature.php', + 'AlibabaCloud\\Credentials\\Signature\\ShaHmac256Signature' => $vendorDir . '/alibabacloud/credentials/src/Signature/ShaHmac256Signature.php', + 'AlibabaCloud\\Credentials\\Signature\\ShaHmac256WithRsaSignature' => $vendorDir . '/alibabacloud/credentials/src/Signature/ShaHmac256WithRsaSignature.php', + 'AlibabaCloud\\Credentials\\Signature\\SignatureInterface' => $vendorDir . '/alibabacloud/credentials/src/Signature/SignatureInterface.php', + 'AlibabaCloud\\Credentials\\StsCredential' => $vendorDir . '/alibabacloud/credentials/src/StsCredential.php', + 'AlibabaCloud\\Credentials\\Utils\\Filter' => $vendorDir . '/alibabacloud/credentials/src/Utils/Filter.php', + 'AlibabaCloud\\Credentials\\Utils\\Helper' => $vendorDir . '/alibabacloud/credentials/src/Utils/Helper.php', + 'AlibabaCloud\\Credentials\\Utils\\MockTrait' => $vendorDir . '/alibabacloud/credentials/src/Utils/MockTrait.php', + 'AlibabaCloud\\Dara\\Dara' => $vendorDir . '/alibabacloud/darabonba/src/Dara.php', + 'AlibabaCloud\\Dara\\Date' => $vendorDir . '/alibabacloud/darabonba/src/Date.php', + 'AlibabaCloud\\Dara\\Exception\\DaraException' => $vendorDir . '/alibabacloud/darabonba/src/Exception/DaraException.php', + 'AlibabaCloud\\Dara\\Exception\\DaraRespException' => $vendorDir . '/alibabacloud/darabonba/src/Exception/DaraRespException.php', + 'AlibabaCloud\\Dara\\Exception\\DaraRetryException' => $vendorDir . '/alibabacloud/darabonba/src/Exception/DaraRetryException.php', + 'AlibabaCloud\\Dara\\Exception\\DaraUnableRetryException' => $vendorDir . '/alibabacloud/darabonba/src/Exception/DaraUnableRetryException.php', + 'AlibabaCloud\\Dara\\File' => $vendorDir . '/alibabacloud/darabonba/src/File.php', + 'AlibabaCloud\\Dara\\Helper' => $vendorDir . '/alibabacloud/darabonba/src/Helper.php', + 'AlibabaCloud\\Dara\\Model' => $vendorDir . '/alibabacloud/darabonba/src/Model.php', + 'AlibabaCloud\\Dara\\Models\\ExtendsParameters' => $vendorDir . '/alibabacloud/darabonba/src/Models/ExtendsParameters.php', + 'AlibabaCloud\\Dara\\Models\\FileField' => $vendorDir . '/alibabacloud/darabonba/src/Models/FileField.php', + 'AlibabaCloud\\Dara\\Models\\RuntimeOptions' => $vendorDir . '/alibabacloud/darabonba/src/Models/RuntimeOptions.php', + 'AlibabaCloud\\Dara\\Models\\SSEEvent' => $vendorDir . '/alibabacloud/darabonba/src/Models/SSEEvent.php', + 'AlibabaCloud\\Dara\\Parameter' => $vendorDir . '/alibabacloud/darabonba/src/Parameter.php', + 'AlibabaCloud\\Dara\\Request' => $vendorDir . '/alibabacloud/darabonba/src/Request.php', + 'AlibabaCloud\\Dara\\Response' => $vendorDir . '/alibabacloud/darabonba/src/Response.php', + 'AlibabaCloud\\Dara\\RetryPolicy\\BackoffPolicy' => $vendorDir . '/alibabacloud/darabonba/src/RetryPolicy/BackoffPolicy.php', + 'AlibabaCloud\\Dara\\RetryPolicy\\EqualJitterBackoffPolicy' => $vendorDir . '/alibabacloud/darabonba/src/RetryPolicy/EqualJitterBackoffPolicy.php', + 'AlibabaCloud\\Dara\\RetryPolicy\\ExponentialBackoffPolicy' => $vendorDir . '/alibabacloud/darabonba/src/RetryPolicy/ExponentialBackoffPolicy.php', + 'AlibabaCloud\\Dara\\RetryPolicy\\FixedBackoffPolicy' => $vendorDir . '/alibabacloud/darabonba/src/RetryPolicy/FixedBackoffPolicy.php', + 'AlibabaCloud\\Dara\\RetryPolicy\\FullJitterBackoffPolicy' => $vendorDir . '/alibabacloud/darabonba/src/RetryPolicy/FullJitterBackoffPolicy.php', + 'AlibabaCloud\\Dara\\RetryPolicy\\RandomBackoffPolicy' => $vendorDir . '/alibabacloud/darabonba/src/RetryPolicy/RandomBackoffPolicy.php', + 'AlibabaCloud\\Dara\\RetryPolicy\\RetryCondition' => $vendorDir . '/alibabacloud/darabonba/src/RetryPolicy/RetryCondition.php', + 'AlibabaCloud\\Dara\\RetryPolicy\\RetryOptions' => $vendorDir . '/alibabacloud/darabonba/src/RetryPolicy/RetryOptions.php', + 'AlibabaCloud\\Dara\\RetryPolicy\\RetryPolicyContext' => $vendorDir . '/alibabacloud/darabonba/src/RetryPolicy/RetryPolicyContext.php', + 'AlibabaCloud\\Dara\\Url' => $vendorDir . '/alibabacloud/darabonba/src/Url.php', + 'AlibabaCloud\\Dara\\Util\\ArrayToXml' => $vendorDir . '/alibabacloud/darabonba/src/Util/ArrayToXml.php', + 'AlibabaCloud\\Dara\\Util\\BytesUtil' => $vendorDir . '/alibabacloud/darabonba/src/Util/BytesUtil.php', + 'AlibabaCloud\\Dara\\Util\\Console' => $vendorDir . '/alibabacloud/darabonba/src/Util/Console.php', + 'AlibabaCloud\\Dara\\Util\\FileFormStream' => $vendorDir . '/alibabacloud/darabonba/src/Util/FileFormStream.php', + 'AlibabaCloud\\Dara\\Util\\FileFormStreamTrait' => $vendorDir . '/alibabacloud/darabonba/src/Util/FileFormStreamTrait.php', + 'AlibabaCloud\\Dara\\Util\\FileFormStreamTyped' => $vendorDir . '/alibabacloud/darabonba/src/Util/FileFormStreamTyped.php', + 'AlibabaCloud\\Dara\\Util\\FormUtil' => $vendorDir . '/alibabacloud/darabonba/src/Util/FormUtil.php', + 'AlibabaCloud\\Dara\\Util\\MathUtil' => $vendorDir . '/alibabacloud/darabonba/src/Util/MathUtil.php', + 'AlibabaCloud\\Dara\\Util\\StreamUtil' => $vendorDir . '/alibabacloud/darabonba/src/Util/StreamUtil.php', + 'AlibabaCloud\\Dara\\Util\\StringUtil' => $vendorDir . '/alibabacloud/darabonba/src/Util/StringUtil.php', + 'AlibabaCloud\\Dara\\Util\\XML' => $vendorDir . '/alibabacloud/darabonba/src/Util/XML.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Dysmsapi' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Dysmsapi.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\AddExtCodeSignRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/AddExtCodeSignRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\AddExtCodeSignResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/AddExtCodeSignResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\AddExtCodeSignResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/AddExtCodeSignResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\AddShortUrlRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/AddShortUrlRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\AddShortUrlResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/AddShortUrlResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\AddShortUrlResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/AddShortUrlResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\AddShortUrlResponseBody\\data' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/AddShortUrlResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\AddSmsSignRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/AddSmsSignRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\AddSmsSignRequest\\signFileList' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/AddSmsSignRequest/signFileList.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\AddSmsSignResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/AddSmsSignResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\AddSmsSignResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/AddSmsSignResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\AddSmsTemplateRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/AddSmsTemplateRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\AddSmsTemplateResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/AddSmsTemplateResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\AddSmsTemplateResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/AddSmsTemplateResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ChangeSignatureQualificationRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/ChangeSignatureQualificationRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ChangeSignatureQualificationResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/ChangeSignatureQualificationResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ChangeSignatureQualificationResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/ChangeSignatureQualificationResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ChangeSignatureQualificationResponseBody\\data' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/ChangeSignatureQualificationResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CheckMobilesCardSupportRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CheckMobilesCardSupportResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CheckMobilesCardSupportResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CheckMobilesCardSupportResponseBody\\data' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CheckMobilesCardSupportResponseBody\\data\\queryResult' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportResponseBody/data/queryResult.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ConversionDataIntlRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/ConversionDataIntlRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ConversionDataIntlResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/ConversionDataIntlResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ConversionDataIntlResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/ConversionDataIntlResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateCardSmsTemplateRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateCardSmsTemplateResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateCardSmsTemplateResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateCardSmsTemplateResponseBody\\data' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateCardSmsTemplateShrinkRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateShrinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateDigitalSignOrderRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSignOrderRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateDigitalSignOrderResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSignOrderResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateDigitalSignOrderResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSignOrderResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateDigitalSignOrderShrinkRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSignOrderShrinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateDigitalSmsTemplateRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSmsTemplateRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateDigitalSmsTemplateRequest\\templateContents' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSmsTemplateRequest/templateContents.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateDigitalSmsTemplateResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSmsTemplateResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateDigitalSmsTemplateResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSmsTemplateResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmartShortUrlRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmartShortUrlRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmartShortUrlResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmartShortUrlResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmartShortUrlResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmartShortUrlResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmartShortUrlResponseBody\\model_' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmartShortUrlResponseBody/model_.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsAppIcpRecordRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAppIcpRecordRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsAppIcpRecordResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAppIcpRecordResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsAppIcpRecordResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAppIcpRecordResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsAuthorizationLetterRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAuthorizationLetterRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsAuthorizationLetterResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAuthorizationLetterResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsAuthorizationLetterResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAuthorizationLetterResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsAuthorizationLetterShrinkRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAuthorizationLetterShrinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsSignRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsSignRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsSignResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsSignResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsSignResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsSignResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsSignShrinkRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsSignShrinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsTemplateRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTemplateRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsTemplateResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTemplateResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsTemplateResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTemplateResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsTemplateShrinkRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTemplateShrinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsTrademarkRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTrademarkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsTrademarkResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTrademarkResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsTrademarkResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTrademarkResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteExtCodeSignRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteExtCodeSignRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteExtCodeSignResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteExtCodeSignResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteExtCodeSignResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteExtCodeSignResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteShortUrlRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteShortUrlRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteShortUrlResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteShortUrlResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteShortUrlResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteShortUrlResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteSmsQualificationRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsQualificationRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteSmsQualificationResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsQualificationResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteSmsQualificationResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsQualificationResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteSmsSignRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsSignRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteSmsSignResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsSignResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteSmsSignResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsSignResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteSmsTemplateRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsTemplateRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteSmsTemplateResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsTemplateResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteSmsTemplateResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsTemplateResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetCardSmsDetailsRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetCardSmsDetailsResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetCardSmsDetailsResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetCardSmsDetailsResponseBody\\cardSendDetailDTO' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsResponseBody/cardSendDetailDTO.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetCardSmsDetailsResponseBody\\cardSendDetailDTO\\records' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsResponseBody/cardSendDetailDTO/records.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetCardSmsLinkRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsLinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetCardSmsLinkResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsLinkResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetCardSmsLinkResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsLinkResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetCardSmsLinkResponseBody\\data' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsLinkResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetMediaResourceIdRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetMediaResourceIdRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetMediaResourceIdResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetMediaResourceIdResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetMediaResourceIdResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetMediaResourceIdResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetMediaResourceIdResponseBody\\data' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetMediaResourceIdResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetOSSInfoForCardTemplateResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForCardTemplateResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetOSSInfoForCardTemplateResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForCardTemplateResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetOSSInfoForCardTemplateResponseBody\\data' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForCardTemplateResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetOSSInfoForUploadFileRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForUploadFileRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetOSSInfoForUploadFileResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForUploadFileResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetOSSInfoForUploadFileResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForUploadFileResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetOSSInfoForUploadFileResponseBody\\model_' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForUploadFileResponseBody/model_.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetQualificationOssInfoRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetQualificationOssInfoRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetQualificationOssInfoResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetQualificationOssInfoResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetQualificationOssInfoResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetQualificationOssInfoResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetQualificationOssInfoResponseBody\\data' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetQualificationOssInfoResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsOcrOssInfoRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsOcrOssInfoRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsOcrOssInfoResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsOcrOssInfoResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsOcrOssInfoResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsOcrOssInfoResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsOcrOssInfoResponseBody\\model_' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsOcrOssInfoResponseBody/model_.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsSignRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsSignResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsSignResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsSignResponseBody\\auditInfo' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponseBody/auditInfo.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsSignResponseBody\\signIspRegisterDetailList' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponseBody/signIspRegisterDetailList.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsSignResponseBody\\signIspRegisterDetailList\\registerStatusReasons' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponseBody/signIspRegisterDetailList/registerStatusReasons.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsTemplateListRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsTemplateListResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsTemplateListResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsTemplateListResponseBody\\data' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsTemplateListResponseBody\\data\\list_' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponseBody/data/list_.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsTemplateListResponseBody\\data\\list_\\templateTag' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponseBody/data/list_/templateTag.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsTemplateListShrinkRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListShrinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsTemplateRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsTemplateResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsTemplateResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsTemplateResponseBody\\auditInfo' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody/auditInfo.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsTemplateResponseBody\\fileUrlList' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody/fileUrlList.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsTemplateResponseBody\\moreDataFileUrlList' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody/moreDataFileUrlList.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsTemplateResponseBody\\signList' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody/signList.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ListTagResourcesRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ListTagResourcesRequest\\tag' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesRequest/tag.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ListTagResourcesResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ListTagResourcesResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ListTagResourcesResponseBody\\tagResources' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesResponseBody/tagResources.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ListTagResourcesResponseBody\\tagResources\\tagResource' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesResponseBody/tagResources/tagResource.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ModifySmsSignRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsSignRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ModifySmsSignRequest\\signFileList' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsSignRequest/signFileList.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ModifySmsSignResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsSignResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ModifySmsSignResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsSignResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ModifySmsTemplateRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsTemplateRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ModifySmsTemplateResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsTemplateResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ModifySmsTemplateResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsTemplateResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryCardSmsTemplateReportRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateReportRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryCardSmsTemplateReportResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateReportResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryCardSmsTemplateReportResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateReportResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryCardSmsTemplateReportResponseBody\\data' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateReportResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryCardSmsTemplateRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryCardSmsTemplateResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryCardSmsTemplateResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryCardSmsTemplateResponseBody\\data' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryDigitalSignByNameRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryDigitalSignByNameRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryDigitalSignByNameResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryDigitalSignByNameResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryDigitalSignByNameResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryDigitalSignByNameResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryExtCodeSignRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryExtCodeSignResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryExtCodeSignResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryExtCodeSignResponseBody\\data' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryExtCodeSignResponseBody\\data\\list_' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignResponseBody/data/list_.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryMobilesCardSupportRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryMobilesCardSupportResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryMobilesCardSupportResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryMobilesCardSupportResponseBody\\data' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryMobilesCardSupportResponseBody\\data\\queryResult' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportResponseBody/data/queryResult.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryMobilesCardSupportShrinkRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportShrinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryPageSmartShortUrlLogRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryPageSmartShortUrlLogResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryPageSmartShortUrlLogResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryPageSmartShortUrlLogResponseBody\\model\\list_' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogResponseBody/model/list_.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryPageSmartShortUrlLogResponseBody\\model_' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogResponseBody/model_.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySendDetailsRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySendDetailsResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySendDetailsResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySendDetailsResponseBody\\smsSendDetailDTOs' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsResponseBody/smsSendDetailDTOs.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySendDetailsResponseBody\\smsSendDetailDTOs\\smsSendDetailDTO' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsResponseBody/smsSendDetailDTOs/smsSendDetailDTO.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySendStatisticsRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySendStatisticsResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySendStatisticsResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySendStatisticsResponseBody\\data' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySendStatisticsResponseBody\\data\\targetList' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsResponseBody/data/targetList.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryShortUrlRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryShortUrlRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryShortUrlResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryShortUrlResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryShortUrlResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryShortUrlResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryShortUrlResponseBody\\data' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QueryShortUrlResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySingleSmsQualificationRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySingleSmsQualificationResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySingleSmsQualificationResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySingleSmsQualificationResponseBody\\data' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySingleSmsQualificationResponseBody\\data\\businessLicensePics' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponseBody/data/businessLicensePics.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySingleSmsQualificationResponseBody\\data\\otherFiles' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponseBody/data/otherFiles.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsAppIcpRecordRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsAppIcpRecordResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsAppIcpRecordResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsAppIcpRecordResponseBody\\data' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsAppIcpRecordShrinkRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordShrinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsAuthorizationLetterRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsAuthorizationLetterResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsAuthorizationLetterResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsAuthorizationLetterResponseBody\\data' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsAuthorizationLetterShrinkRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterShrinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsQualificationRecordRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsQualificationRecordResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsQualificationRecordResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsQualificationRecordResponseBody\\data' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsQualificationRecordResponseBody\\data\\list_' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordResponseBody/data/list_.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsSignListRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsSignListResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsSignListResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsSignListResponseBody\\smsSignList' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListResponseBody/smsSignList.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsSignListResponseBody\\smsSignList\\reason' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListResponseBody/smsSignList/reason.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsSignRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsSignResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsSignResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsTemplateListRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsTemplateListResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsTemplateListResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsTemplateListResponseBody\\smsTemplateList' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListResponseBody/smsTemplateList.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsTemplateListResponseBody\\smsTemplateList\\reason' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListResponseBody/smsTemplateList/reason.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsTemplateRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsTemplateResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsTemplateResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsTrademarkRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsTrademarkResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsTrademarkResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsTrademarkResponseBody\\data' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsTrademarkShrinkRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkShrinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\RequiredPhoneCodeRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/RequiredPhoneCodeRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\RequiredPhoneCodeResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/RequiredPhoneCodeResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\RequiredPhoneCodeResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/RequiredPhoneCodeResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendBatchCardSmsRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/SendBatchCardSmsRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendBatchCardSmsResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/SendBatchCardSmsResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendBatchCardSmsResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/SendBatchCardSmsResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendBatchCardSmsResponseBody\\data' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/SendBatchCardSmsResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendBatchSmsRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/SendBatchSmsRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendBatchSmsResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/SendBatchSmsResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendBatchSmsResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/SendBatchSmsResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendCardSmsRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendCardSmsRequest\\cardObjects' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsRequest/cardObjects.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendCardSmsResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendCardSmsResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendCardSmsResponseBody\\data' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendLogisticsSmsRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/SendLogisticsSmsRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendLogisticsSmsResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/SendLogisticsSmsResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendLogisticsSmsResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/SendLogisticsSmsResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendLogisticsSmsResponseBody\\data' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/SendLogisticsSmsResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendSmsRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/SendSmsRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendSmsResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/SendSmsResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendSmsResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/SendSmsResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SmsConversionIntlRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/SmsConversionIntlRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SmsConversionIntlResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/SmsConversionIntlResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SmsConversionIntlResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/SmsConversionIntlResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SubmitSmsQualificationRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SubmitSmsQualificationRequest\\businessLicensePics' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationRequest/businessLicensePics.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SubmitSmsQualificationRequest\\otherFiles' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationRequest/otherFiles.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SubmitSmsQualificationResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SubmitSmsQualificationResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SubmitSmsQualificationShrinkRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationShrinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\TagResourcesRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/TagResourcesRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\TagResourcesRequest\\tag' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/TagResourcesRequest/tag.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\TagResourcesResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/TagResourcesResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\TagResourcesResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/TagResourcesResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UntagResourcesRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/UntagResourcesRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UntagResourcesResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/UntagResourcesResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UntagResourcesResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/UntagResourcesResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateExtCodeSignRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateExtCodeSignRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateExtCodeSignResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateExtCodeSignResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateExtCodeSignResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateExtCodeSignResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateSmsQualificationRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateSmsQualificationRequest\\businessLicensePics' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationRequest/businessLicensePics.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateSmsQualificationRequest\\otherFiles' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationRequest/otherFiles.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateSmsQualificationResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateSmsQualificationResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateSmsQualificationShrinkRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationShrinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateSmsSignRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsSignRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateSmsSignResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsSignResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateSmsSignResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsSignResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateSmsSignShrinkRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsSignShrinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateSmsTemplateRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsTemplateRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateSmsTemplateResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsTemplateResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateSmsTemplateResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsTemplateResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateSmsTemplateShrinkRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsTemplateShrinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ValidPhoneCodeRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/ValidPhoneCodeRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ValidPhoneCodeResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/ValidPhoneCodeResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ValidPhoneCodeResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/ValidPhoneCodeResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\VerifyLogisticsSmsMailNoRequest' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/VerifyLogisticsSmsMailNoRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\VerifyLogisticsSmsMailNoResponse' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/VerifyLogisticsSmsMailNoResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\VerifyLogisticsSmsMailNoResponseBody' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/VerifyLogisticsSmsMailNoResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\VerifyLogisticsSmsMailNoResponseBody\\data' => $vendorDir . '/alibabacloud/dysmsapi-20170525/src/Models/VerifyLogisticsSmsMailNoResponseBody/data.php', 'AlibabaCloud\\Tea\\Exception\\TeaError' => $vendorDir . '/alibabacloud/tea/src/Exception/TeaError.php', 'AlibabaCloud\\Tea\\Exception\\TeaRetryError' => $vendorDir . '/alibabacloud/tea/src/Exception/TeaRetryError.php', 'AlibabaCloud\\Tea\\Exception\\TeaUnableRetryError' => $vendorDir . '/alibabacloud/tea/src/Exception/TeaUnableRetryError.php', @@ -261,6 +618,24 @@ return array( 'DASPRiD\\Enum\\Exception\\SerializeNotSupportedException' => $vendorDir . '/dasprid/enum/src/Exception/SerializeNotSupportedException.php', 'DASPRiD\\Enum\\Exception\\UnserializeNotSupportedException' => $vendorDir . '/dasprid/enum/src/Exception/UnserializeNotSupportedException.php', 'DASPRiD\\Enum\\NullValue' => $vendorDir . '/dasprid/enum/src/NullValue.php', + 'Darabonba\\GatewaySpi\\Client' => $vendorDir . '/alibabacloud/gateway-spi/src/Client.php', + 'Darabonba\\GatewaySpi\\Models\\AttributeMap' => $vendorDir . '/alibabacloud/gateway-spi/src/Models/AttributeMap.php', + 'Darabonba\\GatewaySpi\\Models\\InterceptorContext' => $vendorDir . '/alibabacloud/gateway-spi/src/Models/InterceptorContext.php', + 'Darabonba\\GatewaySpi\\Models\\InterceptorContext\\configuration' => $vendorDir . '/alibabacloud/gateway-spi/src/Models/InterceptorContext/configuration.php', + 'Darabonba\\GatewaySpi\\Models\\InterceptorContext\\request' => $vendorDir . '/alibabacloud/gateway-spi/src/Models/InterceptorContext/request.php', + 'Darabonba\\GatewaySpi\\Models\\InterceptorContext\\response' => $vendorDir . '/alibabacloud/gateway-spi/src/Models/InterceptorContext/response.php', + 'Darabonba\\OpenApi\\Exceptions\\AlibabaCloudException' => $vendorDir . '/alibabacloud/openapi-core/src/Exceptions/AlibabaCloudException.php', + 'Darabonba\\OpenApi\\Exceptions\\ClientException' => $vendorDir . '/alibabacloud/openapi-core/src/Exceptions/ClientException.php', + 'Darabonba\\OpenApi\\Exceptions\\ServerException' => $vendorDir . '/alibabacloud/openapi-core/src/Exceptions/ServerException.php', + 'Darabonba\\OpenApi\\Exceptions\\ThrottlingException' => $vendorDir . '/alibabacloud/openapi-core/src/Exceptions/ThrottlingException.php', + 'Darabonba\\OpenApi\\Models\\Config' => $vendorDir . '/alibabacloud/openapi-core/src/Models/Config.php', + 'Darabonba\\OpenApi\\Models\\GlobalParameters' => $vendorDir . '/alibabacloud/openapi-core/src/Models/GlobalParameters.php', + 'Darabonba\\OpenApi\\Models\\OpenApiRequest' => $vendorDir . '/alibabacloud/openapi-core/src/Models/OpenApiRequest.php', + 'Darabonba\\OpenApi\\Models\\Params' => $vendorDir . '/alibabacloud/openapi-core/src/Models/Params.php', + 'Darabonba\\OpenApi\\Models\\SSEResponse' => $vendorDir . '/alibabacloud/openapi-core/src/Models/SSEResponse.php', + 'Darabonba\\OpenApi\\OpenApiClient' => $vendorDir . '/alibabacloud/openapi-core/src/OpenApiClient.php', + 'Darabonba\\OpenApi\\Sm3' => $vendorDir . '/alibabacloud/openapi-core/src/Sm3.php', + 'Darabonba\\OpenApi\\Utils' => $vendorDir . '/alibabacloud/openapi-core/src/Utils.php', 'Doctrine\\Common\\Annotations\\Annotation' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php', 'Doctrine\\Common\\Annotations\\AnnotationException' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php', 'Doctrine\\Common\\Annotations\\AnnotationReader' => $vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php', @@ -2591,6 +2966,69 @@ return array( 'Symfony\\Component\\Translation\\Util\\XliffUtils' => $vendorDir . '/symfony/translation/Util/XliffUtils.php', 'Symfony\\Component\\Translation\\Writer\\TranslationWriter' => $vendorDir . '/symfony/translation/Writer/TranslationWriter.php', 'Symfony\\Component\\Translation\\Writer\\TranslationWriterInterface' => $vendorDir . '/symfony/translation/Writer/TranslationWriterInterface.php', + 'Symfony\\Component\\VarDumper\\Caster\\AmqpCaster' => $vendorDir . '/symfony/var-dumper/Caster/AmqpCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\ArgsStub' => $vendorDir . '/symfony/var-dumper/Caster/ArgsStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\Caster' => $vendorDir . '/symfony/var-dumper/Caster/Caster.php', + 'Symfony\\Component\\VarDumper\\Caster\\ClassStub' => $vendorDir . '/symfony/var-dumper/Caster/ClassStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\ConstStub' => $vendorDir . '/symfony/var-dumper/Caster/ConstStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\CutArrayStub' => $vendorDir . '/symfony/var-dumper/Caster/CutArrayStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\CutStub' => $vendorDir . '/symfony/var-dumper/Caster/CutStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\DOMCaster' => $vendorDir . '/symfony/var-dumper/Caster/DOMCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\DateCaster' => $vendorDir . '/symfony/var-dumper/Caster/DateCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\DoctrineCaster' => $vendorDir . '/symfony/var-dumper/Caster/DoctrineCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\DsCaster' => $vendorDir . '/symfony/var-dumper/Caster/DsCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\DsPairStub' => $vendorDir . '/symfony/var-dumper/Caster/DsPairStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\EnumStub' => $vendorDir . '/symfony/var-dumper/Caster/EnumStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\ExceptionCaster' => $vendorDir . '/symfony/var-dumper/Caster/ExceptionCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\FiberCaster' => $vendorDir . '/symfony/var-dumper/Caster/FiberCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\FrameStub' => $vendorDir . '/symfony/var-dumper/Caster/FrameStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\GmpCaster' => $vendorDir . '/symfony/var-dumper/Caster/GmpCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\ImagineCaster' => $vendorDir . '/symfony/var-dumper/Caster/ImagineCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\ImgStub' => $vendorDir . '/symfony/var-dumper/Caster/ImgStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\IntlCaster' => $vendorDir . '/symfony/var-dumper/Caster/IntlCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\LinkStub' => $vendorDir . '/symfony/var-dumper/Caster/LinkStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\MemcachedCaster' => $vendorDir . '/symfony/var-dumper/Caster/MemcachedCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\MysqliCaster' => $vendorDir . '/symfony/var-dumper/Caster/MysqliCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\PdoCaster' => $vendorDir . '/symfony/var-dumper/Caster/PdoCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\PgSqlCaster' => $vendorDir . '/symfony/var-dumper/Caster/PgSqlCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\ProxyManagerCaster' => $vendorDir . '/symfony/var-dumper/Caster/ProxyManagerCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\RdKafkaCaster' => $vendorDir . '/symfony/var-dumper/Caster/RdKafkaCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\RedisCaster' => $vendorDir . '/symfony/var-dumper/Caster/RedisCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\ReflectionCaster' => $vendorDir . '/symfony/var-dumper/Caster/ReflectionCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\ResourceCaster' => $vendorDir . '/symfony/var-dumper/Caster/ResourceCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\SplCaster' => $vendorDir . '/symfony/var-dumper/Caster/SplCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\StubCaster' => $vendorDir . '/symfony/var-dumper/Caster/StubCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\SymfonyCaster' => $vendorDir . '/symfony/var-dumper/Caster/SymfonyCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\TraceStub' => $vendorDir . '/symfony/var-dumper/Caster/TraceStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\UuidCaster' => $vendorDir . '/symfony/var-dumper/Caster/UuidCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\XmlReaderCaster' => $vendorDir . '/symfony/var-dumper/Caster/XmlReaderCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\XmlResourceCaster' => $vendorDir . '/symfony/var-dumper/Caster/XmlResourceCaster.php', + 'Symfony\\Component\\VarDumper\\Cloner\\AbstractCloner' => $vendorDir . '/symfony/var-dumper/Cloner/AbstractCloner.php', + 'Symfony\\Component\\VarDumper\\Cloner\\ClonerInterface' => $vendorDir . '/symfony/var-dumper/Cloner/ClonerInterface.php', + 'Symfony\\Component\\VarDumper\\Cloner\\Cursor' => $vendorDir . '/symfony/var-dumper/Cloner/Cursor.php', + 'Symfony\\Component\\VarDumper\\Cloner\\Data' => $vendorDir . '/symfony/var-dumper/Cloner/Data.php', + 'Symfony\\Component\\VarDumper\\Cloner\\DumperInterface' => $vendorDir . '/symfony/var-dumper/Cloner/DumperInterface.php', + 'Symfony\\Component\\VarDumper\\Cloner\\Stub' => $vendorDir . '/symfony/var-dumper/Cloner/Stub.php', + 'Symfony\\Component\\VarDumper\\Cloner\\VarCloner' => $vendorDir . '/symfony/var-dumper/Cloner/VarCloner.php', + 'Symfony\\Component\\VarDumper\\Command\\Descriptor\\CliDescriptor' => $vendorDir . '/symfony/var-dumper/Command/Descriptor/CliDescriptor.php', + 'Symfony\\Component\\VarDumper\\Command\\Descriptor\\DumpDescriptorInterface' => $vendorDir . '/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php', + 'Symfony\\Component\\VarDumper\\Command\\Descriptor\\HtmlDescriptor' => $vendorDir . '/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php', + 'Symfony\\Component\\VarDumper\\Command\\ServerDumpCommand' => $vendorDir . '/symfony/var-dumper/Command/ServerDumpCommand.php', + 'Symfony\\Component\\VarDumper\\Dumper\\AbstractDumper' => $vendorDir . '/symfony/var-dumper/Dumper/AbstractDumper.php', + 'Symfony\\Component\\VarDumper\\Dumper\\CliDumper' => $vendorDir . '/symfony/var-dumper/Dumper/CliDumper.php', + 'Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\CliContextProvider' => $vendorDir . '/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php', + 'Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\ContextProviderInterface' => $vendorDir . '/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php', + 'Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\RequestContextProvider' => $vendorDir . '/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php', + 'Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\SourceContextProvider' => $vendorDir . '/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php', + 'Symfony\\Component\\VarDumper\\Dumper\\ContextualizedDumper' => $vendorDir . '/symfony/var-dumper/Dumper/ContextualizedDumper.php', + 'Symfony\\Component\\VarDumper\\Dumper\\DataDumperInterface' => $vendorDir . '/symfony/var-dumper/Dumper/DataDumperInterface.php', + 'Symfony\\Component\\VarDumper\\Dumper\\HtmlDumper' => $vendorDir . '/symfony/var-dumper/Dumper/HtmlDumper.php', + 'Symfony\\Component\\VarDumper\\Dumper\\ServerDumper' => $vendorDir . '/symfony/var-dumper/Dumper/ServerDumper.php', + 'Symfony\\Component\\VarDumper\\Exception\\ThrowingCasterException' => $vendorDir . '/symfony/var-dumper/Exception/ThrowingCasterException.php', + 'Symfony\\Component\\VarDumper\\Server\\Connection' => $vendorDir . '/symfony/var-dumper/Server/Connection.php', + 'Symfony\\Component\\VarDumper\\Server\\DumpServer' => $vendorDir . '/symfony/var-dumper/Server/DumpServer.php', + 'Symfony\\Component\\VarDumper\\Test\\VarDumperTestTrait' => $vendorDir . '/symfony/var-dumper/Test/VarDumperTestTrait.php', + 'Symfony\\Component\\VarDumper\\VarDumper' => $vendorDir . '/symfony/var-dumper/VarDumper.php', 'Symfony\\Component\\VarExporter\\Exception\\ClassNotFoundException' => $vendorDir . '/symfony/var-exporter/Exception/ClassNotFoundException.php', 'Symfony\\Component\\VarExporter\\Exception\\ExceptionInterface' => $vendorDir . '/symfony/var-exporter/Exception/ExceptionInterface.php', 'Symfony\\Component\\VarExporter\\Exception\\NotInstantiableTypeException' => $vendorDir . '/symfony/var-exporter/Exception/NotInstantiableTypeException.php', @@ -2666,8 +3104,10 @@ return array( 'app\\AppService' => $baseDir . '/app/AppService.php', 'app\\ExceptionHandle' => $baseDir . '/app/ExceptionHandle.php', 'app\\Request' => $baseDir . '/app/Request.php', + 'app\\command\\BackfillProductSpu' => $baseDir . '/app/command/BackfillProductSpu.php', 'app\\command\\ClearCache' => $baseDir . '/app/command/ClearCache.php', 'app\\command\\ResetAdminPwd' => $baseDir . '/app/command/ResetAdminPwd.php', + 'app\\command\\TestJstSpu' => $baseDir . '/app/command/TestJstSpu.php', 'app\\command\\Timer' => $baseDir . '/app/command/Timer.php', 'app\\common\\controller\\Order' => $baseDir . '/app/common/controller/Order.php', 'app\\common\\controller\\Recharge' => $baseDir . '/app/common/controller/Recharge.php', @@ -3210,6 +3650,20 @@ return array( 'app\\dao\\work\\WorkMomentSendResultDao' => $baseDir . '/app/dao/work/WorkMomentSendResultDao.php', 'app\\dao\\work\\WorkWelcomeDao' => $baseDir . '/app/dao/work/WorkWelcomeDao.php', 'app\\dao\\work\\WorkWelcomeRelationDao' => $baseDir . '/app/dao/work/WorkWelcomeRelationDao.php', + 'app\\haichao\\HaichaoAop' => $baseDir . '/app/haichao/HaichaoAop.php', + 'app\\haichao\\HaichaoBridge' => $baseDir . '/app/haichao/HaichaoBridge.php', + 'app\\haichao\\HaichaoJstServices' => $baseDir . '/app/haichao/HaichaoJstServices.php', + 'app\\haichao\\callback\\JstCallbackEventManager' => $baseDir . '/app/haichao/callback/JstCallbackEventManager.php', + 'app\\haichao\\callback\\event\\JstEvent' => $baseDir . '/app/haichao/callback/event/JstEvent.php', + 'app\\haichao\\callback\\event\\JstOrderCancelEvent' => $baseDir . '/app/haichao/callback/event/JstOrderCancelEvent.php', + 'app\\haichao\\callback\\event\\JstOrderPostEvent' => $baseDir . '/app/haichao/callback/event/JstOrderPostEvent.php', + 'app\\haichao\\callback\\event\\JstOrderRefundEvent' => $baseDir . '/app/haichao/callback/event/JstOrderRefundEvent.php', + 'app\\haichao\\callback\\event\\JstProductEvent' => $baseDir . '/app/haichao/callback/event/JstProductEvent.php', + 'app\\haichao\\callback\\event\\JstTradeEvent' => $baseDir . '/app/haichao/callback/event/JstTradeEvent.php', + 'app\\haichao\\sync\\JstProductSync' => $baseDir . '/app/haichao/sync/JstProductSync.php', + 'app\\haichao\\sync\\JstStorkSync' => $baseDir . '/app/haichao/sync/JstStorkSync.php', + 'app\\haichao\\task\\JstSyncStorkTask' => $baseDir . '/app/haichao/task/JstSyncStorkTask.php', + 'app\\haichao\\task\\JstSyncTask' => $baseDir . '/app/haichao/task/JstSyncTask.php', 'app\\http\\middleware\\AllowOriginMiddleware' => $baseDir . '/app/http/middleware/AllowOriginMiddleware.php', 'app\\http\\middleware\\InstallMiddleware' => $baseDir . '/app/http/middleware/InstallMiddleware.php', 'app\\http\\middleware\\StationOpenMiddleware' => $baseDir . '/app/http/middleware/StationOpenMiddleware.php', @@ -3245,6 +3699,7 @@ return array( 'app\\jobs\\agent\\SystemJob' => $baseDir . '/app/jobs/agent/SystemJob.php', 'app\\jobs\\community\\CommunityCommentJob' => $baseDir . '/app/jobs/community/CommunityCommentJob.php', 'app\\jobs\\community\\CommunityJob' => $baseDir . '/app/jobs/community/CommunityJob.php', + 'app\\jobs\\haichao\\JstAfterSalePushJob' => $baseDir . '/app/jobs/haichao/JstAfterSalePushJob.php', 'app\\jobs\\notice\\EnterpriseWechatJob' => $baseDir . '/app/jobs/notice/EnterpriseWechatJob.php', 'app\\jobs\\notice\\PrintJob' => $baseDir . '/app/jobs/notice/PrintJob.php', 'app\\jobs\\notice\\SmsAdminJob' => $baseDir . '/app/jobs/notice/SmsAdminJob.php', @@ -3749,6 +4204,7 @@ return array( 'app\\services\\other\\HotDataServices' => $baseDir . '/app/services/other/HotDataServices.php', 'app\\services\\other\\Import\\ImportRecordErrorServices' => $baseDir . '/app/services/other/Import/ImportRecordErrorServices.php', 'app\\services\\other\\Import\\ImportRecordServices' => $baseDir . '/app/services/other/Import/ImportRecordServices.php', + 'app\\services\\other\\PrivacyPhoneServices' => $baseDir . '/app/services/other/PrivacyPhoneServices.php', 'app\\services\\other\\QrcodeServices' => $baseDir . '/app/services/other/QrcodeServices.php', 'app\\services\\other\\SystemCityServices' => $baseDir . '/app/services/other/SystemCityServices.php', 'app\\services\\other\\export\\ExportServices' => $baseDir . '/app/services/other/export/ExportServices.php', @@ -4610,6 +5066,10 @@ return array( 'think\\template\\driver\\File' => $vendorDir . '/topthink/think-template/src/template/driver/File.php', 'think\\template\\exception\\TemplateNotFoundException' => $vendorDir . '/topthink/think-template/src/template/exception/TemplateNotFoundException.php', 'think\\template\\taglib\\Cx' => $vendorDir . '/topthink/think-template/src/template/taglib/Cx.php', + 'think\\trace\\Console' => $vendorDir . '/topthink/think-trace/src/Console.php', + 'think\\trace\\Html' => $vendorDir . '/topthink/think-trace/src/Html.php', + 'think\\trace\\Service' => $vendorDir . '/topthink/think-trace/src/Service.php', + 'think\\trace\\TraceDebug' => $vendorDir . '/topthink/think-trace/src/TraceDebug.php', 'think\\validate\\ValidateRule' => $vendorDir . '/topthink/framework/src/think/validate/ValidateRule.php', 'think\\view\\driver\\Php' => $vendorDir . '/topthink/framework/src/think/view/driver/Php.php', 'think\\view\\driver\\Think' => $vendorDir . '/topthink/think-view/src/Think.php', diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index 24e6dfb..a23aac7 100755 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -8,12 +8,12 @@ $baseDir = dirname($vendorDir); return array( '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php', '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', - '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', + 'd767e4fc2dc52fe66584ab8c6684783e' => $vendorDir . '/adbario/php-dot-notation/src/helpers.php', + '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', '9b552a3cc426e3287cc811caefa3cf53' => $vendorDir . '/topthink/think-helper/src/helper.php', 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php', '35fab96057f1bf5e7aba31a8a6d5fdde' => $vendorDir . '/topthink/think-orm/stubs/load_stubs.php', - 'd767e4fc2dc52fe66584ab8c6684783e' => $vendorDir . '/adbario/php-dot-notation/src/helpers.php', 'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php', '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php', 'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php', @@ -27,6 +27,7 @@ return array( 'cd5441689b14144e5573bf989ee47b34' => $vendorDir . '/qcloud/cos-sdk-v5/src/Common.php', '841780ea2e1d6545ea3a253239d59c05' => $vendorDir . '/qiniu/php-sdk/src/Qiniu/functions.php', '5dd19d8a547b7318af0c3a93c8bd6565' => $vendorDir . '/qiniu/php-sdk/src/Qiniu/Http/Middleware/Middleware.php', + '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php', 'cc56288302d9df745d97c934d6a6e5f0' => $vendorDir . '/topthink/think-queue/src/common.php', 'af46dcea2921209ac30627b964175f13' => $vendorDir . '/topthink/think-swoole/src/helpers.php', '1e41b938b3d1409279743028b56efa80' => $baseDir . '/app/helpers.php', diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 98febb4..21babe3 100755 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -7,6 +7,7 @@ $baseDir = dirname($vendorDir); return array( 'think\\view\\driver\\' => array($vendorDir . '/topthink/think-view/src'), + 'think\\trace\\' => array($vendorDir . '/topthink/think-trace/src'), 'think\\swoole\\' => array($vendorDir . '/topthink/think-swoole/src'), 'think\\middleware\\' => array($vendorDir . '/topthink/think-throttle/src'), 'think\\annotation\\' => array($vendorDir . '/topthink/think-annotation/src'), @@ -26,6 +27,7 @@ return array( 'Symfony\\Contracts\\HttpClient\\' => array($vendorDir . '/symfony/http-client-contracts'), 'Symfony\\Contracts\\Cache\\' => array($vendorDir . '/symfony/cache-contracts'), 'Symfony\\Component\\VarExporter\\' => array($vendorDir . '/symfony/var-exporter'), + 'Symfony\\Component\\VarDumper\\' => array($vendorDir . '/symfony/var-dumper'), 'Symfony\\Component\\Translation\\' => array($vendorDir . '/symfony/translation'), 'Symfony\\Component\\Process\\' => array($vendorDir . '/symfony/process'), 'Symfony\\Component\\Mime\\' => array($vendorDir . '/symfony/mime'), @@ -73,6 +75,8 @@ return array( 'Doctrine\\Deprecations\\' => array($vendorDir . '/doctrine/deprecations/lib/Doctrine/Deprecations'), 'Doctrine\\Common\\Lexer\\' => array($vendorDir . '/doctrine/lexer/src'), 'Doctrine\\Common\\Annotations\\' => array($vendorDir . '/doctrine/annotations/lib/Doctrine/Common/Annotations'), + 'Darabonba\\OpenApi\\' => array($vendorDir . '/alibabacloud/openapi-core/src'), + 'Darabonba\\GatewaySpi\\' => array($vendorDir . '/alibabacloud/gateway-spi/src'), 'DASPRiD\\Enum\\' => array($vendorDir . '/dasprid/enum/src'), 'Complex\\' => array($vendorDir . '/markbaker/complex/classes/src'), 'Carbon\\' => array($vendorDir . '/nesbot/carbon/src/Carbon'), @@ -80,5 +84,8 @@ return array( 'Alipay\\EasySDK\\' => array($vendorDir . '/alipaysdk/easysdk/php/src'), 'AlibabaCloud\\Tea\\FileForm\\' => array($vendorDir . '/alibabacloud/tea-fileform/src'), 'AlibabaCloud\\Tea\\' => array($vendorDir . '/alibabacloud/tea/src'), + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\' => array($vendorDir . '/alibabacloud/dysmsapi-20170525/src'), + 'AlibabaCloud\\Dara\\' => array($vendorDir . '/alibabacloud/darabonba/src'), + 'AlibabaCloud\\Credentials\\' => array($vendorDir . '/alibabacloud/credentials/src'), 'Adbar\\' => array($vendorDir . '/adbario/php-dot-notation/src'), ); diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 685493b..7727417 100755 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -9,12 +9,12 @@ class ComposerStaticInit1fe54008b2c00dbbc97064a087d9f8b5 public static $files = array ( '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', - '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', + 'd767e4fc2dc52fe66584ab8c6684783e' => __DIR__ . '/..' . '/adbario/php-dot-notation/src/helpers.php', + '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', '9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php', 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', '35fab96057f1bf5e7aba31a8a6d5fdde' => __DIR__ . '/..' . '/topthink/think-orm/stubs/load_stubs.php', - 'd767e4fc2dc52fe66584ab8c6684783e' => __DIR__ . '/..' . '/adbario/php-dot-notation/src/helpers.php', 'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php', '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php', 'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php', @@ -28,6 +28,7 @@ class ComposerStaticInit1fe54008b2c00dbbc97064a087d9f8b5 'cd5441689b14144e5573bf989ee47b34' => __DIR__ . '/..' . '/qcloud/cos-sdk-v5/src/Common.php', '841780ea2e1d6545ea3a253239d59c05' => __DIR__ . '/..' . '/qiniu/php-sdk/src/Qiniu/functions.php', '5dd19d8a547b7318af0c3a93c8bd6565' => __DIR__ . '/..' . '/qiniu/php-sdk/src/Qiniu/Http/Middleware/Middleware.php', + '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php', 'cc56288302d9df745d97c934d6a6e5f0' => __DIR__ . '/..' . '/topthink/think-queue/src/common.php', 'af46dcea2921209ac30627b964175f13' => __DIR__ . '/..' . '/topthink/think-swoole/src/helpers.php', '1e41b938b3d1409279743028b56efa80' => __DIR__ . '/../..' . '/app/helpers.php', @@ -37,6 +38,7 @@ class ComposerStaticInit1fe54008b2c00dbbc97064a087d9f8b5 't' => array ( 'think\\view\\driver\\' => 18, + 'think\\trace\\' => 12, 'think\\swoole\\' => 13, 'think\\middleware\\' => 17, 'think\\annotation\\' => 17, @@ -71,6 +73,7 @@ class ComposerStaticInit1fe54008b2c00dbbc97064a087d9f8b5 'Symfony\\Contracts\\HttpClient\\' => 29, 'Symfony\\Contracts\\Cache\\' => 24, 'Symfony\\Component\\VarExporter\\' => 30, + 'Symfony\\Component\\VarDumper\\' => 28, 'Symfony\\Component\\Translation\\' => 30, 'Symfony\\Component\\Process\\' => 26, 'Symfony\\Component\\Mime\\' => 23, @@ -154,6 +157,8 @@ class ComposerStaticInit1fe54008b2c00dbbc97064a087d9f8b5 'Doctrine\\Deprecations\\' => 22, 'Doctrine\\Common\\Lexer\\' => 22, 'Doctrine\\Common\\Annotations\\' => 28, + 'Darabonba\\OpenApi\\' => 18, + 'Darabonba\\GatewaySpi\\' => 21, 'DASPRiD\\Enum\\' => 13, ), 'C' => @@ -170,6 +175,9 @@ class ComposerStaticInit1fe54008b2c00dbbc97064a087d9f8b5 'Alipay\\EasySDK\\' => 15, 'AlibabaCloud\\Tea\\FileForm\\' => 26, 'AlibabaCloud\\Tea\\' => 17, + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\' => 36, + 'AlibabaCloud\\Dara\\' => 18, + 'AlibabaCloud\\Credentials\\' => 25, 'Adbar\\' => 6, ), ); @@ -179,6 +187,10 @@ class ComposerStaticInit1fe54008b2c00dbbc97064a087d9f8b5 array ( 0 => __DIR__ . '/..' . '/topthink/think-view/src', ), + 'think\\trace\\' => + array ( + 0 => __DIR__ . '/..' . '/topthink/think-trace/src', + ), 'think\\swoole\\' => array ( 0 => __DIR__ . '/..' . '/topthink/think-swoole/src', @@ -261,6 +273,10 @@ class ComposerStaticInit1fe54008b2c00dbbc97064a087d9f8b5 array ( 0 => __DIR__ . '/..' . '/symfony/var-exporter', ), + 'Symfony\\Component\\VarDumper\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/var-dumper', + ), 'Symfony\\Component\\Translation\\' => array ( 0 => __DIR__ . '/..' . '/symfony/translation', @@ -450,6 +466,14 @@ class ComposerStaticInit1fe54008b2c00dbbc97064a087d9f8b5 array ( 0 => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations', ), + 'Darabonba\\OpenApi\\' => + array ( + 0 => __DIR__ . '/..' . '/alibabacloud/openapi-core/src', + ), + 'Darabonba\\GatewaySpi\\' => + array ( + 0 => __DIR__ . '/..' . '/alibabacloud/gateway-spi/src', + ), 'DASPRiD\\Enum\\' => array ( 0 => __DIR__ . '/..' . '/dasprid/enum/src', @@ -478,6 +502,18 @@ class ComposerStaticInit1fe54008b2c00dbbc97064a087d9f8b5 array ( 0 => __DIR__ . '/..' . '/alibabacloud/tea/src', ), + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\' => + array ( + 0 => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src', + ), + 'AlibabaCloud\\Dara\\' => + array ( + 0 => __DIR__ . '/..' . '/alibabacloud/darabonba/src', + ), + 'AlibabaCloud\\Credentials\\' => + array ( + 0 => __DIR__ . '/..' . '/alibabacloud/credentials/src', + ), 'Adbar\\' => array ( 0 => __DIR__ . '/..' . '/adbario/php-dot-notation/src', @@ -500,6 +536,363 @@ class ComposerStaticInit1fe54008b2c00dbbc97064a087d9f8b5 public static $classMap = array ( 'Adbar\\Dot' => __DIR__ . '/..' . '/adbario/php-dot-notation/src/Dot.php', + 'AlibabaCloud\\Credentials\\AccessKeyCredential' => __DIR__ . '/..' . '/alibabacloud/credentials/src/AccessKeyCredential.php', + 'AlibabaCloud\\Credentials\\BearerTokenCredential' => __DIR__ . '/..' . '/alibabacloud/credentials/src/BearerTokenCredential.php', + 'AlibabaCloud\\Credentials\\Credential' => __DIR__ . '/..' . '/alibabacloud/credentials/src/Credential.php', + 'AlibabaCloud\\Credentials\\Credential\\Config' => __DIR__ . '/..' . '/alibabacloud/credentials/src/Credential/Config.php', + 'AlibabaCloud\\Credentials\\Credential\\CredentialModel' => __DIR__ . '/..' . '/alibabacloud/credentials/src/Credential/CredentialModel.php', + 'AlibabaCloud\\Credentials\\Credential\\RefreshResult' => __DIR__ . '/..' . '/alibabacloud/credentials/src/Credential/RefreshResult.php', + 'AlibabaCloud\\Credentials\\Credentials' => __DIR__ . '/..' . '/alibabacloud/credentials/src/Credentials.php', + 'AlibabaCloud\\Credentials\\CredentialsInterface' => __DIR__ . '/..' . '/alibabacloud/credentials/src/CredentialsInterface.php', + 'AlibabaCloud\\Credentials\\CredentialsProviderWrap' => __DIR__ . '/..' . '/alibabacloud/credentials/src/CredentialsProviderWrap.php', + 'AlibabaCloud\\Credentials\\EcsRamRoleCredential' => __DIR__ . '/..' . '/alibabacloud/credentials/src/EcsRamRoleCredential.php', + 'AlibabaCloud\\Credentials\\Providers\\CLIProfileCredentialsProvider' => __DIR__ . '/..' . '/alibabacloud/credentials/src/Providers/CLIProfileCredentialsProvider.php', + 'AlibabaCloud\\Credentials\\Providers\\ChainProvider' => __DIR__ . '/..' . '/alibabacloud/credentials/src/Providers/ChainProvider.php', + 'AlibabaCloud\\Credentials\\Providers\\Credentials' => __DIR__ . '/..' . '/alibabacloud/credentials/src/Providers/Credentials.php', + 'AlibabaCloud\\Credentials\\Providers\\CredentialsProvider' => __DIR__ . '/..' . '/alibabacloud/credentials/src/Providers/CredentialsProvider.php', + 'AlibabaCloud\\Credentials\\Providers\\DefaultCredentialsProvider' => __DIR__ . '/..' . '/alibabacloud/credentials/src/Providers/DefaultCredentialsProvider.php', + 'AlibabaCloud\\Credentials\\Providers\\EcsRamRoleCredentialsProvider' => __DIR__ . '/..' . '/alibabacloud/credentials/src/Providers/EcsRamRoleCredentialsProvider.php', + 'AlibabaCloud\\Credentials\\Providers\\EnvironmentVariableCredentialsProvider' => __DIR__ . '/..' . '/alibabacloud/credentials/src/Providers/EnvironmentVariableCredentialsProvider.php', + 'AlibabaCloud\\Credentials\\Providers\\OIDCRoleArnCredentialsProvider' => __DIR__ . '/..' . '/alibabacloud/credentials/src/Providers/OIDCRoleArnCredentialsProvider.php', + 'AlibabaCloud\\Credentials\\Providers\\ProfileCredentialsProvider' => __DIR__ . '/..' . '/alibabacloud/credentials/src/Providers/ProfileCredentialsProvider.php', + 'AlibabaCloud\\Credentials\\Providers\\RamRoleArnCredentialsProvider' => __DIR__ . '/..' . '/alibabacloud/credentials/src/Providers/RamRoleArnCredentialsProvider.php', + 'AlibabaCloud\\Credentials\\Providers\\RsaKeyPairCredentialsProvider' => __DIR__ . '/..' . '/alibabacloud/credentials/src/Providers/RsaKeyPairCredentialsProvider.php', + 'AlibabaCloud\\Credentials\\Providers\\SessionCredentialsProvider' => __DIR__ . '/..' . '/alibabacloud/credentials/src/Providers/SessionCredentialsProvider.php', + 'AlibabaCloud\\Credentials\\Providers\\StaticAKCredentialsProvider' => __DIR__ . '/..' . '/alibabacloud/credentials/src/Providers/StaticAKCredentialsProvider.php', + 'AlibabaCloud\\Credentials\\Providers\\StaticSTSCredentialsProvider' => __DIR__ . '/..' . '/alibabacloud/credentials/src/Providers/StaticSTSCredentialsProvider.php', + 'AlibabaCloud\\Credentials\\Providers\\URLCredentialsProvider' => __DIR__ . '/..' . '/alibabacloud/credentials/src/Providers/URLCredentialsProvider.php', + 'AlibabaCloud\\Credentials\\RamRoleArnCredential' => __DIR__ . '/..' . '/alibabacloud/credentials/src/RamRoleArnCredential.php', + 'AlibabaCloud\\Credentials\\Request\\Request' => __DIR__ . '/..' . '/alibabacloud/credentials/src/Request/Request.php', + 'AlibabaCloud\\Credentials\\RsaKeyPairCredential' => __DIR__ . '/..' . '/alibabacloud/credentials/src/RsaKeyPairCredential.php', + 'AlibabaCloud\\Credentials\\Signature\\BearerTokenSignature' => __DIR__ . '/..' . '/alibabacloud/credentials/src/Signature/BearerTokenSignature.php', + 'AlibabaCloud\\Credentials\\Signature\\ShaHmac1Signature' => __DIR__ . '/..' . '/alibabacloud/credentials/src/Signature/ShaHmac1Signature.php', + 'AlibabaCloud\\Credentials\\Signature\\ShaHmac256Signature' => __DIR__ . '/..' . '/alibabacloud/credentials/src/Signature/ShaHmac256Signature.php', + 'AlibabaCloud\\Credentials\\Signature\\ShaHmac256WithRsaSignature' => __DIR__ . '/..' . '/alibabacloud/credentials/src/Signature/ShaHmac256WithRsaSignature.php', + 'AlibabaCloud\\Credentials\\Signature\\SignatureInterface' => __DIR__ . '/..' . '/alibabacloud/credentials/src/Signature/SignatureInterface.php', + 'AlibabaCloud\\Credentials\\StsCredential' => __DIR__ . '/..' . '/alibabacloud/credentials/src/StsCredential.php', + 'AlibabaCloud\\Credentials\\Utils\\Filter' => __DIR__ . '/..' . '/alibabacloud/credentials/src/Utils/Filter.php', + 'AlibabaCloud\\Credentials\\Utils\\Helper' => __DIR__ . '/..' . '/alibabacloud/credentials/src/Utils/Helper.php', + 'AlibabaCloud\\Credentials\\Utils\\MockTrait' => __DIR__ . '/..' . '/alibabacloud/credentials/src/Utils/MockTrait.php', + 'AlibabaCloud\\Dara\\Dara' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/Dara.php', + 'AlibabaCloud\\Dara\\Date' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/Date.php', + 'AlibabaCloud\\Dara\\Exception\\DaraException' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/Exception/DaraException.php', + 'AlibabaCloud\\Dara\\Exception\\DaraRespException' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/Exception/DaraRespException.php', + 'AlibabaCloud\\Dara\\Exception\\DaraRetryException' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/Exception/DaraRetryException.php', + 'AlibabaCloud\\Dara\\Exception\\DaraUnableRetryException' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/Exception/DaraUnableRetryException.php', + 'AlibabaCloud\\Dara\\File' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/File.php', + 'AlibabaCloud\\Dara\\Helper' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/Helper.php', + 'AlibabaCloud\\Dara\\Model' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/Model.php', + 'AlibabaCloud\\Dara\\Models\\ExtendsParameters' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/Models/ExtendsParameters.php', + 'AlibabaCloud\\Dara\\Models\\FileField' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/Models/FileField.php', + 'AlibabaCloud\\Dara\\Models\\RuntimeOptions' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/Models/RuntimeOptions.php', + 'AlibabaCloud\\Dara\\Models\\SSEEvent' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/Models/SSEEvent.php', + 'AlibabaCloud\\Dara\\Parameter' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/Parameter.php', + 'AlibabaCloud\\Dara\\Request' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/Request.php', + 'AlibabaCloud\\Dara\\Response' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/Response.php', + 'AlibabaCloud\\Dara\\RetryPolicy\\BackoffPolicy' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/RetryPolicy/BackoffPolicy.php', + 'AlibabaCloud\\Dara\\RetryPolicy\\EqualJitterBackoffPolicy' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/RetryPolicy/EqualJitterBackoffPolicy.php', + 'AlibabaCloud\\Dara\\RetryPolicy\\ExponentialBackoffPolicy' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/RetryPolicy/ExponentialBackoffPolicy.php', + 'AlibabaCloud\\Dara\\RetryPolicy\\FixedBackoffPolicy' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/RetryPolicy/FixedBackoffPolicy.php', + 'AlibabaCloud\\Dara\\RetryPolicy\\FullJitterBackoffPolicy' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/RetryPolicy/FullJitterBackoffPolicy.php', + 'AlibabaCloud\\Dara\\RetryPolicy\\RandomBackoffPolicy' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/RetryPolicy/RandomBackoffPolicy.php', + 'AlibabaCloud\\Dara\\RetryPolicy\\RetryCondition' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/RetryPolicy/RetryCondition.php', + 'AlibabaCloud\\Dara\\RetryPolicy\\RetryOptions' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/RetryPolicy/RetryOptions.php', + 'AlibabaCloud\\Dara\\RetryPolicy\\RetryPolicyContext' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/RetryPolicy/RetryPolicyContext.php', + 'AlibabaCloud\\Dara\\Url' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/Url.php', + 'AlibabaCloud\\Dara\\Util\\ArrayToXml' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/Util/ArrayToXml.php', + 'AlibabaCloud\\Dara\\Util\\BytesUtil' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/Util/BytesUtil.php', + 'AlibabaCloud\\Dara\\Util\\Console' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/Util/Console.php', + 'AlibabaCloud\\Dara\\Util\\FileFormStream' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/Util/FileFormStream.php', + 'AlibabaCloud\\Dara\\Util\\FileFormStreamTrait' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/Util/FileFormStreamTrait.php', + 'AlibabaCloud\\Dara\\Util\\FileFormStreamTyped' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/Util/FileFormStreamTyped.php', + 'AlibabaCloud\\Dara\\Util\\FormUtil' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/Util/FormUtil.php', + 'AlibabaCloud\\Dara\\Util\\MathUtil' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/Util/MathUtil.php', + 'AlibabaCloud\\Dara\\Util\\StreamUtil' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/Util/StreamUtil.php', + 'AlibabaCloud\\Dara\\Util\\StringUtil' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/Util/StringUtil.php', + 'AlibabaCloud\\Dara\\Util\\XML' => __DIR__ . '/..' . '/alibabacloud/darabonba/src/Util/XML.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Dysmsapi' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Dysmsapi.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\AddExtCodeSignRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/AddExtCodeSignRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\AddExtCodeSignResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/AddExtCodeSignResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\AddExtCodeSignResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/AddExtCodeSignResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\AddShortUrlRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/AddShortUrlRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\AddShortUrlResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/AddShortUrlResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\AddShortUrlResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/AddShortUrlResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\AddShortUrlResponseBody\\data' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/AddShortUrlResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\AddSmsSignRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/AddSmsSignRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\AddSmsSignRequest\\signFileList' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/AddSmsSignRequest/signFileList.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\AddSmsSignResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/AddSmsSignResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\AddSmsSignResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/AddSmsSignResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\AddSmsTemplateRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/AddSmsTemplateRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\AddSmsTemplateResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/AddSmsTemplateResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\AddSmsTemplateResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/AddSmsTemplateResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ChangeSignatureQualificationRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/ChangeSignatureQualificationRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ChangeSignatureQualificationResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/ChangeSignatureQualificationResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ChangeSignatureQualificationResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/ChangeSignatureQualificationResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ChangeSignatureQualificationResponseBody\\data' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/ChangeSignatureQualificationResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CheckMobilesCardSupportRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CheckMobilesCardSupportResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CheckMobilesCardSupportResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CheckMobilesCardSupportResponseBody\\data' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CheckMobilesCardSupportResponseBody\\data\\queryResult' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CheckMobilesCardSupportResponseBody/data/queryResult.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ConversionDataIntlRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/ConversionDataIntlRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ConversionDataIntlResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/ConversionDataIntlResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ConversionDataIntlResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/ConversionDataIntlResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateCardSmsTemplateRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateCardSmsTemplateResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateCardSmsTemplateResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateCardSmsTemplateResponseBody\\data' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateCardSmsTemplateShrinkRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateCardSmsTemplateShrinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateDigitalSignOrderRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSignOrderRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateDigitalSignOrderResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSignOrderResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateDigitalSignOrderResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSignOrderResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateDigitalSignOrderShrinkRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSignOrderShrinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateDigitalSmsTemplateRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSmsTemplateRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateDigitalSmsTemplateRequest\\templateContents' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSmsTemplateRequest/templateContents.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateDigitalSmsTemplateResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSmsTemplateResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateDigitalSmsTemplateResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateDigitalSmsTemplateResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmartShortUrlRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmartShortUrlRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmartShortUrlResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmartShortUrlResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmartShortUrlResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmartShortUrlResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmartShortUrlResponseBody\\model_' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmartShortUrlResponseBody/model_.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsAppIcpRecordRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAppIcpRecordRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsAppIcpRecordResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAppIcpRecordResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsAppIcpRecordResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAppIcpRecordResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsAuthorizationLetterRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAuthorizationLetterRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsAuthorizationLetterResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAuthorizationLetterResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsAuthorizationLetterResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAuthorizationLetterResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsAuthorizationLetterShrinkRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsAuthorizationLetterShrinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsSignRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsSignRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsSignResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsSignResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsSignResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsSignResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsSignShrinkRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsSignShrinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsTemplateRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTemplateRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsTemplateResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTemplateResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsTemplateResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTemplateResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsTemplateShrinkRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTemplateShrinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsTrademarkRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTrademarkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsTrademarkResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTrademarkResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\CreateSmsTrademarkResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/CreateSmsTrademarkResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteExtCodeSignRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteExtCodeSignRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteExtCodeSignResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteExtCodeSignResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteExtCodeSignResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteExtCodeSignResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteShortUrlRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteShortUrlRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteShortUrlResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteShortUrlResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteShortUrlResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteShortUrlResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteSmsQualificationRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsQualificationRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteSmsQualificationResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsQualificationResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteSmsQualificationResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsQualificationResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteSmsSignRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsSignRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteSmsSignResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsSignResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteSmsSignResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsSignResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteSmsTemplateRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsTemplateRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteSmsTemplateResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsTemplateResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\DeleteSmsTemplateResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/DeleteSmsTemplateResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetCardSmsDetailsRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetCardSmsDetailsResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetCardSmsDetailsResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetCardSmsDetailsResponseBody\\cardSendDetailDTO' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsResponseBody/cardSendDetailDTO.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetCardSmsDetailsResponseBody\\cardSendDetailDTO\\records' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsDetailsResponseBody/cardSendDetailDTO/records.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetCardSmsLinkRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsLinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetCardSmsLinkResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsLinkResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetCardSmsLinkResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsLinkResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetCardSmsLinkResponseBody\\data' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetCardSmsLinkResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetMediaResourceIdRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetMediaResourceIdRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetMediaResourceIdResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetMediaResourceIdResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetMediaResourceIdResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetMediaResourceIdResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetMediaResourceIdResponseBody\\data' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetMediaResourceIdResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetOSSInfoForCardTemplateResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForCardTemplateResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetOSSInfoForCardTemplateResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForCardTemplateResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetOSSInfoForCardTemplateResponseBody\\data' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForCardTemplateResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetOSSInfoForUploadFileRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForUploadFileRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetOSSInfoForUploadFileResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForUploadFileResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetOSSInfoForUploadFileResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForUploadFileResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetOSSInfoForUploadFileResponseBody\\model_' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetOSSInfoForUploadFileResponseBody/model_.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetQualificationOssInfoRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetQualificationOssInfoRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetQualificationOssInfoResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetQualificationOssInfoResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetQualificationOssInfoResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetQualificationOssInfoResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetQualificationOssInfoResponseBody\\data' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetQualificationOssInfoResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsOcrOssInfoRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsOcrOssInfoRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsOcrOssInfoResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsOcrOssInfoResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsOcrOssInfoResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsOcrOssInfoResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsOcrOssInfoResponseBody\\model_' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsOcrOssInfoResponseBody/model_.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsSignRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsSignResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsSignResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsSignResponseBody\\auditInfo' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponseBody/auditInfo.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsSignResponseBody\\signIspRegisterDetailList' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponseBody/signIspRegisterDetailList.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsSignResponseBody\\signIspRegisterDetailList\\registerStatusReasons' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsSignResponseBody/signIspRegisterDetailList/registerStatusReasons.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsTemplateListRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsTemplateListResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsTemplateListResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsTemplateListResponseBody\\data' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsTemplateListResponseBody\\data\\list_' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponseBody/data/list_.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsTemplateListResponseBody\\data\\list_\\templateTag' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListResponseBody/data/list_/templateTag.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsTemplateListShrinkRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateListShrinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsTemplateRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsTemplateResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsTemplateResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsTemplateResponseBody\\auditInfo' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody/auditInfo.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsTemplateResponseBody\\fileUrlList' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody/fileUrlList.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsTemplateResponseBody\\moreDataFileUrlList' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody/moreDataFileUrlList.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\GetSmsTemplateResponseBody\\signList' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/GetSmsTemplateResponseBody/signList.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ListTagResourcesRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ListTagResourcesRequest\\tag' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesRequest/tag.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ListTagResourcesResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ListTagResourcesResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ListTagResourcesResponseBody\\tagResources' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesResponseBody/tagResources.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ListTagResourcesResponseBody\\tagResources\\tagResource' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/ListTagResourcesResponseBody/tagResources/tagResource.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ModifySmsSignRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsSignRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ModifySmsSignRequest\\signFileList' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsSignRequest/signFileList.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ModifySmsSignResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsSignResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ModifySmsSignResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsSignResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ModifySmsTemplateRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsTemplateRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ModifySmsTemplateResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsTemplateResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ModifySmsTemplateResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/ModifySmsTemplateResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryCardSmsTemplateReportRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateReportRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryCardSmsTemplateReportResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateReportResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryCardSmsTemplateReportResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateReportResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryCardSmsTemplateReportResponseBody\\data' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateReportResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryCardSmsTemplateRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryCardSmsTemplateResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryCardSmsTemplateResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryCardSmsTemplateResponseBody\\data' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryCardSmsTemplateResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryDigitalSignByNameRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryDigitalSignByNameRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryDigitalSignByNameResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryDigitalSignByNameResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryDigitalSignByNameResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryDigitalSignByNameResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryExtCodeSignRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryExtCodeSignResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryExtCodeSignResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryExtCodeSignResponseBody\\data' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryExtCodeSignResponseBody\\data\\list_' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryExtCodeSignResponseBody/data/list_.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryMobilesCardSupportRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryMobilesCardSupportResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryMobilesCardSupportResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryMobilesCardSupportResponseBody\\data' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryMobilesCardSupportResponseBody\\data\\queryResult' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportResponseBody/data/queryResult.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryMobilesCardSupportShrinkRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryMobilesCardSupportShrinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryPageSmartShortUrlLogRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryPageSmartShortUrlLogResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryPageSmartShortUrlLogResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryPageSmartShortUrlLogResponseBody\\model\\list_' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogResponseBody/model/list_.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryPageSmartShortUrlLogResponseBody\\model_' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryPageSmartShortUrlLogResponseBody/model_.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySendDetailsRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySendDetailsResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySendDetailsResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySendDetailsResponseBody\\smsSendDetailDTOs' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsResponseBody/smsSendDetailDTOs.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySendDetailsResponseBody\\smsSendDetailDTOs\\smsSendDetailDTO' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySendDetailsResponseBody/smsSendDetailDTOs/smsSendDetailDTO.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySendStatisticsRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySendStatisticsResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySendStatisticsResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySendStatisticsResponseBody\\data' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySendStatisticsResponseBody\\data\\targetList' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySendStatisticsResponseBody/data/targetList.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryShortUrlRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryShortUrlRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryShortUrlResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryShortUrlResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryShortUrlResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryShortUrlResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QueryShortUrlResponseBody\\data' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QueryShortUrlResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySingleSmsQualificationRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySingleSmsQualificationResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySingleSmsQualificationResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySingleSmsQualificationResponseBody\\data' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySingleSmsQualificationResponseBody\\data\\businessLicensePics' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponseBody/data/businessLicensePics.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySingleSmsQualificationResponseBody\\data\\otherFiles' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySingleSmsQualificationResponseBody/data/otherFiles.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsAppIcpRecordRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsAppIcpRecordResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsAppIcpRecordResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsAppIcpRecordResponseBody\\data' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsAppIcpRecordShrinkRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAppIcpRecordShrinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsAuthorizationLetterRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsAuthorizationLetterResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsAuthorizationLetterResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsAuthorizationLetterResponseBody\\data' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsAuthorizationLetterShrinkRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsAuthorizationLetterShrinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsQualificationRecordRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsQualificationRecordResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsQualificationRecordResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsQualificationRecordResponseBody\\data' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsQualificationRecordResponseBody\\data\\list_' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsQualificationRecordResponseBody/data/list_.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsSignListRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsSignListResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsSignListResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsSignListResponseBody\\smsSignList' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListResponseBody/smsSignList.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsSignListResponseBody\\smsSignList\\reason' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignListResponseBody/smsSignList/reason.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsSignRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsSignResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsSignResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsSignResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsTemplateListRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsTemplateListResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsTemplateListResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsTemplateListResponseBody\\smsTemplateList' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListResponseBody/smsTemplateList.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsTemplateListResponseBody\\smsTemplateList\\reason' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateListResponseBody/smsTemplateList/reason.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsTemplateRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsTemplateResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsTemplateResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTemplateResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsTrademarkRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsTrademarkResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsTrademarkResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsTrademarkResponseBody\\data' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\QuerySmsTrademarkShrinkRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/QuerySmsTrademarkShrinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\RequiredPhoneCodeRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/RequiredPhoneCodeRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\RequiredPhoneCodeResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/RequiredPhoneCodeResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\RequiredPhoneCodeResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/RequiredPhoneCodeResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendBatchCardSmsRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/SendBatchCardSmsRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendBatchCardSmsResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/SendBatchCardSmsResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendBatchCardSmsResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/SendBatchCardSmsResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendBatchCardSmsResponseBody\\data' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/SendBatchCardSmsResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendBatchSmsRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/SendBatchSmsRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendBatchSmsResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/SendBatchSmsResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendBatchSmsResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/SendBatchSmsResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendCardSmsRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendCardSmsRequest\\cardObjects' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsRequest/cardObjects.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendCardSmsResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendCardSmsResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendCardSmsResponseBody\\data' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/SendCardSmsResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendLogisticsSmsRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/SendLogisticsSmsRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendLogisticsSmsResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/SendLogisticsSmsResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendLogisticsSmsResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/SendLogisticsSmsResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendLogisticsSmsResponseBody\\data' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/SendLogisticsSmsResponseBody/data.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendSmsRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/SendSmsRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendSmsResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/SendSmsResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SendSmsResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/SendSmsResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SmsConversionIntlRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/SmsConversionIntlRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SmsConversionIntlResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/SmsConversionIntlResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SmsConversionIntlResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/SmsConversionIntlResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SubmitSmsQualificationRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SubmitSmsQualificationRequest\\businessLicensePics' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationRequest/businessLicensePics.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SubmitSmsQualificationRequest\\otherFiles' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationRequest/otherFiles.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SubmitSmsQualificationResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SubmitSmsQualificationResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\SubmitSmsQualificationShrinkRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/SubmitSmsQualificationShrinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\TagResourcesRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/TagResourcesRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\TagResourcesRequest\\tag' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/TagResourcesRequest/tag.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\TagResourcesResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/TagResourcesResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\TagResourcesResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/TagResourcesResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UntagResourcesRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/UntagResourcesRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UntagResourcesResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/UntagResourcesResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UntagResourcesResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/UntagResourcesResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateExtCodeSignRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateExtCodeSignRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateExtCodeSignResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateExtCodeSignResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateExtCodeSignResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateExtCodeSignResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateSmsQualificationRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateSmsQualificationRequest\\businessLicensePics' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationRequest/businessLicensePics.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateSmsQualificationRequest\\otherFiles' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationRequest/otherFiles.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateSmsQualificationResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateSmsQualificationResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateSmsQualificationShrinkRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsQualificationShrinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateSmsSignRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsSignRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateSmsSignResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsSignResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateSmsSignResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsSignResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateSmsSignShrinkRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsSignShrinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateSmsTemplateRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsTemplateRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateSmsTemplateResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsTemplateResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateSmsTemplateResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsTemplateResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\UpdateSmsTemplateShrinkRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/UpdateSmsTemplateShrinkRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ValidPhoneCodeRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/ValidPhoneCodeRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ValidPhoneCodeResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/ValidPhoneCodeResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\ValidPhoneCodeResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/ValidPhoneCodeResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\VerifyLogisticsSmsMailNoRequest' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/VerifyLogisticsSmsMailNoRequest.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\VerifyLogisticsSmsMailNoResponse' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/VerifyLogisticsSmsMailNoResponse.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\VerifyLogisticsSmsMailNoResponseBody' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/VerifyLogisticsSmsMailNoResponseBody.php', + 'AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\Models\\VerifyLogisticsSmsMailNoResponseBody\\data' => __DIR__ . '/..' . '/alibabacloud/dysmsapi-20170525/src/Models/VerifyLogisticsSmsMailNoResponseBody/data.php', 'AlibabaCloud\\Tea\\Exception\\TeaError' => __DIR__ . '/..' . '/alibabacloud/tea/src/Exception/TeaError.php', 'AlibabaCloud\\Tea\\Exception\\TeaRetryError' => __DIR__ . '/..' . '/alibabacloud/tea/src/Exception/TeaRetryError.php', 'AlibabaCloud\\Tea\\Exception\\TeaUnableRetryError' => __DIR__ . '/..' . '/alibabacloud/tea/src/Exception/TeaUnableRetryError.php', @@ -754,6 +1147,24 @@ class ComposerStaticInit1fe54008b2c00dbbc97064a087d9f8b5 'DASPRiD\\Enum\\Exception\\SerializeNotSupportedException' => __DIR__ . '/..' . '/dasprid/enum/src/Exception/SerializeNotSupportedException.php', 'DASPRiD\\Enum\\Exception\\UnserializeNotSupportedException' => __DIR__ . '/..' . '/dasprid/enum/src/Exception/UnserializeNotSupportedException.php', 'DASPRiD\\Enum\\NullValue' => __DIR__ . '/..' . '/dasprid/enum/src/NullValue.php', + 'Darabonba\\GatewaySpi\\Client' => __DIR__ . '/..' . '/alibabacloud/gateway-spi/src/Client.php', + 'Darabonba\\GatewaySpi\\Models\\AttributeMap' => __DIR__ . '/..' . '/alibabacloud/gateway-spi/src/Models/AttributeMap.php', + 'Darabonba\\GatewaySpi\\Models\\InterceptorContext' => __DIR__ . '/..' . '/alibabacloud/gateway-spi/src/Models/InterceptorContext.php', + 'Darabonba\\GatewaySpi\\Models\\InterceptorContext\\configuration' => __DIR__ . '/..' . '/alibabacloud/gateway-spi/src/Models/InterceptorContext/configuration.php', + 'Darabonba\\GatewaySpi\\Models\\InterceptorContext\\request' => __DIR__ . '/..' . '/alibabacloud/gateway-spi/src/Models/InterceptorContext/request.php', + 'Darabonba\\GatewaySpi\\Models\\InterceptorContext\\response' => __DIR__ . '/..' . '/alibabacloud/gateway-spi/src/Models/InterceptorContext/response.php', + 'Darabonba\\OpenApi\\Exceptions\\AlibabaCloudException' => __DIR__ . '/..' . '/alibabacloud/openapi-core/src/Exceptions/AlibabaCloudException.php', + 'Darabonba\\OpenApi\\Exceptions\\ClientException' => __DIR__ . '/..' . '/alibabacloud/openapi-core/src/Exceptions/ClientException.php', + 'Darabonba\\OpenApi\\Exceptions\\ServerException' => __DIR__ . '/..' . '/alibabacloud/openapi-core/src/Exceptions/ServerException.php', + 'Darabonba\\OpenApi\\Exceptions\\ThrottlingException' => __DIR__ . '/..' . '/alibabacloud/openapi-core/src/Exceptions/ThrottlingException.php', + 'Darabonba\\OpenApi\\Models\\Config' => __DIR__ . '/..' . '/alibabacloud/openapi-core/src/Models/Config.php', + 'Darabonba\\OpenApi\\Models\\GlobalParameters' => __DIR__ . '/..' . '/alibabacloud/openapi-core/src/Models/GlobalParameters.php', + 'Darabonba\\OpenApi\\Models\\OpenApiRequest' => __DIR__ . '/..' . '/alibabacloud/openapi-core/src/Models/OpenApiRequest.php', + 'Darabonba\\OpenApi\\Models\\Params' => __DIR__ . '/..' . '/alibabacloud/openapi-core/src/Models/Params.php', + 'Darabonba\\OpenApi\\Models\\SSEResponse' => __DIR__ . '/..' . '/alibabacloud/openapi-core/src/Models/SSEResponse.php', + 'Darabonba\\OpenApi\\OpenApiClient' => __DIR__ . '/..' . '/alibabacloud/openapi-core/src/OpenApiClient.php', + 'Darabonba\\OpenApi\\Sm3' => __DIR__ . '/..' . '/alibabacloud/openapi-core/src/Sm3.php', + 'Darabonba\\OpenApi\\Utils' => __DIR__ . '/..' . '/alibabacloud/openapi-core/src/Utils.php', 'Doctrine\\Common\\Annotations\\Annotation' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/Annotation.php', 'Doctrine\\Common\\Annotations\\AnnotationException' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php', 'Doctrine\\Common\\Annotations\\AnnotationReader' => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php', @@ -3084,6 +3495,69 @@ class ComposerStaticInit1fe54008b2c00dbbc97064a087d9f8b5 'Symfony\\Component\\Translation\\Util\\XliffUtils' => __DIR__ . '/..' . '/symfony/translation/Util/XliffUtils.php', 'Symfony\\Component\\Translation\\Writer\\TranslationWriter' => __DIR__ . '/..' . '/symfony/translation/Writer/TranslationWriter.php', 'Symfony\\Component\\Translation\\Writer\\TranslationWriterInterface' => __DIR__ . '/..' . '/symfony/translation/Writer/TranslationWriterInterface.php', + 'Symfony\\Component\\VarDumper\\Caster\\AmqpCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/AmqpCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\ArgsStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ArgsStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\Caster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/Caster.php', + 'Symfony\\Component\\VarDumper\\Caster\\ClassStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ClassStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\ConstStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ConstStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\CutArrayStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/CutArrayStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\CutStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/CutStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\DOMCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/DOMCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\DateCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/DateCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\DoctrineCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/DoctrineCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\DsCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/DsCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\DsPairStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/DsPairStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\EnumStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/EnumStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\ExceptionCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ExceptionCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\FiberCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/FiberCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\FrameStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/FrameStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\GmpCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/GmpCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\ImagineCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ImagineCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\ImgStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ImgStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\IntlCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/IntlCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\LinkStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/LinkStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\MemcachedCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/MemcachedCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\MysqliCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/MysqliCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\PdoCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/PdoCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\PgSqlCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/PgSqlCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\ProxyManagerCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ProxyManagerCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\RdKafkaCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/RdKafkaCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\RedisCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/RedisCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\ReflectionCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ReflectionCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\ResourceCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/ResourceCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\SplCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/SplCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\StubCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/StubCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\SymfonyCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/SymfonyCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\TraceStub' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/TraceStub.php', + 'Symfony\\Component\\VarDumper\\Caster\\UuidCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/UuidCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\XmlReaderCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/XmlReaderCaster.php', + 'Symfony\\Component\\VarDumper\\Caster\\XmlResourceCaster' => __DIR__ . '/..' . '/symfony/var-dumper/Caster/XmlResourceCaster.php', + 'Symfony\\Component\\VarDumper\\Cloner\\AbstractCloner' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/AbstractCloner.php', + 'Symfony\\Component\\VarDumper\\Cloner\\ClonerInterface' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/ClonerInterface.php', + 'Symfony\\Component\\VarDumper\\Cloner\\Cursor' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/Cursor.php', + 'Symfony\\Component\\VarDumper\\Cloner\\Data' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/Data.php', + 'Symfony\\Component\\VarDumper\\Cloner\\DumperInterface' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/DumperInterface.php', + 'Symfony\\Component\\VarDumper\\Cloner\\Stub' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/Stub.php', + 'Symfony\\Component\\VarDumper\\Cloner\\VarCloner' => __DIR__ . '/..' . '/symfony/var-dumper/Cloner/VarCloner.php', + 'Symfony\\Component\\VarDumper\\Command\\Descriptor\\CliDescriptor' => __DIR__ . '/..' . '/symfony/var-dumper/Command/Descriptor/CliDescriptor.php', + 'Symfony\\Component\\VarDumper\\Command\\Descriptor\\DumpDescriptorInterface' => __DIR__ . '/..' . '/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php', + 'Symfony\\Component\\VarDumper\\Command\\Descriptor\\HtmlDescriptor' => __DIR__ . '/..' . '/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php', + 'Symfony\\Component\\VarDumper\\Command\\ServerDumpCommand' => __DIR__ . '/..' . '/symfony/var-dumper/Command/ServerDumpCommand.php', + 'Symfony\\Component\\VarDumper\\Dumper\\AbstractDumper' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/AbstractDumper.php', + 'Symfony\\Component\\VarDumper\\Dumper\\CliDumper' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/CliDumper.php', + 'Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\CliContextProvider' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php', + 'Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\ContextProviderInterface' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php', + 'Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\RequestContextProvider' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php', + 'Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\SourceContextProvider' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php', + 'Symfony\\Component\\VarDumper\\Dumper\\ContextualizedDumper' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/ContextualizedDumper.php', + 'Symfony\\Component\\VarDumper\\Dumper\\DataDumperInterface' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/DataDumperInterface.php', + 'Symfony\\Component\\VarDumper\\Dumper\\HtmlDumper' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/HtmlDumper.php', + 'Symfony\\Component\\VarDumper\\Dumper\\ServerDumper' => __DIR__ . '/..' . '/symfony/var-dumper/Dumper/ServerDumper.php', + 'Symfony\\Component\\VarDumper\\Exception\\ThrowingCasterException' => __DIR__ . '/..' . '/symfony/var-dumper/Exception/ThrowingCasterException.php', + 'Symfony\\Component\\VarDumper\\Server\\Connection' => __DIR__ . '/..' . '/symfony/var-dumper/Server/Connection.php', + 'Symfony\\Component\\VarDumper\\Server\\DumpServer' => __DIR__ . '/..' . '/symfony/var-dumper/Server/DumpServer.php', + 'Symfony\\Component\\VarDumper\\Test\\VarDumperTestTrait' => __DIR__ . '/..' . '/symfony/var-dumper/Test/VarDumperTestTrait.php', + 'Symfony\\Component\\VarDumper\\VarDumper' => __DIR__ . '/..' . '/symfony/var-dumper/VarDumper.php', 'Symfony\\Component\\VarExporter\\Exception\\ClassNotFoundException' => __DIR__ . '/..' . '/symfony/var-exporter/Exception/ClassNotFoundException.php', 'Symfony\\Component\\VarExporter\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/symfony/var-exporter/Exception/ExceptionInterface.php', 'Symfony\\Component\\VarExporter\\Exception\\NotInstantiableTypeException' => __DIR__ . '/..' . '/symfony/var-exporter/Exception/NotInstantiableTypeException.php', @@ -3159,8 +3633,10 @@ class ComposerStaticInit1fe54008b2c00dbbc97064a087d9f8b5 'app\\AppService' => __DIR__ . '/../..' . '/app/AppService.php', 'app\\ExceptionHandle' => __DIR__ . '/../..' . '/app/ExceptionHandle.php', 'app\\Request' => __DIR__ . '/../..' . '/app/Request.php', + 'app\\command\\BackfillProductSpu' => __DIR__ . '/../..' . '/app/command/BackfillProductSpu.php', 'app\\command\\ClearCache' => __DIR__ . '/../..' . '/app/command/ClearCache.php', 'app\\command\\ResetAdminPwd' => __DIR__ . '/../..' . '/app/command/ResetAdminPwd.php', + 'app\\command\\TestJstSpu' => __DIR__ . '/../..' . '/app/command/TestJstSpu.php', 'app\\command\\Timer' => __DIR__ . '/../..' . '/app/command/Timer.php', 'app\\common\\controller\\Order' => __DIR__ . '/../..' . '/app/common/controller/Order.php', 'app\\common\\controller\\Recharge' => __DIR__ . '/../..' . '/app/common/controller/Recharge.php', @@ -3703,6 +4179,20 @@ class ComposerStaticInit1fe54008b2c00dbbc97064a087d9f8b5 'app\\dao\\work\\WorkMomentSendResultDao' => __DIR__ . '/../..' . '/app/dao/work/WorkMomentSendResultDao.php', 'app\\dao\\work\\WorkWelcomeDao' => __DIR__ . '/../..' . '/app/dao/work/WorkWelcomeDao.php', 'app\\dao\\work\\WorkWelcomeRelationDao' => __DIR__ . '/../..' . '/app/dao/work/WorkWelcomeRelationDao.php', + 'app\\haichao\\HaichaoAop' => __DIR__ . '/../..' . '/app/haichao/HaichaoAop.php', + 'app\\haichao\\HaichaoBridge' => __DIR__ . '/../..' . '/app/haichao/HaichaoBridge.php', + 'app\\haichao\\HaichaoJstServices' => __DIR__ . '/../..' . '/app/haichao/HaichaoJstServices.php', + 'app\\haichao\\callback\\JstCallbackEventManager' => __DIR__ . '/../..' . '/app/haichao/callback/JstCallbackEventManager.php', + 'app\\haichao\\callback\\event\\JstEvent' => __DIR__ . '/../..' . '/app/haichao/callback/event/JstEvent.php', + 'app\\haichao\\callback\\event\\JstOrderCancelEvent' => __DIR__ . '/../..' . '/app/haichao/callback/event/JstOrderCancelEvent.php', + 'app\\haichao\\callback\\event\\JstOrderPostEvent' => __DIR__ . '/../..' . '/app/haichao/callback/event/JstOrderPostEvent.php', + 'app\\haichao\\callback\\event\\JstOrderRefundEvent' => __DIR__ . '/../..' . '/app/haichao/callback/event/JstOrderRefundEvent.php', + 'app\\haichao\\callback\\event\\JstProductEvent' => __DIR__ . '/../..' . '/app/haichao/callback/event/JstProductEvent.php', + 'app\\haichao\\callback\\event\\JstTradeEvent' => __DIR__ . '/../..' . '/app/haichao/callback/event/JstTradeEvent.php', + 'app\\haichao\\sync\\JstProductSync' => __DIR__ . '/../..' . '/app/haichao/sync/JstProductSync.php', + 'app\\haichao\\sync\\JstStorkSync' => __DIR__ . '/../..' . '/app/haichao/sync/JstStorkSync.php', + 'app\\haichao\\task\\JstSyncStorkTask' => __DIR__ . '/../..' . '/app/haichao/task/JstSyncStorkTask.php', + 'app\\haichao\\task\\JstSyncTask' => __DIR__ . '/../..' . '/app/haichao/task/JstSyncTask.php', 'app\\http\\middleware\\AllowOriginMiddleware' => __DIR__ . '/../..' . '/app/http/middleware/AllowOriginMiddleware.php', 'app\\http\\middleware\\InstallMiddleware' => __DIR__ . '/../..' . '/app/http/middleware/InstallMiddleware.php', 'app\\http\\middleware\\StationOpenMiddleware' => __DIR__ . '/../..' . '/app/http/middleware/StationOpenMiddleware.php', @@ -3738,6 +4228,7 @@ class ComposerStaticInit1fe54008b2c00dbbc97064a087d9f8b5 'app\\jobs\\agent\\SystemJob' => __DIR__ . '/../..' . '/app/jobs/agent/SystemJob.php', 'app\\jobs\\community\\CommunityCommentJob' => __DIR__ . '/../..' . '/app/jobs/community/CommunityCommentJob.php', 'app\\jobs\\community\\CommunityJob' => __DIR__ . '/../..' . '/app/jobs/community/CommunityJob.php', + 'app\\jobs\\haichao\\JstAfterSalePushJob' => __DIR__ . '/../..' . '/app/jobs/haichao/JstAfterSalePushJob.php', 'app\\jobs\\notice\\EnterpriseWechatJob' => __DIR__ . '/../..' . '/app/jobs/notice/EnterpriseWechatJob.php', 'app\\jobs\\notice\\PrintJob' => __DIR__ . '/../..' . '/app/jobs/notice/PrintJob.php', 'app\\jobs\\notice\\SmsAdminJob' => __DIR__ . '/../..' . '/app/jobs/notice/SmsAdminJob.php', @@ -4242,6 +4733,7 @@ class ComposerStaticInit1fe54008b2c00dbbc97064a087d9f8b5 'app\\services\\other\\HotDataServices' => __DIR__ . '/../..' . '/app/services/other/HotDataServices.php', 'app\\services\\other\\Import\\ImportRecordErrorServices' => __DIR__ . '/../..' . '/app/services/other/Import/ImportRecordErrorServices.php', 'app\\services\\other\\Import\\ImportRecordServices' => __DIR__ . '/../..' . '/app/services/other/Import/ImportRecordServices.php', + 'app\\services\\other\\PrivacyPhoneServices' => __DIR__ . '/../..' . '/app/services/other/PrivacyPhoneServices.php', 'app\\services\\other\\QrcodeServices' => __DIR__ . '/../..' . '/app/services/other/QrcodeServices.php', 'app\\services\\other\\SystemCityServices' => __DIR__ . '/../..' . '/app/services/other/SystemCityServices.php', 'app\\services\\other\\export\\ExportServices' => __DIR__ . '/../..' . '/app/services/other/export/ExportServices.php', @@ -5103,6 +5595,10 @@ class ComposerStaticInit1fe54008b2c00dbbc97064a087d9f8b5 'think\\template\\driver\\File' => __DIR__ . '/..' . '/topthink/think-template/src/template/driver/File.php', 'think\\template\\exception\\TemplateNotFoundException' => __DIR__ . '/..' . '/topthink/think-template/src/template/exception/TemplateNotFoundException.php', 'think\\template\\taglib\\Cx' => __DIR__ . '/..' . '/topthink/think-template/src/template/taglib/Cx.php', + 'think\\trace\\Console' => __DIR__ . '/..' . '/topthink/think-trace/src/Console.php', + 'think\\trace\\Html' => __DIR__ . '/..' . '/topthink/think-trace/src/Html.php', + 'think\\trace\\Service' => __DIR__ . '/..' . '/topthink/think-trace/src/Service.php', + 'think\\trace\\TraceDebug' => __DIR__ . '/..' . '/topthink/think-trace/src/TraceDebug.php', 'think\\validate\\ValidateRule' => __DIR__ . '/..' . '/topthink/framework/src/think/validate/ValidateRule.php', 'think\\view\\driver\\Php' => __DIR__ . '/..' . '/topthink/framework/src/think/view/driver/Php.php', 'think\\view\\driver\\Think' => __DIR__ . '/..' . '/topthink/think-view/src/Think.php', diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 0efe7cb..f88f78b 100755 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -56,6 +56,296 @@ }, "install-path": "../adbario/php-dot-notation" }, + { + "name": "alibabacloud/credentials", + "version": "1.2.3", + "version_normalized": "1.2.3.0", + "source": { + "type": "git", + "url": "https://github.com/aliyun/credentials-php.git", + "reference": "f6d1986e7b7be8da781d0b99f24c92d9860ba0c1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/aliyun/credentials-php/zipball/f6d1986e7b7be8da781d0b99f24c92d9860ba0c1", + "reference": "f6d1986e7b7be8da781d0b99f24c92d9860ba0c1", + "shasum": "" + }, + "require": { + "adbario/php-dot-notation": "^2.2", + "alibabacloud/tea": "^3.0", + "ext-curl": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-openssl": "*", + "ext-simplexml": "*", + "ext-xmlwriter": "*", + "guzzlehttp/guzzle": "^6.3|^7.0", + "php": ">=5.6" + }, + "require-dev": { + "composer/composer": "^1.8", + "drupal/coder": "^8.3", + "ext-dom": "*", + "ext-pcre": "*", + "ext-sockets": "*", + "ext-spl": "*", + "mikey179/vfsstream": "^1.6", + "monolog/monolog": "^1.24", + "phpunit/phpunit": "^5.7|^6.6|^9.3", + "psr/cache": "^1.0", + "symfony/dotenv": "^3.4", + "symfony/var-dumper": "^3.4" + }, + "suggest": { + "ext-sockets": "To use client-side monitoring" + }, + "time": "2025-04-18T09:09:46+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "AlibabaCloud\\Credentials\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Alibaba Cloud SDK", + "email": "sdk-team@alibabacloud.com", + "homepage": "http://www.alibabacloud.com" + } + ], + "description": "Alibaba Cloud Credentials for PHP", + "homepage": "https://www.alibabacloud.com/", + "keywords": [ + "alibaba", + "alibabacloud", + "aliyun", + "client", + "cloud", + "credentials", + "library", + "sdk", + "tool" + ], + "support": { + "issues": "https://github.com/aliyun/credentials-php/issues", + "source": "https://github.com/aliyun/credentials-php" + }, + "install-path": "../alibabacloud/credentials" + }, + { + "name": "alibabacloud/darabonba", + "version": "v1.0.4", + "version_normalized": "1.0.4.0", + "source": { + "type": "git", + "url": "https://github.com/alibabacloud-sdk-php/darabonba.git", + "reference": "b1ccea693258ea68e455e330922406f3afe10e9c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/alibabacloud-sdk-php/darabonba/zipball/b1ccea693258ea68e455e330922406f3afe10e9c", + "reference": "b1ccea693258ea68e455e330922406f3afe10e9c", + "shasum": "" + }, + "require": { + "adbario/php-dot-notation": "^2.4", + "alibabacloud/tea": "^3.2", + "ext-curl": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-openssl": "*", + "ext-simplexml": "*", + "ext-xmlwriter": "*", + "guzzlehttp/guzzle": "^6.3|^7.0", + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35|^5.4.3|^9.3", + "symfony/dotenv": "^3.4", + "symfony/var-dumper": "^3.4" + }, + "suggest": { + "ext-sockets": "To use client-side monitoring" + }, + "time": "2025-12-15T10:15:24+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "AlibabaCloud\\Dara\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Alibaba Cloud SDK", + "email": "sdk-team@alibabacloud.com", + "homepage": "http://www.alibabacloud.com" + } + ], + "description": "Client of Darabonba for PHP", + "homepage": "https://www.alibabacloud.com/", + "keywords": [ + "alibabacloud", + "client", + "cloud", + "tea" + ], + "support": { + "issues": "https://github.com/aliyun/tea-php/issues", + "source": "https://github.com/aliyun/tea-php" + }, + "install-path": "../alibabacloud/darabonba" + }, + { + "name": "alibabacloud/dysmsapi-20170525", + "version": "4.5.1", + "version_normalized": "4.5.1.0", + "source": { + "type": "git", + "url": "https://github.com/alibabacloud-sdk-php/Dysmsapi-20170525.git", + "reference": "1361ecae87674e883cc6e1251033693e3ba0e38d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/alibabacloud-sdk-php/Dysmsapi-20170525/zipball/1361ecae87674e883cc6e1251033693e3ba0e38d", + "reference": "1361ecae87674e883cc6e1251033693e3ba0e38d", + "shasum": "" + }, + "require": { + "alibabacloud/darabonba": "^1.0.0", + "alibabacloud/openapi-core": "^1.0.0", + "php": ">5.5" + }, + "time": "2026-04-07T18:19:34+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "AlibabaCloud\\SDK\\Dysmsapi\\V20170525\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Alibaba Cloud SDK", + "email": "sdk-team@alibabacloud.com" + } + ], + "description": "Alibaba Cloud Dysmsapi (20170525) SDK Library for PHP", + "support": { + "source": "https://github.com/alibabacloud-sdk-php/Dysmsapi-20170525/tree/4.5.1" + }, + "install-path": "../alibabacloud/dysmsapi-20170525" + }, + { + "name": "alibabacloud/gateway-spi", + "version": "1.0.0", + "version_normalized": "1.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/alibabacloud-sdk-php/alibabacloud-gateway-spi.git", + "reference": "7440f77750c329d8ab252db1d1d967314ccd1fcb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/alibabacloud-sdk-php/alibabacloud-gateway-spi/zipball/7440f77750c329d8ab252db1d1d967314ccd1fcb", + "reference": "7440f77750c329d8ab252db1d1d967314ccd1fcb", + "shasum": "" + }, + "require": { + "alibabacloud/credentials": "^1.1", + "php": ">5.5" + }, + "time": "2022-07-14T05:31:35+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Darabonba\\GatewaySpi\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Alibaba Cloud SDK", + "email": "sdk-team@alibabacloud.com" + } + ], + "description": "Alibaba Cloud Gateway SPI Client", + "support": { + "source": "https://github.com/alibabacloud-sdk-php/alibabacloud-gateway-spi/tree/1.0.0" + }, + "install-path": "../alibabacloud/gateway-spi" + }, + { + "name": "alibabacloud/openapi-core", + "version": "1.0.9", + "version_normalized": "1.0.9.0", + "source": { + "type": "git", + "url": "https://github.com/alibabacloud-sdk-php/openapi-core.git", + "reference": "7b241b2a0e71f70629e2ecdc5cbe8c8b6b3a7567" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/alibabacloud-sdk-php/openapi-core/zipball/7b241b2a0e71f70629e2ecdc5cbe8c8b6b3a7567", + "reference": "7b241b2a0e71f70629e2ecdc5cbe8c8b6b3a7567", + "shasum": "" + }, + "require": { + "alibabacloud/credentials": "^1.2.2", + "alibabacloud/darabonba": "^1", + "alibabacloud/gateway-spi": "^1", + "php": ">5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35|^5.4.3|^9.3", + "symfony/dotenv": "^3.4", + "symfony/var-dumper": "^3.4" + }, + "time": "2026-01-15T06:47:29+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Darabonba\\OpenApi\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Alibaba Cloud SDK", + "email": "sdk-team@alibabacloud.com" + } + ], + "description": "Alibaba Cloud OpenApi Client Core", + "support": { + "issues": "https://github.com/alibabacloud-sdk-php/openapi-core/issues", + "source": "https://github.com/alibabacloud-sdk-php/openapi-core/tree/1.0.9" + }, + "install-path": "../alibabacloud/openapi-core" + }, { "name": "alibabacloud/tea", "version": "3.2.1", @@ -5189,6 +5479,103 @@ ], "install-path": "../symfony/translation-contracts" }, + { + "name": "symfony/var-dumper", + "version": "v6.0.19", + "version_normalized": "6.0.19.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "eb980457fa6899840fe1687e8627a03a7d8a3d52" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/eb980457fa6899840fe1687e8627a03a7d8a3d52", + "reference": "eb980457fa6899840fe1687e8627a03a7d8a3d52", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=8.0.2", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "phpunit/phpunit": "<5.4.3", + "symfony/console": "<5.4" + }, + "require-dev": { + "ext-iconv": "*", + "symfony/console": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/uid": "^5.4|^6.0", + "twig/twig": "^2.13|^3.0.4" + }, + "suggest": { + "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", + "ext-intl": "To show region name in time zone dump", + "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" + }, + "time": "2023-01-20T17:44:14+00:00", + "bin": [ + "Resources/bin/var-dump-server" + ], + "type": "library", + "installation-source": "dist", + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides mechanisms for walking through any arbitrary PHP variable", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "support": { + "source": "https://github.com/symfony/var-dumper/tree/v6.0.19" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "install-path": "../symfony/var-dumper" + }, { "name": "symfony/var-exporter", "version": "v6.0.19", @@ -5911,6 +6298,66 @@ }, "install-path": "../topthink/think-throttle" }, + { + "name": "topthink/think-trace", + "version": "v1.6", + "version_normalized": "1.6.0.0", + "source": { + "type": "git", + "url": "https://github.com/top-think/think-trace.git", + "reference": "136cd5d97e8bdb780e4b5c1637c588ed7ca3e142" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/top-think/think-trace/zipball/136cd5d97e8bdb780e4b5c1637c588ed7ca3e142", + "reference": "136cd5d97e8bdb780e4b5c1637c588ed7ca3e142", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=7.1.0", + "topthink/framework": "^6.0|^8.0" + }, + "time": "2023-02-07T08:36:32+00:00", + "type": "library", + "extra": { + "think": { + "services": [ + "think\\trace\\Service" + ], + "config": { + "trace": "src/config.php" + } + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "think\\trace\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "liu21st", + "email": "liu21st@gmail.com" + } + ], + "description": "thinkphp debug trace", + "support": { + "issues": "https://github.com/top-think/think-trace/issues", + "source": "https://github.com/top-think/think-trace/tree/v1.6" + }, + "install-path": "../topthink/think-trace" + }, { "name": "topthink/think-view", "version": "v2.0.0", @@ -6114,6 +6561,9 @@ "install-path": "../xaboy/form-builder" } ], - "dev": false, - "dev-package-names": [] + "dev": true, + "dev-package-names": [ + "symfony/var-dumper", + "topthink/think-trace" + ] } diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 4e6c938..776474d 100755 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -1,13 +1,13 @@ array( 'name' => 'topthink/think', - 'pretty_version' => '1.0.0+no-version-set', - 'version' => '1.0.0.0', - 'reference' => null, + 'pretty_version' => 'dev-main', + 'version' => 'dev-main', + 'reference' => '0334fef6c10da100a749c166426ec9e36df75cca', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'dev' => false, + 'dev' => true, ), 'versions' => array( 'adbario/php-dot-notation' => array( @@ -19,6 +19,51 @@ 'aliases' => array(), 'dev_requirement' => false, ), + 'alibabacloud/credentials' => array( + 'pretty_version' => '1.2.3', + 'version' => '1.2.3.0', + 'reference' => 'f6d1986e7b7be8da781d0b99f24c92d9860ba0c1', + 'type' => 'library', + 'install_path' => __DIR__ . '/../alibabacloud/credentials', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'alibabacloud/darabonba' => array( + 'pretty_version' => 'v1.0.4', + 'version' => '1.0.4.0', + 'reference' => 'b1ccea693258ea68e455e330922406f3afe10e9c', + 'type' => 'library', + 'install_path' => __DIR__ . '/../alibabacloud/darabonba', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'alibabacloud/dysmsapi-20170525' => array( + 'pretty_version' => '4.5.1', + 'version' => '4.5.1.0', + 'reference' => '1361ecae87674e883cc6e1251033693e3ba0e38d', + 'type' => 'library', + 'install_path' => __DIR__ . '/../alibabacloud/dysmsapi-20170525', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'alibabacloud/gateway-spi' => array( + 'pretty_version' => '1.0.0', + 'version' => '1.0.0.0', + 'reference' => '7440f77750c329d8ab252db1d1d967314ccd1fcb', + 'type' => 'library', + 'install_path' => __DIR__ . '/../alibabacloud/gateway-spi', + 'aliases' => array(), + 'dev_requirement' => false, + ), + 'alibabacloud/openapi-core' => array( + 'pretty_version' => '1.0.9', + 'version' => '1.0.9.0', + 'reference' => '7b241b2a0e71f70629e2ecdc5cbe8c8b6b3a7567', + 'type' => 'library', + 'install_path' => __DIR__ . '/../alibabacloud/openapi-core', + 'aliases' => array(), + 'dev_requirement' => false, + ), 'alibabacloud/tea' => array( 'pretty_version' => '3.2.1', 'version' => '3.2.1.0', @@ -727,6 +772,15 @@ 0 => '2.3|3.0', ), ), + 'symfony/var-dumper' => array( + 'pretty_version' => 'v6.0.19', + 'version' => '6.0.19.0', + 'reference' => 'eb980457fa6899840fe1687e8627a03a7d8a3d52', + 'type' => 'library', + 'install_path' => __DIR__ . '/../symfony/var-dumper', + 'aliases' => array(), + 'dev_requirement' => true, + ), 'symfony/var-exporter' => array( 'pretty_version' => 'v6.0.19', 'version' => '6.0.19.0', @@ -755,9 +809,9 @@ 'dev_requirement' => false, ), 'topthink/think' => array( - 'pretty_version' => '1.0.0+no-version-set', - 'version' => '1.0.0.0', - 'reference' => null, + 'pretty_version' => 'dev-main', + 'version' => 'dev-main', + 'reference' => '0334fef6c10da100a749c166426ec9e36df75cca', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -844,6 +898,15 @@ 'aliases' => array(), 'dev_requirement' => false, ), + 'topthink/think-trace' => array( + 'pretty_version' => 'v1.6', + 'version' => '1.6.0.0', + 'reference' => '136cd5d97e8bdb780e4b5c1637c588ed7ca3e142', + 'type' => 'library', + 'install_path' => __DIR__ . '/../topthink/think-trace', + 'aliases' => array(), + 'dev_requirement' => true, + ), 'topthink/think-view' => array( 'pretty_version' => 'v2.0.0', 'version' => '2.0.0.0', diff --git a/vendor/services.php b/vendor/services.php index a6bf768..11082a4 100755 --- a/vendor/services.php +++ b/vendor/services.php @@ -1,8 +1,9 @@ 'think\\annotation\\Service', 1 => 'think\\queue\\Service', 2 => 'think\\swoole\\Service', + 3 => 'think\\trace\\Service', ); \ No newline at end of file diff --git a/vendor/symfony/var-dumper/CHANGELOG.md b/vendor/symfony/var-dumper/CHANGELOG.md new file mode 100644 index 0000000..f58ed31 --- /dev/null +++ b/vendor/symfony/var-dumper/CHANGELOG.md @@ -0,0 +1,72 @@ +CHANGELOG +========= + +5.4 +--- + + * Add ability to style integer and double values independently + * Add casters for Symfony's UUIDs and ULIDs + * Add support for `Fiber` + +5.2.0 +----- + + * added support for PHPUnit `--colors` option + * added `VAR_DUMPER_FORMAT=server` env var value support + * prevent replacing the handler when the `VAR_DUMPER_FORMAT` env var is set + +5.1.0 +----- + + * added `RdKafka` support + +4.4.0 +----- + + * added `VarDumperTestTrait::setUpVarDumper()` and `VarDumperTestTrait::tearDownVarDumper()` + to configure casters & flags to use in tests + * added `ImagineCaster` and infrastructure to dump images + * added the stamps of a message after it is dispatched in `TraceableMessageBus` and `MessengerDataCollector` collected data + * added `UuidCaster` + * made all casters final + * added support for the `NO_COLOR` env var (https://no-color.org/) + +4.3.0 +----- + + * added `DsCaster` to support dumping the contents of data structures from the Ds extension + +4.2.0 +----- + + * support selecting the format to use by setting the environment variable `VAR_DUMPER_FORMAT` to `html` or `cli` + +4.1.0 +----- + + * added a `ServerDumper` to send serialized Data clones to a server + * added a `ServerDumpCommand` and `DumpServer` to run a server collecting + and displaying dumps on a single place with multiple formats support + * added `CliDescriptor` and `HtmlDescriptor` descriptors for `server:dump` CLI and HTML formats support + +4.0.0 +----- + + * support for passing `\ReflectionClass` instances to the `Caster::castObject()` + method has been dropped, pass class names as strings instead + * the `Data::getRawData()` method has been removed + * the `VarDumperTestTrait::assertDumpEquals()` method expects a 3rd `$filter = 0` + argument and moves `$message = ''` argument at 4th position. + * the `VarDumperTestTrait::assertDumpMatchesFormat()` method expects a 3rd `$filter = 0` + argument and moves `$message = ''` argument at 4th position. + +3.4.0 +----- + + * added `AbstractCloner::setMinDepth()` function to ensure minimum tree depth + * deprecated `MongoCaster` + +2.7.0 +----- + + * deprecated `Cloner\Data::getLimitedClone()`. Use `withMaxDepth`, `withMaxItemsPerDepth` or `withRefHandles` instead. diff --git a/vendor/symfony/var-dumper/Caster/AmqpCaster.php b/vendor/symfony/var-dumper/Caster/AmqpCaster.php new file mode 100644 index 0000000..dc3b621 --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/AmqpCaster.php @@ -0,0 +1,212 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts Amqp related classes to array representation. + * + * @author Grégoire Pineau + * + * @final + */ +class AmqpCaster +{ + private const FLAGS = [ + \AMQP_DURABLE => 'AMQP_DURABLE', + \AMQP_PASSIVE => 'AMQP_PASSIVE', + \AMQP_EXCLUSIVE => 'AMQP_EXCLUSIVE', + \AMQP_AUTODELETE => 'AMQP_AUTODELETE', + \AMQP_INTERNAL => 'AMQP_INTERNAL', + \AMQP_NOLOCAL => 'AMQP_NOLOCAL', + \AMQP_AUTOACK => 'AMQP_AUTOACK', + \AMQP_IFEMPTY => 'AMQP_IFEMPTY', + \AMQP_IFUNUSED => 'AMQP_IFUNUSED', + \AMQP_MANDATORY => 'AMQP_MANDATORY', + \AMQP_IMMEDIATE => 'AMQP_IMMEDIATE', + \AMQP_MULTIPLE => 'AMQP_MULTIPLE', + \AMQP_NOWAIT => 'AMQP_NOWAIT', + \AMQP_REQUEUE => 'AMQP_REQUEUE', + ]; + + private const EXCHANGE_TYPES = [ + \AMQP_EX_TYPE_DIRECT => 'AMQP_EX_TYPE_DIRECT', + \AMQP_EX_TYPE_FANOUT => 'AMQP_EX_TYPE_FANOUT', + \AMQP_EX_TYPE_TOPIC => 'AMQP_EX_TYPE_TOPIC', + \AMQP_EX_TYPE_HEADERS => 'AMQP_EX_TYPE_HEADERS', + ]; + + public static function castConnection(\AMQPConnection $c, array $a, Stub $stub, bool $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + $a += [ + $prefix.'is_connected' => $c->isConnected(), + ]; + + // Recent version of the extension already expose private properties + if (isset($a["\x00AMQPConnection\x00login"])) { + return $a; + } + + // BC layer in the amqp lib + if (method_exists($c, 'getReadTimeout')) { + $timeout = $c->getReadTimeout(); + } else { + $timeout = $c->getTimeout(); + } + + $a += [ + $prefix.'is_connected' => $c->isConnected(), + $prefix.'login' => $c->getLogin(), + $prefix.'password' => $c->getPassword(), + $prefix.'host' => $c->getHost(), + $prefix.'vhost' => $c->getVhost(), + $prefix.'port' => $c->getPort(), + $prefix.'read_timeout' => $timeout, + ]; + + return $a; + } + + public static function castChannel(\AMQPChannel $c, array $a, Stub $stub, bool $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + $a += [ + $prefix.'is_connected' => $c->isConnected(), + $prefix.'channel_id' => $c->getChannelId(), + ]; + + // Recent version of the extension already expose private properties + if (isset($a["\x00AMQPChannel\x00connection"])) { + return $a; + } + + $a += [ + $prefix.'connection' => $c->getConnection(), + $prefix.'prefetch_size' => $c->getPrefetchSize(), + $prefix.'prefetch_count' => $c->getPrefetchCount(), + ]; + + return $a; + } + + public static function castQueue(\AMQPQueue $c, array $a, Stub $stub, bool $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + $a += [ + $prefix.'flags' => self::extractFlags($c->getFlags()), + ]; + + // Recent version of the extension already expose private properties + if (isset($a["\x00AMQPQueue\x00name"])) { + return $a; + } + + $a += [ + $prefix.'connection' => $c->getConnection(), + $prefix.'channel' => $c->getChannel(), + $prefix.'name' => $c->getName(), + $prefix.'arguments' => $c->getArguments(), + ]; + + return $a; + } + + public static function castExchange(\AMQPExchange $c, array $a, Stub $stub, bool $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + $a += [ + $prefix.'flags' => self::extractFlags($c->getFlags()), + ]; + + $type = isset(self::EXCHANGE_TYPES[$c->getType()]) ? new ConstStub(self::EXCHANGE_TYPES[$c->getType()], $c->getType()) : $c->getType(); + + // Recent version of the extension already expose private properties + if (isset($a["\x00AMQPExchange\x00name"])) { + $a["\x00AMQPExchange\x00type"] = $type; + + return $a; + } + + $a += [ + $prefix.'connection' => $c->getConnection(), + $prefix.'channel' => $c->getChannel(), + $prefix.'name' => $c->getName(), + $prefix.'type' => $type, + $prefix.'arguments' => $c->getArguments(), + ]; + + return $a; + } + + public static function castEnvelope(\AMQPEnvelope $c, array $a, Stub $stub, bool $isNested, int $filter = 0) + { + $prefix = Caster::PREFIX_VIRTUAL; + + $deliveryMode = new ConstStub($c->getDeliveryMode().(2 === $c->getDeliveryMode() ? ' (persistent)' : ' (non-persistent)'), $c->getDeliveryMode()); + + // Recent version of the extension already expose private properties + if (isset($a["\x00AMQPEnvelope\x00body"])) { + $a["\0AMQPEnvelope\0delivery_mode"] = $deliveryMode; + + return $a; + } + + if (!($filter & Caster::EXCLUDE_VERBOSE)) { + $a += [$prefix.'body' => $c->getBody()]; + } + + $a += [ + $prefix.'delivery_tag' => $c->getDeliveryTag(), + $prefix.'is_redelivery' => $c->isRedelivery(), + $prefix.'exchange_name' => $c->getExchangeName(), + $prefix.'routing_key' => $c->getRoutingKey(), + $prefix.'content_type' => $c->getContentType(), + $prefix.'content_encoding' => $c->getContentEncoding(), + $prefix.'headers' => $c->getHeaders(), + $prefix.'delivery_mode' => $deliveryMode, + $prefix.'priority' => $c->getPriority(), + $prefix.'correlation_id' => $c->getCorrelationId(), + $prefix.'reply_to' => $c->getReplyTo(), + $prefix.'expiration' => $c->getExpiration(), + $prefix.'message_id' => $c->getMessageId(), + $prefix.'timestamp' => $c->getTimeStamp(), + $prefix.'type' => $c->getType(), + $prefix.'user_id' => $c->getUserId(), + $prefix.'app_id' => $c->getAppId(), + ]; + + return $a; + } + + private static function extractFlags(int $flags): ConstStub + { + $flagsArray = []; + + foreach (self::FLAGS as $value => $name) { + if ($flags & $value) { + $flagsArray[] = $name; + } + } + + if (!$flagsArray) { + $flagsArray = ['AMQP_NOPARAM']; + } + + return new ConstStub(implode('|', $flagsArray), $flags); + } +} diff --git a/vendor/symfony/var-dumper/Caster/ArgsStub.php b/vendor/symfony/var-dumper/Caster/ArgsStub.php new file mode 100644 index 0000000..3109874 --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/ArgsStub.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Represents a list of function arguments. + * + * @author Nicolas Grekas + */ +class ArgsStub extends EnumStub +{ + private static array $parameters = []; + + public function __construct(array $args, string $function, ?string $class) + { + [$variadic, $params] = self::getParameters($function, $class); + + $values = []; + foreach ($args as $k => $v) { + $values[$k] = !\is_scalar($v) && !$v instanceof Stub ? new CutStub($v) : $v; + } + if (null === $params) { + parent::__construct($values, false); + + return; + } + if (\count($values) < \count($params)) { + $params = \array_slice($params, 0, \count($values)); + } elseif (\count($values) > \count($params)) { + $values[] = new EnumStub(array_splice($values, \count($params)), false); + $params[] = $variadic; + } + if (['...'] === $params) { + $this->dumpKeys = false; + $this->value = $values[0]->value; + } else { + $this->value = array_combine($params, $values); + } + } + + private static function getParameters(string $function, ?string $class): array + { + if (isset(self::$parameters[$k = $class.'::'.$function])) { + return self::$parameters[$k]; + } + + try { + $r = null !== $class ? new \ReflectionMethod($class, $function) : new \ReflectionFunction($function); + } catch (\ReflectionException $e) { + return [null, null]; + } + + $variadic = '...'; + $params = []; + foreach ($r->getParameters() as $v) { + $k = '$'.$v->name; + if ($v->isPassedByReference()) { + $k = '&'.$k; + } + if ($v->isVariadic()) { + $variadic .= $k; + } else { + $params[] = $k; + } + } + + return self::$parameters[$k] = [$variadic, $params]; + } +} diff --git a/vendor/symfony/var-dumper/Caster/Caster.php b/vendor/symfony/var-dumper/Caster/Caster.php new file mode 100644 index 0000000..890f531 --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/Caster.php @@ -0,0 +1,170 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Helper for filtering out properties in casters. + * + * @author Nicolas Grekas + * + * @final + */ +class Caster +{ + public const EXCLUDE_VERBOSE = 1; + public const EXCLUDE_VIRTUAL = 2; + public const EXCLUDE_DYNAMIC = 4; + public const EXCLUDE_PUBLIC = 8; + public const EXCLUDE_PROTECTED = 16; + public const EXCLUDE_PRIVATE = 32; + public const EXCLUDE_NULL = 64; + public const EXCLUDE_EMPTY = 128; + public const EXCLUDE_NOT_IMPORTANT = 256; + public const EXCLUDE_STRICT = 512; + + public const PREFIX_VIRTUAL = "\0~\0"; + public const PREFIX_DYNAMIC = "\0+\0"; + public const PREFIX_PROTECTED = "\0*\0"; + + /** + * Casts objects to arrays and adds the dynamic property prefix. + * + * @param bool $hasDebugInfo Whether the __debugInfo method exists on $obj or not + */ + public static function castObject(object $obj, string $class, bool $hasDebugInfo = false, string $debugClass = null): array + { + if ($hasDebugInfo) { + try { + $debugInfo = $obj->__debugInfo(); + } catch (\Throwable $e) { + // ignore failing __debugInfo() + $hasDebugInfo = false; + } + } + + $a = $obj instanceof \Closure ? [] : (array) $obj; + + if ($obj instanceof \__PHP_Incomplete_Class) { + return $a; + } + + if ($a) { + static $publicProperties = []; + $debugClass = $debugClass ?? get_debug_type($obj); + + $i = 0; + $prefixedKeys = []; + foreach ($a as $k => $v) { + if ("\0" !== ($k[0] ?? '')) { + if (!isset($publicProperties[$class])) { + foreach ((new \ReflectionClass($class))->getProperties(\ReflectionProperty::IS_PUBLIC) as $prop) { + $publicProperties[$class][$prop->name] = true; + } + } + if (!isset($publicProperties[$class][$k])) { + $prefixedKeys[$i] = self::PREFIX_DYNAMIC.$k; + } + } elseif ($debugClass !== $class && 1 === strpos($k, $class)) { + $prefixedKeys[$i] = "\0".$debugClass.strrchr($k, "\0"); + } + ++$i; + } + if ($prefixedKeys) { + $keys = array_keys($a); + foreach ($prefixedKeys as $i => $k) { + $keys[$i] = $k; + } + $a = array_combine($keys, $a); + } + } + + if ($hasDebugInfo && \is_array($debugInfo)) { + foreach ($debugInfo as $k => $v) { + if (!isset($k[0]) || "\0" !== $k[0]) { + if (\array_key_exists(self::PREFIX_DYNAMIC.$k, $a)) { + continue; + } + $k = self::PREFIX_VIRTUAL.$k; + } + + unset($a[$k]); + $a[$k] = $v; + } + } + + return $a; + } + + /** + * Filters out the specified properties. + * + * By default, a single match in the $filter bit field filters properties out, following an "or" logic. + * When EXCLUDE_STRICT is set, an "and" logic is applied: all bits must match for a property to be removed. + * + * @param array $a The array containing the properties to filter + * @param int $filter A bit field of Caster::EXCLUDE_* constants specifying which properties to filter out + * @param string[] $listedProperties List of properties to exclude when Caster::EXCLUDE_VERBOSE is set, and to preserve when Caster::EXCLUDE_NOT_IMPORTANT is set + * @param int &$count Set to the number of removed properties + */ + public static function filter(array $a, int $filter, array $listedProperties = [], ?int &$count = 0): array + { + $count = 0; + + foreach ($a as $k => $v) { + $type = self::EXCLUDE_STRICT & $filter; + + if (null === $v) { + $type |= self::EXCLUDE_NULL & $filter; + $type |= self::EXCLUDE_EMPTY & $filter; + } elseif (false === $v || '' === $v || '0' === $v || 0 === $v || 0.0 === $v || [] === $v) { + $type |= self::EXCLUDE_EMPTY & $filter; + } + if ((self::EXCLUDE_NOT_IMPORTANT & $filter) && !\in_array($k, $listedProperties, true)) { + $type |= self::EXCLUDE_NOT_IMPORTANT; + } + if ((self::EXCLUDE_VERBOSE & $filter) && \in_array($k, $listedProperties, true)) { + $type |= self::EXCLUDE_VERBOSE; + } + + if (!isset($k[1]) || "\0" !== $k[0]) { + $type |= self::EXCLUDE_PUBLIC & $filter; + } elseif ('~' === $k[1]) { + $type |= self::EXCLUDE_VIRTUAL & $filter; + } elseif ('+' === $k[1]) { + $type |= self::EXCLUDE_DYNAMIC & $filter; + } elseif ('*' === $k[1]) { + $type |= self::EXCLUDE_PROTECTED & $filter; + } else { + $type |= self::EXCLUDE_PRIVATE & $filter; + } + + if ((self::EXCLUDE_STRICT & $filter) ? $type === $filter : $type) { + unset($a[$k]); + ++$count; + } + } + + return $a; + } + + public static function castPhpIncompleteClass(\__PHP_Incomplete_Class $c, array $a, Stub $stub, bool $isNested): array + { + if (isset($a['__PHP_Incomplete_Class_Name'])) { + $stub->class .= '('.$a['__PHP_Incomplete_Class_Name'].')'; + unset($a['__PHP_Incomplete_Class_Name']); + } + + return $a; + } +} diff --git a/vendor/symfony/var-dumper/Caster/ClassStub.php b/vendor/symfony/var-dumper/Caster/ClassStub.php new file mode 100644 index 0000000..1ac6d0a --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/ClassStub.php @@ -0,0 +1,106 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Represents a PHP class identifier. + * + * @author Nicolas Grekas + */ +class ClassStub extends ConstStub +{ + /** + * @param string $identifier A PHP identifier, e.g. a class, method, interface, etc. name + * @param callable $callable The callable targeted by the identifier when it is ambiguous or not a real PHP identifier + */ + public function __construct(string $identifier, callable|array|string $callable = null) + { + $this->value = $identifier; + + try { + if (null !== $callable) { + if ($callable instanceof \Closure) { + $r = new \ReflectionFunction($callable); + } elseif (\is_object($callable)) { + $r = [$callable, '__invoke']; + } elseif (\is_array($callable)) { + $r = $callable; + } elseif (false !== $i = strpos($callable, '::')) { + $r = [substr($callable, 0, $i), substr($callable, 2 + $i)]; + } else { + $r = new \ReflectionFunction($callable); + } + } elseif (0 < $i = strpos($identifier, '::') ?: strpos($identifier, '->')) { + $r = [substr($identifier, 0, $i), substr($identifier, 2 + $i)]; + } else { + $r = new \ReflectionClass($identifier); + } + + if (\is_array($r)) { + try { + $r = new \ReflectionMethod($r[0], $r[1]); + } catch (\ReflectionException $e) { + $r = new \ReflectionClass($r[0]); + } + } + + if (str_contains($identifier, "@anonymous\0")) { + $this->value = $identifier = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', function ($m) { + return class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0]; + }, $identifier); + } + + if (null !== $callable && $r instanceof \ReflectionFunctionAbstract) { + $s = ReflectionCaster::castFunctionAbstract($r, [], new Stub(), true, Caster::EXCLUDE_VERBOSE); + $s = ReflectionCaster::getSignature($s); + + if (str_ends_with($identifier, '()')) { + $this->value = substr_replace($identifier, $s, -2); + } else { + $this->value .= $s; + } + } + } catch (\ReflectionException $e) { + return; + } finally { + if (0 < $i = strrpos($this->value, '\\')) { + $this->attr['ellipsis'] = \strlen($this->value) - $i; + $this->attr['ellipsis-type'] = 'class'; + $this->attr['ellipsis-tail'] = 1; + } + } + + if ($f = $r->getFileName()) { + $this->attr['file'] = $f; + $this->attr['line'] = $r->getStartLine(); + } + } + + public static function wrapCallable(mixed $callable) + { + if (\is_object($callable) || !\is_callable($callable)) { + return $callable; + } + + if (!\is_array($callable)) { + $callable = new static($callable, $callable); + } elseif (\is_string($callable[0])) { + $callable[0] = new static($callable[0], $callable); + } else { + $callable[1] = new static($callable[1], $callable); + } + + return $callable; + } +} diff --git a/vendor/symfony/var-dumper/Caster/ConstStub.php b/vendor/symfony/var-dumper/Caster/ConstStub.php new file mode 100644 index 0000000..d7d1812 --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/ConstStub.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Represents a PHP constant and its value. + * + * @author Nicolas Grekas + */ +class ConstStub extends Stub +{ + public function __construct(string $name, string|int|float $value = null) + { + $this->class = $name; + $this->value = 1 < \func_num_args() ? $value : $name; + } + + public function __toString(): string + { + return (string) $this->value; + } +} diff --git a/vendor/symfony/var-dumper/Caster/CutArrayStub.php b/vendor/symfony/var-dumper/Caster/CutArrayStub.php new file mode 100644 index 0000000..0e4fb36 --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/CutArrayStub.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +/** + * Represents a cut array. + * + * @author Nicolas Grekas + */ +class CutArrayStub extends CutStub +{ + public $preservedSubset; + + public function __construct(array $value, array $preservedKeys) + { + parent::__construct($value); + + $this->preservedSubset = array_intersect_key($value, array_flip($preservedKeys)); + $this->cut -= \count($this->preservedSubset); + } +} diff --git a/vendor/symfony/var-dumper/Caster/CutStub.php b/vendor/symfony/var-dumper/Caster/CutStub.php new file mode 100644 index 0000000..b5a96a0 --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/CutStub.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Represents the main properties of a PHP variable, pre-casted by a caster. + * + * @author Nicolas Grekas + */ +class CutStub extends Stub +{ + public function __construct(mixed $value) + { + $this->value = $value; + + switch (\gettype($value)) { + case 'object': + $this->type = self::TYPE_OBJECT; + $this->class = \get_class($value); + + if ($value instanceof \Closure) { + ReflectionCaster::castClosure($value, [], $this, true, Caster::EXCLUDE_VERBOSE); + } + + $this->cut = -1; + break; + + case 'array': + $this->type = self::TYPE_ARRAY; + $this->class = self::ARRAY_ASSOC; + $this->cut = $this->value = \count($value); + break; + + case 'resource': + case 'unknown type': + case 'resource (closed)': + $this->type = self::TYPE_RESOURCE; + $this->handle = (int) $value; + if ('Unknown' === $this->class = @get_resource_type($value)) { + $this->class = 'Closed'; + } + $this->cut = -1; + break; + + case 'string': + $this->type = self::TYPE_STRING; + $this->class = preg_match('//u', $value) ? self::STRING_UTF8 : self::STRING_BINARY; + $this->cut = self::STRING_BINARY === $this->class ? \strlen($value) : mb_strlen($value, 'UTF-8'); + $this->value = ''; + break; + } + } +} diff --git a/vendor/symfony/var-dumper/Caster/DOMCaster.php b/vendor/symfony/var-dumper/Caster/DOMCaster.php new file mode 100644 index 0000000..4dd16e0 --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/DOMCaster.php @@ -0,0 +1,304 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts DOM related classes to array representation. + * + * @author Nicolas Grekas + * + * @final + */ +class DOMCaster +{ + private const ERROR_CODES = [ + \DOM_PHP_ERR => 'DOM_PHP_ERR', + \DOM_INDEX_SIZE_ERR => 'DOM_INDEX_SIZE_ERR', + \DOMSTRING_SIZE_ERR => 'DOMSTRING_SIZE_ERR', + \DOM_HIERARCHY_REQUEST_ERR => 'DOM_HIERARCHY_REQUEST_ERR', + \DOM_WRONG_DOCUMENT_ERR => 'DOM_WRONG_DOCUMENT_ERR', + \DOM_INVALID_CHARACTER_ERR => 'DOM_INVALID_CHARACTER_ERR', + \DOM_NO_DATA_ALLOWED_ERR => 'DOM_NO_DATA_ALLOWED_ERR', + \DOM_NO_MODIFICATION_ALLOWED_ERR => 'DOM_NO_MODIFICATION_ALLOWED_ERR', + \DOM_NOT_FOUND_ERR => 'DOM_NOT_FOUND_ERR', + \DOM_NOT_SUPPORTED_ERR => 'DOM_NOT_SUPPORTED_ERR', + \DOM_INUSE_ATTRIBUTE_ERR => 'DOM_INUSE_ATTRIBUTE_ERR', + \DOM_INVALID_STATE_ERR => 'DOM_INVALID_STATE_ERR', + \DOM_SYNTAX_ERR => 'DOM_SYNTAX_ERR', + \DOM_INVALID_MODIFICATION_ERR => 'DOM_INVALID_MODIFICATION_ERR', + \DOM_NAMESPACE_ERR => 'DOM_NAMESPACE_ERR', + \DOM_INVALID_ACCESS_ERR => 'DOM_INVALID_ACCESS_ERR', + \DOM_VALIDATION_ERR => 'DOM_VALIDATION_ERR', + ]; + + private const NODE_TYPES = [ + \XML_ELEMENT_NODE => 'XML_ELEMENT_NODE', + \XML_ATTRIBUTE_NODE => 'XML_ATTRIBUTE_NODE', + \XML_TEXT_NODE => 'XML_TEXT_NODE', + \XML_CDATA_SECTION_NODE => 'XML_CDATA_SECTION_NODE', + \XML_ENTITY_REF_NODE => 'XML_ENTITY_REF_NODE', + \XML_ENTITY_NODE => 'XML_ENTITY_NODE', + \XML_PI_NODE => 'XML_PI_NODE', + \XML_COMMENT_NODE => 'XML_COMMENT_NODE', + \XML_DOCUMENT_NODE => 'XML_DOCUMENT_NODE', + \XML_DOCUMENT_TYPE_NODE => 'XML_DOCUMENT_TYPE_NODE', + \XML_DOCUMENT_FRAG_NODE => 'XML_DOCUMENT_FRAG_NODE', + \XML_NOTATION_NODE => 'XML_NOTATION_NODE', + \XML_HTML_DOCUMENT_NODE => 'XML_HTML_DOCUMENT_NODE', + \XML_DTD_NODE => 'XML_DTD_NODE', + \XML_ELEMENT_DECL_NODE => 'XML_ELEMENT_DECL_NODE', + \XML_ATTRIBUTE_DECL_NODE => 'XML_ATTRIBUTE_DECL_NODE', + \XML_ENTITY_DECL_NODE => 'XML_ENTITY_DECL_NODE', + \XML_NAMESPACE_DECL_NODE => 'XML_NAMESPACE_DECL_NODE', + ]; + + public static function castException(\DOMException $e, array $a, Stub $stub, bool $isNested) + { + $k = Caster::PREFIX_PROTECTED.'code'; + if (isset($a[$k], self::ERROR_CODES[$a[$k]])) { + $a[$k] = new ConstStub(self::ERROR_CODES[$a[$k]], $a[$k]); + } + + return $a; + } + + public static function castLength($dom, array $a, Stub $stub, bool $isNested) + { + $a += [ + 'length' => $dom->length, + ]; + + return $a; + } + + public static function castImplementation(\DOMImplementation $dom, array $a, Stub $stub, bool $isNested) + { + $a += [ + Caster::PREFIX_VIRTUAL.'Core' => '1.0', + Caster::PREFIX_VIRTUAL.'XML' => '2.0', + ]; + + return $a; + } + + public static function castNode(\DOMNode $dom, array $a, Stub $stub, bool $isNested) + { + $a += [ + 'nodeName' => $dom->nodeName, + 'nodeValue' => new CutStub($dom->nodeValue), + 'nodeType' => new ConstStub(self::NODE_TYPES[$dom->nodeType], $dom->nodeType), + 'parentNode' => new CutStub($dom->parentNode), + 'childNodes' => $dom->childNodes, + 'firstChild' => new CutStub($dom->firstChild), + 'lastChild' => new CutStub($dom->lastChild), + 'previousSibling' => new CutStub($dom->previousSibling), + 'nextSibling' => new CutStub($dom->nextSibling), + 'attributes' => $dom->attributes, + 'ownerDocument' => new CutStub($dom->ownerDocument), + 'namespaceURI' => $dom->namespaceURI, + 'prefix' => $dom->prefix, + 'localName' => $dom->localName, + 'baseURI' => $dom->baseURI ? new LinkStub($dom->baseURI) : $dom->baseURI, + 'textContent' => new CutStub($dom->textContent), + ]; + + return $a; + } + + public static function castNameSpaceNode(\DOMNameSpaceNode $dom, array $a, Stub $stub, bool $isNested) + { + $a += [ + 'nodeName' => $dom->nodeName, + 'nodeValue' => new CutStub($dom->nodeValue), + 'nodeType' => new ConstStub(self::NODE_TYPES[$dom->nodeType], $dom->nodeType), + 'prefix' => $dom->prefix, + 'localName' => $dom->localName, + 'namespaceURI' => $dom->namespaceURI, + 'ownerDocument' => new CutStub($dom->ownerDocument), + 'parentNode' => new CutStub($dom->parentNode), + ]; + + return $a; + } + + public static function castDocument(\DOMDocument $dom, array $a, Stub $stub, bool $isNested, int $filter = 0) + { + $a += [ + 'doctype' => $dom->doctype, + 'implementation' => $dom->implementation, + 'documentElement' => new CutStub($dom->documentElement), + 'actualEncoding' => $dom->actualEncoding, + 'encoding' => $dom->encoding, + 'xmlEncoding' => $dom->xmlEncoding, + 'standalone' => $dom->standalone, + 'xmlStandalone' => $dom->xmlStandalone, + 'version' => $dom->version, + 'xmlVersion' => $dom->xmlVersion, + 'strictErrorChecking' => $dom->strictErrorChecking, + 'documentURI' => $dom->documentURI ? new LinkStub($dom->documentURI) : $dom->documentURI, + 'config' => $dom->config, + 'formatOutput' => $dom->formatOutput, + 'validateOnParse' => $dom->validateOnParse, + 'resolveExternals' => $dom->resolveExternals, + 'preserveWhiteSpace' => $dom->preserveWhiteSpace, + 'recover' => $dom->recover, + 'substituteEntities' => $dom->substituteEntities, + ]; + + if (!($filter & Caster::EXCLUDE_VERBOSE)) { + $formatOutput = $dom->formatOutput; + $dom->formatOutput = true; + $a += [Caster::PREFIX_VIRTUAL.'xml' => $dom->saveXML()]; + $dom->formatOutput = $formatOutput; + } + + return $a; + } + + public static function castCharacterData(\DOMCharacterData $dom, array $a, Stub $stub, bool $isNested) + { + $a += [ + 'data' => $dom->data, + 'length' => $dom->length, + ]; + + return $a; + } + + public static function castAttr(\DOMAttr $dom, array $a, Stub $stub, bool $isNested) + { + $a += [ + 'name' => $dom->name, + 'specified' => $dom->specified, + 'value' => $dom->value, + 'ownerElement' => $dom->ownerElement, + 'schemaTypeInfo' => $dom->schemaTypeInfo, + ]; + + return $a; + } + + public static function castElement(\DOMElement $dom, array $a, Stub $stub, bool $isNested) + { + $a += [ + 'tagName' => $dom->tagName, + 'schemaTypeInfo' => $dom->schemaTypeInfo, + ]; + + return $a; + } + + public static function castText(\DOMText $dom, array $a, Stub $stub, bool $isNested) + { + $a += [ + 'wholeText' => $dom->wholeText, + ]; + + return $a; + } + + public static function castTypeinfo(\DOMTypeinfo $dom, array $a, Stub $stub, bool $isNested) + { + $a += [ + 'typeName' => $dom->typeName, + 'typeNamespace' => $dom->typeNamespace, + ]; + + return $a; + } + + public static function castDomError(\DOMDomError $dom, array $a, Stub $stub, bool $isNested) + { + $a += [ + 'severity' => $dom->severity, + 'message' => $dom->message, + 'type' => $dom->type, + 'relatedException' => $dom->relatedException, + 'related_data' => $dom->related_data, + 'location' => $dom->location, + ]; + + return $a; + } + + public static function castLocator(\DOMLocator $dom, array $a, Stub $stub, bool $isNested) + { + $a += [ + 'lineNumber' => $dom->lineNumber, + 'columnNumber' => $dom->columnNumber, + 'offset' => $dom->offset, + 'relatedNode' => $dom->relatedNode, + 'uri' => $dom->uri ? new LinkStub($dom->uri, $dom->lineNumber) : $dom->uri, + ]; + + return $a; + } + + public static function castDocumentType(\DOMDocumentType $dom, array $a, Stub $stub, bool $isNested) + { + $a += [ + 'name' => $dom->name, + 'entities' => $dom->entities, + 'notations' => $dom->notations, + 'publicId' => $dom->publicId, + 'systemId' => $dom->systemId, + 'internalSubset' => $dom->internalSubset, + ]; + + return $a; + } + + public static function castNotation(\DOMNotation $dom, array $a, Stub $stub, bool $isNested) + { + $a += [ + 'publicId' => $dom->publicId, + 'systemId' => $dom->systemId, + ]; + + return $a; + } + + public static function castEntity(\DOMEntity $dom, array $a, Stub $stub, bool $isNested) + { + $a += [ + 'publicId' => $dom->publicId, + 'systemId' => $dom->systemId, + 'notationName' => $dom->notationName, + 'actualEncoding' => $dom->actualEncoding, + 'encoding' => $dom->encoding, + 'version' => $dom->version, + ]; + + return $a; + } + + public static function castProcessingInstruction(\DOMProcessingInstruction $dom, array $a, Stub $stub, bool $isNested) + { + $a += [ + 'target' => $dom->target, + 'data' => $dom->data, + ]; + + return $a; + } + + public static function castXPath(\DOMXPath $dom, array $a, Stub $stub, bool $isNested) + { + $a += [ + 'document' => $dom->document, + ]; + + return $a; + } +} diff --git a/vendor/symfony/var-dumper/Caster/DateCaster.php b/vendor/symfony/var-dumper/Caster/DateCaster.php new file mode 100644 index 0000000..18641fb --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/DateCaster.php @@ -0,0 +1,127 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts DateTimeInterface related classes to array representation. + * + * @author Dany Maillard + * + * @final + */ +class DateCaster +{ + private const PERIOD_LIMIT = 3; + + public static function castDateTime(\DateTimeInterface $d, array $a, Stub $stub, bool $isNested, int $filter) + { + $prefix = Caster::PREFIX_VIRTUAL; + $location = $d->getTimezone()->getLocation(); + $fromNow = (new \DateTime())->diff($d); + + $title = $d->format('l, F j, Y') + ."\n".self::formatInterval($fromNow).' from now' + .($location ? ($d->format('I') ? "\nDST On" : "\nDST Off") : '') + ; + + unset( + $a[Caster::PREFIX_DYNAMIC.'date'], + $a[Caster::PREFIX_DYNAMIC.'timezone'], + $a[Caster::PREFIX_DYNAMIC.'timezone_type'] + ); + $a[$prefix.'date'] = new ConstStub(self::formatDateTime($d, $location ? ' e (P)' : ' P'), $title); + + $stub->class .= $d->format(' @U'); + + return $a; + } + + public static function castInterval(\DateInterval $interval, array $a, Stub $stub, bool $isNested, int $filter) + { + $now = new \DateTimeImmutable('@0', new \DateTimeZone('UTC')); + $numberOfSeconds = $now->add($interval)->getTimestamp() - $now->getTimestamp(); + $title = number_format($numberOfSeconds, 0, '.', ' ').'s'; + + $i = [Caster::PREFIX_VIRTUAL.'interval' => new ConstStub(self::formatInterval($interval), $title)]; + + return $filter & Caster::EXCLUDE_VERBOSE ? $i : $i + $a; + } + + private static function formatInterval(\DateInterval $i): string + { + $format = '%R '; + + if (0 === $i->y && 0 === $i->m && ($i->h >= 24 || $i->i >= 60 || $i->s >= 60)) { + $d = new \DateTimeImmutable('@0', new \DateTimeZone('UTC')); + $i = $d->diff($d->add($i)); // recalculate carry over points + $format .= 0 < $i->days ? '%ad ' : ''; + } else { + $format .= ($i->y ? '%yy ' : '').($i->m ? '%mm ' : '').($i->d ? '%dd ' : ''); + } + + $format .= $i->h || $i->i || $i->s || $i->f ? '%H:%I:'.self::formatSeconds($i->s, substr($i->f, 2)) : ''; + $format = '%R ' === $format ? '0s' : $format; + + return $i->format(rtrim($format)); + } + + public static function castTimeZone(\DateTimeZone $timeZone, array $a, Stub $stub, bool $isNested, int $filter) + { + $location = $timeZone->getLocation(); + $formatted = (new \DateTime('now', $timeZone))->format($location ? 'e (P)' : 'P'); + $title = $location && \extension_loaded('intl') ? \Locale::getDisplayRegion('-'.$location['country_code']) : ''; + + $z = [Caster::PREFIX_VIRTUAL.'timezone' => new ConstStub($formatted, $title)]; + + return $filter & Caster::EXCLUDE_VERBOSE ? $z : $z + $a; + } + + public static function castPeriod(\DatePeriod $p, array $a, Stub $stub, bool $isNested, int $filter) + { + $dates = []; + foreach (clone $p as $i => $d) { + if (self::PERIOD_LIMIT === $i) { + $now = new \DateTimeImmutable('now', new \DateTimeZone('UTC')); + $dates[] = sprintf('%s more', ($end = $p->getEndDate()) + ? ceil(($end->format('U.u') - $d->format('U.u')) / ((int) $now->add($p->getDateInterval())->format('U.u') - (int) $now->format('U.u'))) + : $p->recurrences - $i + ); + break; + } + $dates[] = sprintf('%s) %s', $i + 1, self::formatDateTime($d)); + } + + $period = sprintf( + 'every %s, from %s%s %s', + self::formatInterval($p->getDateInterval()), + $p->include_start_date ? '[' : ']', + self::formatDateTime($p->getStartDate()), + ($end = $p->getEndDate()) ? 'to '.self::formatDateTime($end).(\PHP_VERSION_ID >= 80200 && $p->include_end_date ? ']' : '[') : 'recurring '.$p->recurrences.' time/s' + ); + + $p = [Caster::PREFIX_VIRTUAL.'period' => new ConstStub($period, implode("\n", $dates))]; + + return $filter & Caster::EXCLUDE_VERBOSE ? $p : $p + $a; + } + + private static function formatDateTime(\DateTimeInterface $d, string $extra = ''): string + { + return $d->format('Y-m-d H:i:'.self::formatSeconds($d->format('s'), $d->format('u')).$extra); + } + + private static function formatSeconds(string $s, string $us): string + { + return sprintf('%02d.%s', $s, 0 === ($len = \strlen($t = rtrim($us, '0'))) ? '0' : ($len <= 3 ? str_pad($t, 3, '0') : $us)); + } +} diff --git a/vendor/symfony/var-dumper/Caster/DoctrineCaster.php b/vendor/symfony/var-dumper/Caster/DoctrineCaster.php new file mode 100644 index 0000000..129b2cb --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/DoctrineCaster.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Doctrine\Common\Proxy\Proxy as CommonProxy; +use Doctrine\ORM\PersistentCollection; +use Doctrine\ORM\Proxy\Proxy as OrmProxy; +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts Doctrine related classes to array representation. + * + * @author Nicolas Grekas + * + * @final + */ +class DoctrineCaster +{ + public static function castCommonProxy(CommonProxy $proxy, array $a, Stub $stub, bool $isNested) + { + foreach (['__cloner__', '__initializer__'] as $k) { + if (\array_key_exists($k, $a)) { + unset($a[$k]); + ++$stub->cut; + } + } + + return $a; + } + + public static function castOrmProxy(OrmProxy $proxy, array $a, Stub $stub, bool $isNested) + { + foreach (['_entityPersister', '_identifier'] as $k) { + if (\array_key_exists($k = "\0Doctrine\\ORM\\Proxy\\Proxy\0".$k, $a)) { + unset($a[$k]); + ++$stub->cut; + } + } + + return $a; + } + + public static function castPersistentCollection(PersistentCollection $coll, array $a, Stub $stub, bool $isNested) + { + foreach (['snapshot', 'association', 'typeClass'] as $k) { + if (\array_key_exists($k = "\0Doctrine\\ORM\\PersistentCollection\0".$k, $a)) { + $a[$k] = new CutStub($a[$k]); + } + } + + return $a; + } +} diff --git a/vendor/symfony/var-dumper/Caster/DsCaster.php b/vendor/symfony/var-dumper/Caster/DsCaster.php new file mode 100644 index 0000000..b34b670 --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/DsCaster.php @@ -0,0 +1,70 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Ds\Collection; +use Ds\Map; +use Ds\Pair; +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts Ds extension classes to array representation. + * + * @author Jáchym Toušek + * + * @final + */ +class DsCaster +{ + public static function castCollection(Collection $c, array $a, Stub $stub, bool $isNested): array + { + $a[Caster::PREFIX_VIRTUAL.'count'] = $c->count(); + $a[Caster::PREFIX_VIRTUAL.'capacity'] = $c->capacity(); + + if (!$c instanceof Map) { + $a += $c->toArray(); + } + + return $a; + } + + public static function castMap(Map $c, array $a, Stub $stub, bool $isNested): array + { + foreach ($c as $k => $v) { + $a[] = new DsPairStub($k, $v); + } + + return $a; + } + + public static function castPair(Pair $c, array $a, Stub $stub, bool $isNested): array + { + foreach ($c->toArray() as $k => $v) { + $a[Caster::PREFIX_VIRTUAL.$k] = $v; + } + + return $a; + } + + public static function castPairStub(DsPairStub $c, array $a, Stub $stub, bool $isNested): array + { + if ($isNested) { + $stub->class = Pair::class; + $stub->value = null; + $stub->handle = 0; + + $a = $c->value; + } + + return $a; + } +} diff --git a/vendor/symfony/var-dumper/Caster/DsPairStub.php b/vendor/symfony/var-dumper/Caster/DsPairStub.php new file mode 100644 index 0000000..22112af --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/DsPairStub.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * @author Nicolas Grekas + */ +class DsPairStub extends Stub +{ + public function __construct(string|int $key, mixed $value) + { + $this->value = [ + Caster::PREFIX_VIRTUAL.'key' => $key, + Caster::PREFIX_VIRTUAL.'value' => $value, + ]; + } +} diff --git a/vendor/symfony/var-dumper/Caster/EnumStub.php b/vendor/symfony/var-dumper/Caster/EnumStub.php new file mode 100644 index 0000000..7a4e98a --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/EnumStub.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Represents an enumeration of values. + * + * @author Nicolas Grekas + */ +class EnumStub extends Stub +{ + public $dumpKeys = true; + + public function __construct(array $values, bool $dumpKeys = true) + { + $this->value = $values; + $this->dumpKeys = $dumpKeys; + } +} diff --git a/vendor/symfony/var-dumper/Caster/ExceptionCaster.php b/vendor/symfony/var-dumper/Caster/ExceptionCaster.php new file mode 100644 index 0000000..8e517e0 --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/ExceptionCaster.php @@ -0,0 +1,388 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\ErrorHandler\Exception\SilencedErrorContext; +use Symfony\Component\VarDumper\Cloner\Stub; +use Symfony\Component\VarDumper\Exception\ThrowingCasterException; + +/** + * Casts common Exception classes to array representation. + * + * @author Nicolas Grekas + * + * @final + */ +class ExceptionCaster +{ + public static int $srcContext = 1; + public static bool $traceArgs = true; + public static array $errorTypes = [ + \E_DEPRECATED => 'E_DEPRECATED', + \E_USER_DEPRECATED => 'E_USER_DEPRECATED', + \E_RECOVERABLE_ERROR => 'E_RECOVERABLE_ERROR', + \E_ERROR => 'E_ERROR', + \E_WARNING => 'E_WARNING', + \E_PARSE => 'E_PARSE', + \E_NOTICE => 'E_NOTICE', + \E_CORE_ERROR => 'E_CORE_ERROR', + \E_CORE_WARNING => 'E_CORE_WARNING', + \E_COMPILE_ERROR => 'E_COMPILE_ERROR', + \E_COMPILE_WARNING => 'E_COMPILE_WARNING', + \E_USER_ERROR => 'E_USER_ERROR', + \E_USER_WARNING => 'E_USER_WARNING', + \E_USER_NOTICE => 'E_USER_NOTICE', + \E_STRICT => 'E_STRICT', + ]; + + private static array $framesCache = []; + + public static function castError(\Error $e, array $a, Stub $stub, bool $isNested, int $filter = 0) + { + return self::filterExceptionArray($stub->class, $a, "\0Error\0", $filter); + } + + public static function castException(\Exception $e, array $a, Stub $stub, bool $isNested, int $filter = 0) + { + return self::filterExceptionArray($stub->class, $a, "\0Exception\0", $filter); + } + + public static function castErrorException(\ErrorException $e, array $a, Stub $stub, bool $isNested) + { + if (isset($a[$s = Caster::PREFIX_PROTECTED.'severity'], self::$errorTypes[$a[$s]])) { + $a[$s] = new ConstStub(self::$errorTypes[$a[$s]], $a[$s]); + } + + return $a; + } + + public static function castThrowingCasterException(ThrowingCasterException $e, array $a, Stub $stub, bool $isNested) + { + $trace = Caster::PREFIX_VIRTUAL.'trace'; + $prefix = Caster::PREFIX_PROTECTED; + $xPrefix = "\0Exception\0"; + + if (isset($a[$xPrefix.'previous'], $a[$trace]) && $a[$xPrefix.'previous'] instanceof \Exception) { + $b = (array) $a[$xPrefix.'previous']; + $class = get_debug_type($a[$xPrefix.'previous']); + self::traceUnshift($b[$xPrefix.'trace'], $class, $b[$prefix.'file'], $b[$prefix.'line']); + $a[$trace] = new TraceStub($b[$xPrefix.'trace'], false, 0, -\count($a[$trace]->value)); + } + + unset($a[$xPrefix.'previous'], $a[$prefix.'code'], $a[$prefix.'file'], $a[$prefix.'line']); + + return $a; + } + + public static function castSilencedErrorContext(SilencedErrorContext $e, array $a, Stub $stub, bool $isNested) + { + $sPrefix = "\0".SilencedErrorContext::class."\0"; + + if (!isset($a[$s = $sPrefix.'severity'])) { + return $a; + } + + if (isset(self::$errorTypes[$a[$s]])) { + $a[$s] = new ConstStub(self::$errorTypes[$a[$s]], $a[$s]); + } + + $trace = [[ + 'file' => $a[$sPrefix.'file'], + 'line' => $a[$sPrefix.'line'], + ]]; + + if (isset($a[$sPrefix.'trace'])) { + $trace = array_merge($trace, $a[$sPrefix.'trace']); + } + + unset($a[$sPrefix.'file'], $a[$sPrefix.'line'], $a[$sPrefix.'trace']); + $a[Caster::PREFIX_VIRTUAL.'trace'] = new TraceStub($trace, self::$traceArgs); + + return $a; + } + + public static function castTraceStub(TraceStub $trace, array $a, Stub $stub, bool $isNested) + { + if (!$isNested) { + return $a; + } + $stub->class = ''; + $stub->handle = 0; + $frames = $trace->value; + $prefix = Caster::PREFIX_VIRTUAL; + + $a = []; + $j = \count($frames); + if (0 > $i = $trace->sliceOffset) { + $i = max(0, $j + $i); + } + if (!isset($trace->value[$i])) { + return []; + } + $lastCall = isset($frames[$i]['function']) ? (isset($frames[$i]['class']) ? $frames[0]['class'].$frames[$i]['type'] : '').$frames[$i]['function'].'()' : ''; + $frames[] = ['function' => '']; + $collapse = false; + + for ($j += $trace->numberingOffset - $i++; isset($frames[$i]); ++$i, --$j) { + $f = $frames[$i]; + $call = isset($f['function']) ? (isset($f['class']) ? $f['class'].$f['type'] : '').$f['function'] : '???'; + + $frame = new FrameStub( + [ + 'object' => $f['object'] ?? null, + 'class' => $f['class'] ?? null, + 'type' => $f['type'] ?? null, + 'function' => $f['function'] ?? null, + ] + $frames[$i - 1], + false, + true + ); + $f = self::castFrameStub($frame, [], $frame, true); + if (isset($f[$prefix.'src'])) { + foreach ($f[$prefix.'src']->value as $label => $frame) { + if (str_starts_with($label, "\0~collapse=0")) { + if ($collapse) { + $label = substr_replace($label, '1', 11, 1); + } else { + $collapse = true; + } + } + $label = substr_replace($label, "title=Stack level $j.&", 2, 0); + } + $f = $frames[$i - 1]; + if ($trace->keepArgs && !empty($f['args']) && $frame instanceof EnumStub) { + $frame->value['arguments'] = new ArgsStub($f['args'], $f['function'] ?? null, $f['class'] ?? null); + } + } elseif ('???' !== $lastCall) { + $label = new ClassStub($lastCall); + if (isset($label->attr['ellipsis'])) { + $label->attr['ellipsis'] += 2; + $label = substr_replace($prefix, "ellipsis-type=class&ellipsis={$label->attr['ellipsis']}&ellipsis-tail=1&title=Stack level $j.", 2, 0).$label->value.'()'; + } else { + $label = substr_replace($prefix, "title=Stack level $j.", 2, 0).$label->value.'()'; + } + } else { + $label = substr_replace($prefix, "title=Stack level $j.", 2, 0).$lastCall; + } + $a[substr_replace($label, sprintf('separator=%s&', $frame instanceof EnumStub ? ' ' : ':'), 2, 0)] = $frame; + + $lastCall = $call; + } + if (null !== $trace->sliceLength) { + $a = \array_slice($a, 0, $trace->sliceLength, true); + } + + return $a; + } + + public static function castFrameStub(FrameStub $frame, array $a, Stub $stub, bool $isNested) + { + if (!$isNested) { + return $a; + } + $f = $frame->value; + $prefix = Caster::PREFIX_VIRTUAL; + + if (isset($f['file'], $f['line'])) { + $cacheKey = $f; + unset($cacheKey['object'], $cacheKey['args']); + $cacheKey[] = self::$srcContext; + $cacheKey = implode('-', $cacheKey); + + if (isset(self::$framesCache[$cacheKey])) { + $a[$prefix.'src'] = self::$framesCache[$cacheKey]; + } else { + if (preg_match('/\((\d+)\)(?:\([\da-f]{32}\))? : (?:eval\(\)\'d code|runtime-created function)$/', $f['file'], $match)) { + $f['file'] = substr($f['file'], 0, -\strlen($match[0])); + $f['line'] = (int) $match[1]; + } + $src = $f['line']; + $srcKey = $f['file']; + $ellipsis = new LinkStub($srcKey, 0); + $srcAttr = 'collapse='.(int) $ellipsis->inVendor; + $ellipsisTail = $ellipsis->attr['ellipsis-tail'] ?? 0; + $ellipsis = $ellipsis->attr['ellipsis'] ?? 0; + + if (is_file($f['file']) && 0 <= self::$srcContext) { + if (!empty($f['class']) && (is_subclass_of($f['class'], 'Twig\Template') || is_subclass_of($f['class'], 'Twig_Template')) && method_exists($f['class'], 'getDebugInfo')) { + $template = null; + if (isset($f['object'])) { + $template = $f['object']; + } elseif ((new \ReflectionClass($f['class']))->isInstantiable()) { + $template = unserialize(sprintf('O:%d:"%s":0:{}', \strlen($f['class']), $f['class'])); + } + if (null !== $template) { + $ellipsis = 0; + $templateSrc = method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getCode() : (method_exists($template, 'getSource') ? $template->getSource() : ''); + $templateInfo = $template->getDebugInfo(); + if (isset($templateInfo[$f['line']])) { + if (!method_exists($template, 'getSourceContext') || !is_file($templatePath = $template->getSourceContext()->getPath())) { + $templatePath = null; + } + if ($templateSrc) { + $src = self::extractSource($templateSrc, $templateInfo[$f['line']], self::$srcContext, 'twig', $templatePath, $f); + $srcKey = ($templatePath ?: $template->getTemplateName()).':'.$templateInfo[$f['line']]; + } + } + } + } + if ($srcKey == $f['file']) { + $src = self::extractSource(file_get_contents($f['file']), $f['line'], self::$srcContext, 'php', $f['file'], $f); + $srcKey .= ':'.$f['line']; + if ($ellipsis) { + $ellipsis += 1 + \strlen($f['line']); + } + } + $srcAttr .= sprintf('&separator= &file=%s&line=%d', rawurlencode($f['file']), $f['line']); + } else { + $srcAttr .= '&separator=:'; + } + $srcAttr .= $ellipsis ? '&ellipsis-type=path&ellipsis='.$ellipsis.'&ellipsis-tail='.$ellipsisTail : ''; + self::$framesCache[$cacheKey] = $a[$prefix.'src'] = new EnumStub(["\0~$srcAttr\0$srcKey" => $src]); + } + } + + unset($a[$prefix.'args'], $a[$prefix.'line'], $a[$prefix.'file']); + if ($frame->inTraceStub) { + unset($a[$prefix.'class'], $a[$prefix.'type'], $a[$prefix.'function']); + } + foreach ($a as $k => $v) { + if (!$v) { + unset($a[$k]); + } + } + if ($frame->keepArgs && !empty($f['args'])) { + $a[$prefix.'arguments'] = new ArgsStub($f['args'], $f['function'], $f['class']); + } + + return $a; + } + + private static function filterExceptionArray(string $xClass, array $a, string $xPrefix, int $filter): array + { + if (isset($a[$xPrefix.'trace'])) { + $trace = $a[$xPrefix.'trace']; + unset($a[$xPrefix.'trace']); // Ensures the trace is always last + } else { + $trace = []; + } + + if (!($filter & Caster::EXCLUDE_VERBOSE) && $trace) { + if (isset($a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line'])) { + self::traceUnshift($trace, $xClass, $a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line']); + } + $a[Caster::PREFIX_VIRTUAL.'trace'] = new TraceStub($trace, self::$traceArgs); + } + if (empty($a[$xPrefix.'previous'])) { + unset($a[$xPrefix.'previous']); + } + unset($a[$xPrefix.'string'], $a[Caster::PREFIX_DYNAMIC.'xdebug_message'], $a[Caster::PREFIX_DYNAMIC.'__destructorException']); + + if (isset($a[Caster::PREFIX_PROTECTED.'message']) && str_contains($a[Caster::PREFIX_PROTECTED.'message'], "@anonymous\0")) { + $a[Caster::PREFIX_PROTECTED.'message'] = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', function ($m) { + return class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0]; + }, $a[Caster::PREFIX_PROTECTED.'message']); + } + + if (isset($a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line'])) { + $a[Caster::PREFIX_PROTECTED.'file'] = new LinkStub($a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line']); + } + + return $a; + } + + private static function traceUnshift(array &$trace, ?string $class, string $file, int $line): void + { + if (isset($trace[0]['file'], $trace[0]['line']) && $trace[0]['file'] === $file && $trace[0]['line'] === $line) { + return; + } + array_unshift($trace, [ + 'function' => $class ? 'new '.$class : null, + 'file' => $file, + 'line' => $line, + ]); + } + + private static function extractSource(string $srcLines, int $line, int $srcContext, string $lang, ?string $file, array $frame): EnumStub + { + $srcLines = explode("\n", $srcLines); + $src = []; + + for ($i = $line - 1 - $srcContext; $i <= $line - 1 + $srcContext; ++$i) { + $src[] = ($srcLines[$i] ?? '')."\n"; + } + + if ($frame['function'] ?? false) { + $stub = new CutStub(new \stdClass()); + $stub->class = (isset($frame['class']) ? $frame['class'].$frame['type'] : '').$frame['function']; + $stub->type = Stub::TYPE_OBJECT; + $stub->attr['cut_hash'] = true; + $stub->attr['file'] = $frame['file']; + $stub->attr['line'] = $frame['line']; + + try { + $caller = isset($frame['class']) ? new \ReflectionMethod($frame['class'], $frame['function']) : new \ReflectionFunction($frame['function']); + $stub->class .= ReflectionCaster::getSignature(ReflectionCaster::castFunctionAbstract($caller, [], $stub, true, Caster::EXCLUDE_VERBOSE)); + + if ($f = $caller->getFileName()) { + $stub->attr['file'] = $f; + $stub->attr['line'] = $caller->getStartLine(); + } + } catch (\ReflectionException $e) { + // ignore fake class/function + } + + $srcLines = ["\0~separator=\0" => $stub]; + } else { + $stub = null; + $srcLines = []; + } + + $ltrim = 0; + do { + $pad = null; + for ($i = $srcContext << 1; $i >= 0; --$i) { + if (isset($src[$i][$ltrim]) && "\r" !== ($c = $src[$i][$ltrim]) && "\n" !== $c) { + if (null === $pad) { + $pad = $c; + } + if ((' ' !== $c && "\t" !== $c) || $pad !== $c) { + break; + } + } + } + ++$ltrim; + } while (0 > $i && null !== $pad); + + --$ltrim; + + foreach ($src as $i => $c) { + if ($ltrim) { + $c = isset($c[$ltrim]) && "\r" !== $c[$ltrim] ? substr($c, $ltrim) : ltrim($c, " \t"); + } + $c = substr($c, 0, -1); + if ($i !== $srcContext) { + $c = new ConstStub('default', $c); + } else { + $c = new ConstStub($c, $stub ? 'in '.$stub->class : ''); + if (null !== $file) { + $c->attr['file'] = $file; + $c->attr['line'] = $line; + } + } + $c->attr['lang'] = $lang; + $srcLines[sprintf("\0~separator=› &%d\0", $i + $line - $srcContext)] = $c; + } + + return new EnumStub($srcLines); + } +} diff --git a/vendor/symfony/var-dumper/Caster/FiberCaster.php b/vendor/symfony/var-dumper/Caster/FiberCaster.php new file mode 100644 index 0000000..c74a9e5 --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/FiberCaster.php @@ -0,0 +1,43 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts Fiber related classes to array representation. + * + * @author Grégoire Pineau + */ +final class FiberCaster +{ + public static function castFiber(\Fiber $fiber, array $a, Stub $stub, bool $isNested, int $filter = 0) + { + $prefix = Caster::PREFIX_VIRTUAL; + + if ($fiber->isTerminated()) { + $status = 'terminated'; + } elseif ($fiber->isRunning()) { + $status = 'running'; + } elseif ($fiber->isSuspended()) { + $status = 'suspended'; + } elseif ($fiber->isStarted()) { + $status = 'started'; + } else { + $status = 'not started'; + } + + $a[$prefix.'status'] = $status; + + return $a; + } +} diff --git a/vendor/symfony/var-dumper/Caster/FrameStub.php b/vendor/symfony/var-dumper/Caster/FrameStub.php new file mode 100644 index 0000000..8786755 --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/FrameStub.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +/** + * Represents a single backtrace frame as returned by debug_backtrace() or Exception->getTrace(). + * + * @author Nicolas Grekas + */ +class FrameStub extends EnumStub +{ + public $keepArgs; + public $inTraceStub; + + public function __construct(array $frame, bool $keepArgs = true, bool $inTraceStub = false) + { + $this->value = $frame; + $this->keepArgs = $keepArgs; + $this->inTraceStub = $inTraceStub; + } +} diff --git a/vendor/symfony/var-dumper/Caster/GmpCaster.php b/vendor/symfony/var-dumper/Caster/GmpCaster.php new file mode 100644 index 0000000..b018cc7 --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/GmpCaster.php @@ -0,0 +1,32 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts GMP objects to array representation. + * + * @author Hamza Amrouche + * @author Nicolas Grekas + * + * @final + */ +class GmpCaster +{ + public static function castGmp(\GMP $gmp, array $a, Stub $stub, bool $isNested, int $filter): array + { + $a[Caster::PREFIX_VIRTUAL.'value'] = new ConstStub(gmp_strval($gmp), gmp_strval($gmp)); + + return $a; + } +} diff --git a/vendor/symfony/var-dumper/Caster/ImagineCaster.php b/vendor/symfony/var-dumper/Caster/ImagineCaster.php new file mode 100644 index 0000000..d1289da --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/ImagineCaster.php @@ -0,0 +1,37 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Imagine\Image\ImageInterface; +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * @author Grégoire Pineau + */ +final class ImagineCaster +{ + public static function castImage(ImageInterface $c, array $a, Stub $stub, bool $isNested): array + { + $imgData = $c->get('png'); + if (\strlen($imgData) > 1 * 1000 * 1000) { + $a += [ + Caster::PREFIX_VIRTUAL.'image' => new ConstStub($c->getSize()), + ]; + } else { + $a += [ + Caster::PREFIX_VIRTUAL.'image' => new ImgStub($imgData, 'image/png', $c->getSize()), + ]; + } + + return $a; + } +} diff --git a/vendor/symfony/var-dumper/Caster/ImgStub.php b/vendor/symfony/var-dumper/Caster/ImgStub.php new file mode 100644 index 0000000..a16681f --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/ImgStub.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +/** + * @author Grégoire Pineau + */ +class ImgStub extends ConstStub +{ + public function __construct(string $data, string $contentType, string $size = '') + { + $this->value = ''; + $this->attr['img-data'] = $data; + $this->attr['img-size'] = $size; + $this->attr['content-type'] = $contentType; + } +} diff --git a/vendor/symfony/var-dumper/Caster/IntlCaster.php b/vendor/symfony/var-dumper/Caster/IntlCaster.php new file mode 100644 index 0000000..1ed91d4 --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/IntlCaster.php @@ -0,0 +1,172 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * @author Nicolas Grekas + * @author Jan Schädlich + * + * @final + */ +class IntlCaster +{ + public static function castMessageFormatter(\MessageFormatter $c, array $a, Stub $stub, bool $isNested) + { + $a += [ + Caster::PREFIX_VIRTUAL.'locale' => $c->getLocale(), + Caster::PREFIX_VIRTUAL.'pattern' => $c->getPattern(), + ]; + + return self::castError($c, $a); + } + + public static function castNumberFormatter(\NumberFormatter $c, array $a, Stub $stub, bool $isNested, int $filter = 0) + { + $a += [ + Caster::PREFIX_VIRTUAL.'locale' => $c->getLocale(), + Caster::PREFIX_VIRTUAL.'pattern' => $c->getPattern(), + ]; + + if ($filter & Caster::EXCLUDE_VERBOSE) { + $stub->cut += 3; + + return self::castError($c, $a); + } + + $a += [ + Caster::PREFIX_VIRTUAL.'attributes' => new EnumStub( + [ + 'PARSE_INT_ONLY' => $c->getAttribute(\NumberFormatter::PARSE_INT_ONLY), + 'GROUPING_USED' => $c->getAttribute(\NumberFormatter::GROUPING_USED), + 'DECIMAL_ALWAYS_SHOWN' => $c->getAttribute(\NumberFormatter::DECIMAL_ALWAYS_SHOWN), + 'MAX_INTEGER_DIGITS' => $c->getAttribute(\NumberFormatter::MAX_INTEGER_DIGITS), + 'MIN_INTEGER_DIGITS' => $c->getAttribute(\NumberFormatter::MIN_INTEGER_DIGITS), + 'INTEGER_DIGITS' => $c->getAttribute(\NumberFormatter::INTEGER_DIGITS), + 'MAX_FRACTION_DIGITS' => $c->getAttribute(\NumberFormatter::MAX_FRACTION_DIGITS), + 'MIN_FRACTION_DIGITS' => $c->getAttribute(\NumberFormatter::MIN_FRACTION_DIGITS), + 'FRACTION_DIGITS' => $c->getAttribute(\NumberFormatter::FRACTION_DIGITS), + 'MULTIPLIER' => $c->getAttribute(\NumberFormatter::MULTIPLIER), + 'GROUPING_SIZE' => $c->getAttribute(\NumberFormatter::GROUPING_SIZE), + 'ROUNDING_MODE' => $c->getAttribute(\NumberFormatter::ROUNDING_MODE), + 'ROUNDING_INCREMENT' => $c->getAttribute(\NumberFormatter::ROUNDING_INCREMENT), + 'FORMAT_WIDTH' => $c->getAttribute(\NumberFormatter::FORMAT_WIDTH), + 'PADDING_POSITION' => $c->getAttribute(\NumberFormatter::PADDING_POSITION), + 'SECONDARY_GROUPING_SIZE' => $c->getAttribute(\NumberFormatter::SECONDARY_GROUPING_SIZE), + 'SIGNIFICANT_DIGITS_USED' => $c->getAttribute(\NumberFormatter::SIGNIFICANT_DIGITS_USED), + 'MIN_SIGNIFICANT_DIGITS' => $c->getAttribute(\NumberFormatter::MIN_SIGNIFICANT_DIGITS), + 'MAX_SIGNIFICANT_DIGITS' => $c->getAttribute(\NumberFormatter::MAX_SIGNIFICANT_DIGITS), + 'LENIENT_PARSE' => $c->getAttribute(\NumberFormatter::LENIENT_PARSE), + ] + ), + Caster::PREFIX_VIRTUAL.'text_attributes' => new EnumStub( + [ + 'POSITIVE_PREFIX' => $c->getTextAttribute(\NumberFormatter::POSITIVE_PREFIX), + 'POSITIVE_SUFFIX' => $c->getTextAttribute(\NumberFormatter::POSITIVE_SUFFIX), + 'NEGATIVE_PREFIX' => $c->getTextAttribute(\NumberFormatter::NEGATIVE_PREFIX), + 'NEGATIVE_SUFFIX' => $c->getTextAttribute(\NumberFormatter::NEGATIVE_SUFFIX), + 'PADDING_CHARACTER' => $c->getTextAttribute(\NumberFormatter::PADDING_CHARACTER), + 'CURRENCY_CODE' => $c->getTextAttribute(\NumberFormatter::CURRENCY_CODE), + 'DEFAULT_RULESET' => $c->getTextAttribute(\NumberFormatter::DEFAULT_RULESET), + 'PUBLIC_RULESETS' => $c->getTextAttribute(\NumberFormatter::PUBLIC_RULESETS), + ] + ), + Caster::PREFIX_VIRTUAL.'symbols' => new EnumStub( + [ + 'DECIMAL_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::DECIMAL_SEPARATOR_SYMBOL), + 'GROUPING_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::GROUPING_SEPARATOR_SYMBOL), + 'PATTERN_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::PATTERN_SEPARATOR_SYMBOL), + 'PERCENT_SYMBOL' => $c->getSymbol(\NumberFormatter::PERCENT_SYMBOL), + 'ZERO_DIGIT_SYMBOL' => $c->getSymbol(\NumberFormatter::ZERO_DIGIT_SYMBOL), + 'DIGIT_SYMBOL' => $c->getSymbol(\NumberFormatter::DIGIT_SYMBOL), + 'MINUS_SIGN_SYMBOL' => $c->getSymbol(\NumberFormatter::MINUS_SIGN_SYMBOL), + 'PLUS_SIGN_SYMBOL' => $c->getSymbol(\NumberFormatter::PLUS_SIGN_SYMBOL), + 'CURRENCY_SYMBOL' => $c->getSymbol(\NumberFormatter::CURRENCY_SYMBOL), + 'INTL_CURRENCY_SYMBOL' => $c->getSymbol(\NumberFormatter::INTL_CURRENCY_SYMBOL), + 'MONETARY_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::MONETARY_SEPARATOR_SYMBOL), + 'EXPONENTIAL_SYMBOL' => $c->getSymbol(\NumberFormatter::EXPONENTIAL_SYMBOL), + 'PERMILL_SYMBOL' => $c->getSymbol(\NumberFormatter::PERMILL_SYMBOL), + 'PAD_ESCAPE_SYMBOL' => $c->getSymbol(\NumberFormatter::PAD_ESCAPE_SYMBOL), + 'INFINITY_SYMBOL' => $c->getSymbol(\NumberFormatter::INFINITY_SYMBOL), + 'NAN_SYMBOL' => $c->getSymbol(\NumberFormatter::NAN_SYMBOL), + 'SIGNIFICANT_DIGIT_SYMBOL' => $c->getSymbol(\NumberFormatter::SIGNIFICANT_DIGIT_SYMBOL), + 'MONETARY_GROUPING_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::MONETARY_GROUPING_SEPARATOR_SYMBOL), + ] + ), + ]; + + return self::castError($c, $a); + } + + public static function castIntlTimeZone(\IntlTimeZone $c, array $a, Stub $stub, bool $isNested) + { + $a += [ + Caster::PREFIX_VIRTUAL.'display_name' => $c->getDisplayName(), + Caster::PREFIX_VIRTUAL.'id' => $c->getID(), + Caster::PREFIX_VIRTUAL.'raw_offset' => $c->getRawOffset(), + ]; + + if ($c->useDaylightTime()) { + $a += [ + Caster::PREFIX_VIRTUAL.'dst_savings' => $c->getDSTSavings(), + ]; + } + + return self::castError($c, $a); + } + + public static function castIntlCalendar(\IntlCalendar $c, array $a, Stub $stub, bool $isNested, int $filter = 0) + { + $a += [ + Caster::PREFIX_VIRTUAL.'type' => $c->getType(), + Caster::PREFIX_VIRTUAL.'first_day_of_week' => $c->getFirstDayOfWeek(), + Caster::PREFIX_VIRTUAL.'minimal_days_in_first_week' => $c->getMinimalDaysInFirstWeek(), + Caster::PREFIX_VIRTUAL.'repeated_wall_time_option' => $c->getRepeatedWallTimeOption(), + Caster::PREFIX_VIRTUAL.'skipped_wall_time_option' => $c->getSkippedWallTimeOption(), + Caster::PREFIX_VIRTUAL.'time' => $c->getTime(), + Caster::PREFIX_VIRTUAL.'in_daylight_time' => $c->inDaylightTime(), + Caster::PREFIX_VIRTUAL.'is_lenient' => $c->isLenient(), + Caster::PREFIX_VIRTUAL.'time_zone' => ($filter & Caster::EXCLUDE_VERBOSE) ? new CutStub($c->getTimeZone()) : $c->getTimeZone(), + ]; + + return self::castError($c, $a); + } + + public static function castIntlDateFormatter(\IntlDateFormatter $c, array $a, Stub $stub, bool $isNested, int $filter = 0) + { + $a += [ + Caster::PREFIX_VIRTUAL.'locale' => $c->getLocale(), + Caster::PREFIX_VIRTUAL.'pattern' => $c->getPattern(), + Caster::PREFIX_VIRTUAL.'calendar' => $c->getCalendar(), + Caster::PREFIX_VIRTUAL.'time_zone_id' => $c->getTimeZoneId(), + Caster::PREFIX_VIRTUAL.'time_type' => $c->getTimeType(), + Caster::PREFIX_VIRTUAL.'date_type' => $c->getDateType(), + Caster::PREFIX_VIRTUAL.'calendar_object' => ($filter & Caster::EXCLUDE_VERBOSE) ? new CutStub($c->getCalendarObject()) : $c->getCalendarObject(), + Caster::PREFIX_VIRTUAL.'time_zone' => ($filter & Caster::EXCLUDE_VERBOSE) ? new CutStub($c->getTimeZone()) : $c->getTimeZone(), + ]; + + return self::castError($c, $a); + } + + private static function castError(object $c, array $a): array + { + if ($errorCode = $c->getErrorCode()) { + $a += [ + Caster::PREFIX_VIRTUAL.'error_code' => $errorCode, + Caster::PREFIX_VIRTUAL.'error_message' => $c->getErrorMessage(), + ]; + } + + return $a; + } +} diff --git a/vendor/symfony/var-dumper/Caster/LinkStub.php b/vendor/symfony/var-dumper/Caster/LinkStub.php new file mode 100644 index 0000000..36e0d3c --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/LinkStub.php @@ -0,0 +1,108 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +/** + * Represents a file or a URL. + * + * @author Nicolas Grekas + */ +class LinkStub extends ConstStub +{ + public $inVendor = false; + + private static array $vendorRoots; + private static array $composerRoots = []; + + public function __construct(string $label, int $line = 0, string $href = null) + { + $this->value = $label; + + if (null === $href) { + $href = $label; + } + if (!\is_string($href)) { + return; + } + if (str_starts_with($href, 'file://')) { + if ($href === $label) { + $label = substr($label, 7); + } + $href = substr($href, 7); + } elseif (str_contains($href, '://')) { + $this->attr['href'] = $href; + + return; + } + if (!is_file($href)) { + return; + } + if ($line) { + $this->attr['line'] = $line; + } + if ($label !== $this->attr['file'] = realpath($href) ?: $href) { + return; + } + if ($composerRoot = $this->getComposerRoot($href, $this->inVendor)) { + $this->attr['ellipsis'] = \strlen($href) - \strlen($composerRoot) + 1; + $this->attr['ellipsis-type'] = 'path'; + $this->attr['ellipsis-tail'] = 1 + ($this->inVendor ? 2 + \strlen(implode('', \array_slice(explode(\DIRECTORY_SEPARATOR, substr($href, 1 - $this->attr['ellipsis'])), 0, 2))) : 0); + } elseif (3 < \count($ellipsis = explode(\DIRECTORY_SEPARATOR, $href))) { + $this->attr['ellipsis'] = 2 + \strlen(implode('', \array_slice($ellipsis, -2))); + $this->attr['ellipsis-type'] = 'path'; + $this->attr['ellipsis-tail'] = 1; + } + } + + private function getComposerRoot(string $file, bool &$inVendor) + { + if (!isset(self::$vendorRoots)) { + self::$vendorRoots = []; + + foreach (get_declared_classes() as $class) { + if ('C' === $class[0] && str_starts_with($class, 'ComposerAutoloaderInit')) { + $r = new \ReflectionClass($class); + $v = \dirname($r->getFileName(), 2); + if (is_file($v.'/composer/installed.json')) { + self::$vendorRoots[] = $v.\DIRECTORY_SEPARATOR; + } + } + } + } + $inVendor = false; + + if (isset(self::$composerRoots[$dir = \dirname($file)])) { + return self::$composerRoots[$dir]; + } + + foreach (self::$vendorRoots as $root) { + if ($inVendor = str_starts_with($file, $root)) { + return $root; + } + } + + $parent = $dir; + while (!@is_file($parent.'/composer.json')) { + if (!@file_exists($parent)) { + // open_basedir restriction in effect + break; + } + if ($parent === \dirname($parent)) { + return self::$composerRoots[$dir] = false; + } + + $parent = \dirname($parent); + } + + return self::$composerRoots[$dir] = $parent.\DIRECTORY_SEPARATOR; + } +} diff --git a/vendor/symfony/var-dumper/Caster/MemcachedCaster.php b/vendor/symfony/var-dumper/Caster/MemcachedCaster.php new file mode 100644 index 0000000..d6baa25 --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/MemcachedCaster.php @@ -0,0 +1,81 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * @author Jan Schädlich + * + * @final + */ +class MemcachedCaster +{ + private static array $optionConstants; + private static array $defaultOptions; + + public static function castMemcached(\Memcached $c, array $a, Stub $stub, bool $isNested) + { + $a += [ + Caster::PREFIX_VIRTUAL.'servers' => $c->getServerList(), + Caster::PREFIX_VIRTUAL.'options' => new EnumStub( + self::getNonDefaultOptions($c) + ), + ]; + + return $a; + } + + private static function getNonDefaultOptions(\Memcached $c): array + { + self::$defaultOptions = self::$defaultOptions ?? self::discoverDefaultOptions(); + self::$optionConstants = self::$optionConstants ?? self::getOptionConstants(); + + $nonDefaultOptions = []; + foreach (self::$optionConstants as $constantKey => $value) { + if (self::$defaultOptions[$constantKey] !== $option = $c->getOption($value)) { + $nonDefaultOptions[$constantKey] = $option; + } + } + + return $nonDefaultOptions; + } + + private static function discoverDefaultOptions(): array + { + $defaultMemcached = new \Memcached(); + $defaultMemcached->addServer('127.0.0.1', 11211); + + $defaultOptions = []; + self::$optionConstants = self::$optionConstants ?? self::getOptionConstants(); + + foreach (self::$optionConstants as $constantKey => $value) { + $defaultOptions[$constantKey] = $defaultMemcached->getOption($value); + } + + return $defaultOptions; + } + + private static function getOptionConstants(): array + { + $reflectedMemcached = new \ReflectionClass(\Memcached::class); + + $optionConstants = []; + foreach ($reflectedMemcached->getConstants() as $constantKey => $value) { + if (str_starts_with($constantKey, 'OPT_')) { + $optionConstants[$constantKey] = $value; + } + } + + return $optionConstants; + } +} diff --git a/vendor/symfony/var-dumper/Caster/MysqliCaster.php b/vendor/symfony/var-dumper/Caster/MysqliCaster.php new file mode 100644 index 0000000..bfe6f08 --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/MysqliCaster.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * @author Nicolas Grekas + * + * @internal + */ +final class MysqliCaster +{ + public static function castMysqliDriver(\mysqli_driver $c, array $a, Stub $stub, bool $isNested): array + { + foreach ($a as $k => $v) { + if (isset($c->$k)) { + $a[$k] = $c->$k; + } + } + + return $a; + } +} diff --git a/vendor/symfony/var-dumper/Caster/PdoCaster.php b/vendor/symfony/var-dumper/Caster/PdoCaster.php new file mode 100644 index 0000000..140473b --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/PdoCaster.php @@ -0,0 +1,122 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts PDO related classes to array representation. + * + * @author Nicolas Grekas + * + * @final + */ +class PdoCaster +{ + private const PDO_ATTRIBUTES = [ + 'CASE' => [ + \PDO::CASE_LOWER => 'LOWER', + \PDO::CASE_NATURAL => 'NATURAL', + \PDO::CASE_UPPER => 'UPPER', + ], + 'ERRMODE' => [ + \PDO::ERRMODE_SILENT => 'SILENT', + \PDO::ERRMODE_WARNING => 'WARNING', + \PDO::ERRMODE_EXCEPTION => 'EXCEPTION', + ], + 'TIMEOUT', + 'PREFETCH', + 'AUTOCOMMIT', + 'PERSISTENT', + 'DRIVER_NAME', + 'SERVER_INFO', + 'ORACLE_NULLS' => [ + \PDO::NULL_NATURAL => 'NATURAL', + \PDO::NULL_EMPTY_STRING => 'EMPTY_STRING', + \PDO::NULL_TO_STRING => 'TO_STRING', + ], + 'CLIENT_VERSION', + 'SERVER_VERSION', + 'STATEMENT_CLASS', + 'EMULATE_PREPARES', + 'CONNECTION_STATUS', + 'STRINGIFY_FETCHES', + 'DEFAULT_FETCH_MODE' => [ + \PDO::FETCH_ASSOC => 'ASSOC', + \PDO::FETCH_BOTH => 'BOTH', + \PDO::FETCH_LAZY => 'LAZY', + \PDO::FETCH_NUM => 'NUM', + \PDO::FETCH_OBJ => 'OBJ', + ], + ]; + + public static function castPdo(\PDO $c, array $a, Stub $stub, bool $isNested) + { + $attr = []; + $errmode = $c->getAttribute(\PDO::ATTR_ERRMODE); + $c->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); + + foreach (self::PDO_ATTRIBUTES as $k => $v) { + if (!isset($k[0])) { + $k = $v; + $v = []; + } + + try { + $attr[$k] = 'ERRMODE' === $k ? $errmode : $c->getAttribute(\constant('PDO::ATTR_'.$k)); + if ($v && isset($v[$attr[$k]])) { + $attr[$k] = new ConstStub($v[$attr[$k]], $attr[$k]); + } + } catch (\Exception $e) { + } + } + if (isset($attr[$k = 'STATEMENT_CLASS'][1])) { + if ($attr[$k][1]) { + $attr[$k][1] = new ArgsStub($attr[$k][1], '__construct', $attr[$k][0]); + } + $attr[$k][0] = new ClassStub($attr[$k][0]); + } + + $prefix = Caster::PREFIX_VIRTUAL; + $a += [ + $prefix.'inTransaction' => method_exists($c, 'inTransaction'), + $prefix.'errorInfo' => $c->errorInfo(), + $prefix.'attributes' => new EnumStub($attr), + ]; + + if ($a[$prefix.'inTransaction']) { + $a[$prefix.'inTransaction'] = $c->inTransaction(); + } else { + unset($a[$prefix.'inTransaction']); + } + + if (!isset($a[$prefix.'errorInfo'][1], $a[$prefix.'errorInfo'][2])) { + unset($a[$prefix.'errorInfo']); + } + + $c->setAttribute(\PDO::ATTR_ERRMODE, $errmode); + + return $a; + } + + public static function castPdoStatement(\PDOStatement $c, array $a, Stub $stub, bool $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + $a[$prefix.'errorInfo'] = $c->errorInfo(); + + if (!isset($a[$prefix.'errorInfo'][1], $a[$prefix.'errorInfo'][2])) { + unset($a[$prefix.'errorInfo']); + } + + return $a; + } +} diff --git a/vendor/symfony/var-dumper/Caster/PgSqlCaster.php b/vendor/symfony/var-dumper/Caster/PgSqlCaster.php new file mode 100644 index 0000000..d8e5b52 --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/PgSqlCaster.php @@ -0,0 +1,156 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts pqsql resources to array representation. + * + * @author Nicolas Grekas + * + * @final + */ +class PgSqlCaster +{ + private const PARAM_CODES = [ + 'server_encoding', + 'client_encoding', + 'is_superuser', + 'session_authorization', + 'DateStyle', + 'TimeZone', + 'IntervalStyle', + 'integer_datetimes', + 'application_name', + 'standard_conforming_strings', + ]; + + private const TRANSACTION_STATUS = [ + \PGSQL_TRANSACTION_IDLE => 'PGSQL_TRANSACTION_IDLE', + \PGSQL_TRANSACTION_ACTIVE => 'PGSQL_TRANSACTION_ACTIVE', + \PGSQL_TRANSACTION_INTRANS => 'PGSQL_TRANSACTION_INTRANS', + \PGSQL_TRANSACTION_INERROR => 'PGSQL_TRANSACTION_INERROR', + \PGSQL_TRANSACTION_UNKNOWN => 'PGSQL_TRANSACTION_UNKNOWN', + ]; + + private const RESULT_STATUS = [ + \PGSQL_EMPTY_QUERY => 'PGSQL_EMPTY_QUERY', + \PGSQL_COMMAND_OK => 'PGSQL_COMMAND_OK', + \PGSQL_TUPLES_OK => 'PGSQL_TUPLES_OK', + \PGSQL_COPY_OUT => 'PGSQL_COPY_OUT', + \PGSQL_COPY_IN => 'PGSQL_COPY_IN', + \PGSQL_BAD_RESPONSE => 'PGSQL_BAD_RESPONSE', + \PGSQL_NONFATAL_ERROR => 'PGSQL_NONFATAL_ERROR', + \PGSQL_FATAL_ERROR => 'PGSQL_FATAL_ERROR', + ]; + + private const DIAG_CODES = [ + 'severity' => \PGSQL_DIAG_SEVERITY, + 'sqlstate' => \PGSQL_DIAG_SQLSTATE, + 'message' => \PGSQL_DIAG_MESSAGE_PRIMARY, + 'detail' => \PGSQL_DIAG_MESSAGE_DETAIL, + 'hint' => \PGSQL_DIAG_MESSAGE_HINT, + 'statement position' => \PGSQL_DIAG_STATEMENT_POSITION, + 'internal position' => \PGSQL_DIAG_INTERNAL_POSITION, + 'internal query' => \PGSQL_DIAG_INTERNAL_QUERY, + 'context' => \PGSQL_DIAG_CONTEXT, + 'file' => \PGSQL_DIAG_SOURCE_FILE, + 'line' => \PGSQL_DIAG_SOURCE_LINE, + 'function' => \PGSQL_DIAG_SOURCE_FUNCTION, + ]; + + public static function castLargeObject($lo, array $a, Stub $stub, bool $isNested) + { + $a['seek position'] = pg_lo_tell($lo); + + return $a; + } + + public static function castLink($link, array $a, Stub $stub, bool $isNested) + { + $a['status'] = pg_connection_status($link); + $a['status'] = new ConstStub(\PGSQL_CONNECTION_OK === $a['status'] ? 'PGSQL_CONNECTION_OK' : 'PGSQL_CONNECTION_BAD', $a['status']); + $a['busy'] = pg_connection_busy($link); + + $a['transaction'] = pg_transaction_status($link); + if (isset(self::TRANSACTION_STATUS[$a['transaction']])) { + $a['transaction'] = new ConstStub(self::TRANSACTION_STATUS[$a['transaction']], $a['transaction']); + } + + $a['pid'] = pg_get_pid($link); + $a['last error'] = pg_last_error($link); + $a['last notice'] = pg_last_notice($link); + $a['host'] = pg_host($link); + $a['port'] = pg_port($link); + $a['dbname'] = pg_dbname($link); + $a['options'] = pg_options($link); + $a['version'] = pg_version($link); + + foreach (self::PARAM_CODES as $v) { + if (false !== $s = pg_parameter_status($link, $v)) { + $a['param'][$v] = $s; + } + } + + $a['param']['client_encoding'] = pg_client_encoding($link); + $a['param'] = new EnumStub($a['param']); + + return $a; + } + + public static function castResult($result, array $a, Stub $stub, bool $isNested) + { + $a['num rows'] = pg_num_rows($result); + $a['status'] = pg_result_status($result); + if (isset(self::RESULT_STATUS[$a['status']])) { + $a['status'] = new ConstStub(self::RESULT_STATUS[$a['status']], $a['status']); + } + $a['command-completion tag'] = pg_result_status($result, \PGSQL_STATUS_STRING); + + if (-1 === $a['num rows']) { + foreach (self::DIAG_CODES as $k => $v) { + $a['error'][$k] = pg_result_error_field($result, $v); + } + } + + $a['affected rows'] = pg_affected_rows($result); + $a['last OID'] = pg_last_oid($result); + + $fields = pg_num_fields($result); + + for ($i = 0; $i < $fields; ++$i) { + $field = [ + 'name' => pg_field_name($result, $i), + 'table' => sprintf('%s (OID: %s)', pg_field_table($result, $i), pg_field_table($result, $i, true)), + 'type' => sprintf('%s (OID: %s)', pg_field_type($result, $i), pg_field_type_oid($result, $i)), + 'nullable' => (bool) pg_field_is_null($result, $i), + 'storage' => pg_field_size($result, $i).' bytes', + 'display' => pg_field_prtlen($result, $i).' chars', + ]; + if (' (OID: )' === $field['table']) { + $field['table'] = null; + } + if ('-1 bytes' === $field['storage']) { + $field['storage'] = 'variable size'; + } elseif ('1 bytes' === $field['storage']) { + $field['storage'] = '1 byte'; + } + if ('1 chars' === $field['display']) { + $field['display'] = '1 char'; + } + $a['fields'][] = new EnumStub($field); + } + + return $a; + } +} diff --git a/vendor/symfony/var-dumper/Caster/ProxyManagerCaster.php b/vendor/symfony/var-dumper/Caster/ProxyManagerCaster.php new file mode 100644 index 0000000..e712019 --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/ProxyManagerCaster.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use ProxyManager\Proxy\ProxyInterface; +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * @author Nicolas Grekas + * + * @final + */ +class ProxyManagerCaster +{ + public static function castProxy(ProxyInterface $c, array $a, Stub $stub, bool $isNested) + { + if ($parent = get_parent_class($c)) { + $stub->class .= ' - '.$parent; + } + $stub->class .= '@proxy'; + + return $a; + } +} diff --git a/vendor/symfony/var-dumper/Caster/RdKafkaCaster.php b/vendor/symfony/var-dumper/Caster/RdKafkaCaster.php new file mode 100644 index 0000000..8053363 --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/RdKafkaCaster.php @@ -0,0 +1,186 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use RdKafka\Conf; +use RdKafka\Exception as RdKafkaException; +use RdKafka\KafkaConsumer; +use RdKafka\Message; +use RdKafka\Metadata\Broker as BrokerMetadata; +use RdKafka\Metadata\Collection as CollectionMetadata; +use RdKafka\Metadata\Partition as PartitionMetadata; +use RdKafka\Metadata\Topic as TopicMetadata; +use RdKafka\Topic; +use RdKafka\TopicConf; +use RdKafka\TopicPartition; +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts RdKafka related classes to array representation. + * + * @author Romain Neutron + */ +class RdKafkaCaster +{ + public static function castKafkaConsumer(KafkaConsumer $c, array $a, Stub $stub, bool $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + try { + $assignment = $c->getAssignment(); + } catch (RdKafkaException $e) { + $assignment = []; + } + + $a += [ + $prefix.'subscription' => $c->getSubscription(), + $prefix.'assignment' => $assignment, + ]; + + $a += self::extractMetadata($c); + + return $a; + } + + public static function castTopic(Topic $c, array $a, Stub $stub, bool $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + $a += [ + $prefix.'name' => $c->getName(), + ]; + + return $a; + } + + public static function castTopicPartition(TopicPartition $c, array $a) + { + $prefix = Caster::PREFIX_VIRTUAL; + + $a += [ + $prefix.'offset' => $c->getOffset(), + $prefix.'partition' => $c->getPartition(), + $prefix.'topic' => $c->getTopic(), + ]; + + return $a; + } + + public static function castMessage(Message $c, array $a, Stub $stub, bool $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + $a += [ + $prefix.'errstr' => $c->errstr(), + ]; + + return $a; + } + + public static function castConf(Conf $c, array $a, Stub $stub, bool $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + foreach ($c->dump() as $key => $value) { + $a[$prefix.$key] = $value; + } + + return $a; + } + + public static function castTopicConf(TopicConf $c, array $a, Stub $stub, bool $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + foreach ($c->dump() as $key => $value) { + $a[$prefix.$key] = $value; + } + + return $a; + } + + public static function castRdKafka(\RdKafka $c, array $a, Stub $stub, bool $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + $a += [ + $prefix.'out_q_len' => $c->getOutQLen(), + ]; + + $a += self::extractMetadata($c); + + return $a; + } + + public static function castCollectionMetadata(CollectionMetadata $c, array $a, Stub $stub, bool $isNested) + { + $a += iterator_to_array($c); + + return $a; + } + + public static function castTopicMetadata(TopicMetadata $c, array $a, Stub $stub, bool $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + $a += [ + $prefix.'name' => $c->getTopic(), + $prefix.'partitions' => $c->getPartitions(), + ]; + + return $a; + } + + public static function castPartitionMetadata(PartitionMetadata $c, array $a, Stub $stub, bool $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + $a += [ + $prefix.'id' => $c->getId(), + $prefix.'err' => $c->getErr(), + $prefix.'leader' => $c->getLeader(), + ]; + + return $a; + } + + public static function castBrokerMetadata(BrokerMetadata $c, array $a, Stub $stub, bool $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + $a += [ + $prefix.'id' => $c->getId(), + $prefix.'host' => $c->getHost(), + $prefix.'port' => $c->getPort(), + ]; + + return $a; + } + + private static function extractMetadata(KafkaConsumer|\RdKafka $c) + { + $prefix = Caster::PREFIX_VIRTUAL; + + try { + $m = $c->getMetadata(true, null, 500); + } catch (RdKafkaException $e) { + return []; + } + + return [ + $prefix.'orig_broker_id' => $m->getOrigBrokerId(), + $prefix.'orig_broker_name' => $m->getOrigBrokerName(), + $prefix.'brokers' => $m->getBrokers(), + $prefix.'topics' => $m->getTopics(), + ]; + } +} diff --git a/vendor/symfony/var-dumper/Caster/RedisCaster.php b/vendor/symfony/var-dumper/Caster/RedisCaster.php new file mode 100644 index 0000000..eac25a1 --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/RedisCaster.php @@ -0,0 +1,149 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts Redis class from ext-redis to array representation. + * + * @author Nicolas Grekas + * + * @final + */ +class RedisCaster +{ + private const SERIALIZERS = [ + \Redis::SERIALIZER_NONE => 'NONE', + \Redis::SERIALIZER_PHP => 'PHP', + 2 => 'IGBINARY', // Optional Redis::SERIALIZER_IGBINARY + ]; + + private const MODES = [ + \Redis::ATOMIC => 'ATOMIC', + \Redis::MULTI => 'MULTI', + \Redis::PIPELINE => 'PIPELINE', + ]; + + private const COMPRESSION_MODES = [ + 0 => 'NONE', // Redis::COMPRESSION_NONE + 1 => 'LZF', // Redis::COMPRESSION_LZF + ]; + + private const FAILOVER_OPTIONS = [ + \RedisCluster::FAILOVER_NONE => 'NONE', + \RedisCluster::FAILOVER_ERROR => 'ERROR', + \RedisCluster::FAILOVER_DISTRIBUTE => 'DISTRIBUTE', + \RedisCluster::FAILOVER_DISTRIBUTE_SLAVES => 'DISTRIBUTE_SLAVES', + ]; + + public static function castRedis(\Redis $c, array $a, Stub $stub, bool $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + if (!$connected = $c->isConnected()) { + return $a + [ + $prefix.'isConnected' => $connected, + ]; + } + + $mode = $c->getMode(); + + return $a + [ + $prefix.'isConnected' => $connected, + $prefix.'host' => $c->getHost(), + $prefix.'port' => $c->getPort(), + $prefix.'auth' => $c->getAuth(), + $prefix.'mode' => isset(self::MODES[$mode]) ? new ConstStub(self::MODES[$mode], $mode) : $mode, + $prefix.'dbNum' => $c->getDbNum(), + $prefix.'timeout' => $c->getTimeout(), + $prefix.'lastError' => $c->getLastError(), + $prefix.'persistentId' => $c->getPersistentID(), + $prefix.'options' => self::getRedisOptions($c), + ]; + } + + public static function castRedisArray(\RedisArray $c, array $a, Stub $stub, bool $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + return $a + [ + $prefix.'hosts' => $c->_hosts(), + $prefix.'function' => ClassStub::wrapCallable($c->_function()), + $prefix.'lastError' => $c->getLastError(), + $prefix.'options' => self::getRedisOptions($c), + ]; + } + + public static function castRedisCluster(\RedisCluster $c, array $a, Stub $stub, bool $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + $failover = $c->getOption(\RedisCluster::OPT_SLAVE_FAILOVER); + + $a += [ + $prefix.'_masters' => $c->_masters(), + $prefix.'_redir' => $c->_redir(), + $prefix.'mode' => new ConstStub($c->getMode() ? 'MULTI' : 'ATOMIC', $c->getMode()), + $prefix.'lastError' => $c->getLastError(), + $prefix.'options' => self::getRedisOptions($c, [ + 'SLAVE_FAILOVER' => isset(self::FAILOVER_OPTIONS[$failover]) ? new ConstStub(self::FAILOVER_OPTIONS[$failover], $failover) : $failover, + ]), + ]; + + return $a; + } + + private static function getRedisOptions(\Redis|\RedisArray|\RedisCluster $redis, array $options = []): EnumStub + { + $serializer = $redis->getOption(\Redis::OPT_SERIALIZER); + if (\is_array($serializer)) { + foreach ($serializer as &$v) { + if (isset(self::SERIALIZERS[$v])) { + $v = new ConstStub(self::SERIALIZERS[$v], $v); + } + } + } elseif (isset(self::SERIALIZERS[$serializer])) { + $serializer = new ConstStub(self::SERIALIZERS[$serializer], $serializer); + } + + $compression = \defined('Redis::OPT_COMPRESSION') ? $redis->getOption(\Redis::OPT_COMPRESSION) : 0; + if (\is_array($compression)) { + foreach ($compression as &$v) { + if (isset(self::COMPRESSION_MODES[$v])) { + $v = new ConstStub(self::COMPRESSION_MODES[$v], $v); + } + } + } elseif (isset(self::COMPRESSION_MODES[$compression])) { + $compression = new ConstStub(self::COMPRESSION_MODES[$compression], $compression); + } + + $retry = \defined('Redis::OPT_SCAN') ? $redis->getOption(\Redis::OPT_SCAN) : 0; + if (\is_array($retry)) { + foreach ($retry as &$v) { + $v = new ConstStub($v ? 'RETRY' : 'NORETRY', $v); + } + } else { + $retry = new ConstStub($retry ? 'RETRY' : 'NORETRY', $retry); + } + + $options += [ + 'TCP_KEEPALIVE' => \defined('Redis::OPT_TCP_KEEPALIVE') ? $redis->getOption(\Redis::OPT_TCP_KEEPALIVE) : 0, + 'READ_TIMEOUT' => $redis->getOption(\Redis::OPT_READ_TIMEOUT), + 'COMPRESSION' => $compression, + 'SERIALIZER' => $serializer, + 'PREFIX' => $redis->getOption(\Redis::OPT_PREFIX), + 'SCAN' => $retry, + ]; + + return new EnumStub($options); + } +} diff --git a/vendor/symfony/var-dumper/Caster/ReflectionCaster.php b/vendor/symfony/var-dumper/Caster/ReflectionCaster.php new file mode 100644 index 0000000..ef5f15d --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/ReflectionCaster.php @@ -0,0 +1,440 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts Reflector related classes to array representation. + * + * @author Nicolas Grekas + * + * @final + */ +class ReflectionCaster +{ + public const UNSET_CLOSURE_FILE_INFO = ['Closure' => __CLASS__.'::unsetClosureFileInfo']; + + private const EXTRA_MAP = [ + 'docComment' => 'getDocComment', + 'extension' => 'getExtensionName', + 'isDisabled' => 'isDisabled', + 'isDeprecated' => 'isDeprecated', + 'isInternal' => 'isInternal', + 'isUserDefined' => 'isUserDefined', + 'isGenerator' => 'isGenerator', + 'isVariadic' => 'isVariadic', + ]; + + public static function castClosure(\Closure $c, array $a, Stub $stub, bool $isNested, int $filter = 0) + { + $prefix = Caster::PREFIX_VIRTUAL; + $c = new \ReflectionFunction($c); + + $a = static::castFunctionAbstract($c, $a, $stub, $isNested, $filter); + + if (!str_contains($c->name, '{closure}')) { + $stub->class = isset($a[$prefix.'class']) ? $a[$prefix.'class']->value.'::'.$c->name : $c->name; + unset($a[$prefix.'class']); + } + unset($a[$prefix.'extra']); + + $stub->class .= self::getSignature($a); + + if ($f = $c->getFileName()) { + $stub->attr['file'] = $f; + $stub->attr['line'] = $c->getStartLine(); + } + + unset($a[$prefix.'parameters']); + + if ($filter & Caster::EXCLUDE_VERBOSE) { + $stub->cut += ($c->getFileName() ? 2 : 0) + \count($a); + + return []; + } + + if ($f) { + $a[$prefix.'file'] = new LinkStub($f, $c->getStartLine()); + $a[$prefix.'line'] = $c->getStartLine().' to '.$c->getEndLine(); + } + + return $a; + } + + public static function unsetClosureFileInfo(\Closure $c, array $a) + { + unset($a[Caster::PREFIX_VIRTUAL.'file'], $a[Caster::PREFIX_VIRTUAL.'line']); + + return $a; + } + + public static function castGenerator(\Generator $c, array $a, Stub $stub, bool $isNested) + { + // Cannot create ReflectionGenerator based on a terminated Generator + try { + $reflectionGenerator = new \ReflectionGenerator($c); + } catch (\Exception $e) { + $a[Caster::PREFIX_VIRTUAL.'closed'] = true; + + return $a; + } + + return self::castReflectionGenerator($reflectionGenerator, $a, $stub, $isNested); + } + + public static function castType(\ReflectionType $c, array $a, Stub $stub, bool $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + if ($c instanceof \ReflectionNamedType) { + $a += [ + $prefix.'name' => $c instanceof \ReflectionNamedType ? $c->getName() : (string) $c, + $prefix.'allowsNull' => $c->allowsNull(), + $prefix.'isBuiltin' => $c->isBuiltin(), + ]; + } elseif ($c instanceof \ReflectionUnionType || $c instanceof \ReflectionIntersectionType) { + $a[$prefix.'allowsNull'] = $c->allowsNull(); + self::addMap($a, $c, [ + 'types' => 'getTypes', + ]); + } else { + $a[$prefix.'allowsNull'] = $c->allowsNull(); + } + + return $a; + } + + public static function castAttribute(\ReflectionAttribute $c, array $a, Stub $stub, bool $isNested) + { + self::addMap($a, $c, [ + 'name' => 'getName', + 'arguments' => 'getArguments', + ]); + + return $a; + } + + public static function castReflectionGenerator(\ReflectionGenerator $c, array $a, Stub $stub, bool $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + if ($c->getThis()) { + $a[$prefix.'this'] = new CutStub($c->getThis()); + } + $function = $c->getFunction(); + $frame = [ + 'class' => $function->class ?? null, + 'type' => isset($function->class) ? ($function->isStatic() ? '::' : '->') : null, + 'function' => $function->name, + 'file' => $c->getExecutingFile(), + 'line' => $c->getExecutingLine(), + ]; + if ($trace = $c->getTrace(\DEBUG_BACKTRACE_IGNORE_ARGS)) { + $function = new \ReflectionGenerator($c->getExecutingGenerator()); + array_unshift($trace, [ + 'function' => 'yield', + 'file' => $function->getExecutingFile(), + 'line' => $function->getExecutingLine() - (int) (\PHP_VERSION_ID < 80100), + ]); + $trace[] = $frame; + $a[$prefix.'trace'] = new TraceStub($trace, false, 0, -1, -1); + } else { + $function = new FrameStub($frame, false, true); + $function = ExceptionCaster::castFrameStub($function, [], $function, true); + $a[$prefix.'executing'] = $function[$prefix.'src']; + } + + $a[Caster::PREFIX_VIRTUAL.'closed'] = false; + + return $a; + } + + public static function castClass(\ReflectionClass $c, array $a, Stub $stub, bool $isNested, int $filter = 0) + { + $prefix = Caster::PREFIX_VIRTUAL; + + if ($n = \Reflection::getModifierNames($c->getModifiers())) { + $a[$prefix.'modifiers'] = implode(' ', $n); + } + + self::addMap($a, $c, [ + 'extends' => 'getParentClass', + 'implements' => 'getInterfaceNames', + 'constants' => 'getReflectionConstants', + ]); + + foreach ($c->getProperties() as $n) { + $a[$prefix.'properties'][$n->name] = $n; + } + + foreach ($c->getMethods() as $n) { + $a[$prefix.'methods'][$n->name] = $n; + } + + self::addAttributes($a, $c, $prefix); + + if (!($filter & Caster::EXCLUDE_VERBOSE) && !$isNested) { + self::addExtra($a, $c); + } + + return $a; + } + + public static function castFunctionAbstract(\ReflectionFunctionAbstract $c, array $a, Stub $stub, bool $isNested, int $filter = 0) + { + $prefix = Caster::PREFIX_VIRTUAL; + + self::addMap($a, $c, [ + 'returnsReference' => 'returnsReference', + 'returnType' => 'getReturnType', + 'class' => \PHP_VERSION_ID >= 80111 ? 'getClosureCalledClass' : 'getClosureScopeClass', + 'this' => 'getClosureThis', + ]); + + if (isset($a[$prefix.'returnType'])) { + $v = $a[$prefix.'returnType']; + $v = $v instanceof \ReflectionNamedType ? $v->getName() : (string) $v; + $a[$prefix.'returnType'] = new ClassStub($a[$prefix.'returnType'] instanceof \ReflectionNamedType && $a[$prefix.'returnType']->allowsNull() && 'mixed' !== $v ? '?'.$v : $v, [class_exists($v, false) || interface_exists($v, false) || trait_exists($v, false) ? $v : '', '']); + } + if (isset($a[$prefix.'class'])) { + $a[$prefix.'class'] = new ClassStub($a[$prefix.'class']); + } + if (isset($a[$prefix.'this'])) { + $a[$prefix.'this'] = new CutStub($a[$prefix.'this']); + } + + foreach ($c->getParameters() as $v) { + $k = '$'.$v->name; + if ($v->isVariadic()) { + $k = '...'.$k; + } + if ($v->isPassedByReference()) { + $k = '&'.$k; + } + $a[$prefix.'parameters'][$k] = $v; + } + if (isset($a[$prefix.'parameters'])) { + $a[$prefix.'parameters'] = new EnumStub($a[$prefix.'parameters']); + } + + self::addAttributes($a, $c, $prefix); + + if (!($filter & Caster::EXCLUDE_VERBOSE) && $v = $c->getStaticVariables()) { + foreach ($v as $k => &$v) { + if (\is_object($v)) { + $a[$prefix.'use']['$'.$k] = new CutStub($v); + } else { + $a[$prefix.'use']['$'.$k] = &$v; + } + } + unset($v); + $a[$prefix.'use'] = new EnumStub($a[$prefix.'use']); + } + + if (!($filter & Caster::EXCLUDE_VERBOSE) && !$isNested) { + self::addExtra($a, $c); + } + + return $a; + } + + public static function castClassConstant(\ReflectionClassConstant $c, array $a, Stub $stub, bool $isNested) + { + $a[Caster::PREFIX_VIRTUAL.'modifiers'] = implode(' ', \Reflection::getModifierNames($c->getModifiers())); + $a[Caster::PREFIX_VIRTUAL.'value'] = $c->getValue(); + + self::addAttributes($a, $c); + + return $a; + } + + public static function castMethod(\ReflectionMethod $c, array $a, Stub $stub, bool $isNested) + { + $a[Caster::PREFIX_VIRTUAL.'modifiers'] = implode(' ', \Reflection::getModifierNames($c->getModifiers())); + + return $a; + } + + public static function castParameter(\ReflectionParameter $c, array $a, Stub $stub, bool $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + self::addMap($a, $c, [ + 'position' => 'getPosition', + 'isVariadic' => 'isVariadic', + 'byReference' => 'isPassedByReference', + 'allowsNull' => 'allowsNull', + ]); + + self::addAttributes($a, $c, $prefix); + + if ($v = $c->getType()) { + $a[$prefix.'typeHint'] = $v instanceof \ReflectionNamedType ? $v->getName() : (string) $v; + } + + if (isset($a[$prefix.'typeHint'])) { + $v = $a[$prefix.'typeHint']; + $a[$prefix.'typeHint'] = new ClassStub($v, [class_exists($v, false) || interface_exists($v, false) || trait_exists($v, false) ? $v : '', '']); + } else { + unset($a[$prefix.'allowsNull']); + } + + if ($c->isOptional()) { + try { + $a[$prefix.'default'] = $v = $c->getDefaultValue(); + if ($c->isDefaultValueConstant()) { + $a[$prefix.'default'] = new ConstStub($c->getDefaultValueConstantName(), $v); + } + if (null === $v) { + unset($a[$prefix.'allowsNull']); + } + } catch (\ReflectionException $e) { + } + } + + return $a; + } + + public static function castProperty(\ReflectionProperty $c, array $a, Stub $stub, bool $isNested) + { + $a[Caster::PREFIX_VIRTUAL.'modifiers'] = implode(' ', \Reflection::getModifierNames($c->getModifiers())); + + self::addAttributes($a, $c); + self::addExtra($a, $c); + + return $a; + } + + public static function castReference(\ReflectionReference $c, array $a, Stub $stub, bool $isNested) + { + $a[Caster::PREFIX_VIRTUAL.'id'] = $c->getId(); + + return $a; + } + + public static function castExtension(\ReflectionExtension $c, array $a, Stub $stub, bool $isNested) + { + self::addMap($a, $c, [ + 'version' => 'getVersion', + 'dependencies' => 'getDependencies', + 'iniEntries' => 'getIniEntries', + 'isPersistent' => 'isPersistent', + 'isTemporary' => 'isTemporary', + 'constants' => 'getConstants', + 'functions' => 'getFunctions', + 'classes' => 'getClasses', + ]); + + return $a; + } + + public static function castZendExtension(\ReflectionZendExtension $c, array $a, Stub $stub, bool $isNested) + { + self::addMap($a, $c, [ + 'version' => 'getVersion', + 'author' => 'getAuthor', + 'copyright' => 'getCopyright', + 'url' => 'getURL', + ]); + + return $a; + } + + public static function getSignature(array $a) + { + $prefix = Caster::PREFIX_VIRTUAL; + $signature = ''; + + if (isset($a[$prefix.'parameters'])) { + foreach ($a[$prefix.'parameters']->value as $k => $param) { + $signature .= ', '; + if ($type = $param->getType()) { + if (!$type instanceof \ReflectionNamedType) { + $signature .= $type.' '; + } else { + if (!$param->isOptional() && $param->allowsNull() && 'mixed' !== $type->getName()) { + $signature .= '?'; + } + $signature .= substr(strrchr('\\'.$type->getName(), '\\'), 1).' '; + } + } + $signature .= $k; + + if (!$param->isDefaultValueAvailable()) { + continue; + } + $v = $param->getDefaultValue(); + $signature .= ' = '; + + if ($param->isDefaultValueConstant()) { + $signature .= substr(strrchr('\\'.$param->getDefaultValueConstantName(), '\\'), 1); + } elseif (null === $v) { + $signature .= 'null'; + } elseif (\is_array($v)) { + $signature .= $v ? '[…'.\count($v).']' : '[]'; + } elseif (\is_string($v)) { + $signature .= 10 > \strlen($v) && !str_contains($v, '\\') ? "'{$v}'" : "'…".\strlen($v)."'"; + } elseif (\is_bool($v)) { + $signature .= $v ? 'true' : 'false'; + } elseif (\is_object($v)) { + $signature .= 'new '.substr(strrchr('\\'.get_debug_type($v), '\\'), 1); + } else { + $signature .= $v; + } + } + } + $signature = (empty($a[$prefix.'returnsReference']) ? '' : '&').'('.substr($signature, 2).')'; + + if (isset($a[$prefix.'returnType'])) { + $signature .= ': '.substr(strrchr('\\'.$a[$prefix.'returnType'], '\\'), 1); + } + + return $signature; + } + + private static function addExtra(array &$a, \Reflector $c) + { + $x = isset($a[Caster::PREFIX_VIRTUAL.'extra']) ? $a[Caster::PREFIX_VIRTUAL.'extra']->value : []; + + if (method_exists($c, 'getFileName') && $m = $c->getFileName()) { + $x['file'] = new LinkStub($m, $c->getStartLine()); + $x['line'] = $c->getStartLine().' to '.$c->getEndLine(); + } + + self::addMap($x, $c, self::EXTRA_MAP, ''); + + if ($x) { + $a[Caster::PREFIX_VIRTUAL.'extra'] = new EnumStub($x); + } + } + + private static function addMap(array &$a, object $c, array $map, string $prefix = Caster::PREFIX_VIRTUAL) + { + foreach ($map as $k => $m) { + if ('isDisabled' === $k) { + continue; + } + + if (method_exists($c, $m) && false !== ($m = $c->$m()) && null !== $m) { + $a[$prefix.$k] = $m instanceof \Reflector ? $m->name : $m; + } + } + } + + private static function addAttributes(array &$a, \Reflector $c, string $prefix = Caster::PREFIX_VIRTUAL): void + { + foreach ($c->getAttributes() as $n) { + $a[$prefix.'attributes'][] = $n; + } + } +} diff --git a/vendor/symfony/var-dumper/Caster/ResourceCaster.php b/vendor/symfony/var-dumper/Caster/ResourceCaster.php new file mode 100644 index 0000000..4e597f8 --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/ResourceCaster.php @@ -0,0 +1,100 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts common resource types to array representation. + * + * @author Nicolas Grekas + * + * @final + */ +class ResourceCaster +{ + public static function castCurl(\CurlHandle $h, array $a, Stub $stub, bool $isNested): array + { + return curl_getinfo($h); + } + + public static function castDba($dba, array $a, Stub $stub, bool $isNested) + { + $list = dba_list(); + $a['file'] = $list[(int) $dba]; + + return $a; + } + + public static function castProcess($process, array $a, Stub $stub, bool $isNested) + { + return proc_get_status($process); + } + + public static function castStream($stream, array $a, Stub $stub, bool $isNested) + { + $a = stream_get_meta_data($stream) + static::castStreamContext($stream, $a, $stub, $isNested); + if ($a['uri'] ?? false) { + $a['uri'] = new LinkStub($a['uri']); + } + + return $a; + } + + public static function castStreamContext($stream, array $a, Stub $stub, bool $isNested) + { + return @stream_context_get_params($stream) ?: $a; + } + + public static function castGd($gd, array $a, Stub $stub, bool $isNested) + { + $a['size'] = imagesx($gd).'x'.imagesy($gd); + $a['trueColor'] = imageistruecolor($gd); + + return $a; + } + + public static function castMysqlLink($h, array $a, Stub $stub, bool $isNested) + { + $a['host'] = mysql_get_host_info($h); + $a['protocol'] = mysql_get_proto_info($h); + $a['server'] = mysql_get_server_info($h); + + return $a; + } + + public static function castOpensslX509($h, array $a, Stub $stub, bool $isNested) + { + $stub->cut = -1; + $info = openssl_x509_parse($h, false); + + $pin = openssl_pkey_get_public($h); + $pin = openssl_pkey_get_details($pin)['key']; + $pin = \array_slice(explode("\n", $pin), 1, -2); + $pin = base64_decode(implode('', $pin)); + $pin = base64_encode(hash('sha256', $pin, true)); + + $a += [ + 'subject' => new EnumStub(array_intersect_key($info['subject'], ['organizationName' => true, 'commonName' => true])), + 'issuer' => new EnumStub(array_intersect_key($info['issuer'], ['organizationName' => true, 'commonName' => true])), + 'expiry' => new ConstStub(date(\DateTime::ISO8601, $info['validTo_time_t']), $info['validTo_time_t']), + 'fingerprint' => new EnumStub([ + 'md5' => new ConstStub(wordwrap(strtoupper(openssl_x509_fingerprint($h, 'md5')), 2, ':', true)), + 'sha1' => new ConstStub(wordwrap(strtoupper(openssl_x509_fingerprint($h, 'sha1')), 2, ':', true)), + 'sha256' => new ConstStub(wordwrap(strtoupper(openssl_x509_fingerprint($h, 'sha256')), 2, ':', true)), + 'pin-sha256' => new ConstStub($pin), + ]), + ]; + + return $a; + } +} diff --git a/vendor/symfony/var-dumper/Caster/SplCaster.php b/vendor/symfony/var-dumper/Caster/SplCaster.php new file mode 100644 index 0000000..a51cace --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/SplCaster.php @@ -0,0 +1,234 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts SPL related classes to array representation. + * + * @author Nicolas Grekas + * + * @final + */ +class SplCaster +{ + private const SPL_FILE_OBJECT_FLAGS = [ + \SplFileObject::DROP_NEW_LINE => 'DROP_NEW_LINE', + \SplFileObject::READ_AHEAD => 'READ_AHEAD', + \SplFileObject::SKIP_EMPTY => 'SKIP_EMPTY', + \SplFileObject::READ_CSV => 'READ_CSV', + ]; + + public static function castArrayObject(\ArrayObject $c, array $a, Stub $stub, bool $isNested) + { + return self::castSplArray($c, $a, $stub, $isNested); + } + + public static function castArrayIterator(\ArrayIterator $c, array $a, Stub $stub, bool $isNested) + { + return self::castSplArray($c, $a, $stub, $isNested); + } + + public static function castHeap(\Iterator $c, array $a, Stub $stub, bool $isNested) + { + $a += [ + Caster::PREFIX_VIRTUAL.'heap' => iterator_to_array(clone $c), + ]; + + return $a; + } + + public static function castDoublyLinkedList(\SplDoublyLinkedList $c, array $a, Stub $stub, bool $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + $mode = $c->getIteratorMode(); + $c->setIteratorMode(\SplDoublyLinkedList::IT_MODE_KEEP | $mode & ~\SplDoublyLinkedList::IT_MODE_DELETE); + + $a += [ + $prefix.'mode' => new ConstStub((($mode & \SplDoublyLinkedList::IT_MODE_LIFO) ? 'IT_MODE_LIFO' : 'IT_MODE_FIFO').' | '.(($mode & \SplDoublyLinkedList::IT_MODE_DELETE) ? 'IT_MODE_DELETE' : 'IT_MODE_KEEP'), $mode), + $prefix.'dllist' => iterator_to_array($c), + ]; + $c->setIteratorMode($mode); + + return $a; + } + + public static function castFileInfo(\SplFileInfo $c, array $a, Stub $stub, bool $isNested) + { + static $map = [ + 'path' => 'getPath', + 'filename' => 'getFilename', + 'basename' => 'getBasename', + 'pathname' => 'getPathname', + 'extension' => 'getExtension', + 'realPath' => 'getRealPath', + 'aTime' => 'getATime', + 'mTime' => 'getMTime', + 'cTime' => 'getCTime', + 'inode' => 'getInode', + 'size' => 'getSize', + 'perms' => 'getPerms', + 'owner' => 'getOwner', + 'group' => 'getGroup', + 'type' => 'getType', + 'writable' => 'isWritable', + 'readable' => 'isReadable', + 'executable' => 'isExecutable', + 'file' => 'isFile', + 'dir' => 'isDir', + 'link' => 'isLink', + 'linkTarget' => 'getLinkTarget', + ]; + + $prefix = Caster::PREFIX_VIRTUAL; + unset($a["\0SplFileInfo\0fileName"]); + unset($a["\0SplFileInfo\0pathName"]); + + try { + $c->isReadable(); + } catch (\RuntimeException $e) { + if ('Object not initialized' !== $e->getMessage()) { + throw $e; + } + + $a[$prefix.'⚠'] = 'The parent constructor was not called: the object is in an invalid state'; + + return $a; + } catch (\Error $e) { + if ('Object not initialized' !== $e->getMessage()) { + throw $e; + } + + $a[$prefix.'⚠'] = 'The parent constructor was not called: the object is in an invalid state'; + + return $a; + } + + foreach ($map as $key => $accessor) { + try { + $a[$prefix.$key] = $c->$accessor(); + } catch (\Exception $e) { + } + } + + if ($a[$prefix.'realPath'] ?? false) { + $a[$prefix.'realPath'] = new LinkStub($a[$prefix.'realPath']); + } + + if (isset($a[$prefix.'perms'])) { + $a[$prefix.'perms'] = new ConstStub(sprintf('0%o', $a[$prefix.'perms']), $a[$prefix.'perms']); + } + + static $mapDate = ['aTime', 'mTime', 'cTime']; + foreach ($mapDate as $key) { + if (isset($a[$prefix.$key])) { + $a[$prefix.$key] = new ConstStub(date('Y-m-d H:i:s', $a[$prefix.$key]), $a[$prefix.$key]); + } + } + + return $a; + } + + public static function castFileObject(\SplFileObject $c, array $a, Stub $stub, bool $isNested) + { + static $map = [ + 'csvControl' => 'getCsvControl', + 'flags' => 'getFlags', + 'maxLineLen' => 'getMaxLineLen', + 'fstat' => 'fstat', + 'eof' => 'eof', + 'key' => 'key', + ]; + + $prefix = Caster::PREFIX_VIRTUAL; + + foreach ($map as $key => $accessor) { + try { + $a[$prefix.$key] = $c->$accessor(); + } catch (\Exception $e) { + } + } + + if (isset($a[$prefix.'flags'])) { + $flagsArray = []; + foreach (self::SPL_FILE_OBJECT_FLAGS as $value => $name) { + if ($a[$prefix.'flags'] & $value) { + $flagsArray[] = $name; + } + } + $a[$prefix.'flags'] = new ConstStub(implode('|', $flagsArray), $a[$prefix.'flags']); + } + + if (isset($a[$prefix.'fstat'])) { + $a[$prefix.'fstat'] = new CutArrayStub($a[$prefix.'fstat'], ['dev', 'ino', 'nlink', 'rdev', 'blksize', 'blocks']); + } + + return $a; + } + + public static function castObjectStorage(\SplObjectStorage $c, array $a, Stub $stub, bool $isNested) + { + $storage = []; + unset($a[Caster::PREFIX_DYNAMIC."\0gcdata"]); // Don't hit https://bugs.php.net/65967 + unset($a["\0SplObjectStorage\0storage"]); + + $clone = clone $c; + foreach ($clone as $obj) { + $storage[] = [ + 'object' => $obj, + 'info' => $clone->getInfo(), + ]; + } + + $a += [ + Caster::PREFIX_VIRTUAL.'storage' => $storage, + ]; + + return $a; + } + + public static function castOuterIterator(\OuterIterator $c, array $a, Stub $stub, bool $isNested) + { + $a[Caster::PREFIX_VIRTUAL.'innerIterator'] = $c->getInnerIterator(); + + return $a; + } + + public static function castWeakReference(\WeakReference $c, array $a, Stub $stub, bool $isNested) + { + $a[Caster::PREFIX_VIRTUAL.'object'] = $c->get(); + + return $a; + } + + private static function castSplArray(\ArrayObject|\ArrayIterator $c, array $a, Stub $stub, bool $isNested): array + { + $prefix = Caster::PREFIX_VIRTUAL; + $flags = $c->getFlags(); + + if (!($flags & \ArrayObject::STD_PROP_LIST)) { + $c->setFlags(\ArrayObject::STD_PROP_LIST); + $a = Caster::castObject($c, \get_class($c), method_exists($c, '__debugInfo'), $stub->class); + $c->setFlags($flags); + } + $a += [ + $prefix.'flag::STD_PROP_LIST' => (bool) ($flags & \ArrayObject::STD_PROP_LIST), + $prefix.'flag::ARRAY_AS_PROPS' => (bool) ($flags & \ArrayObject::ARRAY_AS_PROPS), + ]; + if ($c instanceof \ArrayObject) { + $a[$prefix.'iteratorClass'] = new ClassStub($c->getIteratorClass()); + } + + return $a; + } +} diff --git a/vendor/symfony/var-dumper/Caster/StubCaster.php b/vendor/symfony/var-dumper/Caster/StubCaster.php new file mode 100644 index 0000000..32ead7c --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/StubCaster.php @@ -0,0 +1,84 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts a caster's Stub. + * + * @author Nicolas Grekas + * + * @final + */ +class StubCaster +{ + public static function castStub(Stub $c, array $a, Stub $stub, bool $isNested) + { + if ($isNested) { + $stub->type = $c->type; + $stub->class = $c->class; + $stub->value = $c->value; + $stub->handle = $c->handle; + $stub->cut = $c->cut; + $stub->attr = $c->attr; + + if (Stub::TYPE_REF === $c->type && !$c->class && \is_string($c->value) && !preg_match('//u', $c->value)) { + $stub->type = Stub::TYPE_STRING; + $stub->class = Stub::STRING_BINARY; + } + + $a = []; + } + + return $a; + } + + public static function castCutArray(CutArrayStub $c, array $a, Stub $stub, bool $isNested) + { + return $isNested ? $c->preservedSubset : $a; + } + + public static function cutInternals($obj, array $a, Stub $stub, bool $isNested) + { + if ($isNested) { + $stub->cut += \count($a); + + return []; + } + + return $a; + } + + public static function castEnum(EnumStub $c, array $a, Stub $stub, bool $isNested) + { + if ($isNested) { + $stub->class = $c->dumpKeys ? '' : null; + $stub->handle = 0; + $stub->value = null; + $stub->cut = $c->cut; + $stub->attr = $c->attr; + + $a = []; + + if ($c->value) { + foreach (array_keys($c->value) as $k) { + $keys[] = !isset($k[0]) || "\0" !== $k[0] ? Caster::PREFIX_VIRTUAL.$k : $k; + } + // Preserve references with array_combine() + $a = array_combine($keys, $c->value); + } + } + + return $a; + } +} diff --git a/vendor/symfony/var-dumper/Caster/SymfonyCaster.php b/vendor/symfony/var-dumper/Caster/SymfonyCaster.php new file mode 100644 index 0000000..08428b9 --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/SymfonyCaster.php @@ -0,0 +1,97 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Uid\Ulid; +use Symfony\Component\Uid\Uuid; +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * @final + */ +class SymfonyCaster +{ + private const REQUEST_GETTERS = [ + 'pathInfo' => 'getPathInfo', + 'requestUri' => 'getRequestUri', + 'baseUrl' => 'getBaseUrl', + 'basePath' => 'getBasePath', + 'method' => 'getMethod', + 'format' => 'getRequestFormat', + ]; + + public static function castRequest(Request $request, array $a, Stub $stub, bool $isNested) + { + $clone = null; + + foreach (self::REQUEST_GETTERS as $prop => $getter) { + $key = Caster::PREFIX_PROTECTED.$prop; + if (\array_key_exists($key, $a) && null === $a[$key]) { + if (null === $clone) { + $clone = clone $request; + } + $a[Caster::PREFIX_VIRTUAL.$prop] = $clone->{$getter}(); + } + } + + return $a; + } + + public static function castHttpClient($client, array $a, Stub $stub, bool $isNested) + { + $multiKey = sprintf("\0%s\0multi", \get_class($client)); + if (isset($a[$multiKey])) { + $a[$multiKey] = new CutStub($a[$multiKey]); + } + + return $a; + } + + public static function castHttpClientResponse($response, array $a, Stub $stub, bool $isNested) + { + $stub->cut += \count($a); + $a = []; + + foreach ($response->getInfo() as $k => $v) { + $a[Caster::PREFIX_VIRTUAL.$k] = $v; + } + + return $a; + } + + public static function castUuid(Uuid $uuid, array $a, Stub $stub, bool $isNested) + { + $a[Caster::PREFIX_VIRTUAL.'toBase58'] = $uuid->toBase58(); + $a[Caster::PREFIX_VIRTUAL.'toBase32'] = $uuid->toBase32(); + + // symfony/uid >= 5.3 + if (method_exists($uuid, 'getDateTime')) { + $a[Caster::PREFIX_VIRTUAL.'time'] = $uuid->getDateTime()->format('Y-m-d H:i:s.u \U\T\C'); + } + + return $a; + } + + public static function castUlid(Ulid $ulid, array $a, Stub $stub, bool $isNested) + { + $a[Caster::PREFIX_VIRTUAL.'toBase58'] = $ulid->toBase58(); + $a[Caster::PREFIX_VIRTUAL.'toRfc4122'] = $ulid->toRfc4122(); + + // symfony/uid >= 5.3 + if (method_exists($ulid, 'getDateTime')) { + $a[Caster::PREFIX_VIRTUAL.'time'] = $ulid->getDateTime()->format('Y-m-d H:i:s.v \U\T\C'); + } + + return $a; + } +} diff --git a/vendor/symfony/var-dumper/Caster/TraceStub.php b/vendor/symfony/var-dumper/Caster/TraceStub.php new file mode 100644 index 0000000..5eea1c8 --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/TraceStub.php @@ -0,0 +1,36 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Represents a backtrace as returned by debug_backtrace() or Exception->getTrace(). + * + * @author Nicolas Grekas + */ +class TraceStub extends Stub +{ + public $keepArgs; + public $sliceOffset; + public $sliceLength; + public $numberingOffset; + + public function __construct(array $trace, bool $keepArgs = true, int $sliceOffset = 0, int $sliceLength = null, int $numberingOffset = 0) + { + $this->value = $trace; + $this->keepArgs = $keepArgs; + $this->sliceOffset = $sliceOffset; + $this->sliceLength = $sliceLength; + $this->numberingOffset = $numberingOffset; + } +} diff --git a/vendor/symfony/var-dumper/Caster/UuidCaster.php b/vendor/symfony/var-dumper/Caster/UuidCaster.php new file mode 100644 index 0000000..b102774 --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/UuidCaster.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Ramsey\Uuid\UuidInterface; +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * @author Grégoire Pineau + */ +final class UuidCaster +{ + public static function castRamseyUuid(UuidInterface $c, array $a, Stub $stub, bool $isNested): array + { + $a += [ + Caster::PREFIX_VIRTUAL.'uuid' => (string) $c, + ]; + + return $a; + } +} diff --git a/vendor/symfony/var-dumper/Caster/XmlReaderCaster.php b/vendor/symfony/var-dumper/Caster/XmlReaderCaster.php new file mode 100644 index 0000000..5b45565 --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/XmlReaderCaster.php @@ -0,0 +1,91 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts XmlReader class to array representation. + * + * @author Baptiste Clavié + * + * @final + */ +class XmlReaderCaster +{ + private const NODE_TYPES = [ + \XMLReader::NONE => 'NONE', + \XMLReader::ELEMENT => 'ELEMENT', + \XMLReader::ATTRIBUTE => 'ATTRIBUTE', + \XMLReader::TEXT => 'TEXT', + \XMLReader::CDATA => 'CDATA', + \XMLReader::ENTITY_REF => 'ENTITY_REF', + \XMLReader::ENTITY => 'ENTITY', + \XMLReader::PI => 'PI (Processing Instruction)', + \XMLReader::COMMENT => 'COMMENT', + \XMLReader::DOC => 'DOC', + \XMLReader::DOC_TYPE => 'DOC_TYPE', + \XMLReader::DOC_FRAGMENT => 'DOC_FRAGMENT', + \XMLReader::NOTATION => 'NOTATION', + \XMLReader::WHITESPACE => 'WHITESPACE', + \XMLReader::SIGNIFICANT_WHITESPACE => 'SIGNIFICANT_WHITESPACE', + \XMLReader::END_ELEMENT => 'END_ELEMENT', + \XMLReader::END_ENTITY => 'END_ENTITY', + \XMLReader::XML_DECLARATION => 'XML_DECLARATION', + ]; + + public static function castXmlReader(\XMLReader $reader, array $a, Stub $stub, bool $isNested) + { + try { + $properties = [ + 'LOADDTD' => @$reader->getParserProperty(\XMLReader::LOADDTD), + 'DEFAULTATTRS' => @$reader->getParserProperty(\XMLReader::DEFAULTATTRS), + 'VALIDATE' => @$reader->getParserProperty(\XMLReader::VALIDATE), + 'SUBST_ENTITIES' => @$reader->getParserProperty(\XMLReader::SUBST_ENTITIES), + ]; + } catch (\Error $e) { + $properties = [ + 'LOADDTD' => false, + 'DEFAULTATTRS' => false, + 'VALIDATE' => false, + 'SUBST_ENTITIES' => false, + ]; + } + + $props = Caster::PREFIX_VIRTUAL.'parserProperties'; + $info = [ + 'localName' => $reader->localName, + 'prefix' => $reader->prefix, + 'nodeType' => new ConstStub(self::NODE_TYPES[$reader->nodeType], $reader->nodeType), + 'depth' => $reader->depth, + 'isDefault' => $reader->isDefault, + 'isEmptyElement' => \XMLReader::NONE === $reader->nodeType ? null : $reader->isEmptyElement, + 'xmlLang' => $reader->xmlLang, + 'attributeCount' => $reader->attributeCount, + 'value' => $reader->value, + 'namespaceURI' => $reader->namespaceURI, + 'baseURI' => $reader->baseURI ? new LinkStub($reader->baseURI) : $reader->baseURI, + $props => $properties, + ]; + + if ($info[$props] = Caster::filter($info[$props], Caster::EXCLUDE_EMPTY, [], $count)) { + $info[$props] = new EnumStub($info[$props]); + $info[$props]->cut = $count; + } + + $info = Caster::filter($info, Caster::EXCLUDE_EMPTY, [], $count); + // +2 because hasValue and hasAttributes are always filtered + $stub->cut += $count + 2; + + return $a + $info; + } +} diff --git a/vendor/symfony/var-dumper/Caster/XmlResourceCaster.php b/vendor/symfony/var-dumper/Caster/XmlResourceCaster.php new file mode 100644 index 0000000..ba55fce --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/XmlResourceCaster.php @@ -0,0 +1,63 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts XML resources to array representation. + * + * @author Nicolas Grekas + * + * @final + */ +class XmlResourceCaster +{ + private const XML_ERRORS = [ + \XML_ERROR_NONE => 'XML_ERROR_NONE', + \XML_ERROR_NO_MEMORY => 'XML_ERROR_NO_MEMORY', + \XML_ERROR_SYNTAX => 'XML_ERROR_SYNTAX', + \XML_ERROR_NO_ELEMENTS => 'XML_ERROR_NO_ELEMENTS', + \XML_ERROR_INVALID_TOKEN => 'XML_ERROR_INVALID_TOKEN', + \XML_ERROR_UNCLOSED_TOKEN => 'XML_ERROR_UNCLOSED_TOKEN', + \XML_ERROR_PARTIAL_CHAR => 'XML_ERROR_PARTIAL_CHAR', + \XML_ERROR_TAG_MISMATCH => 'XML_ERROR_TAG_MISMATCH', + \XML_ERROR_DUPLICATE_ATTRIBUTE => 'XML_ERROR_DUPLICATE_ATTRIBUTE', + \XML_ERROR_JUNK_AFTER_DOC_ELEMENT => 'XML_ERROR_JUNK_AFTER_DOC_ELEMENT', + \XML_ERROR_PARAM_ENTITY_REF => 'XML_ERROR_PARAM_ENTITY_REF', + \XML_ERROR_UNDEFINED_ENTITY => 'XML_ERROR_UNDEFINED_ENTITY', + \XML_ERROR_RECURSIVE_ENTITY_REF => 'XML_ERROR_RECURSIVE_ENTITY_REF', + \XML_ERROR_ASYNC_ENTITY => 'XML_ERROR_ASYNC_ENTITY', + \XML_ERROR_BAD_CHAR_REF => 'XML_ERROR_BAD_CHAR_REF', + \XML_ERROR_BINARY_ENTITY_REF => 'XML_ERROR_BINARY_ENTITY_REF', + \XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF => 'XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF', + \XML_ERROR_MISPLACED_XML_PI => 'XML_ERROR_MISPLACED_XML_PI', + \XML_ERROR_UNKNOWN_ENCODING => 'XML_ERROR_UNKNOWN_ENCODING', + \XML_ERROR_INCORRECT_ENCODING => 'XML_ERROR_INCORRECT_ENCODING', + \XML_ERROR_UNCLOSED_CDATA_SECTION => 'XML_ERROR_UNCLOSED_CDATA_SECTION', + \XML_ERROR_EXTERNAL_ENTITY_HANDLING => 'XML_ERROR_EXTERNAL_ENTITY_HANDLING', + ]; + + public static function castXml($h, array $a, Stub $stub, bool $isNested) + { + $a['current_byte_index'] = xml_get_current_byte_index($h); + $a['current_column_number'] = xml_get_current_column_number($h); + $a['current_line_number'] = xml_get_current_line_number($h); + $a['error_code'] = xml_get_error_code($h); + + if (isset(self::XML_ERRORS[$a['error_code']])) { + $a['error_code'] = new ConstStub(self::XML_ERRORS[$a['error_code']], $a['error_code']); + } + + return $a; + } +} diff --git a/vendor/symfony/var-dumper/Cloner/AbstractCloner.php b/vendor/symfony/var-dumper/Cloner/AbstractCloner.php new file mode 100644 index 0000000..b835c03 --- /dev/null +++ b/vendor/symfony/var-dumper/Cloner/AbstractCloner.php @@ -0,0 +1,388 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Cloner; + +use Symfony\Component\VarDumper\Caster\Caster; +use Symfony\Component\VarDumper\Exception\ThrowingCasterException; + +/** + * AbstractCloner implements a generic caster mechanism for objects and resources. + * + * @author Nicolas Grekas + */ +abstract class AbstractCloner implements ClonerInterface +{ + public static $defaultCasters = [ + '__PHP_Incomplete_Class' => ['Symfony\Component\VarDumper\Caster\Caster', 'castPhpIncompleteClass'], + + 'Symfony\Component\VarDumper\Caster\CutStub' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'castStub'], + 'Symfony\Component\VarDumper\Caster\CutArrayStub' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'castCutArray'], + 'Symfony\Component\VarDumper\Caster\ConstStub' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'castStub'], + 'Symfony\Component\VarDumper\Caster\EnumStub' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'castEnum'], + + 'Fiber' => ['Symfony\Component\VarDumper\Caster\FiberCaster', 'castFiber'], + + 'Closure' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castClosure'], + 'Generator' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castGenerator'], + 'ReflectionType' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castType'], + 'ReflectionAttribute' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castAttribute'], + 'ReflectionGenerator' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castReflectionGenerator'], + 'ReflectionClass' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castClass'], + 'ReflectionClassConstant' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castClassConstant'], + 'ReflectionFunctionAbstract' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castFunctionAbstract'], + 'ReflectionMethod' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castMethod'], + 'ReflectionParameter' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castParameter'], + 'ReflectionProperty' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castProperty'], + 'ReflectionReference' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castReference'], + 'ReflectionExtension' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castExtension'], + 'ReflectionZendExtension' => ['Symfony\Component\VarDumper\Caster\ReflectionCaster', 'castZendExtension'], + + 'Doctrine\Common\Persistence\ObjectManager' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], + 'Doctrine\Common\Proxy\Proxy' => ['Symfony\Component\VarDumper\Caster\DoctrineCaster', 'castCommonProxy'], + 'Doctrine\ORM\Proxy\Proxy' => ['Symfony\Component\VarDumper\Caster\DoctrineCaster', 'castOrmProxy'], + 'Doctrine\ORM\PersistentCollection' => ['Symfony\Component\VarDumper\Caster\DoctrineCaster', 'castPersistentCollection'], + 'Doctrine\Persistence\ObjectManager' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], + + 'DOMException' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castException'], + 'DOMStringList' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], + 'DOMNameList' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], + 'DOMImplementation' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castImplementation'], + 'DOMImplementationList' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], + 'DOMNode' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castNode'], + 'DOMNameSpaceNode' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castNameSpaceNode'], + 'DOMDocument' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castDocument'], + 'DOMNodeList' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], + 'DOMNamedNodeMap' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLength'], + 'DOMCharacterData' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castCharacterData'], + 'DOMAttr' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castAttr'], + 'DOMElement' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castElement'], + 'DOMText' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castText'], + 'DOMTypeinfo' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castTypeinfo'], + 'DOMDomError' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castDomError'], + 'DOMLocator' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castLocator'], + 'DOMDocumentType' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castDocumentType'], + 'DOMNotation' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castNotation'], + 'DOMEntity' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castEntity'], + 'DOMProcessingInstruction' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castProcessingInstruction'], + 'DOMXPath' => ['Symfony\Component\VarDumper\Caster\DOMCaster', 'castXPath'], + + 'XMLReader' => ['Symfony\Component\VarDumper\Caster\XmlReaderCaster', 'castXmlReader'], + + 'ErrorException' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castErrorException'], + 'Exception' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castException'], + 'Error' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castError'], + 'Symfony\Bridge\Monolog\Logger' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], + 'Symfony\Component\DependencyInjection\ContainerInterface' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], + 'Symfony\Component\EventDispatcher\EventDispatcherInterface' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], + 'Symfony\Component\HttpClient\AmpHttpClient' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castHttpClient'], + 'Symfony\Component\HttpClient\CurlHttpClient' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castHttpClient'], + 'Symfony\Component\HttpClient\NativeHttpClient' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castHttpClient'], + 'Symfony\Component\HttpClient\Response\AmpResponse' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castHttpClientResponse'], + 'Symfony\Component\HttpClient\Response\CurlResponse' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castHttpClientResponse'], + 'Symfony\Component\HttpClient\Response\NativeResponse' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castHttpClientResponse'], + 'Symfony\Component\HttpFoundation\Request' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castRequest'], + 'Symfony\Component\Uid\Ulid' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castUlid'], + 'Symfony\Component\Uid\Uuid' => ['Symfony\Component\VarDumper\Caster\SymfonyCaster', 'castUuid'], + 'Symfony\Component\VarDumper\Exception\ThrowingCasterException' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castThrowingCasterException'], + 'Symfony\Component\VarDumper\Caster\TraceStub' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castTraceStub'], + 'Symfony\Component\VarDumper\Caster\FrameStub' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castFrameStub'], + 'Symfony\Component\VarDumper\Cloner\AbstractCloner' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], + 'Symfony\Component\ErrorHandler\Exception\SilencedErrorContext' => ['Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castSilencedErrorContext'], + + 'Imagine\Image\ImageInterface' => ['Symfony\Component\VarDumper\Caster\ImagineCaster', 'castImage'], + + 'Ramsey\Uuid\UuidInterface' => ['Symfony\Component\VarDumper\Caster\UuidCaster', 'castRamseyUuid'], + + 'ProxyManager\Proxy\ProxyInterface' => ['Symfony\Component\VarDumper\Caster\ProxyManagerCaster', 'castProxy'], + 'PHPUnit_Framework_MockObject_MockObject' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], + 'PHPUnit\Framework\MockObject\MockObject' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], + 'PHPUnit\Framework\MockObject\Stub' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], + 'Prophecy\Prophecy\ProphecySubjectInterface' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], + 'Mockery\MockInterface' => ['Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'], + + 'PDO' => ['Symfony\Component\VarDumper\Caster\PdoCaster', 'castPdo'], + 'PDOStatement' => ['Symfony\Component\VarDumper\Caster\PdoCaster', 'castPdoStatement'], + + 'AMQPConnection' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castConnection'], + 'AMQPChannel' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castChannel'], + 'AMQPQueue' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castQueue'], + 'AMQPExchange' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castExchange'], + 'AMQPEnvelope' => ['Symfony\Component\VarDumper\Caster\AmqpCaster', 'castEnvelope'], + + 'ArrayObject' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castArrayObject'], + 'ArrayIterator' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castArrayIterator'], + 'SplDoublyLinkedList' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castDoublyLinkedList'], + 'SplFileInfo' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castFileInfo'], + 'SplFileObject' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castFileObject'], + 'SplHeap' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castHeap'], + 'SplObjectStorage' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castObjectStorage'], + 'SplPriorityQueue' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castHeap'], + 'OuterIterator' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castOuterIterator'], + 'WeakReference' => ['Symfony\Component\VarDumper\Caster\SplCaster', 'castWeakReference'], + + 'Redis' => ['Symfony\Component\VarDumper\Caster\RedisCaster', 'castRedis'], + 'RedisArray' => ['Symfony\Component\VarDumper\Caster\RedisCaster', 'castRedisArray'], + 'RedisCluster' => ['Symfony\Component\VarDumper\Caster\RedisCaster', 'castRedisCluster'], + + 'DateTimeInterface' => ['Symfony\Component\VarDumper\Caster\DateCaster', 'castDateTime'], + 'DateInterval' => ['Symfony\Component\VarDumper\Caster\DateCaster', 'castInterval'], + 'DateTimeZone' => ['Symfony\Component\VarDumper\Caster\DateCaster', 'castTimeZone'], + 'DatePeriod' => ['Symfony\Component\VarDumper\Caster\DateCaster', 'castPeriod'], + + 'GMP' => ['Symfony\Component\VarDumper\Caster\GmpCaster', 'castGmp'], + + 'MessageFormatter' => ['Symfony\Component\VarDumper\Caster\IntlCaster', 'castMessageFormatter'], + 'NumberFormatter' => ['Symfony\Component\VarDumper\Caster\IntlCaster', 'castNumberFormatter'], + 'IntlTimeZone' => ['Symfony\Component\VarDumper\Caster\IntlCaster', 'castIntlTimeZone'], + 'IntlCalendar' => ['Symfony\Component\VarDumper\Caster\IntlCaster', 'castIntlCalendar'], + 'IntlDateFormatter' => ['Symfony\Component\VarDumper\Caster\IntlCaster', 'castIntlDateFormatter'], + + 'Memcached' => ['Symfony\Component\VarDumper\Caster\MemcachedCaster', 'castMemcached'], + + 'Ds\Collection' => ['Symfony\Component\VarDumper\Caster\DsCaster', 'castCollection'], + 'Ds\Map' => ['Symfony\Component\VarDumper\Caster\DsCaster', 'castMap'], + 'Ds\Pair' => ['Symfony\Component\VarDumper\Caster\DsCaster', 'castPair'], + 'Symfony\Component\VarDumper\Caster\DsPairStub' => ['Symfony\Component\VarDumper\Caster\DsCaster', 'castPairStub'], + + 'mysqli_driver' => ['Symfony\Component\VarDumper\Caster\MysqliCaster', 'castMysqliDriver'], + + 'CurlHandle' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castCurl'], + + ':dba' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castDba'], + ':dba persistent' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castDba'], + + 'GdImage' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castGd'], + ':gd' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castGd'], + + ':mysql link' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castMysqlLink'], + ':pgsql large object' => ['Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castLargeObject'], + ':pgsql link' => ['Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castLink'], + ':pgsql link persistent' => ['Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castLink'], + ':pgsql result' => ['Symfony\Component\VarDumper\Caster\PgSqlCaster', 'castResult'], + ':process' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castProcess'], + ':stream' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castStream'], + + 'OpenSSLCertificate' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castOpensslX509'], + ':OpenSSL X.509' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castOpensslX509'], + + ':persistent stream' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castStream'], + ':stream-context' => ['Symfony\Component\VarDumper\Caster\ResourceCaster', 'castStreamContext'], + + 'XmlParser' => ['Symfony\Component\VarDumper\Caster\XmlResourceCaster', 'castXml'], + ':xml' => ['Symfony\Component\VarDumper\Caster\XmlResourceCaster', 'castXml'], + + 'RdKafka' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castRdKafka'], + 'RdKafka\Conf' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castConf'], + 'RdKafka\KafkaConsumer' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castKafkaConsumer'], + 'RdKafka\Metadata\Broker' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castBrokerMetadata'], + 'RdKafka\Metadata\Collection' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castCollectionMetadata'], + 'RdKafka\Metadata\Partition' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castPartitionMetadata'], + 'RdKafka\Metadata\Topic' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castTopicMetadata'], + 'RdKafka\Message' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castMessage'], + 'RdKafka\Topic' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castTopic'], + 'RdKafka\TopicPartition' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castTopicPartition'], + 'RdKafka\TopicConf' => ['Symfony\Component\VarDumper\Caster\RdKafkaCaster', 'castTopicConf'], + ]; + + protected $maxItems = 2500; + protected $maxString = -1; + protected $minDepth = 1; + + /** + * @var array> + */ + private array $casters = []; + + /** + * @var callable|null + */ + private $prevErrorHandler; + + private array $classInfo = []; + private int $filter = 0; + + /** + * @param callable[]|null $casters A map of casters + * + * @see addCasters + */ + public function __construct(array $casters = null) + { + if (null === $casters) { + $casters = static::$defaultCasters; + } + $this->addCasters($casters); + } + + /** + * Adds casters for resources and objects. + * + * Maps resources or objects types to a callback. + * Types are in the key, with a callable caster for value. + * Resource types are to be prefixed with a `:`, + * see e.g. static::$defaultCasters. + * + * @param callable[] $casters A map of casters + */ + public function addCasters(array $casters) + { + foreach ($casters as $type => $callback) { + $this->casters[$type][] = $callback; + } + } + + /** + * Sets the maximum number of items to clone past the minimum depth in nested structures. + */ + public function setMaxItems(int $maxItems) + { + $this->maxItems = $maxItems; + } + + /** + * Sets the maximum cloned length for strings. + */ + public function setMaxString(int $maxString) + { + $this->maxString = $maxString; + } + + /** + * Sets the minimum tree depth where we are guaranteed to clone all the items. After this + * depth is reached, only setMaxItems items will be cloned. + */ + public function setMinDepth(int $minDepth) + { + $this->minDepth = $minDepth; + } + + /** + * Clones a PHP variable. + * + * @param int $filter A bit field of Caster::EXCLUDE_* constants + */ + public function cloneVar(mixed $var, int $filter = 0): Data + { + $this->prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) { + if (\E_RECOVERABLE_ERROR === $type || \E_USER_ERROR === $type) { + // Cloner never dies + throw new \ErrorException($msg, 0, $type, $file, $line); + } + + if ($this->prevErrorHandler) { + return ($this->prevErrorHandler)($type, $msg, $file, $line, $context); + } + + return false; + }); + $this->filter = $filter; + + if ($gc = gc_enabled()) { + gc_disable(); + } + try { + return new Data($this->doClone($var)); + } finally { + if ($gc) { + gc_enable(); + } + restore_error_handler(); + $this->prevErrorHandler = null; + } + } + + /** + * Effectively clones the PHP variable. + */ + abstract protected function doClone(mixed $var): array; + + /** + * Casts an object to an array representation. + * + * @param bool $isNested True if the object is nested in the dumped structure + */ + protected function castObject(Stub $stub, bool $isNested): array + { + $obj = $stub->value; + $class = $stub->class; + + if (str_contains($class, "@anonymous\0")) { + $stub->class = get_debug_type($obj); + } + if (isset($this->classInfo[$class])) { + [$i, $parents, $hasDebugInfo, $fileInfo] = $this->classInfo[$class]; + } else { + $i = 2; + $parents = [$class]; + $hasDebugInfo = method_exists($class, '__debugInfo'); + + foreach (class_parents($class) as $p) { + $parents[] = $p; + ++$i; + } + foreach (class_implements($class) as $p) { + $parents[] = $p; + ++$i; + } + $parents[] = '*'; + + $r = new \ReflectionClass($class); + $fileInfo = $r->isInternal() || $r->isSubclassOf(Stub::class) ? [] : [ + 'file' => $r->getFileName(), + 'line' => $r->getStartLine(), + ]; + + $this->classInfo[$class] = [$i, $parents, $hasDebugInfo, $fileInfo]; + } + + $stub->attr += $fileInfo; + $a = Caster::castObject($obj, $class, $hasDebugInfo, $stub->class); + + try { + while ($i--) { + if (!empty($this->casters[$p = $parents[$i]])) { + foreach ($this->casters[$p] as $callback) { + $a = $callback($obj, $a, $stub, $isNested, $this->filter); + } + } + } + } catch (\Exception $e) { + $a = [(Stub::TYPE_OBJECT === $stub->type ? Caster::PREFIX_VIRTUAL : '').'⚠' => new ThrowingCasterException($e)] + $a; + } + + return $a; + } + + /** + * Casts a resource to an array representation. + * + * @param bool $isNested True if the object is nested in the dumped structure + */ + protected function castResource(Stub $stub, bool $isNested): array + { + $a = []; + $res = $stub->value; + $type = $stub->class; + + try { + if (!empty($this->casters[':'.$type])) { + foreach ($this->casters[':'.$type] as $callback) { + $a = $callback($res, $a, $stub, $isNested, $this->filter); + } + } + } catch (\Exception $e) { + $a = [(Stub::TYPE_OBJECT === $stub->type ? Caster::PREFIX_VIRTUAL : '').'⚠' => new ThrowingCasterException($e)] + $a; + } + + return $a; + } +} diff --git a/vendor/symfony/var-dumper/Cloner/ClonerInterface.php b/vendor/symfony/var-dumper/Cloner/ClonerInterface.php new file mode 100644 index 0000000..5a8e2e4 --- /dev/null +++ b/vendor/symfony/var-dumper/Cloner/ClonerInterface.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Cloner; + +/** + * @author Nicolas Grekas + */ +interface ClonerInterface +{ + /** + * Clones a PHP variable. + */ + public function cloneVar(mixed $var): Data; +} diff --git a/vendor/symfony/var-dumper/Cloner/Cursor.php b/vendor/symfony/var-dumper/Cloner/Cursor.php new file mode 100644 index 0000000..1fd796d --- /dev/null +++ b/vendor/symfony/var-dumper/Cloner/Cursor.php @@ -0,0 +1,43 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Cloner; + +/** + * Represents the current state of a dumper while dumping. + * + * @author Nicolas Grekas + */ +class Cursor +{ + public const HASH_INDEXED = Stub::ARRAY_INDEXED; + public const HASH_ASSOC = Stub::ARRAY_ASSOC; + public const HASH_OBJECT = Stub::TYPE_OBJECT; + public const HASH_RESOURCE = Stub::TYPE_RESOURCE; + + public $depth = 0; + public $refIndex = 0; + public $softRefTo = 0; + public $softRefCount = 0; + public $softRefHandle = 0; + public $hardRefTo = 0; + public $hardRefCount = 0; + public $hardRefHandle = 0; + public $hashType; + public $hashKey; + public $hashKeyIsBinary; + public $hashIndex = 0; + public $hashLength = 0; + public $hashCut = 0; + public $stop = false; + public $attr = []; + public $skipChildren = false; +} diff --git a/vendor/symfony/var-dumper/Cloner/Data.php b/vendor/symfony/var-dumper/Cloner/Data.php new file mode 100644 index 0000000..6ecb883 --- /dev/null +++ b/vendor/symfony/var-dumper/Cloner/Data.php @@ -0,0 +1,422 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Cloner; + +use Symfony\Component\VarDumper\Caster\Caster; +use Symfony\Component\VarDumper\Dumper\ContextProvider\SourceContextProvider; + +/** + * @author Nicolas Grekas + */ +class Data implements \ArrayAccess, \Countable, \IteratorAggregate +{ + private array $data; + private int $position = 0; + private int|string $key = 0; + private int $maxDepth = 20; + private int $maxItemsPerDepth = -1; + private int $useRefHandles = -1; + private array $context = []; + + /** + * @param array $data An array as returned by ClonerInterface::cloneVar() + */ + public function __construct(array $data) + { + $this->data = $data; + } + + public function getType(): ?string + { + $item = $this->data[$this->position][$this->key]; + + if ($item instanceof Stub && Stub::TYPE_REF === $item->type && !$item->position) { + $item = $item->value; + } + if (!$item instanceof Stub) { + return \gettype($item); + } + if (Stub::TYPE_STRING === $item->type) { + return 'string'; + } + if (Stub::TYPE_ARRAY === $item->type) { + return 'array'; + } + if (Stub::TYPE_OBJECT === $item->type) { + return $item->class; + } + if (Stub::TYPE_RESOURCE === $item->type) { + return $item->class.' resource'; + } + + return null; + } + + /** + * Returns a native representation of the original value. + * + * @param array|bool $recursive Whether values should be resolved recursively or not + * + * @return string|int|float|bool|array|Data[]|null + */ + public function getValue(array|bool $recursive = false): string|int|float|bool|array|null + { + $item = $this->data[$this->position][$this->key]; + + if ($item instanceof Stub && Stub::TYPE_REF === $item->type && !$item->position) { + $item = $item->value; + } + if (!($item = $this->getStub($item)) instanceof Stub) { + return $item; + } + if (Stub::TYPE_STRING === $item->type) { + return $item->value; + } + + $children = $item->position ? $this->data[$item->position] : []; + + foreach ($children as $k => $v) { + if ($recursive && !($v = $this->getStub($v)) instanceof Stub) { + continue; + } + $children[$k] = clone $this; + $children[$k]->key = $k; + $children[$k]->position = $item->position; + + if ($recursive) { + if (Stub::TYPE_REF === $v->type && ($v = $this->getStub($v->value)) instanceof Stub) { + $recursive = (array) $recursive; + if (isset($recursive[$v->position])) { + continue; + } + $recursive[$v->position] = true; + } + $children[$k] = $children[$k]->getValue($recursive); + } + } + + return $children; + } + + public function count(): int + { + return \count($this->getValue()); + } + + public function getIterator(): \Traversable + { + if (!\is_array($value = $this->getValue())) { + throw new \LogicException(sprintf('"%s" object holds non-iterable type "%s".', self::class, get_debug_type($value))); + } + + yield from $value; + } + + public function __get(string $key) + { + if (null !== $data = $this->seek($key)) { + $item = $this->getStub($data->data[$data->position][$data->key]); + + return $item instanceof Stub || [] === $item ? $data : $item; + } + + return null; + } + + public function __isset(string $key): bool + { + return null !== $this->seek($key); + } + + public function offsetExists(mixed $key): bool + { + return $this->__isset($key); + } + + public function offsetGet(mixed $key): mixed + { + return $this->__get($key); + } + + public function offsetSet(mixed $key, mixed $value): void + { + throw new \BadMethodCallException(self::class.' objects are immutable.'); + } + + public function offsetUnset(mixed $key): void + { + throw new \BadMethodCallException(self::class.' objects are immutable.'); + } + + public function __toString(): string + { + $value = $this->getValue(); + + if (!\is_array($value)) { + return (string) $value; + } + + return sprintf('%s (count=%d)', $this->getType(), \count($value)); + } + + /** + * Returns a depth limited clone of $this. + */ + public function withMaxDepth(int $maxDepth): static + { + $data = clone $this; + $data->maxDepth = $maxDepth; + + return $data; + } + + /** + * Limits the number of elements per depth level. + */ + public function withMaxItemsPerDepth(int $maxItemsPerDepth): static + { + $data = clone $this; + $data->maxItemsPerDepth = $maxItemsPerDepth; + + return $data; + } + + /** + * Enables/disables objects' identifiers tracking. + * + * @param bool $useRefHandles False to hide global ref. handles + */ + public function withRefHandles(bool $useRefHandles): static + { + $data = clone $this; + $data->useRefHandles = $useRefHandles ? -1 : 0; + + return $data; + } + + public function withContext(array $context): static + { + $data = clone $this; + $data->context = $context; + + return $data; + } + + /** + * Seeks to a specific key in nested data structures. + */ + public function seek(string|int $key): ?static + { + $item = $this->data[$this->position][$this->key]; + + if ($item instanceof Stub && Stub::TYPE_REF === $item->type && !$item->position) { + $item = $item->value; + } + if (!($item = $this->getStub($item)) instanceof Stub || !$item->position) { + return null; + } + $keys = [$key]; + + switch ($item->type) { + case Stub::TYPE_OBJECT: + $keys[] = Caster::PREFIX_DYNAMIC.$key; + $keys[] = Caster::PREFIX_PROTECTED.$key; + $keys[] = Caster::PREFIX_VIRTUAL.$key; + $keys[] = "\0$item->class\0$key"; + // no break + case Stub::TYPE_ARRAY: + case Stub::TYPE_RESOURCE: + break; + default: + return null; + } + + $data = null; + $children = $this->data[$item->position]; + + foreach ($keys as $key) { + if (isset($children[$key]) || \array_key_exists($key, $children)) { + $data = clone $this; + $data->key = $key; + $data->position = $item->position; + break; + } + } + + return $data; + } + + /** + * Dumps data with a DumperInterface dumper. + */ + public function dump(DumperInterface $dumper) + { + $refs = [0]; + $cursor = new Cursor(); + + if ($cursor->attr = $this->context[SourceContextProvider::class] ?? []) { + $cursor->attr['if_links'] = true; + $cursor->hashType = -1; + $dumper->dumpScalar($cursor, 'default', '^'); + $cursor->attr = ['if_links' => true]; + $dumper->dumpScalar($cursor, 'default', ' '); + $cursor->hashType = 0; + } + + $this->dumpItem($dumper, $cursor, $refs, $this->data[$this->position][$this->key]); + } + + /** + * Depth-first dumping of items. + * + * @param mixed $item A Stub object or the original value being dumped + */ + private function dumpItem(DumperInterface $dumper, Cursor $cursor, array &$refs, mixed $item) + { + $cursor->refIndex = 0; + $cursor->softRefTo = $cursor->softRefHandle = $cursor->softRefCount = 0; + $cursor->hardRefTo = $cursor->hardRefHandle = $cursor->hardRefCount = 0; + $firstSeen = true; + + if (!$item instanceof Stub) { + $cursor->attr = []; + $type = \gettype($item); + if ($item && 'array' === $type) { + $item = $this->getStub($item); + } + } elseif (Stub::TYPE_REF === $item->type) { + if ($item->handle) { + if (!isset($refs[$r = $item->handle - (\PHP_INT_MAX >> 1)])) { + $cursor->refIndex = $refs[$r] = $cursor->refIndex ?: ++$refs[0]; + } else { + $firstSeen = false; + } + $cursor->hardRefTo = $refs[$r]; + $cursor->hardRefHandle = $this->useRefHandles & $item->handle; + $cursor->hardRefCount = 0 < $item->handle ? $item->refCount : 0; + } + $cursor->attr = $item->attr; + $type = $item->class ?: \gettype($item->value); + $item = $this->getStub($item->value); + } + if ($item instanceof Stub) { + if ($item->refCount) { + if (!isset($refs[$r = $item->handle])) { + $cursor->refIndex = $refs[$r] = $cursor->refIndex ?: ++$refs[0]; + } else { + $firstSeen = false; + } + $cursor->softRefTo = $refs[$r]; + } + $cursor->softRefHandle = $this->useRefHandles & $item->handle; + $cursor->softRefCount = $item->refCount; + $cursor->attr = $item->attr; + $cut = $item->cut; + + if ($item->position && $firstSeen) { + $children = $this->data[$item->position]; + + if ($cursor->stop) { + if ($cut >= 0) { + $cut += \count($children); + } + $children = []; + } + } else { + $children = []; + } + switch ($item->type) { + case Stub::TYPE_STRING: + $dumper->dumpString($cursor, $item->value, Stub::STRING_BINARY === $item->class, $cut); + break; + + case Stub::TYPE_ARRAY: + $item = clone $item; + $item->type = $item->class; + $item->class = $item->value; + // no break + case Stub::TYPE_OBJECT: + case Stub::TYPE_RESOURCE: + $withChildren = $children && $cursor->depth !== $this->maxDepth && $this->maxItemsPerDepth; + $dumper->enterHash($cursor, $item->type, $item->class, $withChildren); + if ($withChildren) { + if ($cursor->skipChildren) { + $withChildren = false; + $cut = -1; + } else { + $cut = $this->dumpChildren($dumper, $cursor, $refs, $children, $cut, $item->type, null !== $item->class); + } + } elseif ($children && 0 <= $cut) { + $cut += \count($children); + } + $cursor->skipChildren = false; + $dumper->leaveHash($cursor, $item->type, $item->class, $withChildren, $cut); + break; + + default: + throw new \RuntimeException(sprintf('Unexpected Stub type: "%s".', $item->type)); + } + } elseif ('array' === $type) { + $dumper->enterHash($cursor, Cursor::HASH_INDEXED, 0, false); + $dumper->leaveHash($cursor, Cursor::HASH_INDEXED, 0, false, 0); + } elseif ('string' === $type) { + $dumper->dumpString($cursor, $item, false, 0); + } else { + $dumper->dumpScalar($cursor, $type, $item); + } + } + + /** + * Dumps children of hash structures. + * + * @return int The final number of removed items + */ + private function dumpChildren(DumperInterface $dumper, Cursor $parentCursor, array &$refs, array $children, int $hashCut, int $hashType, bool $dumpKeys): int + { + $cursor = clone $parentCursor; + ++$cursor->depth; + $cursor->hashType = $hashType; + $cursor->hashIndex = 0; + $cursor->hashLength = \count($children); + $cursor->hashCut = $hashCut; + foreach ($children as $key => $child) { + $cursor->hashKeyIsBinary = isset($key[0]) && !preg_match('//u', $key); + $cursor->hashKey = $dumpKeys ? $key : null; + $this->dumpItem($dumper, $cursor, $refs, $child); + if (++$cursor->hashIndex === $this->maxItemsPerDepth || $cursor->stop) { + $parentCursor->stop = true; + + return $hashCut >= 0 ? $hashCut + $cursor->hashLength - $cursor->hashIndex : $hashCut; + } + } + + return $hashCut; + } + + private function getStub(mixed $item) + { + if (!$item || !\is_array($item)) { + return $item; + } + + $stub = new Stub(); + $stub->type = Stub::TYPE_ARRAY; + foreach ($item as $stub->class => $stub->position) { + } + if (isset($item[0])) { + $stub->cut = $item[0]; + } + $stub->value = $stub->cut + ($stub->position ? \count($this->data[$stub->position]) : 0); + + return $stub; + } +} diff --git a/vendor/symfony/var-dumper/Cloner/DumperInterface.php b/vendor/symfony/var-dumper/Cloner/DumperInterface.php new file mode 100644 index 0000000..61d02d2 --- /dev/null +++ b/vendor/symfony/var-dumper/Cloner/DumperInterface.php @@ -0,0 +1,53 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Cloner; + +/** + * DumperInterface used by Data objects. + * + * @author Nicolas Grekas + */ +interface DumperInterface +{ + /** + * Dumps a scalar value. + */ + public function dumpScalar(Cursor $cursor, string $type, string|int|float|bool|null $value); + + /** + * Dumps a string. + * + * @param string $str The string being dumped + * @param bool $bin Whether $str is UTF-8 or binary encoded + * @param int $cut The number of characters $str has been cut by + */ + public function dumpString(Cursor $cursor, string $str, bool $bin, int $cut); + + /** + * Dumps while entering an hash. + * + * @param int $type A Cursor::HASH_* const for the type of hash + * @param string|int|null $class The object class, resource type or array count + * @param bool $hasChild When the dump of the hash has child item + */ + public function enterHash(Cursor $cursor, int $type, string|int|null $class, bool $hasChild); + + /** + * Dumps while leaving an hash. + * + * @param int $type A Cursor::HASH_* const for the type of hash + * @param string|int|null $class The object class, resource type or array count + * @param bool $hasChild When the dump of the hash has child item + * @param int $cut The number of items the hash has been cut by + */ + public function leaveHash(Cursor $cursor, int $type, string|int|null $class, bool $hasChild, int $cut); +} diff --git a/vendor/symfony/var-dumper/Cloner/Stub.php b/vendor/symfony/var-dumper/Cloner/Stub.php new file mode 100644 index 0000000..1c5b887 --- /dev/null +++ b/vendor/symfony/var-dumper/Cloner/Stub.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Cloner; + +/** + * Represents the main properties of a PHP variable. + * + * @author Nicolas Grekas + */ +class Stub +{ + public const TYPE_REF = 1; + public const TYPE_STRING = 2; + public const TYPE_ARRAY = 3; + public const TYPE_OBJECT = 4; + public const TYPE_RESOURCE = 5; + + public const STRING_BINARY = 1; + public const STRING_UTF8 = 2; + + public const ARRAY_ASSOC = 1; + public const ARRAY_INDEXED = 2; + + public $type = self::TYPE_REF; + public $class = ''; + public $value; + public $cut = 0; + public $handle = 0; + public $refCount = 0; + public $position = 0; + public $attr = []; + + private static array $defaultProperties = []; + + /** + * @internal + */ + public function __sleep(): array + { + $properties = []; + + if (!isset(self::$defaultProperties[$c = static::class])) { + self::$defaultProperties[$c] = get_class_vars($c); + + foreach ((new \ReflectionClass($c))->getStaticProperties() as $k => $v) { + unset(self::$defaultProperties[$c][$k]); + } + } + + foreach (self::$defaultProperties[$c] as $k => $v) { + if ($this->$k !== $v) { + $properties[] = $k; + } + } + + return $properties; + } +} diff --git a/vendor/symfony/var-dumper/Cloner/VarCloner.php b/vendor/symfony/var-dumper/Cloner/VarCloner.php new file mode 100644 index 0000000..9afcc34 --- /dev/null +++ b/vendor/symfony/var-dumper/Cloner/VarCloner.php @@ -0,0 +1,286 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Cloner; + +/** + * @author Nicolas Grekas + */ +class VarCloner extends AbstractCloner +{ + private static string $gid; + private static array $arrayCache = []; + + /** + * {@inheritdoc} + */ + protected function doClone(mixed $var): array + { + $len = 1; // Length of $queue + $pos = 0; // Number of cloned items past the minimum depth + $refsCounter = 0; // Hard references counter + $queue = [[$var]]; // This breadth-first queue is the return value + $hardRefs = []; // Map of original zval ids to stub objects + $objRefs = []; // Map of original object handles to their stub object counterpart + $objects = []; // Keep a ref to objects to ensure their handle cannot be reused while cloning + $resRefs = []; // Map of original resource handles to their stub object counterpart + $values = []; // Map of stub objects' ids to original values + $maxItems = $this->maxItems; + $maxString = $this->maxString; + $minDepth = $this->minDepth; + $currentDepth = 0; // Current tree depth + $currentDepthFinalIndex = 0; // Final $queue index for current tree depth + $minimumDepthReached = 0 === $minDepth; // Becomes true when minimum tree depth has been reached + $cookie = (object) []; // Unique object used to detect hard references + $a = null; // Array cast for nested structures + $stub = null; // Stub capturing the main properties of an original item value + // or null if the original value is used directly + + $gid = self::$gid ??= md5(random_bytes(6)); // Unique string used to detect the special $GLOBALS variable + $arrayStub = new Stub(); + $arrayStub->type = Stub::TYPE_ARRAY; + $fromObjCast = false; + + for ($i = 0; $i < $len; ++$i) { + // Detect when we move on to the next tree depth + if ($i > $currentDepthFinalIndex) { + ++$currentDepth; + $currentDepthFinalIndex = $len - 1; + if ($currentDepth >= $minDepth) { + $minimumDepthReached = true; + } + } + + $refs = $vals = $queue[$i]; + foreach ($vals as $k => $v) { + // $v is the original value or a stub object in case of hard references + + $zvalRef = ($r = \ReflectionReference::fromArrayElement($vals, $k)) ? $r->getId() : null; + + if ($zvalRef) { + $vals[$k] = &$stub; // Break hard references to make $queue completely + unset($stub); // independent from the original structure + if (null !== $vals[$k] = $hardRefs[$zvalRef] ?? null) { + $v = $vals[$k]; + if ($v->value instanceof Stub && (Stub::TYPE_OBJECT === $v->value->type || Stub::TYPE_RESOURCE === $v->value->type)) { + ++$v->value->refCount; + } + ++$v->refCount; + continue; + } + $vals[$k] = new Stub(); + $vals[$k]->value = $v; + $vals[$k]->handle = ++$refsCounter; + $hardRefs[$zvalRef] = $vals[$k]; + } + // Create $stub when the original value $v cannot be used directly + // If $v is a nested structure, put that structure in array $a + switch (true) { + case null === $v: + case \is_bool($v): + case \is_int($v): + case \is_float($v): + continue 2; + case \is_string($v): + if ('' === $v) { + continue 2; + } + if (!preg_match('//u', $v)) { + $stub = new Stub(); + $stub->type = Stub::TYPE_STRING; + $stub->class = Stub::STRING_BINARY; + if (0 <= $maxString && 0 < $cut = \strlen($v) - $maxString) { + $stub->cut = $cut; + $stub->value = substr($v, 0, -$cut); + } else { + $stub->value = $v; + } + } elseif (0 <= $maxString && isset($v[1 + ($maxString >> 2)]) && 0 < $cut = mb_strlen($v, 'UTF-8') - $maxString) { + $stub = new Stub(); + $stub->type = Stub::TYPE_STRING; + $stub->class = Stub::STRING_UTF8; + $stub->cut = $cut; + $stub->value = mb_substr($v, 0, $maxString, 'UTF-8'); + } else { + continue 2; + } + $a = null; + break; + + case \is_array($v): + if (!$v) { + continue 2; + } + $stub = $arrayStub; + + if (\PHP_VERSION_ID >= 80100) { + $stub->class = array_is_list($v) ? Stub::ARRAY_INDEXED : Stub::ARRAY_ASSOC; + $a = $v; + break; + } + + $stub->class = Stub::ARRAY_INDEXED; + + $j = -1; + foreach ($v as $gk => $gv) { + if ($gk !== ++$j) { + $stub->class = Stub::ARRAY_ASSOC; + $a = $v; + $a[$gid] = true; + break; + } + } + + // Copies of $GLOBALS have very strange behavior, + // let's detect them with some black magic + if (isset($v[$gid])) { + unset($v[$gid]); + $a = []; + foreach ($v as $gk => &$gv) { + if ($v === $gv && !isset($hardRefs[\ReflectionReference::fromArrayElement($v, $gk)->getId()])) { + unset($v); + $v = new Stub(); + $v->value = [$v->cut = \count($gv), Stub::TYPE_ARRAY => 0]; + $v->handle = -1; + $gv = &$a[$gk]; + $hardRefs[\ReflectionReference::fromArrayElement($a, $gk)->getId()] = &$gv; + $gv = $v; + } + + $a[$gk] = &$gv; + } + unset($gv); + } else { + $a = $v; + } + break; + + case \is_object($v): + if (empty($objRefs[$h = spl_object_id($v)])) { + $stub = new Stub(); + $stub->type = Stub::TYPE_OBJECT; + $stub->class = \get_class($v); + $stub->value = $v; + $stub->handle = $h; + $a = $this->castObject($stub, 0 < $i); + if ($v !== $stub->value) { + if (Stub::TYPE_OBJECT !== $stub->type || null === $stub->value) { + break; + } + $stub->handle = $h = spl_object_id($stub->value); + } + $stub->value = null; + if (0 <= $maxItems && $maxItems <= $pos && $minimumDepthReached) { + $stub->cut = \count($a); + $a = null; + } + } + if (empty($objRefs[$h])) { + $objRefs[$h] = $stub; + $objects[] = $v; + } else { + $stub = $objRefs[$h]; + ++$stub->refCount; + $a = null; + } + break; + + default: // resource + if (empty($resRefs[$h = (int) $v])) { + $stub = new Stub(); + $stub->type = Stub::TYPE_RESOURCE; + if ('Unknown' === $stub->class = @get_resource_type($v)) { + $stub->class = 'Closed'; + } + $stub->value = $v; + $stub->handle = $h; + $a = $this->castResource($stub, 0 < $i); + $stub->value = null; + if (0 <= $maxItems && $maxItems <= $pos && $minimumDepthReached) { + $stub->cut = \count($a); + $a = null; + } + } + if (empty($resRefs[$h])) { + $resRefs[$h] = $stub; + } else { + $stub = $resRefs[$h]; + ++$stub->refCount; + $a = null; + } + break; + } + + if ($a) { + if (!$minimumDepthReached || 0 > $maxItems) { + $queue[$len] = $a; + $stub->position = $len++; + } elseif ($pos < $maxItems) { + if ($maxItems < $pos += \count($a)) { + $a = \array_slice($a, 0, $maxItems - $pos, true); + if ($stub->cut >= 0) { + $stub->cut += $pos - $maxItems; + } + } + $queue[$len] = $a; + $stub->position = $len++; + } elseif ($stub->cut >= 0) { + $stub->cut += \count($a); + $stub->position = 0; + } + } + + if ($arrayStub === $stub) { + if ($arrayStub->cut) { + $stub = [$arrayStub->cut, $arrayStub->class => $arrayStub->position]; + $arrayStub->cut = 0; + } elseif (isset(self::$arrayCache[$arrayStub->class][$arrayStub->position])) { + $stub = self::$arrayCache[$arrayStub->class][$arrayStub->position]; + } else { + self::$arrayCache[$arrayStub->class][$arrayStub->position] = $stub = [$arrayStub->class => $arrayStub->position]; + } + } + + if (!$zvalRef) { + $vals[$k] = $stub; + } else { + $hardRefs[$zvalRef]->value = $stub; + } + } + + if ($fromObjCast) { + $fromObjCast = false; + $refs = $vals; + $vals = []; + $j = -1; + foreach ($queue[$i] as $k => $v) { + foreach ([$k => true] as $gk => $gv) { + } + if ($gk !== $k) { + $vals = (object) $vals; + $vals->{$k} = $refs[++$j]; + $vals = (array) $vals; + } else { + $vals[$k] = $refs[++$j]; + } + } + } + + $queue[$i] = $vals; + } + + foreach ($values as $h => $v) { + $hardRefs[$h] = $v; + } + + return $queue; + } +} diff --git a/vendor/symfony/var-dumper/Command/Descriptor/CliDescriptor.php b/vendor/symfony/var-dumper/Command/Descriptor/CliDescriptor.php new file mode 100644 index 0000000..e3d5f1d --- /dev/null +++ b/vendor/symfony/var-dumper/Command/Descriptor/CliDescriptor.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Command\Descriptor; + +use Symfony\Component\Console\Input\ArrayInput; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\VarDumper\Cloner\Data; +use Symfony\Component\VarDumper\Dumper\CliDumper; + +/** + * Describe collected data clones for cli output. + * + * @author Maxime Steinhausser + * + * @final + */ +class CliDescriptor implements DumpDescriptorInterface +{ + private $dumper; + private mixed $lastIdentifier = null; + + public function __construct(CliDumper $dumper) + { + $this->dumper = $dumper; + } + + public function describe(OutputInterface $output, Data $data, array $context, int $clientId): void + { + $io = $output instanceof SymfonyStyle ? $output : new SymfonyStyle(new ArrayInput([]), $output); + $this->dumper->setColors($output->isDecorated()); + + $rows = [['date', date('r', (int) $context['timestamp'])]]; + $lastIdentifier = $this->lastIdentifier; + $this->lastIdentifier = $clientId; + + $section = "Received from client #$clientId"; + if (isset($context['request'])) { + $request = $context['request']; + $this->lastIdentifier = $request['identifier']; + $section = sprintf('%s %s', $request['method'], $request['uri']); + if ($controller = $request['controller']) { + $rows[] = ['controller', rtrim($this->dumper->dump($controller, true), "\n")]; + } + } elseif (isset($context['cli'])) { + $this->lastIdentifier = $context['cli']['identifier']; + $section = '$ '.$context['cli']['command_line']; + } + + if ($this->lastIdentifier !== $lastIdentifier) { + $io->section($section); + } + + if (isset($context['source'])) { + $source = $context['source']; + $sourceInfo = sprintf('%s on line %d', $source['name'], $source['line']); + if ($fileLink = $source['file_link'] ?? null) { + $sourceInfo = sprintf('%s', $fileLink, $sourceInfo); + } + $rows[] = ['source', $sourceInfo]; + $file = $source['file_relative'] ?? $source['file']; + $rows[] = ['file', $file]; + } + + $io->table([], $rows); + + $this->dumper->dump($data); + $io->newLine(); + } +} diff --git a/vendor/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php b/vendor/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php new file mode 100644 index 0000000..267d27b --- /dev/null +++ b/vendor/symfony/var-dumper/Command/Descriptor/DumpDescriptorInterface.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Command\Descriptor; + +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\VarDumper\Cloner\Data; + +/** + * @author Maxime Steinhausser + */ +interface DumpDescriptorInterface +{ + public function describe(OutputInterface $output, Data $data, array $context, int $clientId): void; +} diff --git a/vendor/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php b/vendor/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php new file mode 100644 index 0000000..1c0d80a --- /dev/null +++ b/vendor/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php @@ -0,0 +1,119 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Command\Descriptor; + +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\VarDumper\Cloner\Data; +use Symfony\Component\VarDumper\Dumper\HtmlDumper; + +/** + * Describe collected data clones for html output. + * + * @author Maxime Steinhausser + * + * @final + */ +class HtmlDescriptor implements DumpDescriptorInterface +{ + private $dumper; + private bool $initialized = false; + + public function __construct(HtmlDumper $dumper) + { + $this->dumper = $dumper; + } + + public function describe(OutputInterface $output, Data $data, array $context, int $clientId): void + { + if (!$this->initialized) { + $styles = file_get_contents(__DIR__.'/../../Resources/css/htmlDescriptor.css'); + $scripts = file_get_contents(__DIR__.'/../../Resources/js/htmlDescriptor.js'); + $output->writeln(""); + $this->initialized = true; + } + + $title = '-'; + if (isset($context['request'])) { + $request = $context['request']; + $controller = "{$this->dumper->dump($request['controller'], true, ['maxDepth' => 0])}"; + $title = sprintf('%s %s', $request['method'], $uri = $request['uri'], $uri); + $dedupIdentifier = $request['identifier']; + } elseif (isset($context['cli'])) { + $title = '$ '.$context['cli']['command_line']; + $dedupIdentifier = $context['cli']['identifier']; + } else { + $dedupIdentifier = uniqid('', true); + } + + $sourceDescription = ''; + if (isset($context['source'])) { + $source = $context['source']; + $projectDir = $source['project_dir'] ?? null; + $sourceDescription = sprintf('%s on line %d', $source['name'], $source['line']); + if (isset($source['file_link'])) { + $sourceDescription = sprintf('%s', $source['file_link'], $sourceDescription); + } + } + + $isoDate = $this->extractDate($context, 'c'); + $tags = array_filter([ + 'controller' => $controller ?? null, + 'project dir' => $projectDir ?? null, + ]); + + $output->writeln(<< +
+
+

$title

+ +
+ {$this->renderTags($tags)} +
+
+

+ $sourceDescription +

+ {$this->dumper->dump($data, true)} +
+ +HTML + ); + } + + private function extractDate(array $context, string $format = 'r'): string + { + return date($format, (int) $context['timestamp']); + } + + private function renderTags(array $tags): string + { + if (!$tags) { + return ''; + } + + $renderedTags = ''; + foreach ($tags as $key => $value) { + $renderedTags .= sprintf('
  • %s%s
  • ', $key, $value); + } + + return << +
      + $renderedTags +
    + +HTML; + } +} diff --git a/vendor/symfony/var-dumper/Command/ServerDumpCommand.php b/vendor/symfony/var-dumper/Command/ServerDumpCommand.php new file mode 100644 index 0000000..13dd475 --- /dev/null +++ b/vendor/symfony/var-dumper/Command/ServerDumpCommand.php @@ -0,0 +1,112 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Command; + +use Symfony\Component\Console\Attribute\AsCommand; +use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Completion\CompletionInput; +use Symfony\Component\Console\Completion\CompletionSuggestions; +use Symfony\Component\Console\Exception\InvalidArgumentException; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\VarDumper\Cloner\Data; +use Symfony\Component\VarDumper\Command\Descriptor\CliDescriptor; +use Symfony\Component\VarDumper\Command\Descriptor\DumpDescriptorInterface; +use Symfony\Component\VarDumper\Command\Descriptor\HtmlDescriptor; +use Symfony\Component\VarDumper\Dumper\CliDumper; +use Symfony\Component\VarDumper\Dumper\HtmlDumper; +use Symfony\Component\VarDumper\Server\DumpServer; + +/** + * Starts a dump server to collect and output dumps on a single place with multiple formats support. + * + * @author Maxime Steinhausser + * + * @final + */ +#[AsCommand(name: 'server:dump', description: 'Start a dump server that collects and displays dumps in a single place')] +class ServerDumpCommand extends Command +{ + private $server; + + /** @var DumpDescriptorInterface[] */ + private array $descriptors; + + public function __construct(DumpServer $server, array $descriptors = []) + { + $this->server = $server; + $this->descriptors = $descriptors + [ + 'cli' => new CliDescriptor(new CliDumper()), + 'html' => new HtmlDescriptor(new HtmlDumper()), + ]; + + parent::__construct(); + } + + protected function configure() + { + $this + ->addOption('format', null, InputOption::VALUE_REQUIRED, sprintf('The output format (%s)', implode(', ', $this->getAvailableFormats())), 'cli') + ->setHelp(<<<'EOF' +%command.name% starts a dump server that collects and displays +dumps in a single place for debugging you application: + + php %command.full_name% + +You can consult dumped data in HTML format in your browser by providing the --format=html option +and redirecting the output to a file: + + php %command.full_name% --format="html" > dump.html + +EOF + ) + ; + } + + protected function execute(InputInterface $input, OutputInterface $output): int + { + $io = new SymfonyStyle($input, $output); + $format = $input->getOption('format'); + + if (!$descriptor = $this->descriptors[$format] ?? null) { + throw new InvalidArgumentException(sprintf('Unsupported format "%s".', $format)); + } + + $errorIo = $io->getErrorStyle(); + $errorIo->title('Symfony Var Dumper Server'); + + $this->server->start(); + + $errorIo->success(sprintf('Server listening on %s', $this->server->getHost())); + $errorIo->comment('Quit the server with CONTROL-C.'); + + $this->server->listen(function (Data $data, array $context, int $clientId) use ($descriptor, $io) { + $descriptor->describe($io, $data, $context, $clientId); + }); + + return 0; + } + + public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void + { + if ($input->mustSuggestOptionValuesFor('format')) { + $suggestions->suggestValues($this->getAvailableFormats()); + } + } + + private function getAvailableFormats(): array + { + return array_keys($this->descriptors); + } +} diff --git a/vendor/symfony/var-dumper/Dumper/AbstractDumper.php b/vendor/symfony/var-dumper/Dumper/AbstractDumper.php new file mode 100644 index 0000000..3c2f55f --- /dev/null +++ b/vendor/symfony/var-dumper/Dumper/AbstractDumper.php @@ -0,0 +1,197 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Dumper; + +use Symfony\Component\VarDumper\Cloner\Data; +use Symfony\Component\VarDumper\Cloner\DumperInterface; + +/** + * Abstract mechanism for dumping a Data object. + * + * @author Nicolas Grekas + */ +abstract class AbstractDumper implements DataDumperInterface, DumperInterface +{ + public const DUMP_LIGHT_ARRAY = 1; + public const DUMP_STRING_LENGTH = 2; + public const DUMP_COMMA_SEPARATOR = 4; + public const DUMP_TRAILING_COMMA = 8; + + public static $defaultOutput = 'php://output'; + + protected $line = ''; + protected $lineDumper; + protected $outputStream; + protected $decimalPoint = '.'; + protected $indentPad = ' '; + protected $flags; + + private string $charset = ''; + + /** + * @param callable|resource|string|null $output A line dumper callable, an opened stream or an output path, defaults to static::$defaultOutput + * @param string|null $charset The default character encoding to use for non-UTF8 strings + * @param int $flags A bit field of static::DUMP_* constants to fine tune dumps representation + */ + public function __construct($output = null, string $charset = null, int $flags = 0) + { + $this->flags = $flags; + $this->setCharset($charset ?: \ini_get('php.output_encoding') ?: \ini_get('default_charset') ?: 'UTF-8'); + $this->setOutput($output ?: static::$defaultOutput); + if (!$output && \is_string(static::$defaultOutput)) { + static::$defaultOutput = $this->outputStream; + } + } + + /** + * Sets the output destination of the dumps. + * + * @param callable|resource|string $output A line dumper callable, an opened stream or an output path + * + * @return callable|resource|string The previous output destination + */ + public function setOutput($output) + { + $prev = $this->outputStream ?? $this->lineDumper; + + if (\is_callable($output)) { + $this->outputStream = null; + $this->lineDumper = $output; + } else { + if (\is_string($output)) { + $output = fopen($output, 'w'); + } + $this->outputStream = $output; + $this->lineDumper = [$this, 'echoLine']; + } + + return $prev; + } + + /** + * Sets the default character encoding to use for non-UTF8 strings. + * + * @return string The previous charset + */ + public function setCharset(string $charset): string + { + $prev = $this->charset; + + $charset = strtoupper($charset); + $charset = null === $charset || 'UTF-8' === $charset || 'UTF8' === $charset ? 'CP1252' : $charset; + + $this->charset = $charset; + + return $prev; + } + + /** + * Sets the indentation pad string. + * + * @param string $pad A string that will be prepended to dumped lines, repeated by nesting level + * + * @return string The previous indent pad + */ + public function setIndentPad(string $pad): string + { + $prev = $this->indentPad; + $this->indentPad = $pad; + + return $prev; + } + + /** + * Dumps a Data object. + * + * @param callable|resource|string|true|null $output A line dumper callable, an opened stream, an output path or true to return the dump + * + * @return string|null The dump as string when $output is true + */ + public function dump(Data $data, $output = null): ?string + { + if ($locale = $this->flags & (self::DUMP_COMMA_SEPARATOR | self::DUMP_TRAILING_COMMA) ? setlocale(\LC_NUMERIC, 0) : null) { + setlocale(\LC_NUMERIC, 'C'); + } + + if ($returnDump = true === $output) { + $output = fopen('php://memory', 'r+'); + } + if ($output) { + $prevOutput = $this->setOutput($output); + } + try { + $data->dump($this); + $this->dumpLine(-1); + + if ($returnDump) { + $result = stream_get_contents($output, -1, 0); + fclose($output); + + return $result; + } + } finally { + if ($output) { + $this->setOutput($prevOutput); + } + if ($locale) { + setlocale(\LC_NUMERIC, $locale); + } + } + + return null; + } + + /** + * Dumps the current line. + * + * @param int $depth The recursive depth in the dumped structure for the line being dumped, + * or -1 to signal the end-of-dump to the line dumper callable + */ + protected function dumpLine(int $depth) + { + ($this->lineDumper)($this->line, $depth, $this->indentPad); + $this->line = ''; + } + + /** + * Generic line dumper callback. + */ + protected function echoLine(string $line, int $depth, string $indentPad) + { + if (-1 !== $depth) { + fwrite($this->outputStream, str_repeat($indentPad, $depth).$line."\n"); + } + } + + /** + * Converts a non-UTF-8 string to UTF-8. + */ + protected function utf8Encode(?string $s): ?string + { + if (null === $s || preg_match('//u', $s)) { + return $s; + } + + if (!\function_exists('iconv')) { + throw new \RuntimeException('Unable to convert a non-UTF-8 string to UTF-8: required function iconv() does not exist. You should install ext-iconv or symfony/polyfill-iconv.'); + } + + if (false !== $c = @iconv($this->charset, 'UTF-8', $s)) { + return $c; + } + if ('CP1252' !== $this->charset && false !== $c = @iconv('CP1252', 'UTF-8', $s)) { + return $c; + } + + return iconv('CP850', 'UTF-8', $s); + } +} diff --git a/vendor/symfony/var-dumper/Dumper/CliDumper.php b/vendor/symfony/var-dumper/Dumper/CliDumper.php new file mode 100644 index 0000000..065b918 --- /dev/null +++ b/vendor/symfony/var-dumper/Dumper/CliDumper.php @@ -0,0 +1,643 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Dumper; + +use Symfony\Component\VarDumper\Cloner\Cursor; +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * CliDumper dumps variables for command line output. + * + * @author Nicolas Grekas + */ +class CliDumper extends AbstractDumper +{ + public static $defaultColors; + public static $defaultOutput = 'php://stdout'; + + protected $colors; + protected $maxStringWidth = 0; + protected $styles = [ + // See http://en.wikipedia.org/wiki/ANSI_escape_code#graphics + 'default' => '0;38;5;208', + 'num' => '1;38;5;38', + 'const' => '1;38;5;208', + 'str' => '1;38;5;113', + 'note' => '38;5;38', + 'ref' => '38;5;247', + 'public' => '', + 'protected' => '', + 'private' => '', + 'meta' => '38;5;170', + 'key' => '38;5;113', + 'index' => '38;5;38', + ]; + + protected static $controlCharsRx = '/[\x00-\x1F\x7F]+/'; + protected static $controlCharsMap = [ + "\t" => '\t', + "\n" => '\n', + "\v" => '\v', + "\f" => '\f', + "\r" => '\r', + "\033" => '\e', + ]; + + protected $collapseNextHash = false; + protected $expandNextHash = false; + + private array $displayOptions = [ + 'fileLinkFormat' => null, + ]; + + private bool $handlesHrefGracefully; + + /** + * {@inheritdoc} + */ + public function __construct($output = null, string $charset = null, int $flags = 0) + { + parent::__construct($output, $charset, $flags); + + if ('\\' === \DIRECTORY_SEPARATOR && !$this->isWindowsTrueColor()) { + // Use only the base 16 xterm colors when using ANSICON or standard Windows 10 CLI + $this->setStyles([ + 'default' => '31', + 'num' => '1;34', + 'const' => '1;31', + 'str' => '1;32', + 'note' => '34', + 'ref' => '1;30', + 'meta' => '35', + 'key' => '32', + 'index' => '34', + ]); + } + + $this->displayOptions['fileLinkFormat'] = \ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format') ?: 'file://%f#L%l'; + } + + /** + * Enables/disables colored output. + */ + public function setColors(bool $colors) + { + $this->colors = $colors; + } + + /** + * Sets the maximum number of characters per line for dumped strings. + */ + public function setMaxStringWidth(int $maxStringWidth) + { + $this->maxStringWidth = $maxStringWidth; + } + + /** + * Configures styles. + * + * @param array $styles A map of style names to style definitions + */ + public function setStyles(array $styles) + { + $this->styles = $styles + $this->styles; + } + + /** + * Configures display options. + * + * @param array $displayOptions A map of display options to customize the behavior + */ + public function setDisplayOptions(array $displayOptions) + { + $this->displayOptions = $displayOptions + $this->displayOptions; + } + + /** + * {@inheritdoc} + */ + public function dumpScalar(Cursor $cursor, string $type, string|int|float|bool|null $value) + { + $this->dumpKey($cursor); + + $style = 'const'; + $attr = $cursor->attr; + + switch ($type) { + case 'default': + $style = 'default'; + break; + + case 'integer': + $style = 'num'; + + if (isset($this->styles['integer'])) { + $style = 'integer'; + } + + break; + + case 'double': + $style = 'num'; + + if (isset($this->styles['float'])) { + $style = 'float'; + } + + switch (true) { + case \INF === $value: $value = 'INF'; break; + case -\INF === $value: $value = '-INF'; break; + case is_nan($value): $value = 'NAN'; break; + default: + $value = (string) $value; + if (!str_contains($value, $this->decimalPoint)) { + $value .= $this->decimalPoint.'0'; + } + break; + } + break; + + case 'NULL': + $value = 'null'; + break; + + case 'boolean': + $value = $value ? 'true' : 'false'; + break; + + default: + $attr += ['value' => $this->utf8Encode($value)]; + $value = $this->utf8Encode($type); + break; + } + + $this->line .= $this->style($style, $value, $attr); + + $this->endValue($cursor); + } + + /** + * {@inheritdoc} + */ + public function dumpString(Cursor $cursor, string $str, bool $bin, int $cut) + { + $this->dumpKey($cursor); + $attr = $cursor->attr; + + if ($bin) { + $str = $this->utf8Encode($str); + } + if ('' === $str) { + $this->line .= '""'; + $this->endValue($cursor); + } else { + $attr += [ + 'length' => 0 <= $cut ? mb_strlen($str, 'UTF-8') + $cut : 0, + 'binary' => $bin, + ]; + $str = $bin && false !== strpos($str, "\0") ? [$str] : explode("\n", $str); + if (isset($str[1]) && !isset($str[2]) && !isset($str[1][0])) { + unset($str[1]); + $str[0] .= "\n"; + } + $m = \count($str) - 1; + $i = $lineCut = 0; + + if (self::DUMP_STRING_LENGTH & $this->flags) { + $this->line .= '('.$attr['length'].') '; + } + if ($bin) { + $this->line .= 'b'; + } + + if ($m) { + $this->line .= '"""'; + $this->dumpLine($cursor->depth); + } else { + $this->line .= '"'; + } + + foreach ($str as $str) { + if ($i < $m) { + $str .= "\n"; + } + if (0 < $this->maxStringWidth && $this->maxStringWidth < $len = mb_strlen($str, 'UTF-8')) { + $str = mb_substr($str, 0, $this->maxStringWidth, 'UTF-8'); + $lineCut = $len - $this->maxStringWidth; + } + if ($m && 0 < $cursor->depth) { + $this->line .= $this->indentPad; + } + if ('' !== $str) { + $this->line .= $this->style('str', $str, $attr); + } + if ($i++ == $m) { + if ($m) { + if ('' !== $str) { + $this->dumpLine($cursor->depth); + if (0 < $cursor->depth) { + $this->line .= $this->indentPad; + } + } + $this->line .= '"""'; + } else { + $this->line .= '"'; + } + if ($cut < 0) { + $this->line .= '…'; + $lineCut = 0; + } elseif ($cut) { + $lineCut += $cut; + } + } + if ($lineCut) { + $this->line .= '…'.$lineCut; + $lineCut = 0; + } + + if ($i > $m) { + $this->endValue($cursor); + } else { + $this->dumpLine($cursor->depth); + } + } + } + } + + /** + * {@inheritdoc} + */ + public function enterHash(Cursor $cursor, int $type, string|int|null $class, bool $hasChild) + { + if (null === $this->colors) { + $this->colors = $this->supportsColors(); + } + + $this->dumpKey($cursor); + $attr = $cursor->attr; + + if ($this->collapseNextHash) { + $cursor->skipChildren = true; + $this->collapseNextHash = $hasChild = false; + } + + $class = $this->utf8Encode($class); + if (Cursor::HASH_OBJECT === $type) { + $prefix = $class && 'stdClass' !== $class ? $this->style('note', $class, $attr).(empty($attr['cut_hash']) ? ' {' : '') : '{'; + } elseif (Cursor::HASH_RESOURCE === $type) { + $prefix = $this->style('note', $class.' resource', $attr).($hasChild ? ' {' : ' '); + } else { + $prefix = $class && !(self::DUMP_LIGHT_ARRAY & $this->flags) ? $this->style('note', 'array:'.$class).' [' : '['; + } + + if (($cursor->softRefCount || 0 < $cursor->softRefHandle) && empty($attr['cut_hash'])) { + $prefix .= $this->style('ref', (Cursor::HASH_RESOURCE === $type ? '@' : '#').(0 < $cursor->softRefHandle ? $cursor->softRefHandle : $cursor->softRefTo), ['count' => $cursor->softRefCount]); + } elseif ($cursor->hardRefTo && !$cursor->refIndex && $class) { + $prefix .= $this->style('ref', '&'.$cursor->hardRefTo, ['count' => $cursor->hardRefCount]); + } elseif (!$hasChild && Cursor::HASH_RESOURCE === $type) { + $prefix = substr($prefix, 0, -1); + } + + $this->line .= $prefix; + + if ($hasChild) { + $this->dumpLine($cursor->depth); + } + } + + /** + * {@inheritdoc} + */ + public function leaveHash(Cursor $cursor, int $type, string|int|null $class, bool $hasChild, int $cut) + { + if (empty($cursor->attr['cut_hash'])) { + $this->dumpEllipsis($cursor, $hasChild, $cut); + $this->line .= Cursor::HASH_OBJECT === $type ? '}' : (Cursor::HASH_RESOURCE !== $type ? ']' : ($hasChild ? '}' : '')); + } + + $this->endValue($cursor); + } + + /** + * Dumps an ellipsis for cut children. + * + * @param bool $hasChild When the dump of the hash has child item + * @param int $cut The number of items the hash has been cut by + */ + protected function dumpEllipsis(Cursor $cursor, bool $hasChild, int $cut) + { + if ($cut) { + $this->line .= ' …'; + if (0 < $cut) { + $this->line .= $cut; + } + if ($hasChild) { + $this->dumpLine($cursor->depth + 1); + } + } + } + + /** + * Dumps a key in a hash structure. + */ + protected function dumpKey(Cursor $cursor) + { + if (null !== $key = $cursor->hashKey) { + if ($cursor->hashKeyIsBinary) { + $key = $this->utf8Encode($key); + } + $attr = ['binary' => $cursor->hashKeyIsBinary]; + $bin = $cursor->hashKeyIsBinary ? 'b' : ''; + $style = 'key'; + switch ($cursor->hashType) { + default: + case Cursor::HASH_INDEXED: + if (self::DUMP_LIGHT_ARRAY & $this->flags) { + break; + } + $style = 'index'; + // no break + case Cursor::HASH_ASSOC: + if (\is_int($key)) { + $this->line .= $this->style($style, $key).' => '; + } else { + $this->line .= $bin.'"'.$this->style($style, $key).'" => '; + } + break; + + case Cursor::HASH_RESOURCE: + $key = "\0~\0".$key; + // no break + case Cursor::HASH_OBJECT: + if (!isset($key[0]) || "\0" !== $key[0]) { + $this->line .= '+'.$bin.$this->style('public', $key).': '; + } elseif (0 < strpos($key, "\0", 1)) { + $key = explode("\0", substr($key, 1), 2); + + switch ($key[0][0]) { + case '+': // User inserted keys + $attr['dynamic'] = true; + $this->line .= '+'.$bin.'"'.$this->style('public', $key[1], $attr).'": '; + break 2; + case '~': + $style = 'meta'; + if (isset($key[0][1])) { + parse_str(substr($key[0], 1), $attr); + $attr += ['binary' => $cursor->hashKeyIsBinary]; + } + break; + case '*': + $style = 'protected'; + $bin = '#'.$bin; + break; + default: + $attr['class'] = $key[0]; + $style = 'private'; + $bin = '-'.$bin; + break; + } + + if (isset($attr['collapse'])) { + if ($attr['collapse']) { + $this->collapseNextHash = true; + } else { + $this->expandNextHash = true; + } + } + + $this->line .= $bin.$this->style($style, $key[1], $attr).($attr['separator'] ?? ': '); + } else { + // This case should not happen + $this->line .= '-'.$bin.'"'.$this->style('private', $key, ['class' => '']).'": '; + } + break; + } + + if ($cursor->hardRefTo) { + $this->line .= $this->style('ref', '&'.($cursor->hardRefCount ? $cursor->hardRefTo : ''), ['count' => $cursor->hardRefCount]).' '; + } + } + } + + /** + * Decorates a value with some style. + * + * @param string $style The type of style being applied + * @param string $value The value being styled + * @param array $attr Optional context information + */ + protected function style(string $style, string $value, array $attr = []): string + { + if (null === $this->colors) { + $this->colors = $this->supportsColors(); + } + + $this->handlesHrefGracefully ??= 'JetBrains-JediTerm' !== getenv('TERMINAL_EMULATOR') + && (!getenv('KONSOLE_VERSION') || (int) getenv('KONSOLE_VERSION') > 201100); + + if (isset($attr['ellipsis'], $attr['ellipsis-type'])) { + $prefix = substr($value, 0, -$attr['ellipsis']); + if ('cli' === \PHP_SAPI && 'path' === $attr['ellipsis-type'] && isset($_SERVER[$pwd = '\\' === \DIRECTORY_SEPARATOR ? 'CD' : 'PWD']) && str_starts_with($prefix, $_SERVER[$pwd])) { + $prefix = '.'.substr($prefix, \strlen($_SERVER[$pwd])); + } + if (!empty($attr['ellipsis-tail'])) { + $prefix .= substr($value, -$attr['ellipsis'], $attr['ellipsis-tail']); + $value = substr($value, -$attr['ellipsis'] + $attr['ellipsis-tail']); + } else { + $value = substr($value, -$attr['ellipsis']); + } + + $value = $this->style('default', $prefix).$this->style($style, $value); + + goto href; + } + + $map = static::$controlCharsMap; + $startCchr = $this->colors ? "\033[m\033[{$this->styles['default']}m" : ''; + $endCchr = $this->colors ? "\033[m\033[{$this->styles[$style]}m" : ''; + $value = preg_replace_callback(static::$controlCharsRx, function ($c) use ($map, $startCchr, $endCchr) { + $s = $startCchr; + $c = $c[$i = 0]; + do { + $s .= $map[$c[$i]] ?? sprintf('\x%02X', \ord($c[$i])); + } while (isset($c[++$i])); + + return $s.$endCchr; + }, $value, -1, $cchrCount); + + if ($this->colors) { + if ($cchrCount && "\033" === $value[0]) { + $value = substr($value, \strlen($startCchr)); + } else { + $value = "\033[{$this->styles[$style]}m".$value; + } + if ($cchrCount && str_ends_with($value, $endCchr)) { + $value = substr($value, 0, -\strlen($endCchr)); + } else { + $value .= "\033[{$this->styles['default']}m"; + } + } + + href: + if ($this->colors && $this->handlesHrefGracefully) { + if (isset($attr['file']) && $href = $this->getSourceLink($attr['file'], $attr['line'] ?? 0)) { + if ('note' === $style) { + $value .= "\033]8;;{$href}\033\\^\033]8;;\033\\"; + } else { + $attr['href'] = $href; + } + } + if (isset($attr['href'])) { + $value = "\033]8;;{$attr['href']}\033\\{$value}\033]8;;\033\\"; + } + } elseif ($attr['if_links'] ?? false) { + return ''; + } + + return $value; + } + + protected function supportsColors(): bool + { + if ($this->outputStream !== static::$defaultOutput) { + return $this->hasColorSupport($this->outputStream); + } + if (null !== static::$defaultColors) { + return static::$defaultColors; + } + if (isset($_SERVER['argv'][1])) { + $colors = $_SERVER['argv']; + $i = \count($colors); + while (--$i > 0) { + if (isset($colors[$i][5])) { + switch ($colors[$i]) { + case '--ansi': + case '--color': + case '--color=yes': + case '--color=force': + case '--color=always': + case '--colors=always': + return static::$defaultColors = true; + + case '--no-ansi': + case '--color=no': + case '--color=none': + case '--color=never': + case '--colors=never': + return static::$defaultColors = false; + } + } + } + } + + $h = stream_get_meta_data($this->outputStream) + ['wrapper_type' => null]; + $h = 'Output' === $h['stream_type'] && 'PHP' === $h['wrapper_type'] ? fopen('php://stdout', 'w') : $this->outputStream; + + return static::$defaultColors = $this->hasColorSupport($h); + } + + /** + * {@inheritdoc} + */ + protected function dumpLine(int $depth, bool $endOfValue = false) + { + if ($this->colors) { + $this->line = sprintf("\033[%sm%s\033[m", $this->styles['default'], $this->line); + } + parent::dumpLine($depth); + } + + protected function endValue(Cursor $cursor) + { + if (-1 === $cursor->hashType) { + return; + } + + if (Stub::ARRAY_INDEXED === $cursor->hashType || Stub::ARRAY_ASSOC === $cursor->hashType) { + if (self::DUMP_TRAILING_COMMA & $this->flags && 0 < $cursor->depth) { + $this->line .= ','; + } elseif (self::DUMP_COMMA_SEPARATOR & $this->flags && 1 < $cursor->hashLength - $cursor->hashIndex) { + $this->line .= ','; + } + } + + $this->dumpLine($cursor->depth, true); + } + + /** + * Returns true if the stream supports colorization. + * + * Reference: Composer\XdebugHandler\Process::supportsColor + * https://github.com/composer/xdebug-handler + */ + private function hasColorSupport(mixed $stream): bool + { + if (!\is_resource($stream) || 'stream' !== get_resource_type($stream)) { + return false; + } + + // Follow https://no-color.org/ + if (isset($_SERVER['NO_COLOR']) || false !== getenv('NO_COLOR')) { + return false; + } + + if ('Hyper' === getenv('TERM_PROGRAM')) { + return true; + } + + if (\DIRECTORY_SEPARATOR === '\\') { + return (\function_exists('sapi_windows_vt100_support') + && @sapi_windows_vt100_support($stream)) + || false !== getenv('ANSICON') + || 'ON' === getenv('ConEmuANSI') + || 'xterm' === getenv('TERM'); + } + + return stream_isatty($stream); + } + + /** + * Returns true if the Windows terminal supports true color. + * + * Note that this does not check an output stream, but relies on environment + * variables from known implementations, or a PHP and Windows version that + * supports true color. + */ + private function isWindowsTrueColor(): bool + { + $result = 183 <= getenv('ANSICON_VER') + || 'ON' === getenv('ConEmuANSI') + || 'xterm' === getenv('TERM') + || 'Hyper' === getenv('TERM_PROGRAM'); + + if (!$result) { + $version = sprintf( + '%s.%s.%s', + PHP_WINDOWS_VERSION_MAJOR, + PHP_WINDOWS_VERSION_MINOR, + PHP_WINDOWS_VERSION_BUILD + ); + $result = $version >= '10.0.15063'; + } + + return $result; + } + + private function getSourceLink(string $file, int $line) + { + if ($fmt = $this->displayOptions['fileLinkFormat']) { + return \is_string($fmt) ? strtr($fmt, ['%f' => $file, '%l' => $line]) : ($fmt->format($file, $line) ?: 'file://'.$file.'#L'.$line); + } + + return false; + } +} diff --git a/vendor/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php b/vendor/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php new file mode 100644 index 0000000..38f8789 --- /dev/null +++ b/vendor/symfony/var-dumper/Dumper/ContextProvider/CliContextProvider.php @@ -0,0 +1,32 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Dumper\ContextProvider; + +/** + * Tries to provide context on CLI. + * + * @author Maxime Steinhausser + */ +final class CliContextProvider implements ContextProviderInterface +{ + public function getContext(): ?array + { + if ('cli' !== \PHP_SAPI) { + return null; + } + + return [ + 'command_line' => $commandLine = implode(' ', $_SERVER['argv'] ?? []), + 'identifier' => hash('crc32b', $commandLine.$_SERVER['REQUEST_TIME_FLOAT']), + ]; + } +} diff --git a/vendor/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php b/vendor/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php new file mode 100644 index 0000000..532aa0f --- /dev/null +++ b/vendor/symfony/var-dumper/Dumper/ContextProvider/ContextProviderInterface.php @@ -0,0 +1,22 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Dumper\ContextProvider; + +/** + * Interface to provide contextual data about dump data clones sent to a server. + * + * @author Maxime Steinhausser + */ +interface ContextProviderInterface +{ + public function getContext(): ?array; +} diff --git a/vendor/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php b/vendor/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php new file mode 100644 index 0000000..3684a47 --- /dev/null +++ b/vendor/symfony/var-dumper/Dumper/ContextProvider/RequestContextProvider.php @@ -0,0 +1,51 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Dumper\ContextProvider; + +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\VarDumper\Caster\ReflectionCaster; +use Symfony\Component\VarDumper\Cloner\VarCloner; + +/** + * Tries to provide context from a request. + * + * @author Maxime Steinhausser + */ +final class RequestContextProvider implements ContextProviderInterface +{ + private $requestStack; + private $cloner; + + public function __construct(RequestStack $requestStack) + { + $this->requestStack = $requestStack; + $this->cloner = new VarCloner(); + $this->cloner->setMaxItems(0); + $this->cloner->addCasters(ReflectionCaster::UNSET_CLOSURE_FILE_INFO); + } + + public function getContext(): ?array + { + if (null === $request = $this->requestStack->getCurrentRequest()) { + return null; + } + + $controller = $request->attributes->get('_controller'); + + return [ + 'uri' => $request->getUri(), + 'method' => $request->getMethod(), + 'controller' => $controller ? $this->cloner->cloneVar($controller) : $controller, + 'identifier' => spl_object_hash($request), + ]; + } +} diff --git a/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php b/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php new file mode 100644 index 0000000..8ef6e36 --- /dev/null +++ b/vendor/symfony/var-dumper/Dumper/ContextProvider/SourceContextProvider.php @@ -0,0 +1,126 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Dumper\ContextProvider; + +use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; +use Symfony\Component\VarDumper\Cloner\VarCloner; +use Symfony\Component\VarDumper\Dumper\HtmlDumper; +use Symfony\Component\VarDumper\VarDumper; +use Twig\Template; + +/** + * Tries to provide context from sources (class name, file, line, code excerpt, ...). + * + * @author Nicolas Grekas + * @author Maxime Steinhausser + */ +final class SourceContextProvider implements ContextProviderInterface +{ + private int $limit; + private ?string $charset; + private ?string $projectDir; + private $fileLinkFormatter; + + public function __construct(string $charset = null, string $projectDir = null, FileLinkFormatter $fileLinkFormatter = null, int $limit = 9) + { + $this->charset = $charset; + $this->projectDir = $projectDir; + $this->fileLinkFormatter = $fileLinkFormatter; + $this->limit = $limit; + } + + public function getContext(): ?array + { + $trace = debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT | \DEBUG_BACKTRACE_IGNORE_ARGS, $this->limit); + + $file = $trace[1]['file']; + $line = $trace[1]['line']; + $name = false; + $fileExcerpt = false; + + for ($i = 2; $i < $this->limit; ++$i) { + if (isset($trace[$i]['class'], $trace[$i]['function']) + && 'dump' === $trace[$i]['function'] + && VarDumper::class === $trace[$i]['class'] + ) { + $file = $trace[$i]['file'] ?? $file; + $line = $trace[$i]['line'] ?? $line; + + while (++$i < $this->limit) { + if (isset($trace[$i]['function'], $trace[$i]['file']) && empty($trace[$i]['class']) && !str_starts_with($trace[$i]['function'], 'call_user_func')) { + $file = $trace[$i]['file']; + $line = $trace[$i]['line']; + + break; + } elseif (isset($trace[$i]['object']) && $trace[$i]['object'] instanceof Template) { + $template = $trace[$i]['object']; + $name = $template->getTemplateName(); + $src = method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getCode() : (method_exists($template, 'getSource') ? $template->getSource() : false); + $info = $template->getDebugInfo(); + if (isset($info[$trace[$i - 1]['line']])) { + $line = $info[$trace[$i - 1]['line']]; + $file = method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getPath() : null; + + if ($src) { + $src = explode("\n", $src); + $fileExcerpt = []; + + for ($i = max($line - 3, 1), $max = min($line + 3, \count($src)); $i <= $max; ++$i) { + $fileExcerpt[] = ''.$this->htmlEncode($src[$i - 1]).''; + } + + $fileExcerpt = '
      '.implode("\n", $fileExcerpt).'
    '; + } + } + break; + } + } + break; + } + } + + if (false === $name) { + $name = str_replace('\\', '/', $file); + $name = substr($name, strrpos($name, '/') + 1); + } + + $context = ['name' => $name, 'file' => $file, 'line' => $line]; + $context['file_excerpt'] = $fileExcerpt; + + if (null !== $this->projectDir) { + $context['project_dir'] = $this->projectDir; + if (str_starts_with($file, $this->projectDir)) { + $context['file_relative'] = ltrim(substr($file, \strlen($this->projectDir)), \DIRECTORY_SEPARATOR); + } + } + + if ($this->fileLinkFormatter && $fileLink = $this->fileLinkFormatter->format($context['file'], $context['line'])) { + $context['file_link'] = $fileLink; + } + + return $context; + } + + private function htmlEncode(string $s): string + { + $html = ''; + + $dumper = new HtmlDumper(function ($line) use (&$html) { $html .= $line; }, $this->charset); + $dumper->setDumpHeader(''); + $dumper->setDumpBoundaries('', ''); + + $cloner = new VarCloner(); + $dumper->dump($cloner->cloneVar($s)); + + return substr(strip_tags($html), 1, -1); + } +} diff --git a/vendor/symfony/var-dumper/Dumper/ContextualizedDumper.php b/vendor/symfony/var-dumper/Dumper/ContextualizedDumper.php new file mode 100644 index 0000000..18ab56e --- /dev/null +++ b/vendor/symfony/var-dumper/Dumper/ContextualizedDumper.php @@ -0,0 +1,43 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Dumper; + +use Symfony\Component\VarDumper\Cloner\Data; +use Symfony\Component\VarDumper\Dumper\ContextProvider\ContextProviderInterface; + +/** + * @author Kévin Thérage + */ +class ContextualizedDumper implements DataDumperInterface +{ + private $wrappedDumper; + private array $contextProviders; + + /** + * @param ContextProviderInterface[] $contextProviders + */ + public function __construct(DataDumperInterface $wrappedDumper, array $contextProviders) + { + $this->wrappedDumper = $wrappedDumper; + $this->contextProviders = $contextProviders; + } + + public function dump(Data $data) + { + $context = []; + foreach ($this->contextProviders as $contextProvider) { + $context[\get_class($contextProvider)] = $contextProvider->getContext(); + } + + $this->wrappedDumper->dump($data->withContext($context)); + } +} diff --git a/vendor/symfony/var-dumper/Dumper/DataDumperInterface.php b/vendor/symfony/var-dumper/Dumper/DataDumperInterface.php new file mode 100644 index 0000000..b173bcc --- /dev/null +++ b/vendor/symfony/var-dumper/Dumper/DataDumperInterface.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Dumper; + +use Symfony\Component\VarDumper\Cloner\Data; + +/** + * DataDumperInterface for dumping Data objects. + * + * @author Nicolas Grekas + */ +interface DataDumperInterface +{ + public function dump(Data $data); +} diff --git a/vendor/symfony/var-dumper/Dumper/HtmlDumper.php b/vendor/symfony/var-dumper/Dumper/HtmlDumper.php new file mode 100644 index 0000000..e74888d --- /dev/null +++ b/vendor/symfony/var-dumper/Dumper/HtmlDumper.php @@ -0,0 +1,986 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Dumper; + +use Symfony\Component\VarDumper\Cloner\Cursor; +use Symfony\Component\VarDumper\Cloner\Data; + +/** + * HtmlDumper dumps variables as HTML. + * + * @author Nicolas Grekas + */ +class HtmlDumper extends CliDumper +{ + public static $defaultOutput = 'php://output'; + + protected static $themes = [ + 'dark' => [ + 'default' => 'background-color:#18171B; color:#FF8400; line-height:1.2em; font:12px Menlo, Monaco, Consolas, monospace; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:99999; word-break: break-all', + 'num' => 'font-weight:bold; color:#1299DA', + 'const' => 'font-weight:bold', + 'str' => 'font-weight:bold; color:#56DB3A', + 'note' => 'color:#1299DA', + 'ref' => 'color:#A0A0A0', + 'public' => 'color:#FFFFFF', + 'protected' => 'color:#FFFFFF', + 'private' => 'color:#FFFFFF', + 'meta' => 'color:#B729D9', + 'key' => 'color:#56DB3A', + 'index' => 'color:#1299DA', + 'ellipsis' => 'color:#FF8400', + 'ns' => 'user-select:none;', + ], + 'light' => [ + 'default' => 'background:none; color:#CC7832; line-height:1.2em; font:12px Menlo, Monaco, Consolas, monospace; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:99999; word-break: break-all', + 'num' => 'font-weight:bold; color:#1299DA', + 'const' => 'font-weight:bold', + 'str' => 'font-weight:bold; color:#629755;', + 'note' => 'color:#6897BB', + 'ref' => 'color:#6E6E6E', + 'public' => 'color:#262626', + 'protected' => 'color:#262626', + 'private' => 'color:#262626', + 'meta' => 'color:#B729D9', + 'key' => 'color:#789339', + 'index' => 'color:#1299DA', + 'ellipsis' => 'color:#CC7832', + 'ns' => 'user-select:none;', + ], + ]; + + protected $dumpHeader; + protected $dumpPrefix = '
    ';
    +    protected $dumpSuffix = '
    '; + protected $dumpId = 'sf-dump'; + protected $colors = true; + protected $headerIsDumped = false; + protected $lastDepth = -1; + protected $styles; + + private array $displayOptions = [ + 'maxDepth' => 1, + 'maxStringLength' => 160, + 'fileLinkFormat' => null, + ]; + private array $extraDisplayOptions = []; + + /** + * {@inheritdoc} + */ + public function __construct($output = null, string $charset = null, int $flags = 0) + { + AbstractDumper::__construct($output, $charset, $flags); + $this->dumpId = 'sf-dump-'.mt_rand(); + $this->displayOptions['fileLinkFormat'] = \ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); + $this->styles = static::$themes['dark'] ?? self::$themes['dark']; + } + + /** + * {@inheritdoc} + */ + public function setStyles(array $styles) + { + $this->headerIsDumped = false; + $this->styles = $styles + $this->styles; + } + + public function setTheme(string $themeName) + { + if (!isset(static::$themes[$themeName])) { + throw new \InvalidArgumentException(sprintf('Theme "%s" does not exist in class "%s".', $themeName, static::class)); + } + + $this->setStyles(static::$themes[$themeName]); + } + + /** + * Configures display options. + * + * @param array $displayOptions A map of display options to customize the behavior + */ + public function setDisplayOptions(array $displayOptions) + { + $this->headerIsDumped = false; + $this->displayOptions = $displayOptions + $this->displayOptions; + } + + /** + * Sets an HTML header that will be dumped once in the output stream. + */ + public function setDumpHeader(?string $header) + { + $this->dumpHeader = $header; + } + + /** + * Sets an HTML prefix and suffix that will encapse every single dump. + */ + public function setDumpBoundaries(string $prefix, string $suffix) + { + $this->dumpPrefix = $prefix; + $this->dumpSuffix = $suffix; + } + + /** + * {@inheritdoc} + */ + public function dump(Data $data, $output = null, array $extraDisplayOptions = []): ?string + { + $this->extraDisplayOptions = $extraDisplayOptions; + $result = parent::dump($data, $output); + $this->dumpId = 'sf-dump-'.mt_rand(); + + return $result; + } + + /** + * Dumps the HTML header. + */ + protected function getDumpHeader() + { + $this->headerIsDumped = $this->outputStream ?? $this->lineDumper; + + if (null !== $this->dumpHeader) { + return $this->dumpHeader; + } + + $line = str_replace('{$options}', json_encode($this->displayOptions, \JSON_FORCE_OBJECT), <<<'EOHTML' +'.$this->dumpHeader; + } + + /** + * {@inheritdoc} + */ + public function dumpString(Cursor $cursor, string $str, bool $bin, int $cut) + { + if ('' === $str && isset($cursor->attr['img-data'], $cursor->attr['content-type'])) { + $this->dumpKey($cursor); + $this->line .= $this->style('default', $cursor->attr['img-size'] ?? '', []); + $this->line .= $cursor->depth >= $this->displayOptions['maxDepth'] ? ' ' : ' '; + $this->endValue($cursor); + $this->line .= $this->indentPad; + $this->line .= sprintf('', $cursor->attr['content-type'], base64_encode($cursor->attr['img-data'])); + $this->endValue($cursor); + } else { + parent::dumpString($cursor, $str, $bin, $cut); + } + } + + /** + * {@inheritdoc} + */ + public function enterHash(Cursor $cursor, int $type, string|int|null $class, bool $hasChild) + { + if (Cursor::HASH_OBJECT === $type) { + $cursor->attr['depth'] = $cursor->depth; + } + parent::enterHash($cursor, $type, $class, false); + + if ($cursor->skipChildren || $cursor->depth >= $this->displayOptions['maxDepth']) { + $cursor->skipChildren = false; + $eol = ' class=sf-dump-compact>'; + } else { + $this->expandNextHash = false; + $eol = ' class=sf-dump-expanded>'; + } + + if ($hasChild) { + $this->line .= 'dumpId, $r); + } + $this->line .= $eol; + $this->dumpLine($cursor->depth); + } + } + + /** + * {@inheritdoc} + */ + public function leaveHash(Cursor $cursor, int $type, string|int|null $class, bool $hasChild, int $cut) + { + $this->dumpEllipsis($cursor, $hasChild, $cut); + if ($hasChild) { + $this->line .= ''; + } + parent::leaveHash($cursor, $type, $class, $hasChild, 0); + } + + /** + * {@inheritdoc} + */ + protected function style(string $style, string $value, array $attr = []): string + { + if ('' === $value) { + return ''; + } + + $v = esc($value); + + if ('ref' === $style) { + if (empty($attr['count'])) { + return sprintf('%s', $v); + } + $r = ('#' !== $v[0] ? 1 - ('@' !== $v[0]) : 2).substr($value, 1); + + return sprintf('%s', $this->dumpId, $r, 1 + $attr['count'], $v); + } + + if ('const' === $style && isset($attr['value'])) { + $style .= sprintf(' title="%s"', esc(\is_scalar($attr['value']) ? $attr['value'] : json_encode($attr['value']))); + } elseif ('public' === $style) { + $style .= sprintf(' title="%s"', empty($attr['dynamic']) ? 'Public property' : 'Runtime added dynamic property'); + } elseif ('str' === $style && 1 < $attr['length']) { + $style .= sprintf(' title="%d%s characters"', $attr['length'], $attr['binary'] ? ' binary or non-UTF-8' : ''); + } elseif ('note' === $style && 0 < ($attr['depth'] ?? 0) && false !== $c = strrpos($value, '\\')) { + $style .= ' title=""'; + $attr += [ + 'ellipsis' => \strlen($value) - $c, + 'ellipsis-type' => 'note', + 'ellipsis-tail' => 1, + ]; + } elseif ('protected' === $style) { + $style .= ' title="Protected property"'; + } elseif ('meta' === $style && isset($attr['title'])) { + $style .= sprintf(' title="%s"', esc($this->utf8Encode($attr['title']))); + } elseif ('private' === $style) { + $style .= sprintf(' title="Private property defined in class: `%s`"', esc($this->utf8Encode($attr['class']))); + } + $map = static::$controlCharsMap; + + if (isset($attr['ellipsis'])) { + $class = 'sf-dump-ellipsis'; + if (isset($attr['ellipsis-type'])) { + $class = sprintf('"%s sf-dump-ellipsis-%s"', $class, $attr['ellipsis-type']); + } + $label = esc(substr($value, -$attr['ellipsis'])); + $style = str_replace(' title="', " title=\"$v\n", $style); + $v = sprintf('%s', $class, substr($v, 0, -\strlen($label))); + + if (!empty($attr['ellipsis-tail'])) { + $tail = \strlen(esc(substr($value, -$attr['ellipsis'], $attr['ellipsis-tail']))); + $v .= sprintf('%s%s', $class, substr($label, 0, $tail), substr($label, $tail)); + } else { + $v .= $label; + } + } + + $v = "".preg_replace_callback(static::$controlCharsRx, function ($c) use ($map) { + $s = $b = ''; + }, $v).''; + + if (isset($attr['file']) && $href = $this->getSourceLink($attr['file'], $attr['line'] ?? 0)) { + $attr['href'] = $href; + } + if (isset($attr['href'])) { + $target = isset($attr['file']) ? '' : ' target="_blank"'; + $v = sprintf('%s', esc($this->utf8Encode($attr['href'])), $target, $v); + } + if (isset($attr['lang'])) { + $v = sprintf('%s', esc($attr['lang']), $v); + } + + return $v; + } + + /** + * {@inheritdoc} + */ + protected function dumpLine(int $depth, bool $endOfValue = false) + { + if (-1 === $this->lastDepth) { + $this->line = sprintf($this->dumpPrefix, $this->dumpId, $this->indentPad).$this->line; + } + if ($this->headerIsDumped !== ($this->outputStream ?? $this->lineDumper)) { + $this->line = $this->getDumpHeader().$this->line; + } + + if (-1 === $depth) { + $args = ['"'.$this->dumpId.'"']; + if ($this->extraDisplayOptions) { + $args[] = json_encode($this->extraDisplayOptions, \JSON_FORCE_OBJECT); + } + // Replace is for BC + $this->line .= sprintf(str_replace('"%s"', '%s', $this->dumpSuffix), implode(', ', $args)); + } + $this->lastDepth = $depth; + + $this->line = mb_encode_numericentity($this->line, [0x80, 0x10FFFF, 0, 0x1FFFFF], 'UTF-8'); + + if (-1 === $depth) { + AbstractDumper::dumpLine(0); + } + AbstractDumper::dumpLine($depth); + } + + private function getSourceLink(string $file, int $line) + { + $options = $this->extraDisplayOptions + $this->displayOptions; + + if ($fmt = $options['fileLinkFormat']) { + return \is_string($fmt) ? strtr($fmt, ['%f' => $file, '%l' => $line]) : $fmt->format($file, $line); + } + + return false; + } +} + +function esc(string $str) +{ + return htmlspecialchars($str, \ENT_QUOTES, 'UTF-8'); +} diff --git a/vendor/symfony/var-dumper/Dumper/ServerDumper.php b/vendor/symfony/var-dumper/Dumper/ServerDumper.php new file mode 100644 index 0000000..94795bf --- /dev/null +++ b/vendor/symfony/var-dumper/Dumper/ServerDumper.php @@ -0,0 +1,53 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Dumper; + +use Symfony\Component\VarDumper\Cloner\Data; +use Symfony\Component\VarDumper\Dumper\ContextProvider\ContextProviderInterface; +use Symfony\Component\VarDumper\Server\Connection; + +/** + * ServerDumper forwards serialized Data clones to a server. + * + * @author Maxime Steinhausser + */ +class ServerDumper implements DataDumperInterface +{ + private $connection; + private $wrappedDumper; + + /** + * @param string $host The server host + * @param DataDumperInterface|null $wrappedDumper A wrapped instance used whenever we failed contacting the server + * @param ContextProviderInterface[] $contextProviders Context providers indexed by context name + */ + public function __construct(string $host, DataDumperInterface $wrappedDumper = null, array $contextProviders = []) + { + $this->connection = new Connection($host, $contextProviders); + $this->wrappedDumper = $wrappedDumper; + } + + public function getContextProviders(): array + { + return $this->connection->getContextProviders(); + } + + /** + * {@inheritdoc} + */ + public function dump(Data $data) + { + if (!$this->connection->write($data) && $this->wrappedDumper) { + $this->wrappedDumper->dump($data); + } + } +} diff --git a/vendor/symfony/var-dumper/Exception/ThrowingCasterException.php b/vendor/symfony/var-dumper/Exception/ThrowingCasterException.php new file mode 100644 index 0000000..122f0d3 --- /dev/null +++ b/vendor/symfony/var-dumper/Exception/ThrowingCasterException.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Exception; + +/** + * @author Nicolas Grekas + */ +class ThrowingCasterException extends \Exception +{ + /** + * @param \Throwable $prev The exception thrown from the caster + */ + public function __construct(\Throwable $prev) + { + parent::__construct('Unexpected '.\get_class($prev).' thrown from a caster: '.$prev->getMessage(), 0, $prev); + } +} diff --git a/vendor/symfony/var-dumper/LICENSE b/vendor/symfony/var-dumper/LICENSE new file mode 100644 index 0000000..72412a6 --- /dev/null +++ b/vendor/symfony/var-dumper/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014-2023 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/symfony/var-dumper/README.md b/vendor/symfony/var-dumper/README.md new file mode 100644 index 0000000..a0da8c9 --- /dev/null +++ b/vendor/symfony/var-dumper/README.md @@ -0,0 +1,15 @@ +VarDumper Component +=================== + +The VarDumper component provides mechanisms for walking through any arbitrary +PHP variable. It provides a better `dump()` function that you can use instead +of `var_dump()`. + +Resources +--------- + + * [Documentation](https://symfony.com/doc/current/components/var_dumper/introduction.html) + * [Contributing](https://symfony.com/doc/current/contributing/index.html) + * [Report issues](https://github.com/symfony/symfony/issues) and + [send Pull Requests](https://github.com/symfony/symfony/pulls) + in the [main Symfony repository](https://github.com/symfony/symfony) diff --git a/vendor/symfony/var-dumper/Resources/bin/var-dump-server b/vendor/symfony/var-dumper/Resources/bin/var-dump-server new file mode 100755 index 0000000..f398fce --- /dev/null +++ b/vendor/symfony/var-dumper/Resources/bin/var-dump-server @@ -0,0 +1,67 @@ +#!/usr/bin/env php + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +if ('cli' !== PHP_SAPI) { + throw new Exception('This script must be run from the command line.'); +} + +/** + * Starts a dump server to collect and output dumps on a single place with multiple formats support. + * + * @author Maxime Steinhausser + */ + +use Psr\Log\LoggerInterface; +use Symfony\Component\Console\Application; +use Symfony\Component\Console\Input\ArgvInput; +use Symfony\Component\Console\Input\InputOption; +use Symfony\Component\Console\Logger\ConsoleLogger; +use Symfony\Component\Console\Output\ConsoleOutput; +use Symfony\Component\VarDumper\Command\ServerDumpCommand; +use Symfony\Component\VarDumper\Server\DumpServer; + +function includeIfExists(string $file): bool +{ + return file_exists($file) && include $file; +} + +if ( + !includeIfExists(__DIR__ . '/../../../../autoload.php') && + !includeIfExists(__DIR__ . '/../../vendor/autoload.php') && + !includeIfExists(__DIR__ . '/../../../../../../vendor/autoload.php') +) { + fwrite(STDERR, 'Install dependencies using Composer.'.PHP_EOL); + exit(1); +} + +if (!class_exists(Application::class)) { + fwrite(STDERR, 'You need the "symfony/console" component in order to run the VarDumper server.'.PHP_EOL); + exit(1); +} + +$input = new ArgvInput(); +$output = new ConsoleOutput(); +$defaultHost = '127.0.0.1:9912'; +$host = $input->getParameterOption(['--host'], $_SERVER['VAR_DUMPER_SERVER'] ?? $defaultHost, true); +$logger = interface_exists(LoggerInterface::class) ? new ConsoleLogger($output->getErrorOutput()) : null; + +$app = new Application(); + +$app->getDefinition()->addOption( + new InputOption('--host', null, InputOption::VALUE_REQUIRED, 'The address the server should listen to', $defaultHost) +); + +$app->add($command = new ServerDumpCommand(new DumpServer($host, $logger))) + ->getApplication() + ->setDefaultCommand($command->getName(), true) + ->run($input, $output) +; diff --git a/vendor/symfony/var-dumper/Resources/css/htmlDescriptor.css b/vendor/symfony/var-dumper/Resources/css/htmlDescriptor.css new file mode 100644 index 0000000..8f706d6 --- /dev/null +++ b/vendor/symfony/var-dumper/Resources/css/htmlDescriptor.css @@ -0,0 +1,130 @@ +body { + display: flex; + flex-direction: column-reverse; + justify-content: flex-end; + max-width: 1140px; + margin: auto; + padding: 15px; + word-wrap: break-word; + background-color: #F9F9F9; + color: #222; + font-family: Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 1.4; +} +p { + margin: 0; +} +a { + color: #218BC3; + text-decoration: none; +} +a:hover { + text-decoration: underline; +} +.text-small { + font-size: 12px !important; +} +article { + margin: 5px; + margin-bottom: 10px; +} +article > header > .row { + display: flex; + flex-direction: row; + align-items: baseline; + margin-bottom: 10px; +} +article > header > .row > .col { + flex: 1; + display: flex; + align-items: baseline; +} +article > header > .row > h2 { + font-size: 14px; + color: #222; + font-weight: normal; + font-family: "Lucida Console", monospace, sans-serif; + word-break: break-all; + margin: 20px 5px 0 0; + user-select: all; +} +article > header > .row > h2 > code { + white-space: nowrap; + user-select: none; + color: #cc2255; + background-color: #f7f7f9; + border: 1px solid #e1e1e8; + border-radius: 3px; + margin-right: 5px; + padding: 0 3px; +} +article > header > .row > time.col { + flex: 0; + text-align: right; + white-space: nowrap; + color: #999; + font-style: italic; +} +article > header ul.tags { + list-style: none; + padding: 0; + margin: 0; + font-size: 12px; +} +article > header ul.tags > li { + user-select: all; + margin-bottom: 2px; +} +article > header ul.tags > li > span.badge { + display: inline-block; + padding: .25em .4em; + margin-right: 5px; + border-radius: 4px; + background-color: #6c757d3b; + color: #524d4d; + font-size: 12px; + text-align: center; + font-weight: 700; + line-height: 1; + white-space: nowrap; + vertical-align: baseline; + user-select: none; +} +article > section.body { + border: 1px solid #d8d8d8; + background: #FFF; + padding: 10px; + border-radius: 3px; +} +pre.sf-dump { + border-radius: 3px; + margin-bottom: 0; +} +.hidden { + display: none !important; +} +.dumped-tag > .sf-dump { + display: inline-block; + margin: 0; + padding: 1px 5px; + line-height: 1.4; + vertical-align: top; + background-color: transparent; + user-select: auto; +} +.dumped-tag > pre.sf-dump, +.dumped-tag > .sf-dump-default { + color: #CC7832; + background: none; +} +.dumped-tag > .sf-dump .sf-dump-str { color: #629755; } +.dumped-tag > .sf-dump .sf-dump-private, +.dumped-tag > .sf-dump .sf-dump-protected, +.dumped-tag > .sf-dump .sf-dump-public { color: #262626; } +.dumped-tag > .sf-dump .sf-dump-note { color: #6897BB; } +.dumped-tag > .sf-dump .sf-dump-key { color: #789339; } +.dumped-tag > .sf-dump .sf-dump-ref { color: #6E6E6E; } +.dumped-tag > .sf-dump .sf-dump-ellipsis { color: #CC7832; max-width: 100em; } +.dumped-tag > .sf-dump .sf-dump-ellipsis-path { max-width: 5em; } +.dumped-tag > .sf-dump .sf-dump-ns { user-select: none; } diff --git a/vendor/symfony/var-dumper/Resources/functions/dump.php b/vendor/symfony/var-dumper/Resources/functions/dump.php new file mode 100644 index 0000000..6221a4d --- /dev/null +++ b/vendor/symfony/var-dumper/Resources/functions/dump.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Component\VarDumper\VarDumper; + +if (!function_exists('dump')) { + /** + * @author Nicolas Grekas + */ + function dump(mixed $var, mixed ...$moreVars): mixed + { + VarDumper::dump($var); + + foreach ($moreVars as $v) { + VarDumper::dump($v); + } + + if (1 < func_num_args()) { + return func_get_args(); + } + + return $var; + } +} + +if (!function_exists('dd')) { + /** + * @return never + */ + function dd(...$vars): void + { + if (!in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && !headers_sent()) { + header('HTTP/1.1 500 Internal Server Error'); + } + + foreach ($vars as $v) { + VarDumper::dump($v); + } + + exit(1); + } +} diff --git a/vendor/symfony/var-dumper/Resources/js/htmlDescriptor.js b/vendor/symfony/var-dumper/Resources/js/htmlDescriptor.js new file mode 100644 index 0000000..63101e5 --- /dev/null +++ b/vendor/symfony/var-dumper/Resources/js/htmlDescriptor.js @@ -0,0 +1,10 @@ +document.addEventListener('DOMContentLoaded', function() { + let prev = null; + Array.from(document.getElementsByTagName('article')).reverse().forEach(function (article) { + const dedupId = article.dataset.dedupId; + if (dedupId === prev) { + article.getElementsByTagName('header')[0].classList.add('hidden'); + } + prev = dedupId; + }); +}); diff --git a/vendor/symfony/var-dumper/Server/Connection.php b/vendor/symfony/var-dumper/Server/Connection.php new file mode 100644 index 0000000..97b5b94 --- /dev/null +++ b/vendor/symfony/var-dumper/Server/Connection.php @@ -0,0 +1,99 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Server; + +use Symfony\Component\VarDumper\Cloner\Data; +use Symfony\Component\VarDumper\Dumper\ContextProvider\ContextProviderInterface; + +/** + * Forwards serialized Data clones to a server. + * + * @author Maxime Steinhausser + */ +class Connection +{ + private string $host; + private array $contextProviders; + + /** + * @var resource|null + */ + private $socket; + + /** + * @param string $host The server host + * @param ContextProviderInterface[] $contextProviders Context providers indexed by context name + */ + public function __construct(string $host, array $contextProviders = []) + { + if (!str_contains($host, '://')) { + $host = 'tcp://'.$host; + } + + $this->host = $host; + $this->contextProviders = $contextProviders; + } + + public function getContextProviders(): array + { + return $this->contextProviders; + } + + public function write(Data $data): bool + { + $socketIsFresh = !$this->socket; + if (!$this->socket = $this->socket ?: $this->createSocket()) { + return false; + } + + $context = ['timestamp' => microtime(true)]; + foreach ($this->contextProviders as $name => $provider) { + $context[$name] = $provider->getContext(); + } + $context = array_filter($context); + $encodedPayload = base64_encode(serialize([$data, $context]))."\n"; + + set_error_handler([self::class, 'nullErrorHandler']); + try { + if (-1 !== stream_socket_sendto($this->socket, $encodedPayload)) { + return true; + } + if (!$socketIsFresh) { + stream_socket_shutdown($this->socket, \STREAM_SHUT_RDWR); + fclose($this->socket); + $this->socket = $this->createSocket(); + } + if (-1 !== stream_socket_sendto($this->socket, $encodedPayload)) { + return true; + } + } finally { + restore_error_handler(); + } + + return false; + } + + private static function nullErrorHandler(int $t, string $m) + { + // no-op + } + + private function createSocket() + { + set_error_handler([self::class, 'nullErrorHandler']); + try { + return stream_socket_client($this->host, $errno, $errstr, 3, \STREAM_CLIENT_CONNECT | \STREAM_CLIENT_ASYNC_CONNECT); + } finally { + restore_error_handler(); + } + } +} diff --git a/vendor/symfony/var-dumper/Server/DumpServer.php b/vendor/symfony/var-dumper/Server/DumpServer.php new file mode 100644 index 0000000..6a43c12 --- /dev/null +++ b/vendor/symfony/var-dumper/Server/DumpServer.php @@ -0,0 +1,115 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Server; + +use Psr\Log\LoggerInterface; +use Symfony\Component\VarDumper\Cloner\Data; +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * A server collecting Data clones sent by a ServerDumper. + * + * @author Maxime Steinhausser + * + * @final + */ +class DumpServer +{ + private string $host; + private $logger; + + /** + * @var resource|null + */ + private $socket; + + public function __construct(string $host, LoggerInterface $logger = null) + { + if (!str_contains($host, '://')) { + $host = 'tcp://'.$host; + } + + $this->host = $host; + $this->logger = $logger; + } + + public function start(): void + { + if (!$this->socket = stream_socket_server($this->host, $errno, $errstr)) { + throw new \RuntimeException(sprintf('Server start failed on "%s": ', $this->host).$errstr.' '.$errno); + } + } + + public function listen(callable $callback): void + { + if (null === $this->socket) { + $this->start(); + } + + foreach ($this->getMessages() as $clientId => $message) { + if ($this->logger) { + $this->logger->info('Received a payload from client {clientId}', ['clientId' => $clientId]); + } + + $payload = @unserialize(base64_decode($message), ['allowed_classes' => [Data::class, Stub::class]]); + + // Impossible to decode the message, give up. + if (false === $payload) { + if ($this->logger) { + $this->logger->warning('Unable to decode a message from {clientId} client.', ['clientId' => $clientId]); + } + + continue; + } + + if (!\is_array($payload) || \count($payload) < 2 || !$payload[0] instanceof Data || !\is_array($payload[1])) { + if ($this->logger) { + $this->logger->warning('Invalid payload from {clientId} client. Expected an array of two elements (Data $data, array $context)', ['clientId' => $clientId]); + } + + continue; + } + + [$data, $context] = $payload; + + $callback($data, $context, $clientId); + } + } + + public function getHost(): string + { + return $this->host; + } + + private function getMessages(): iterable + { + $sockets = [(int) $this->socket => $this->socket]; + $write = []; + + while (true) { + $read = $sockets; + stream_select($read, $write, $write, null); + + foreach ($read as $stream) { + if ($this->socket === $stream) { + $stream = stream_socket_accept($this->socket); + $sockets[(int) $stream] = $stream; + } elseif (feof($stream)) { + unset($sockets[(int) $stream]); + fclose($stream); + } else { + yield (int) $stream => fgets($stream); + } + } + } + } +} diff --git a/vendor/symfony/var-dumper/Test/VarDumperTestTrait.php b/vendor/symfony/var-dumper/Test/VarDumperTestTrait.php new file mode 100644 index 0000000..a202185 --- /dev/null +++ b/vendor/symfony/var-dumper/Test/VarDumperTestTrait.php @@ -0,0 +1,84 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Test; + +use Symfony\Component\VarDumper\Cloner\VarCloner; +use Symfony\Component\VarDumper\Dumper\CliDumper; + +/** + * @author Nicolas Grekas + */ +trait VarDumperTestTrait +{ + /** + * @internal + */ + private array $varDumperConfig = [ + 'casters' => [], + 'flags' => null, + ]; + + protected function setUpVarDumper(array $casters, int $flags = null): void + { + $this->varDumperConfig['casters'] = $casters; + $this->varDumperConfig['flags'] = $flags; + } + + /** + * @after + */ + protected function tearDownVarDumper(): void + { + $this->varDumperConfig['casters'] = []; + $this->varDumperConfig['flags'] = null; + } + + public function assertDumpEquals(mixed $expected, mixed $data, int $filter = 0, string $message = '') + { + $this->assertSame($this->prepareExpectation($expected, $filter), $this->getDump($data, null, $filter), $message); + } + + public function assertDumpMatchesFormat(mixed $expected, mixed $data, int $filter = 0, string $message = '') + { + $this->assertStringMatchesFormat($this->prepareExpectation($expected, $filter), $this->getDump($data, null, $filter), $message); + } + + protected function getDump(mixed $data, string|int $key = null, int $filter = 0): ?string + { + if (null === $flags = $this->varDumperConfig['flags']) { + $flags = getenv('DUMP_LIGHT_ARRAY') ? CliDumper::DUMP_LIGHT_ARRAY : 0; + $flags |= getenv('DUMP_STRING_LENGTH') ? CliDumper::DUMP_STRING_LENGTH : 0; + $flags |= getenv('DUMP_COMMA_SEPARATOR') ? CliDumper::DUMP_COMMA_SEPARATOR : 0; + } + + $cloner = new VarCloner(); + $cloner->addCasters($this->varDumperConfig['casters']); + $cloner->setMaxItems(-1); + $dumper = new CliDumper(null, null, $flags); + $dumper->setColors(false); + $data = $cloner->cloneVar($data, $filter)->withRefHandles(false); + if (null !== $key && null === $data = $data->seek($key)) { + return null; + } + + return rtrim($dumper->dump($data, true)); + } + + private function prepareExpectation(mixed $expected, int $filter): string + { + if (!\is_string($expected)) { + $expected = $this->getDump($expected, null, $filter); + } + + return rtrim($expected); + } +} diff --git a/vendor/symfony/var-dumper/VarDumper.php b/vendor/symfony/var-dumper/VarDumper.php new file mode 100644 index 0000000..c0d0741 --- /dev/null +++ b/vendor/symfony/var-dumper/VarDumper.php @@ -0,0 +1,112 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper; + +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpKernel\Debug\FileLinkFormatter; +use Symfony\Component\VarDumper\Caster\ReflectionCaster; +use Symfony\Component\VarDumper\Cloner\VarCloner; +use Symfony\Component\VarDumper\Dumper\CliDumper; +use Symfony\Component\VarDumper\Dumper\ContextProvider\CliContextProvider; +use Symfony\Component\VarDumper\Dumper\ContextProvider\RequestContextProvider; +use Symfony\Component\VarDumper\Dumper\ContextProvider\SourceContextProvider; +use Symfony\Component\VarDumper\Dumper\ContextualizedDumper; +use Symfony\Component\VarDumper\Dumper\HtmlDumper; +use Symfony\Component\VarDumper\Dumper\ServerDumper; + +// Load the global dump() function +require_once __DIR__.'/Resources/functions/dump.php'; + +/** + * @author Nicolas Grekas + */ +class VarDumper +{ + /** + * @var callable|null + */ + private static $handler; + + public static function dump(mixed $var) + { + if (null === self::$handler) { + self::register(); + } + + return (self::$handler)($var); + } + + public static function setHandler(callable $callable = null): ?callable + { + $prevHandler = self::$handler; + + // Prevent replacing the handler with expected format as soon as the env var was set: + if (isset($_SERVER['VAR_DUMPER_FORMAT'])) { + return $prevHandler; + } + + self::$handler = $callable; + + return $prevHandler; + } + + private static function register(): void + { + $cloner = new VarCloner(); + $cloner->addCasters(ReflectionCaster::UNSET_CLOSURE_FILE_INFO); + + $format = $_SERVER['VAR_DUMPER_FORMAT'] ?? null; + switch (true) { + case 'html' === $format: + $dumper = new HtmlDumper(); + break; + case 'cli' === $format: + $dumper = new CliDumper(); + break; + case 'server' === $format: + case $format && 'tcp' === parse_url($format, \PHP_URL_SCHEME): + $host = 'server' === $format ? $_SERVER['VAR_DUMPER_SERVER'] ?? '127.0.0.1:9912' : $format; + $dumper = \in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) ? new CliDumper() : new HtmlDumper(); + $dumper = new ServerDumper($host, $dumper, self::getDefaultContextProviders()); + break; + default: + $dumper = \in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) ? new CliDumper() : new HtmlDumper(); + } + + if (!$dumper instanceof ServerDumper) { + $dumper = new ContextualizedDumper($dumper, [new SourceContextProvider()]); + } + + self::$handler = function ($var) use ($cloner, $dumper) { + $dumper->dump($cloner->cloneVar($var)); + }; + } + + private static function getDefaultContextProviders(): array + { + $contextProviders = []; + + if (!\in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && class_exists(Request::class)) { + $requestStack = new RequestStack(); + $requestStack->push(Request::createFromGlobals()); + $contextProviders['request'] = new RequestContextProvider($requestStack); + } + + $fileLinkFormatter = class_exists(FileLinkFormatter::class) ? new FileLinkFormatter(null, $requestStack ?? null) : null; + + return $contextProviders + [ + 'cli' => new CliContextProvider(), + 'source' => new SourceContextProvider(null, null, $fileLinkFormatter), + ]; + } +} diff --git a/vendor/symfony/var-dumper/composer.json b/vendor/symfony/var-dumper/composer.json new file mode 100644 index 0000000..db04f58 --- /dev/null +++ b/vendor/symfony/var-dumper/composer.json @@ -0,0 +1,49 @@ +{ + "name": "symfony/var-dumper", + "type": "library", + "description": "Provides mechanisms for walking through any arbitrary PHP variable", + "keywords": ["dump", "debug"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=8.0.2", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "ext-iconv": "*", + "symfony/console": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/uid": "^5.4|^6.0", + "twig/twig": "^2.13|^3.0.4" + }, + "conflict": { + "phpunit/phpunit": "<5.4.3", + "symfony/console": "<5.4" + }, + "suggest": { + "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", + "ext-intl": "To show region name in time zone dump", + "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" + }, + "autoload": { + "files": [ "Resources/functions/dump.php" ], + "psr-4": { "Symfony\\Component\\VarDumper\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "bin": [ + "Resources/bin/var-dump-server" + ], + "minimum-stability": "dev" +} diff --git a/vendor/topthink/think-trace/.gitignore b/vendor/topthink/think-trace/.gitignore new file mode 100644 index 0000000..485dee6 --- /dev/null +++ b/vendor/topthink/think-trace/.gitignore @@ -0,0 +1 @@ +.idea diff --git a/vendor/topthink/think-trace/LICENSE b/vendor/topthink/think-trace/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/vendor/topthink/think-trace/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/topthink/think-trace/README.md b/vendor/topthink/think-trace/README.md new file mode 100644 index 0000000..6ed63ec --- /dev/null +++ b/vendor/topthink/think-trace/README.md @@ -0,0 +1,15 @@ +# think-trace + +用于ThinkPHP6+的页面Trace扩展,支持Html页面和浏览器控制台两种方式输出。 + +## 安装 + +~~~ +composer require topthink/think-trace +~~~ + +## 配置 + +安装后config目录下会自带trace.php配置文件。 + +type参数用于指定trace类型,支持html和console两种方式。 \ No newline at end of file diff --git a/vendor/topthink/think-trace/composer.json b/vendor/topthink/think-trace/composer.json new file mode 100644 index 0000000..e6cd16b --- /dev/null +++ b/vendor/topthink/think-trace/composer.json @@ -0,0 +1,31 @@ +{ + "name": "topthink/think-trace", + "description": "thinkphp debug trace", + "license": "Apache-2.0", + "authors": [ + { + "name": "liu21st", + "email": "liu21st@gmail.com" + } + ], + "require": { + "php": ">=7.1.0", + "topthink/framework": "^6.0|^8.0" + }, + "autoload": { + "psr-4": { + "think\\trace\\": "src" + } + }, + "extra": { + "think":{ + "services":[ + "think\\trace\\Service" + ], + "config":{ + "trace": "src/config.php" + } + } + }, + "minimum-stability": "dev" +} diff --git a/vendor/topthink/think-trace/src/Console.php b/vendor/topthink/think-trace/src/Console.php new file mode 100644 index 0000000..179d4ea --- /dev/null +++ b/vendor/topthink/think-trace/src/Console.php @@ -0,0 +1,173 @@ + +// +---------------------------------------------------------------------- +declare (strict_types = 1); +namespace think\trace; + +use think\App; +use think\Response; + +/** + * 浏览器调试输出 + */ +class Console +{ + protected $config = [ + 'tabs' => ['base' => '基本', 'file' => '文件', 'info' => '流程', 'notice|error' => '错误', 'sql' => 'SQL', 'debug|log' => '调试'], + ]; + + // 实例化并传入参数 + public function __construct(array $config = []) + { + $this->config = array_merge($this->config, $config); + } + + /** + * 调试输出接口 + * @access public + * @param Response $response Response对象 + * @param array $log 日志信息 + * @return string|bool + */ + public function output(App $app, Response $response, array $log = []) + { + $request = $app->request; + $contentType = $response->getHeader('Content-Type'); + + if ($request->isJson() || $request->isAjax()) { + return false; + } elseif (!empty($contentType) && strpos($contentType, 'html') === false) { + return false; + } elseif ($response->getCode() == 204) { + return false; + } + + // 获取基本信息 + $runtime = number_format(microtime(true) - $app->getBeginTime(), 10, '.', ''); + $reqs = $runtime > 0 ? number_format(1 / $runtime, 2) : '∞'; + $mem = number_format((memory_get_usage() - $app->getBeginMem()) / 1024, 2); + + if ($request->host()) { + $uri = $request->protocol() . ' ' . $request->method() . ' : ' . $request->url(true); + } else { + $uri = 'cmd:' . implode(' ', $_SERVER['argv']); + } + + // 页面Trace信息 + $base = [ + '请求信息' => date('Y-m-d H:i:s', $request->time() ?: time()) . ' ' . $uri, + '运行时间' => number_format((float) $runtime, 6) . 's [ 吞吐率:' . $reqs . 'req/s ] 内存消耗:' . $mem . 'kb 文件加载:' . count(get_included_files()), + '查询信息' => $app->db->getQueryTimes() . ' queries', + '缓存信息' => $app->cache->getReadTimes() . ' reads,' . $app->cache->getWriteTimes() . ' writes', + ]; + + if (isset($app->session)) { + $base['会话信息'] = 'SESSION_ID=' . $app->session->getId(); + } + + $info = $this->getFileInfo(); + + // 页面Trace信息 + $trace = []; + foreach ($this->config['tabs'] as $name => $title) { + $name = strtolower($name); + switch ($name) { + case 'base': // 基本信息 + $trace[$title] = $base; + break; + case 'file': // 文件信息 + $trace[$title] = $info; + break; + default: // 调试信息 + if (strpos($name, '|')) { + // 多组信息 + $names = explode('|', $name); + $result = []; + foreach ($names as $item) { + $result = array_merge($result, $log[$item] ?? []); + } + $trace[$title] = $result; + } else { + $trace[$title] = $log[$name] ?? ''; + } + } + } + + //输出到控制台 + $lines = ''; + foreach ($trace as $type => $msg) { + $lines .= $this->console($type, empty($msg) ? [] : $msg); + } + $js = << +{$lines} + +JS; + return $js; + } + + protected function console(string $type, $msg) + { + $type = strtolower($type); + $trace_tabs = array_values($this->config['tabs']); + $line = []; + $line[] = ($type == $trace_tabs[0] || '调试' == $type || '错误' == $type) + ? "console.group('{$type}');" + : "console.groupCollapsed('{$type}');"; + + foreach ((array) $msg as $key => $m) { + switch ($type) { + case '调试': + $var_type = gettype($m); + if (in_array($var_type, ['array', 'string'])) { + $line[] = "console.log(" . json_encode($m) . ");"; + } else { + $line[] = "console.log(" . json_encode(var_export($m, true)) . ");"; + } + break; + case '错误': + $msg = str_replace("\n", '\n', addslashes(is_scalar($m) ? $m : json_encode($m))); + $style = 'color:#F4006B;font-size:14px;'; + $line[] = "console.error(\"%c{$msg}\", \"{$style}\");"; + break; + case 'sql': + $msg = str_replace("\n", '\n', addslashes($m)); + $style = "color:#009bb4;"; + $line[] = "console.log(\"%c{$msg}\", \"{$style}\");"; + break; + default: + $m = is_string($key) ? $key . ' ' . $m : $key + 1 . ' ' . $m; + $msg = json_encode($m); + $line[] = "console.log({$msg});"; + break; + } + } + $line[] = "console.groupEnd();"; + return implode(PHP_EOL, $line); + } + + /** + * 获取文件加载信息 + * @access protected + * @return integer|array + */ + protected function getFileInfo() + { + $files = get_included_files(); + $info = []; + + foreach ($files as $key => $file) { + $info[] = $file . ' ( ' . number_format(filesize($file) / 1024, 2) . ' KB )'; + } + + return $info; + } +} diff --git a/vendor/topthink/think-trace/src/Html.php b/vendor/topthink/think-trace/src/Html.php new file mode 100644 index 0000000..bcb2f50 --- /dev/null +++ b/vendor/topthink/think-trace/src/Html.php @@ -0,0 +1,126 @@ + +// +---------------------------------------------------------------------- +declare (strict_types = 1); +namespace think\trace; + +use think\App; +use think\Response; + +/** + * 页面Trace调试 + */ +class Html +{ + protected $config = [ + 'file' => '', + 'tabs' => ['base' => '基本', 'file' => '文件', 'info' => '流程', 'notice|error' => '错误', 'sql' => 'SQL', 'debug|log' => '调试'], + ]; + + // 实例化并传入参数 + public function __construct(array $config = []) + { + $this->config = array_merge($this->config, $config); + } + + /** + * 调试输出接口 + * @access public + * @param App $app 应用实例 + * @param Response $response Response对象 + * @param array $log 日志信息 + * @return bool|string + */ + public function output(App $app, Response $response, array $log = []) + { + $request = $app->request; + $contentType = $response->getHeader('Content-Type'); + + if ($request->isJson() || $request->isAjax()) { + return false; + } elseif (!empty($contentType) && strpos($contentType, 'html') === false) { + return false; + } elseif ($response->getCode() == 204) { + return false; + } + + // 获取基本信息 + $runtime = number_format(microtime(true) - $app->getBeginTime(), 10, '.', ''); + $reqs = $runtime > 0 ? number_format(1 / $runtime, 2) : '∞'; + $mem = number_format((memory_get_usage() - $app->getBeginMem()) / 1024, 2); + + // 页面Trace信息 + if ($request->host()) { + $uri = $request->protocol() . ' ' . $request->method() . ' : ' . $request->url(true); + } else { + $uri = 'cmd:' . implode(' ', $_SERVER['argv']); + } + + $base = [ + '请求信息' => date('Y-m-d H:i:s', $request->time() ?: time()) . ' ' . $uri, + '运行时间' => number_format((float) $runtime, 6) . 's [ 吞吐率:' . $reqs . 'req/s ] 内存消耗:' . $mem . 'kb 文件加载:' . count(get_included_files()), + '查询信息' => $app->db->getQueryTimes() . ' queries', + '缓存信息' => $app->cache->getReadTimes() . ' reads,' . $app->cache->getWriteTimes() . ' writes', + ]; + + if (isset($app->session)) { + $base['会话信息'] = 'SESSION_ID=' . $app->session->getId(); + } + + $info = $this->getFileInfo(); + + // 页面Trace信息 + $trace = []; + foreach ($this->config['tabs'] as $name => $title) { + $name = strtolower($name); + switch ($name) { + case 'base': // 基本信息 + $trace[$title] = $base; + break; + case 'file': // 文件信息 + $trace[$title] = $info; + break; + default: // 调试信息 + if (strpos($name, '|')) { + // 多组信息 + $names = explode('|', $name); + $result = []; + foreach ($names as $item) { + $result = array_merge($result, $log[$item] ?? []); + } + $trace[$title] = $result; + } else { + $trace[$title] = $log[$name] ?? ''; + } + } + } + // 调用Trace页面模板 + ob_start(); + include $this->config['file'] ?: __DIR__ . '/tpl/page_trace.tpl'; + return ob_get_clean(); + } + + /** + * 获取文件加载信息 + * @access protected + * @return integer|array + */ + protected function getFileInfo() + { + $files = get_included_files(); + $info = []; + + foreach ($files as $key => $file) { + $info[] = $file . ' ( ' . number_format(filesize($file) / 1024, 2) . ' KB )'; + } + + return $info; + } +} diff --git a/vendor/topthink/think-trace/src/Service.php b/vendor/topthink/think-trace/src/Service.php new file mode 100644 index 0000000..3e78ecc --- /dev/null +++ b/vendor/topthink/think-trace/src/Service.php @@ -0,0 +1,21 @@ + +// +---------------------------------------------------------------------- +namespace think\trace; + +use think\Service as BaseService; + +class Service extends BaseService +{ + public function register() + { + $this->app->middleware->add(TraceDebug::class); + } +} diff --git a/vendor/topthink/think-trace/src/TraceDebug.php b/vendor/topthink/think-trace/src/TraceDebug.php new file mode 100644 index 0000000..5ed9cbf --- /dev/null +++ b/vendor/topthink/think-trace/src/TraceDebug.php @@ -0,0 +1,109 @@ + +// +---------------------------------------------------------------------- +declare (strict_types = 1); + +namespace think\trace; + +use Closure; +use think\App; +use think\Config; +use think\event\LogWrite; +use think\Request; +use think\Response; +use think\response\Redirect; + +/** + * 页面Trace中间件 + */ +class TraceDebug +{ + + /** + * Trace日志 + * @var array + */ + protected $log = []; + + /** + * 配置参数 + * @var array + */ + protected $config = []; + + /** @var App */ + protected $app; + + public function __construct(App $app, Config $config) + { + $this->app = $app; + $this->config = $config->get('trace'); + } + + /** + * 页面Trace调试 + * @access public + * @param Request $request + * @param Closure $next + * @return void + */ + public function handle($request, Closure $next) + { + $debug = $this->app->isDebug(); + + // 注册日志监听 + if ($debug) { + $this->log = []; + $this->app->event->listen(LogWrite::class, function ($event) { + if (empty($this->config['channel']) || $this->config['channel'] == $event->channel) { + $this->log = array_merge_recursive($this->log, $event->log); + } + }); + } + + $response = $next($request); + + // Trace调试注入 + if ($debug) { + $data = $response->getContent(); + $this->traceDebug($response, $data); + $response->content($data); + } + + return $response; + } + + public function traceDebug(Response $response, &$content) + { + $config = $this->config; + $type = $config['type'] ?? 'Html'; + + unset($config['type']); + + $trace = App::factory($type, '\\think\\trace\\', $config); + + if ($response instanceof Redirect) { + //TODO 记录 + } else { + $log = $this->app->log->getLog($config['channel'] ?? ''); + $log = array_merge_recursive($this->log, $log); + $output = $trace->output($this->app, $response, $log); + if (is_string($output)) { + // trace调试信息注入 + $pos = strripos($content, ''); + if (false !== $pos) { + $content = substr($content, 0, $pos) . $output . substr($content, $pos); + } else { + $content = $content . $output; + } + } + } + } +} diff --git a/vendor/topthink/think-trace/src/config.php b/vendor/topthink/think-trace/src/config.php new file mode 100644 index 0000000..fad2392 --- /dev/null +++ b/vendor/topthink/think-trace/src/config.php @@ -0,0 +1,10 @@ + 'Html', + // 读取的日志通道名 + 'channel' => '', +]; diff --git a/vendor/topthink/think-trace/src/tpl/page_trace.tpl b/vendor/topthink/think-trace/src/tpl/page_trace.tpl new file mode 100644 index 0000000..6b1b9a1 --- /dev/null +++ b/vendor/topthink/think-trace/src/tpl/page_trace.tpl @@ -0,0 +1,71 @@ +
    + + +
    +
    +
    + +
    + + diff --git a/商城商品推送到聚水潭分析.md b/商城商品推送到聚水潭分析.md new file mode 100644 index 0000000..6182258 --- /dev/null +++ b/商城商品推送到聚水潭分析.md @@ -0,0 +1,465 @@ +# 商城商品推送到聚水潭分析 + +## 一、答案 + +### ❌ 当前状态:**推送功能已禁用** + +在 [CreateSuccess.php#L80-99](file:///home/jone/workspace/CRMEB_PRO/app/listener/product/CreateSuccess.php#L80-99) 中,推送到ERP的代码**被注释掉了**: + +```php +//ERP功能开启 +// if (sys_config('erp_open') && $data['product_type'] == 0) { +// //上传商品至ERP平台 +// ProductSyncErp::dispatchDo('upProductToErp', [$id]); +// ... +// } +``` + +--- + +## 二、推送功能架构 + +### 2.1 推送流程图 + +``` +商城商品创建成功 + ↓ +触发 CreateSuccess 事件监听器 + ↓ +检查 ERP 功能是否开启 (erp_open = 1) + ↓ + ├─ 未开启 → 不推送 + │ + └─ 开启 → ProductSyncErp::dispatchDo('upProductToErp', [$id]) + ↓ + ┌──────────────┐ + │ 商品数据转换 │ + │ │ + │ 商品主数据 │ + │ SPU编码 │ + │ 商品名称 │ + │ SKU规格 │ + │ 价格信息 │ + └──────┬───────┘ + ↓ + 调用聚水潭API + /open/jushuitan/itemsku/upload + ↓ + 推送商品到聚水潭平台 +``` + +### 2.2 核心文件 + +| 文件 | 职责 | +|------|------| +| [CreateSuccess.php](file:///home/jone/workspace/CRMEB_PRO/app/listener/product/CreateSuccess.php#L80-99) | 商品创建事件监听器 | +| [ProductSyncErp.php](file:///home/jone/workspace/CRMEB_PRO/app/jobs/product/ProductSyncErp.php#L31-61) | 推送任务(upProductToErp方法)| +| [Product.php](file:///home/jone/workspace/CRMEB_PRO/crmeb/services/erp/storage/jushuitan/Product.php#L36-54) | 聚水潭API调用封装 | + +--- + +## 三、推送逻辑详解 + +### 3.1 商品创建监听器 + +**文件**: [CreateSuccess.php#L79-99](file:///home/jone/workspace/CRMEB_PRO/app/listener/product/CreateSuccess.php#L79-99) + +```php +//ERP功能开启 +if (sys_config('erp_open') && $data['product_type'] == 0) { + // 1. 上传商品至ERP平台 + ProductSyncErp::dispatchDo('upProductToErp', [$id]); + + // 2. 上传商品至ERP默认门店 + ProductSyncErp::dispatchDo('upBranchProductToErp', [ + $id, + ['erp_shop_id' => sys_config('jst_default_shopid')] + ]); + + // 3. 给所有绑定了ERP店铺的门店增加该商品 + $systemStoreServices = app()->make(SystemStoreServices::class); + $erpStoreList = $systemStoreServices->getStoreList([ + ['erp_shop_id', '>', 0] + ]); + foreach ($erpStoreList['list'] as $item) { + if ($item['erp_shop_id'] < 1) continue; + ProductSyncErp::dispatchDo('upBranchProductToErp', [$id, $item]); + } + + // 4. 如果是新商品,同步库存 + if ($is_new) { + ProductSyncErp::dispatchDo('stockFromErp', [[$id]]); + } +} +``` + +**触发条件**: +- ✅ `erp_open` 配置已开启 +- ✅ 商品类型为 `product_type == 0`(普通商品,非虚拟商品等) +- ✅ 商品创建成功事件被触发 + +### 3.2 数据转换逻辑 + +**文件**: [ProductSyncErp.php#L31-61](file:///home/jone/workspace/CRMEB_PRO/app/jobs/product/ProductSyncErp.php#L31-61) + +```php +public function upProductToErp($id) +{ + try { + // 1. 获取商品信息 + $productServices = app()->make(StoreProductServices::class); + $productInfo = $productServices->getInfo($id)['productInfo']; + + // 2. 准备数据 + $data = []; + $attrs = $productInfo['attrs'] ?? [$productInfo['attr']]; + + foreach ($attrs as $item) { + // 处理图片URL + if ($item['pic'] && strstr($item['pic'], 'http') === false) { + $siteUrl = sys_config('site_url'); + $item['pic'] = $siteUrl . $item['pic']; + } + + // 3. 构建推送数据 + $data[] = [ + 'i_id' => $productInfo['code'], // SPU编码 + 'sku_id' => $item['code'], // SKU编码 + 'name' => $productInfo['store_name'], // 商品名称 + 'properties_value' => str_replace(',', ' ', $item['values']), // 规格属性 + 's_price' => $item['price'], // 售价 + 'pic' => $item['pic'], // 图片URL + 'c_price' => $item['cost'], // 成本价 + 'market_price' => $item['ot_price'], // 划线价 + ]; + } + + // 4. 调用聚水潭API + (new erpServices())->serviceDriver('product')->updateProduct($data); + + } catch (\Exception $e) { + response_log_write([ + 'message' => '上传商品到ERP失败, 原因: ' . $e->getMessage(), + 'file' => $e->getFile(), + 'line' => $e->getLine() + ]); + } +} +``` + +### 3.3 API调用 + +**文件**: [Product.php#L36-54](file:///home/jone/workspace/CRMEB_PRO/crmeb/services/erp/storage/jushuitan/Product.php#L36-54) + +```php +public function updateProduct($data) +{ + $url = $this->accessToken->getApiUrl("/open/jushuitan/itemsku/upload"); + + // 业务参数 + $biz['items'] = $data; + + // 拼装请求参数 + $params = $this->getParams($biz); + + // 请求平台接口 + $request = $this->postRequest($url, $params); + + if ($request['code'] == 0) { + return true; + } else { + return false; + } +} +``` + +**调用API**: `POST /open/jushuitan/itemsku/upload` + +--- + +## 四、数据映射关系 + +### 4.1 推送数据格式 + +```json +{ + "items": [ + { + "i_id": "4651127369", // SPU编码(来自CRMEB的code字段) + "sku_id": "1N55001102", // SKU编码(来自CRMEB的attrs.code字段) + "name": "贝肽斯夏季儿童防晒帽", // 商品名称 + "properties_value": "卡其布黄;M码:头围50-54cm", // 规格属性 + "s_price": 35.9, // 售价 + "pic": "https://img.yzcdn.cn/...", // 图片URL + "c_price": 0, // 成本价 + "market_price": 0 // 划线价 + } + ] +} +``` + +### 4.2 字段对应关系 + +| 聚水潭字段 | CRMEB字段 | 说明 | +|-----------|-----------|------| +| `i_id` | `productInfo.code` | SPU编码(商品唯一标识)| +| `sku_id` | `attrs[].code` | SKU编码 | +| `name` | `productInfo.store_name` | 商品名称 | +| `properties_value` | `attrs[].values` | 规格属性(逗号替换为空格)| +| `s_price` | `attrs[].price` | 售价 | +| `pic` | `attrs[].pic` | SKU图片 | +| `c_price` | `attrs[].cost` | 成本价 | +| `market_price` | `attrs[].ot_price` | 划线价 | + +--- + +## 五、推送触发场景 + +### 5.1 自动推送(已禁用) + +**触发时机**: 商品创建成功 + +```php +// 在 CreateSuccess.php 中被注释 +if (sys_config('erp_open') && $data['product_type'] == 0) { + ProductSyncErp::dispatchDo('upProductToErp', [$id]); +} +``` + +### 5.2 手动推送 + +**触发方式**: 后台手动操作 + +可以通过后台页面触发,调用接口: +```bash +POST /adminapi/product/sync_jst_product +{ + "spu_str": "商品SPU编码" +} +``` + +### 5.3 门店商品推送 + +除了主商品库,还会推送到绑定了ERP店铺的门店: + +```php +// 上传到ERP默认门店 +ProductSyncErp::dispatchDo('upBranchProductToErp', [ + $id, + ['erp_shop_id' => sys_config('jst_default_shopid')] +]); + +// 上传到所有绑定ERP店铺的门店 +foreach ($erpStoreList['list'] as $item) { + ProductSyncErp::dispatchDo('upBranchProductToErp', [$id, $item]); +} +``` + +--- + +## 六、当前状态分析 + +### 6.1 为什么推送功能被禁用? + +查看代码注释,ERP推送功能是被有意注释掉的,可能原因: + +1. **测试阶段** - 功能尚未完善,避免生产环境误操作 +2. **数据同步策略** - 可能改为只从聚水潭拉取,不推送到聚水潭 +3. **业务调整** - 业务方向改变,暂不需要此功能 +4. **数据一致性** - 避免双向同步导致的数据冲突 + +### 6.2 如何启用推送功能? + +**步骤1**: 取消注释推送代码 + +编辑 [CreateSuccess.php#L80-99](file:///home/jone/workspace/CRMEB_PRO/app/listener/product/CreateSuccess.php#L80-99),取消注释: + +```php +//ERP功能开启 +if (sys_config('erp_open') && $data['product_type'] == 0) { + //上传商品至ERP平台 + ProductSyncErp::dispatchDo('upProductToErp', [$id]); + + //上传商品至ERP默认门店 + ProductSyncErp::dispatchDo('upBranchProductToErp', [ + $id, + ['erp_shop_id' => sys_config('jst_default_shopid')] + ]); + + //给所有绑定了ERP店铺的门店增加该商品 + $systemStoreServices = app()->make(SystemStoreServices::class); + $erpStoreList = $systemStoreServices->getStoreList([['erp_shop_id', '>', 0]]); + foreach ($erpStoreList['list'] as $item) { + if ($item['erp_shop_id'] < 1) continue; + ProductSyncErp::dispatchDo('upBranchProductToErp', [$id, $item]); + } + + if ($is_new) { + ProductSyncErp::dispatchDo('stockFromErp', [[$id]]); + } +} +``` + +**步骤2**: 确保ERP配置正确 + +在后台配置: +- ✅ 开启ERP功能 +- ✅ 配置聚水潭AppKey和Secret +- ✅ 配置默认门店ID + +**步骤3**: 测试推送功能 + +```bash +# 创建测试商品 +POST /adminapi/product/save +{ + "store_name": "测试商品", + "price": 99.00 +} + +# 检查日志 +tail -f runtime/log/xxx.log | grep "upProductToErp" +``` + +--- + +## 七、推送 vs 拉取 + +### 7.1 对比表 + +| 特性 | 拉取(已有)| 推送(已禁用)| +|------|-----------|-------------| +| **触发方式** | 手动/定时任务 | 商品创建时自动 | +| **数据流向** | 聚水潭 → CRMEB | CRMEB → 聚水潭 | +| **代码状态** | ✅ 正常 | ❌ 被注释 | +| **使用场景** | 从ERP同步商品 | 上传新品到ERP | +| **功能完整性** | ✅ 完善 | ⚠️ 需启用 | + +### 7.2 推荐策略 + +#### 方案A: 仅拉取(当前) + +**适用场景**: +- 聚水潭是主数据源 +- CRMEB作为销售前端 +- 商品信息在聚水潭维护 + +**优点**: +- ✅ 数据单一来源,避免冲突 +- ✅ 商品信息统一管理 +- ✅ 降低系统复杂度 + +#### 方案B: 仅推送 + +**适用场景**: +- CRMEB是主数据源 +- 聚水潭仅用于库存/订单管理 +- 商品信息在CRMEB维护 + +**优点**: +- ✅ 快速响应商品变化 +- ✅ 统一商品发布渠道 +- ✅ 便于营销活动管理 + +#### 方案C: 双向同步 + +**适用场景**: +- 两边都需要管理商品 +- 有专业团队分别维护 +- 需要数据一致性保障机制 + +**挑战**: +- ⚠️ 数据冲突解决策略 +- ⚠️ 同步延迟处理 +- ⚠️ 异常情况处理 + +--- + +## 八、启用推送的注意事项 + +### 8.1 数据一致性 + +```php +// 推送时,确保商品编码唯一 +$productInfo['code'] 必须在聚水潭中是唯一的 + +// 如果推送失败,需要记录日志并重试 +if (!(new erpServices())->serviceDriver('product')->updateProduct($data)) { + // 记录失败日志 + Log::error('商品推送失败', ['product_id' => $id]); + // 可以加入重试队列 +} +``` + +### 8.2 性能考虑 + +```php +// 当前是异步队列推送,无需担心性能 +ProductSyncErp::dispatchDo('upProductToErp', [$id]); + +// 但需要注意: +// 1. 批量创建商品时,可能产生大量队列任务 +// 2. 建议限制推送频率 +// 3. 添加推送限流机制 +``` + +### 8.3 错误处理 + +```php +try { + (new erpServices())->serviceDriver('product')->updateProduct($data); +} catch (\Exception $e) { + // 1. 记录错误日志 + Log::error('推送商品到聚水潭失败', [ + 'product_id' => $id, + 'error' => $e->getMessage() + ]); + + // 2. 可以加入失败重试队列 + ProductSyncErp::dispatchDo('upProductToErp', [$id]); + + // 3. 通知管理员 + // sendNotify('商品推送失败,需要人工处理'); +} +``` + +--- + +## 九、总结 + +### ❌ 当前状态 + +**商城创建的商品推送到聚水潭的功能已被禁用** + +### ✅ 推送功能已实现 + +代码逻辑完整,包括: +- ✅ 商品数据转换 +- ✅ SKU规格处理 +- ✅ 聚水潭API调用 +- ✅ 门店商品推送 +- ✅ 库存同步 + +### 🔧 如何启用 + +1. 取消 [CreateSuccess.php](file:///home/jone/workspace/CRMEB_PRO/app/listener/product/CreateSuccess.php#L80-99) 中的注释 +2. 配置ERP功能 +3. 测试推送流程 + +### 💡 建议 + +根据业务需求选择合适的数据同步策略: +- **推荐仅拉取**:单数据源,避免冲突 +- **慎用双向同步**:需要完善冲突处理机制 + +--- + +## 十、相关文件清单 + +| 文件路径 | 说明 | 状态 | +|---------|------|------| +| [CreateSuccess.php](file:///home/jone/workspace/CRMEB_PRO/app/listener/product/CreateSuccess.php) | 商品创建监听器 | ⚠️ 推送代码被注释 | +| [ProductSyncErp.php](file:///home/jone/workspace/CRMEB_PRO/app/jobs/product/ProductSyncErp.php) | 推送任务 | ✅ 已实现 | +| [Product.php](file:///home/jone/workspace/CRMEB_PRO/crmeb/services/erp/storage/jushuitan/Product.php) | API调用 | ✅ 已实现 | +| [Jushuitan.php](file:///home/jone/workspace/CRMEB_PRO/crmeb/services/erp/storage/Jushuitan.php) | 聚水潭SDK | ✅ 已实现 | +| [HaichaoJstServices.php](file:///home/jone/workspace/CRMEB_PRO/app/haichao/HaichaoJstServices.php) | 业务封装 | ✅ 已实现 | diff --git a/聚水潭商品拉取测试报告.md b/聚水潭商品拉取测试报告.md new file mode 100644 index 0000000..8672d6d --- /dev/null +++ b/聚水潭商品拉取测试报告.md @@ -0,0 +1,159 @@ +# 聚水潭商品拉取接口测试报告 + +## 测试时间 +2026-04-02 + +## 测试结果 + +### ✅ 接口可正常调用 +通过测试脚本 `test_haichao.php` 验证,聚水潭按SPU拉取商品接口 **可以正常调用**。 + +### ❌ Access Token 问题 +测试过程中遇到错误: +``` +验证失败!无效的access_token或access_token已过期 +``` + +这说明接口调用链路是通的,但需要在后台完成聚水潭授权配置。 + +--- + +## 测试脚本说明 + +我已创建了测试脚本,您可以用于验证接口功能: + +### 使用方法 + +```bash +cd /home/jone/workspace/CRMEB_PRO + +# 测试1: 不带参数,自动获取示例数据 +php test_haichao.php + +# 测试2: 带SPU参数,查询指定商品 +php test_haichao.php 你的SPU编码 +``` + +### 脚本文件 +- `test_haichao.php` - 主测试脚本 + +--- + +## 聚水潭配置检查清单 + +在测试接口之前,请确保完成以下配置: + +### 1️⃣ 开启ERP功能 +后台路径:`系统设置 → ERP配置 → 开启ERP功能` + +### 2️⃣ 配置聚水潭应用密钥 +需要配置以下参数: +- `jst_appkey` - 聚水潭应用Key +- `jst_appsecret` - 聚水潭应用Secret +- `jst_login_account` - 聚水潭登录账号 +- `jst_login_password` - 聚水潭登录密码 + +### 3️⃣ 完成OAuth授权 +授权地址:`https://openweb.jushuitan.com/auth` + +授权后系统会自动获取并缓存 Access Token。 + +--- + +## 接口调用说明 + +### 按SPU拉取商品 + +**方法1: HaichaoJstServices** +```php +$haichaoJst = \app\haichao\HaichaoJstServices::getServices(); +$result = $haichaoJst->getProductListKuan($spu); +``` + +**API**: `/open/mall/item/query` +- 参数: `i_ids` - SPU ID数组 +- 返回: 商品详情包含SKU列表 + +### 其他可用方法 + +| 方法 | 说明 | API | +|------|------|-----| +| `getProductListShop($key)` | 按店铺拉取 | `/open/skumap/query` | +| `getProductListName($key)` | 按名称查询 | `/open/sku/query` | +| `getProductListKuan($key)` | 按SPU拉取 | `/open/mall/item/query` | +| `getProductListStand()` | 拉取标准商品 | `/open/mall/item/query` | +| `getProductList()` | 全量拉取(分页) | `/open/mall/item/query` | + +--- + +## 返回数据结构 + +成功的响应示例: + +```json +{ + "code": 0, + "msg": "success", + "datas": [ + { + "i_id": "SPU001", + "name": "商品名称", + "s_price": 99.00, + "market_price": 199.00, + "c_price": 50.00, + "pic": "http://xxx.jpg", + "skus": [ + { + "sku_id": "SKU001", + "properties_value": "红色/L", + "sale_price": 99.00, + "market_price": 199.00, + "cost_price": 50.00 + } + ] + } + ] +} +``` + +--- + +## 故障排查 + +### 问题1: Access Token过期 +**错误**: `无效的access_token或access_token已过期` + +**解决方案**: +1. 清除缓存的Token +2. 重新进行OAuth授权 +3. 检查系统时间是否正确 + +### 问题2: 配置未保存 +**错误**: `JST config missing` + +**解决方案**: +1. 检查后台ERP配置是否保存 +2. 确认配置参数不为空 + +### 问题3: 网络问题 +**错误**: `cURL error 7` 或连接超时 + +**解决方案**: +1. 检查服务器网络连接 +2. 确认防火墙允许访问 `openapi.jushuitan.com` + +--- + +## 下一步操作 + +1. 完成聚水潭授权配置 +2. 重新运行测试脚本验证 +3. 如需指定SPU商品,请提供有效的SPU编码 + +--- + +## 相关文件 + +- 测试脚本: `/home/jone/workspace/CRMEB_PRO/test_haichao.php` +- 核心服务: `/home/jone/workspace/CRMEB_PRO/app/haichao/HaichaoJstServices.php` +- 商品同步: `/home/jone/workspace/CRMEB_PRO/app/haichao/sync/JstProductSync.php` diff --git a/聚水潭测试指南.md b/聚水潭测试指南.md new file mode 100644 index 0000000..b9c88db --- /dev/null +++ b/聚水潭测试指南.md @@ -0,0 +1,138 @@ +# 聚水潭商品拉取测试总结 + +## ✅ 测试结果 + +### 1. Token问题已解决 +- **原因**: HaichaoBridge需要`runtime/jstdata/jst_token_data.json`文件 +- **解决方案**: 运行`php init_jst_token.php` +- **状态**: ✅ 已解决 + +### 2. API接口调用成功 +- **Token验证**: ✅ 通过 +- **API连接**: ✅ 成功 +- **数据拉取**: ⚠️ 返回空(见下文说明) + +### 3. 数据为空的原因 + +`getProductListStand()`方法使用时间过滤: +```php +// 只查询10天前到3天前修改过的商品 +$time = 10; +'modified_begin' => 10天前 +'modified_end' => 3天前 +``` + +**可能原因**: +1. 聚水潭系统中没有商品在指定时间范围内修改过 +2. 商品最近没有更新 +3. 时间范围需要调整 + +--- + +## 📋 可用测试脚本 + +### 1. init_jst_token.php +初始化Token文件(已运行) + +```bash +php init_jst_token.php +``` + +### 2. test_haichao.php +测试HaichaoJstServices +```bash +# 获取示例数据 +php test_haichao.php + +# 查询指定SPU +php test_haichao.php 4651127369 +``` + +### 3. test_haichao_all.php +全量拉取测试 +```bash +php test_haichao_all.php +``` + +### 4. test_jst_final_demo.php +完整展示脚本 +```bash +php test_jst_final_demo.php +``` + +--- + +## 🔧 建议操作 + +### 如果需要拉取所有商品 + +可以修改HaichaoJstServices.php中的时间范围: + +**文件**: `/home/jone/workspace/CRMEB_PRO/app/haichao/HaichaoJstServices.php` + +**位置**: 第655-667行 + +```php +public function getProductListStand(): array +{ + $time = 10; // 修改为更大的值,如 365(一年) + $data = $this->post('open/mall/item/query', [ + 'modified_begin' => date('Y-m-d H:i', (time() - (86400 * $time))), + 'modified_end' => date('Y-m-d H:i', time() - (86400 * $time) + 7 * 86400), + 'i_ids' => [], + 'page_index' => 1, + 'page_size' => 50, + 'date_field' => '', + ])['data']; + return $data; +} +``` + +### 或者直接查询指定SPU + +```bash +php test_haichao.php 4651127369 +php test_haichao.php 5606676507 +php test_haichao.php 5633479406 +``` + +--- + +## 📊 数据结构说明 + +成功返回的JSON格式: +```json +{ + "i_id": "4651127369", + "name": "贝肽斯夏季儿童防晒帽...", + "s_price": "35.9", + "market_price": null, + "c_price": null, + "pic": "https://img.yzcdn.cn/...", + "skus": [ + { + "sku_id": "1N55001102", + "properties_value": "卡其布黄;M码:头围50-54cm", + "sale_price": "35.9", + "market_price": null, + "cost_price": null + } + ] +} +``` + +--- + +## ⚠️ 注意事项 + +1. **Token有效期**: 30天(2592000秒) +2. **无RefreshToken**: 无法自动刷新,需要手动更新 +3. **API权限**: 部分接口可能需要额外申请权限 + +--- + +## 📝 下一步建议 + +1. 如果有具体要测试的SPU,请提供 +2. 如果需要拉取全部商品,可以修改时间范围 +3. 建议配置RefreshToken以支持自动续期